]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Sync buff_time to spectators and don't run buff player logic on them
authorMario <mario@smbclan.net>
Sun, 12 Feb 2017 23:55:03 +0000 (09:55 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Feb 2017 23:55:03 +0000 (09:55 +1000)
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc

index 4643ed201676a27ef09bc39f23fc713c57fd40b8..73fe2209342694887ad9dd97444435235c9524b5 100644 (file)
@@ -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)