mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
Move the CL_NewTranslation from the entity linking code into the protocol
updates (where it belongs). This gives a 1% boost to bigass1.
This commit is contained in:
parent
f7c90759af
commit
1d410a3a1f
2 changed files with 24 additions and 14 deletions
|
@ -171,6 +171,8 @@ CL_ClearState (void)
|
||||||
memset (cl_baselines, 0, sizeof (cl_baselines));
|
memset (cl_baselines, 0, sizeof (cl_baselines));
|
||||||
memset (r_lightstyle, 0, sizeof (r_lightstyle));
|
memset (r_lightstyle, 0, sizeof (r_lightstyle));
|
||||||
|
|
||||||
|
Skin_ClearTempSkins ();
|
||||||
|
|
||||||
CL_ClearTEnts ();
|
CL_ClearTEnts ();
|
||||||
|
|
||||||
R_ClearEfrags ();
|
R_ClearEfrags ();
|
||||||
|
@ -570,12 +572,6 @@ CL_RelinkEntities (void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i <= cl.maxclients) {
|
|
||||||
ent->skin = Skin_NewTempSkin ();
|
|
||||||
if (ent->skin)
|
|
||||||
CL_NewTranslation (i - 1, ent->skin);
|
|
||||||
}
|
|
||||||
|
|
||||||
// rotate binary objects locally
|
// rotate binary objects locally
|
||||||
if (ent->model->flags & EF_ROTATE)
|
if (ent->model->flags & EF_ROTATE)
|
||||||
ent->angles[1] = bobjrotate;
|
ent->angles[1] = bobjrotate;
|
||||||
|
@ -659,7 +655,6 @@ CL_ReadFromServer (void)
|
||||||
Con_Printf ("\n");
|
Con_Printf ("\n");
|
||||||
|
|
||||||
R_ClearEnts ();
|
R_ClearEnts ();
|
||||||
Skin_ClearTempSkins ();
|
|
||||||
|
|
||||||
CL_RelinkEntities ();
|
CL_RelinkEntities ();
|
||||||
CL_UpdateTEnts ();
|
CL_UpdateTEnts ();
|
||||||
|
|
|
@ -44,6 +44,7 @@ static const char rcsid[] =
|
||||||
#include "QF/msg.h"
|
#include "QF/msg.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
#include "QF/screen.h"
|
#include "QF/screen.h"
|
||||||
|
#include "QF/skin.h"
|
||||||
#include "QF/sound.h" // FIXME: DEFAULT_SOUND_PACKET_*
|
#include "QF/sound.h" // FIXME: DEFAULT_SOUND_PACKET_*
|
||||||
#include "QF/input.h"
|
#include "QF/input.h"
|
||||||
|
|
||||||
|
@ -394,8 +395,12 @@ CL_ParseUpdate (int bits)
|
||||||
ent->syncbase = 0.0;
|
ent->syncbase = 0.0;
|
||||||
} else
|
} else
|
||||||
forcelink = true; // hack to make null model players work
|
forcelink = true; // hack to make null model players work
|
||||||
//XXX if (num > 0 && num <= cl.maxclients)
|
if (num > 0 && num <= cl.maxclients) {
|
||||||
//XXX CL_NewTranslation (num - 1);
|
if (!ent->skin)
|
||||||
|
ent->skin = Skin_NewTempSkin ();
|
||||||
|
if (ent->skin)
|
||||||
|
CL_NewTranslation (num - 1, ent->skin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bits & U_FRAME)
|
if (bits & U_FRAME)
|
||||||
|
@ -421,8 +426,12 @@ CL_ParseUpdate (int bits)
|
||||||
skin = state->baseline.skin;
|
skin = state->baseline.skin;
|
||||||
if (skin != ent->skinnum) {
|
if (skin != ent->skinnum) {
|
||||||
ent->skinnum = skin;
|
ent->skinnum = skin;
|
||||||
//XXX if (num > 0 && num <= cl.maxclients)
|
if (num > 0 && num <= cl.maxclients) {
|
||||||
//XXX CL_NewTranslation (num - 1);
|
if (!ent->skin)
|
||||||
|
ent->skin = Skin_NewTempSkin ();
|
||||||
|
if (ent->skin)
|
||||||
|
CL_NewTranslation (num - 1, ent->skin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bits & U_EFFECTS)
|
if (bits & U_EFFECTS)
|
||||||
|
@ -786,11 +795,17 @@ CL_ParseServerMessage (void)
|
||||||
case svc_updatecolors:
|
case svc_updatecolors:
|
||||||
Sbar_Changed ();
|
Sbar_Changed ();
|
||||||
i = MSG_ReadByte (net_message);
|
i = MSG_ReadByte (net_message);
|
||||||
if (i >= cl.maxclients)
|
if (i >= cl.maxclients) {
|
||||||
Host_Error ("CL_ParseServerMessage: svc_updatecolors > "
|
Host_Error ("CL_ParseServerMessage: svc_updatecolors > "
|
||||||
"MAX_SCOREBOARD");
|
"MAX_SCOREBOARD");
|
||||||
cl.scores[i].colors = MSG_ReadByte (net_message);
|
} else {
|
||||||
//XXX CL_NewTranslation (i);
|
entity_t *ent = &cl_entities[i+1];
|
||||||
|
cl.scores[i].colors = MSG_ReadByte (net_message);
|
||||||
|
if (!ent->skin)
|
||||||
|
ent->skin = Skin_NewTempSkin ();
|
||||||
|
if (ent->skin)
|
||||||
|
CL_NewTranslation (i, ent->skin);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case svc_particle:
|
case svc_particle:
|
||||||
|
|
Loading…
Reference in a new issue