]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
SV_PushMove: ignore pushes from and to "owned" entities
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Jan 2009 20:17:02 +0000 (20:17 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Jan 2009 20:17:02 +0000 (20:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8623 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index ffc4123f6f6ed70b09d29f90f1876e2719de46a0..bcd461dc41bcd0511d657d23bd7073c78c2c2f60 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1055,6 +1055,7 @@ SV_PushMove
 void SV_PushMove (prvm_edict_t *pusher, float movetime)
 {
        int i, e, index;
+       int pusherowner, pusherprog;
        int checkcontents;
        qboolean rotated;
        float savesolid, movetime2, pushltime;
@@ -1103,6 +1104,8 @@ void SV_PushMove (prvm_edict_t *pusher, float movetime)
                return;
        }
        pushermodel = sv.models[index];
+       pusherowner = pusher->fields.server->owner;
+       pusherprog = PRVM_EDICT_TO_PROG(pusher);
 
        rotated = VectorLength2(pusher->fields.server->angles) + VectorLength2(pusher->fields.server->avelocity) > 0;
 
@@ -1194,6 +1197,12 @@ void SV_PushMove (prvm_edict_t *pusher, float movetime)
                 || check->fields.server->movetype == MOVETYPE_FAKEPUSH)
                        continue;
 
+               if (check->fields.server->owner == pusherprog)
+                       continue;
+
+               if (pusherowner == PRVM_EDICT_TO_PROG(check))
+                       continue;
+
                //Con_Printf("%i %s ", PRVM_NUM_FOR_EDICT(check), PRVM_GetString(check->fields.server->classname));
 
                // tell any MOVETYPE_STEP entity that it may need to check for water transitions