]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Potentially fix an issue with buff times and vehicle entering/exiting
authorMario <mario@smbclan.net>
Wed, 25 Nov 2015 12:30:42 +0000 (22:30 +1000)
committerMario <mario@smbclan.net>
Wed, 25 Nov 2015 12:30:42 +0000 (22:30 +1000)
qcsrc/common/mutators/mutator/buffs/buffs.qc

index 9eb113a96ff86355b809b690b43ceaff159cc79e..f4f6df73aa806ee3c3a0b372118d5ae0e0405115 100644 (file)
@@ -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;
 }