From 60415ba6220698fa71b192e76104d1572bcf5abc Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 3 Mar 2012 21:17:43 +0200 Subject: [PATCH] Make the macro earthquake effect work for spectators too --- data/qcsrc/server/cl_client.qc | 3 +++ data/qcsrc/server/sv_main.qc | 4 ++-- docs/TODO.txt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 3b4afbc5..6f4a06ae 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -2141,6 +2141,9 @@ void SpectateCopy(entity spectatee) { setsize(self, spectatee.mins, spectatee.maxs); SetZoomState(spectatee.zoomstate); + // copy necessary flags + if(spectatee.flags & FL_ONGROUND) self.flags |= FL_ONGROUND; else self.flags &~= FL_ONGROUND; + anticheat_spectatecopy(spectatee); } diff --git a/data/qcsrc/server/sv_main.qc b/data/qcsrc/server/sv_main.qc index fd754514..451a0b87 100644 --- a/data/qcsrc/server/sv_main.qc +++ b/data/qcsrc/server/sv_main.qc @@ -121,9 +121,9 @@ void CreatureFrame (void) entity head; for(head = findradius(self.origin, cvar("g_healthsize_quake_step_radius")); head; head = head.chain) { - if not(head.classname == "player") + if not(head.classname == "player" || head.classname == "spectator") continue; - if(head == self) + if(head == self || head.spectatee_status == num_for_edict(self)) continue; // not for self if not(head.flags & FL_ONGROUND) continue; // we only feel the ground shaking if we are sitting on it diff --git a/docs/TODO.txt b/docs/TODO.txt index eb6f5f62..dbb6609a 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -134,4 +134,4 @@ - 0.7 BUG: Disabling g_healthsize gives a different field of view, even at 100 heatlh -- 0.7 | 0.8: The macro earthquake effect does not work for spectators who are spectating a player, because fl_onground needs to be bhack for the spectated player, not the spectator \ No newline at end of file +- 0.7: Make sure all effects work for spectators too (such as the macro earthquake effect) \ No newline at end of file -- 2.39.2