Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T3D 1.2 - Particle Emitter ejectionPeriodMS has 1000 limit #110

Closed
DavidWyand-GG opened this issue Nov 5, 2012 · 2 comments
Closed

T3D 1.2 - Particle Emitter ejectionPeriodMS has 1000 limit #110

DavidWyand-GG opened this issue Nov 5, 2012 · 2 comments
Assignees

Comments

@DavidWyand-GG
Copy link
Member

Originally from THREED-3122

Reference: http://www.garagegames.com/community/forums/viewthread/128933

This is a problem in 1.1 and 1.2 so probably all T3D releases.

This is partially a bug, and partially just a current limitation.

The ejectionPeriodMS for ParticleEmitters is sent over the network with

stream->writeInt(ejectionPeriodMS, 10);

which means any integer over 1023 is sent incorrectly to the client.

Also, in 1.1 (I haven't tried this part in 1.2 yet) if the particleEmitter has an ejectionPeriodMS of 1024 (or probably 2048, 4096 etc), this sends 0 over the network and there is a divide by 0 error and the program terminates on this line:

partListInitSize = maxPartLife / (ejectionPeriodMS - periodVarianceMS);

The number of bits should be increased for larger ejection periods and the amount should be clamped at its max and there should be a check for divide by 0;

@ghost ghost assigned DavidWyand-GG Nov 5, 2012
DavidWyand-GG added a commit that referenced this issue Nov 5, 2012
…ection

Fix for Issue #110 for Particle Emitter Ejection
@DavidWyand-GG
Copy link
Member Author

Fix merged into development branch.

@DavidWyand-GG
Copy link
Member Author

Original notes from Chris:

FIX - Add type validators to prevent out of range ParticleEmitter values being set in script (THREED-3122).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant