]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commit
StatusEffects_gettime now returns current time if end time is < current time since... terencehill/status_effect_fix_test
authorterencehill <piuntn@gmail.com>
Wed, 9 Aug 2023 12:25:52 +0000 (14:25 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 9 Aug 2023 12:25:52 +0000 (14:25 +0200)
commitee1f689b397abca64c2013c8ae70f5ca44469aef
tree536e7ae22dd2b6d3c36fb4b57152befe06c5d28a
parent9057d2e3e3b4ecddd49eb106f2fd4edb45224c1f
StatusEffects_gettime now returns current time if end time is < current time since in the last frame, right before effect removal, even thought end time has passed the effect is still active.

It prevents wrong usage of the returned value, e.g. in Fire_AddDamage mintime can be set to a negative value and used to apply a negative damage to the player
qcsrc/common/mutators/mutator/status_effects/status_effects.qc
qcsrc/server/client.qc