Extend particle lifetime to beyond 32768.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Extend particle lifetime to beyond 32768.

Re: Extend particle lifetime to beyond 32768.

by Graf Zahl » Thu Dec 07, 2017 6:29 am

I guess that happens if you work with a 'space optimized' data structure and don't subconsciously want to whack it. :mrgreen:

Re: Extend particle lifetime to beyond 32768.

by drfrag » Thu Dec 07, 2017 6:18 am

Actually you changed it to short in a commit from 01/07/17 (widened ttl variable in particle_t to short to allow longer living particles than 6 seconds), before it was a BYTE. :) I've left it as pending for now BTW.

Re: Extend particle lifetime to beyond 32768.

by Graf Zahl » Thu Dec 07, 2017 1:58 am

I wonder how many other such 'shorts' still exist in ZDoom. This was a very unfortunate consequence of typical 90's space saving methods.

Re: Extend particle lifetime to beyond 32768.

by Rachael » Thu Dec 07, 2017 1:31 am

How can I say no to a man in a santa hat with a candy cane? :P

Re: Extend particle lifetime to beyond 32768.

by Accensus » Thu Dec 07, 2017 1:09 am

Thank you for this.

Re: Extend particle lifetime to beyond 32768.

by Rachael » Thu Dec 07, 2017 12:51 am

Yep. Both my suspicion based on Lud's accurate count, as well as _mental_ were right.

In particle_t, ttl is a short - so that's why particle lifespans were .... "short". I'm hoping it's just as simple as changing it to an int32_t - but I need something to test with to confirm this. (Nothing broke when I changed it, so I figured it safe to commit to master)

Re: Extend particle lifetime to beyond 32768.

by _mental_ » Thu Dec 07, 2017 12:13 am

Maximum number of simultaneously active particles is controlled by r_maxparticles CVAR.
But this limit has nothing to do with their time to live. It’s stored in short variable indeed.

Re: Extend particle lifetime to beyond 32768.

by Rachael » Wed Dec 06, 2017 9:28 pm

I don't know, Major Cooke, I'd have to look into that, but I will say this - if that were the case I doubt he'd come to such an exact number.

Re: Extend particle lifetime to beyond 32768.

by Major Cooke » Wed Dec 06, 2017 9:27 pm

Come to think of it, aren't those particles removed similarly to the corpse queue when the threshold is reached?

Extend particle lifetime to beyond 32768.

by Accensus » Wed Dec 06, 2017 8:12 pm

Currently the particle lifetime will overflow if you put in any number larger than 32768. The reason why I'm requesting this is that I'm using some long-lived particles for effects and 15 minutes is definitely not enough. A workaround would be to spam 1-tic-lifetime particles every tic, which I find quite a bad idea when there's 50 actors that do it.

Top