]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commit
StatusEffects_gettime now returns current time if end time is < current time because... terencehill/status_effect_fix 1228/head
authorterencehill <piuntn@gmail.com>
Sun, 24 Mar 2024 22:09:46 +0000 (23:09 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 24 Mar 2024 22:09:46 +0000 (23:09 +0100)
commit8b09e90b53b0e33c60fc44ed08128559ad4c78fb
tree4a0e76d494207f2ea751ef8f0e052ef106312668
parentab64afeaea87240618e2d1c177cec2e05022bd9e
StatusEffects_gettime now returns current time if end time is < current time because in the last frame, right before effect removal, the effect is still active even if end time has passed.

It prevents wrong usage of the returned value, for example in Fire_AddDamage where 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