]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/sv_main.qc
Punchangle strength depends on healthsize difference as well
[voretournament/voretournament.git] / data / qcsrc / server / sv_main.qc
index fd7545146a54e723dc443a66bb978e828b749040..e49283c69874beb447c485321e50fe7b623cf609 100644 (file)
@@ -121,18 +121,20 @@ 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
+                                                                       if(head.stat_eaten)\r
+                                                                               continue; // not for prey\r
 \r
                                                                        float shake;\r
                                                                        shake = vlen(head.origin - self.origin);\r
                                                                        if(shake)\r
                                                                                shake = 1 - bound(0, shake / cvar("g_healthsize_quake_step_radius"), 1);\r
-                                                                       shake *= cvar("g_healthsize_quake_step");\r
+                                                                       shake *= playersize_macro(self) * cvar("g_healthsize_quake_step");\r
 \r
                                                                        head.punchvector_x += crandom() * shake;\r
                                                                        head.punchvector_y += crandom() * shake;\r