]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Make the macro earthquake effect work for spectators too
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 3 Mar 2012 19:17:43 +0000 (21:17 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 3 Mar 2012 19:17:43 +0000 (21:17 +0200)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/sv_main.qc
docs/TODO.txt

index 3b4afbc550cecae97cca0c537d319c4cc66b8e3f..6f4a06ae1ab43f7be1774f3453abe17d591cb7cf 100644 (file)
@@ -2141,6 +2141,9 @@ void SpectateCopy(entity spectatee) {
        setsize(self, spectatee.mins, spectatee.maxs);\r
        SetZoomState(spectatee.zoomstate);\r
 \r
+       // copy necessary flags\r
+       if(spectatee.flags & FL_ONGROUND)       self.flags |= FL_ONGROUND;      else    self.flags &~= FL_ONGROUND;\r
+\r
        anticheat_spectatecopy(spectatee);\r
 }\r
 \r
index fd7545146a54e723dc443a66bb978e828b749040..451a0b8725298cd658b8ca6d78eda001aca2afe1 100644 (file)
@@ -121,9 +121,9 @@ void CreatureFrame (void)
                                                                entity head;\r
                                                                for(head = findradius(self.origin, cvar("g_healthsize_quake_step_radius")); head; head = head.chain)\r
                                                                {\r
-                                                                       if not(head.classname == "player")\r
+                                                                       if not(head.classname == "player" || head.classname == "spectator")\r
                                                                                continue;\r
-                                                                       if(head == self)\r
+                                                                       if(head == self || head.spectatee_status == num_for_edict(self))\r
                                                                                continue; // not for self\r
                                                                        if not(head.flags & FL_ONGROUND)\r
                                                                                continue; // we only feel the ground shaking if we are sitting on it\r
index eb6f5f62baa9abefdf29ef65e31203018c04564e..dbb6609adabeb30fb00cf62ee349105b3e5f272d 100644 (file)
 \r
 - 0.7 BUG: Disabling g_healthsize gives a different field of view, even at 100 heatlh\r
 \r
-- 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