From: MirceaKitsune Date: Sat, 3 Mar 2012 19:17:43 +0000 (+0200) Subject: Make the macro earthquake effect work for spectators too X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=60415ba6220698fa71b192e76104d1572bcf5abc;p=voretournament%2Fvoretournament.git Make the macro earthquake effect work for spectators too --- 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