Use Shorts instead of Bytes for modelindex

This commit is contained in:
Steam Deck User 2023-03-27 14:15:35 -04:00
parent 0215e51529
commit 702e2a9aa5
3 changed files with 5 additions and 5 deletions

View file

@ -531,7 +531,7 @@ void CL_ParseUpdate (int bits)
if (bits & U_MODEL) if (bits & U_MODEL)
{ {
modnum = MSG_ReadByte (); modnum = MSG_ReadShort ();
if (modnum >= MAX_MODELS) if (modnum >= MAX_MODELS)
Host_Error ("CL_ParseModel: bad modnum"); Host_Error ("CL_ParseModel: bad modnum");
} }
@ -664,7 +664,7 @@ void CL_ParseBaseline (entity_t *ent)
{ {
int i; int i;
ent->baseline.modelindex = MSG_ReadByte (); ent->baseline.modelindex = MSG_ReadShort ();
ent->baseline.frame = MSG_ReadByte (); ent->baseline.frame = MSG_ReadByte ();
ent->baseline.colormap = MSG_ReadByte(); ent->baseline.colormap = MSG_ReadByte();
ent->baseline.skin = MSG_ReadByte(); ent->baseline.skin = MSG_ReadByte();

View file

@ -3003,7 +3003,7 @@ void PF_makestatic (void)
MSG_WriteByte (&sv.signon,svc_spawnstatic); MSG_WriteByte (&sv.signon,svc_spawnstatic);
MSG_WriteByte (&sv.signon, SV_ModelIndex(pr_strings + ent->v.model)); MSG_WriteShort (&sv.signon, SV_ModelIndex(pr_strings + ent->v.model));
MSG_WriteByte (&sv.signon, ent->v.frame); MSG_WriteByte (&sv.signon, ent->v.frame);
MSG_WriteByte (&sv.signon, ent->v.colormap); MSG_WriteByte (&sv.signon, ent->v.colormap);

View file

@ -588,7 +588,7 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg, qboolean nomap)
MSG_WriteByte (msg,e); MSG_WriteByte (msg,e);
if (bits & U_MODEL) if (bits & U_MODEL)
MSG_WriteByte (msg, ent->v.modelindex); MSG_WriteShort (msg, ent->v.modelindex);
if (bits & U_FRAME) if (bits & U_FRAME)
MSG_WriteShort (msg, ent->v.frame); MSG_WriteShort (msg, ent->v.frame);
if (bits & U_COLORMAP) if (bits & U_COLORMAP)
@ -1049,7 +1049,7 @@ void SV_CreateBaseline (void)
MSG_WriteByte (&sv.signon,svc_spawnbaseline); MSG_WriteByte (&sv.signon,svc_spawnbaseline);
MSG_WriteShort (&sv.signon,entnum); MSG_WriteShort (&sv.signon,entnum);
MSG_WriteByte (&sv.signon, svent->baseline.modelindex); MSG_WriteShort (&sv.signon, svent->baseline.modelindex);
MSG_WriteByte (&sv.signon, svent->baseline.frame); MSG_WriteByte (&sv.signon, svent->baseline.frame);
MSG_WriteByte (&sv.signon, svent->baseline.colormap); MSG_WriteByte (&sv.signon, svent->baseline.colormap);
MSG_WriteByte (&sv.signon, svent->baseline.skin); MSG_WriteByte (&sv.signon, svent->baseline.skin);