]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix in entity teleport detection of FlyMove
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 19 Oct 2010 19:13:39 +0000 (19:13 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 22 Oct 2010 22:01:30 +0000 (00:01 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10555 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=245e40043557def8aac7ec4d3c1c094086f2418d

sv_phys.c

index 7863325352bb26b74021443293213d284c7e6e5e..e55ae81e77c7fbe62ce505cc35cda37a7c36f535 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1297,12 +1297,24 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qboolean applygravity, flo
                        //Con_Printf("step %f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
                        VectorSet(steppush, 0, 0, stepheight);
                        VectorCopy(ent->fields.server->origin, org);
-                       SV_PushEntity(&steptrace, ent, steppush, false, false);
+                       if(!SV_PushEntity(&steptrace, ent, steppush, false, false))
+                       {
+                               blocked |= 8;
+                               break;
+                       }
                        //Con_Printf("%f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
-                       SV_PushEntity(&steptrace2, ent, push, false, false);
+                       if(!SV_PushEntity(&steptrace2, ent, push, false, false))
+                       {
+                               blocked |= 8;
+                               break;
+                       }
                        //Con_Printf("%f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
                        VectorSet(steppush, 0, 0, org[2] - ent->fields.server->origin[2]);
-                       SV_PushEntity(&steptrace3, ent, steppush, false, false);
+                       if(!SV_PushEntity(&steptrace3, ent, steppush, false, false))
+                       {
+                               blocked |= 8;
+                               break;
+                       }
                        //Con_Printf("%f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
                        // accept the new position if it made some progress...
                        if (fabs(ent->fields.server->origin[0] - org[0]) >= 0.03125 || fabs(ent->fields.server->origin[1] - org[1]) >= 0.03125)