]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
corrected comment again, indicating that the offset for polygon 3 is in the bottom...
[xonotic/darkplaces.git] / sv_phys.c
index 0e465d1e26820ea002dc793f9c7bc5fe08beaca3..44daad484fb76a6f71e365262ace067955a68b8b 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -103,12 +103,12 @@ void SV_CheckVelocity (edict_t *ent)
        {
                if (IS_NAN(ent->v->velocity[i]))
                {
-                       Con_Printf ("Got a NaN velocity on %s\n", pr_strings + ent->v->classname);
+                       Con_Printf ("Got a NaN velocity on %s\n", PR_GetString(ent->v->classname));
                        ent->v->velocity[i] = 0;
                }
                if (IS_NAN(ent->v->origin[i]))
                {
-                       Con_Printf ("Got a NaN origin on %s\n", pr_strings + ent->v->classname);
+                       Con_Printf ("Got a NaN origin on %s\n", PR_GetString(ent->v->classname));
                        ent->v->origin[i] = 0;
                }
        }
@@ -1433,11 +1433,16 @@ trace_t SV_Trace_Toss (edict_t *tossent, edict_t *ignore)
        float gravity, savesolid;
        vec3_t move, end;
        edict_t tempent, *tent;
+       entvars_t vars;
        eval_t *val;
        trace_t trace;
 
-       memcpy(&tempent, tossent, sizeof(edict_t));
+       // copy the vars over
+       memcpy(&vars, tossent->v, sizeof(entvars_t));
+       // set up the temp entity to point to the copied vars
        tent = &tempent;
+       tent->v = &vars;
+
        savesolid = tossent->v->solid;
        tossent->v->solid = SOLID_NOT;