]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_move.c
A minor removal of a few pieces of dead code. Nothing major. This is
[xonotic/darkplaces.git] / sv_move.c
index 382c9a08fe7ce75ed49683c40f57c51f805f3566..ffaa44a716ffae147d941deaeae1decbf0797f7d 100644 (file)
--- a/sv_move.c
+++ b/sv_move.c
@@ -110,12 +110,12 @@ pr_global_struct->trace_normal is set to the normal of the blocking wall
 qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
 {
        float           dz;
-       vec3_t          oldorg, neworg, end;
+       vec3_t          oldorg, neworg, end, traceendpos;
        trace_t         trace;
        int                     i;
        edict_t         *enemy;
 
-// try the move        
+// try the move
        VectorCopy (ent->v.origin, oldorg);
        VectorAdd (ent->v.origin, move, neworg);
 
@@ -136,22 +136,23 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
                                        neworg[2] += 8;
                        }
                        trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, neworg, MOVE_NORMAL, ent);
-       
+
                        if (trace.fraction == 1)
                        {
-                               if ( ((int)ent->v.flags & FL_SWIM) && SV_PointContents(trace.endpos) == CONTENTS_EMPTY )
+                               VectorCopy(trace.endpos, traceendpos);
+                               if ( ((int)ent->v.flags & FL_SWIM) && SV_PointContents(traceendpos) == CONTENTS_EMPTY )
                                        return false;   // swim monster left water
-       
-                               VectorCopy (trace.endpos, ent->v.origin);
+
+                               VectorCopy (traceendpos, ent->v.origin);
                                if (relink)
                                        SV_LinkEdict (ent, true);
                                return true;
                        }
-                       
+
                        if (enemy == sv.edicts)
                                break;
                }
-               
+
                return false;
        }
 
@@ -181,7 +182,6 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
                        if (relink)
                                SV_LinkEdict (ent, true);
                        ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
-//     Con_Printf ("fall down\n"); 
                        return true;
                }
 
@@ -205,10 +205,8 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
        }
 
        if ( (int)ent->v.flags & FL_PARTIALGROUND )
-       {
-//             Con_Printf ("back on ground\n"); 
                ent->v.flags = (int)ent->v.flags & ~FL_PARTIALGROUND;
-       }
+
        ent->v.groundentity = EDICT_TO_PROG(trace.ent);
 
 // the move is ok
@@ -267,8 +265,6 @@ SV_FixCheckBottom
 */
 void SV_FixCheckBottom (edict_t *ent)
 {
-//     Con_Printf ("SV_FixCheckBottom\n");
-       
        ent->v.flags = (int)ent->v.flags | FL_PARTIALGROUND;
 }