]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
fixed bug from lingering code that was resetting entity priority every frame
[xonotic/darkplaces.git] / cl_parse.c
index 4c1bc80dd3cb39201478b5e552cb03345471e3d7..64cd45b2b757fb2520e65ce9af653af51724d3f9 100644 (file)
@@ -2227,7 +2227,7 @@ void CL_ParseTempEntity(void)
                        color[2] = MSG_ReadCoord(cls.protocol) * (2.0f / 1.0f);
                        CL_ParticleExplosion(pos);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocDlight(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        S_StartSound(-1, 0, cl.sfx_r_exp3, pos, 1, 1);
                        break;
 
@@ -2240,7 +2240,7 @@ void CL_ParseTempEntity(void)
                        color[1] = MSG_ReadByte() * (2.0f / 255.0f);
                        color[2] = MSG_ReadByte() * (2.0f / 255.0f);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocDlight(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        S_StartSound(-1, 0, cl.sfx_r_exp3, pos, 1, 1);
                        break;
 
@@ -2267,7 +2267,7 @@ void CL_ParseTempEntity(void)
                        color[1] = MSG_ReadByte() * (2.0f / 255.0f);
                        color[2] = MSG_ReadByte() * (2.0f / 255.0f);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocDlight(NULL, &tempmatrix, radius, color[0], color[1], color[2], radius / velspeed, velspeed, 0, -1, true, 1, 0.25, 1, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, radius, color[0], color[1], color[2], radius / velspeed, velspeed, 0, -1, true, 1, 0.25, 1, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        break;
 
                case TE_FLAMEJET:
@@ -2326,7 +2326,7 @@ void CL_ParseTempEntity(void)
                        color[1] = tempcolor[1] * (2.0f / 255.0f);
                        color[2] = tempcolor[2] * (2.0f / 255.0f);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocDlight(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        S_StartSound(-1, 0, cl.sfx_r_exp3, pos, 1, 1);
                        break;
 
@@ -2547,6 +2547,7 @@ void CL_ParseServerMessage(void)
        {
                cl.mtime[1] = cl.mtime[0];
                cl.mtime[0] = realtime; // qw has no clock
+               cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
                cl.timenonlerp = bound(cl.mtime[1], cl.timenonlerp, cl.mtime[0]);
                cl.onground = false; // since there's no clientdata parsing, clear the onground flag here
                // if true the cl.viewangles are interpolated from cl.mviewangles[]
@@ -2968,6 +2969,7 @@ void CL_ParseServerMessage(void)
                        case svc_time:
                                cl.mtime[1] = cl.mtime[0];
                                cl.mtime[0] = MSG_ReadFloat ();
+                               cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
                                cl.timenonlerp = bound(cl.mtime[1], cl.timenonlerp, cl.mtime[0]);
                                cl.movement_needupdate = true;
                                // if true the cl.viewangles are interpolated from cl.mviewangles[]