From: Mario Date: Wed, 25 Nov 2015 12:30:42 +0000 (+1000) Subject: Potentially fix an issue with buff times and vehicle entering/exiting X-Git-Tag: xonotic-v0.8.2~1620 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d71068b6e326bebc95f715b7861132c85fbaa73d;p=xonotic%2Fxonotic-data.pk3dir.git Potentially fix an issue with buff times and vehicle entering/exiting --- diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index 9eb113a96..f4f6df73a 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -985,7 +985,7 @@ MUTATOR_HOOKFUNCTION(buffs, VehicleEnter) { vh_vehicle.buffs = vh_player.buffs; vh_player.buffs = 0; - vh_vehicle.buff_time = vh_player.buff_time - time; + vh_vehicle.buff_time = max(0, time - vh_player.buff_time); vh_player.buff_time = 0; return false; }