From: Mario Date: Sun, 12 Feb 2017 23:55:03 +0000 (+1000) Subject: Sync buff_time to spectators and don't run buff player logic on them X-Git-Tag: xonotic-v0.8.2~219 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bdda83880206e7a4295b2ea6767a48a14ee28bf7;p=xonotic%2Fxonotic-data.pk3dir.git Sync buff_time to spectators and don't run buff player logic on them --- diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index 4643ed201..73fe22093 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -795,7 +795,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink) { entity player = M_ARGV(0, entity); - if(game_stopped || IS_DEAD(player) || frametime) return; + if(game_stopped || IS_DEAD(player) || frametime || !IS_PLAYER(player)) return; if(player.buffs & BUFF_FLIGHT.m_itemid) { @@ -997,6 +997,7 @@ MUTATOR_HOOKFUNCTION(buffs, SpectateCopy) entity client = M_ARGV(1, entity); client.buffs = spectatee.buffs; + client.buff_time = spectatee.buff_time; } MUTATOR_HOOKFUNCTION(buffs, VehicleEnter)