]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commit
Don't allow StatusEffects_gettime to return a time in the past
authorterencehill <piuntn@gmail.com>
Sun, 1 Sep 2024 12:12:09 +0000 (14:12 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 1 Sep 2024 12:21:00 +0000 (14:21 +0200)
commit4a9c2668abd888f0524b63a3272b4c91ea1ff436
treef3c4b720b75adb64510edb464b4495ae3ed5780c
parentc8beae0cb6c02aebf419d1779d9539d3a0616172
Don't allow StatusEffects_gettime to return a time in the past

By not doing so the effect would be still active in the last frame 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
Removed now redundant max operations at StatusEffects_gettime call sites
.gitlab-ci.yml
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/status_effects/status_effects.qc
qcsrc/server/client.qc
qcsrc/server/items/items.qc