Skip to content

New cvar for electro balls to get their lifetime from after sticking

Dr. Jaska requested to merge drjaska/electrostickylifetime into master

Added a new cvar g_balance_electro_secondary_stick_newlifetime from which electro balls can get a new lifetime from after landing on something when stick is enabled.

This enables mainly consistent lifetime on landing so balls can be set to have high lifetime when they are midair but low lifetime when they finally stick on something, including instant exploding. It's also possible to set balls to explode nearly instant midair but last for a longtime after sticking making alt fire basically a mineplanter which player can't place mines far away with.

Default cvar value is set to -1, hopefully clear enough that by default the behavior is off due to new negative lifetime value AND off due to being behind stick. 0 could be considered a potential candidate for the offswitch value but personally I see it more intuitive for 0 to be 0 seconds of lifetime, therefore an instant detonation.

If new lifetime is set to 0 then creating a new entity is avoided and the old entity is just exploded instantly dealing damage to save resources.

Edited by Dr. Jaska

Merge request reports