From: Mario Date: Mon, 2 Nov 2015 01:46:36 +0000 (+1000) Subject: Add a hack to give and take buff time when entering/leaving vehicle X-Git-Tag: xonotic-v0.8.2~1742 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7ae70afe662b38a0dd326072deab7b657c6d97dc;p=xonotic%2Fxonotic-data.pk3dir.git Add a hack to give and take buff time when entering/leaving vehicle --- diff --git a/qcsrc/server/mutators/mutator/mutator_buffs.qc b/qcsrc/server/mutators/mutator/mutator_buffs.qc index 4f0758fa3..6aacfedb4 100644 --- a/qcsrc/server/mutators/mutator/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator/mutator_buffs.qc @@ -939,6 +939,8 @@ MUTATOR_HOOKFUNCTION(buffs, VehicleEnter) { vh_vehicle.buffs = vh_player.buffs; vh_player.buffs = 0; + vh_vehicle.buff_time = vh_player.buff_time - time; + vh_player.buff_time = 0; return false; } @@ -946,6 +948,8 @@ MUTATOR_HOOKFUNCTION(buffs, VehicleExit) { vh_player.buffs = vh_vehicle.buffs; vh_vehicle.buffs = 0; + vh_player.buff_time = time + vh_vehicle.buff_time; + vh_vehicle.buff_time = 0; return false; }