From 7ae70afe662b38a0dd326072deab7b657c6d97dc Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 2 Nov 2015 11:46:36 +1000 Subject: [PATCH] Add a hack to give and take buff time when entering/leaving vehicle --- qcsrc/server/mutators/mutator/mutator_buffs.qc | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.2