]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
FINALLY use the mapidx right
[xonotic/darkplaces.git] / sv_phys.c
index 7863325352bb26b74021443293213d284c7e6e5e..7558be896a987111e13bffa2f26f8f174138c480 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -299,7 +299,7 @@ trace_t SV_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_
 #endif
 
        // clip to world
-       Collision_ClipLineToWorld(&cliptrace, sv.worldmodel, clipstart, clipend, hitsupercontentsmask);
+       Collision_ClipLineToWorld(&cliptrace, sv.worldmodel, clipstart, clipend, hitsupercontentsmask, false);
        cliptrace.bmodelstartsolid = cliptrace.startsolid;
        if (cliptrace.startsolid || cliptrace.fraction < 1)
                cliptrace.ent = prog->edicts;
@@ -393,7 +393,7 @@ trace_t SV_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_
                if (type == MOVE_MISSILE && (int)touch->fields.server->flags & FL_MONSTER)
                        Collision_ClipToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touch->fields.server->mins, touch->fields.server->maxs, bodysupercontents, &matrix, &imatrix, clipstart, clipmins2, clipmaxs2, clipend, hitsupercontentsmask);
                else
-                       Collision_ClipLineToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touch->fields.server->mins, touch->fields.server->maxs, bodysupercontents, &matrix, &imatrix, clipstart, clipend, hitsupercontentsmask);
+                       Collision_ClipLineToGenericEntity(&trace, model, touch->priv.server->frameblend, &touch->priv.server->skeleton, touch->fields.server->mins, touch->fields.server->maxs, bodysupercontents, &matrix, &imatrix, clipstart, clipend, hitsupercontentsmask, false);
 
                Collision_CombineTraces(&cliptrace, &trace, (void *)touch, touch->fields.server->solid == SOLID_BSP);
        }
@@ -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)