]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
-Added an comment ('[INIT]') to all fields of vm_prog that can/should be
[xonotic/darkplaces.git] / cl_main.c
index e8760d27a2ed752b7d9ac1e076da9d8bddc06320..00401515687b547ee5cdcb9d50baf2942482e68a 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -614,7 +614,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                        // make relative to the entity
                        matrix = &t->render.matrix;
                        // some properties of the tag entity carry over
-                       e->render.flags |= t->render.flags & RENDER_EXTERIORMODEL;
+                       e->render.flags |= t->render.flags & (RENDER_EXTERIORMODEL | RENDER_VIEWMODEL);
                        // if a valid tagindex is used, make it relative to that tag instead
                        // FIXME: use a model function to get tag info (need to handle skeletal)
                        if (e->state_current.tagentity && e->state_current.tagindex >= 1 && (model = t->render.model))
@@ -641,7 +641,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                // if it's the player entity, update according to client movement
                if (e == cl_entities + cl.playerentity && cl.movement)
                {
-                       lerp = (cl.time - cl.mtime[0]) / (cl.mtime[0] - cl.mtime[1]);
+                       lerp = (cl.time - cl.mtime[1]) / (cl.mtime[0] - cl.mtime[1]);
                        lerp = bound(0, lerp, 1);
                        VectorLerp(cl.movement_oldorigin, lerp, cl.movement_origin, origin);
                        VectorSet(angles, 0, cl.viewangles[1], 0);
@@ -1244,6 +1244,7 @@ int CL_ReadFromServer(void)
        r_refdef.time = cl.time;
        r_refdef.extraupdate = !r_speeds.integer;
        r_refdef.numentities = 0;
+       Matrix4x4_CreateIdentity(&r_refdef.viewentitymatrix);
        cl_num_brushmodel_entities = 0;
 
        if (cls.state == ca_connected && cls.signon == SIGNONS)