diff --git a/source/cl_parse.c b/source/cl_parse.c index 545f0f4..c760cb0 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -420,7 +420,7 @@ if (bits&(1<= MAX_MODELS) Host_Error ("CL_ParseModel: bad modnum"); } @@ -569,7 +569,7 @@ void CL_ParseBaseline (entity_t *ent) { int i; - ent->baseline.modelindex = MSG_ReadByte (); + ent->baseline.modelindex = MSG_ReadShort (); ent->baseline.frame = MSG_ReadByte (); ent->baseline.colormap = MSG_ReadByte(); ent->baseline.skin = MSG_ReadByte(); diff --git a/source/pr_cmds.c b/source/pr_cmds.c index 7643176..34fcc78 100644 --- a/source/pr_cmds.c +++ b/source/pr_cmds.c @@ -3027,7 +3027,7 @@ void PF_makestatic (void) 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.colormap); diff --git a/source/quakedef.h b/source/quakedef.h index acd79af..e558c62 100644 --- a/source/quakedef.h +++ b/source/quakedef.h @@ -110,7 +110,7 @@ void VID_UnlockBuffer (void); // #define MAX_EDICTS 600 // FIXME: ouch! ouch! ouch! #define MAX_LIGHTSTYLES 64 -#define MAX_MODELS 256 // these are sent over the net as bytes +#define MAX_MODELS 300 // motolegacy -- nzp protocol(115), uses memory inefficient shorts for model indexes, yay! #define MAX_SOUNDS 256 // so they cannot be blindly increased #define SAVEGAME_COMMENT_LENGTH 39 diff --git a/source/sv_main.c b/source/sv_main.c index 5bac80a..94d3f8e 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -588,7 +588,7 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg) MSG_WriteByte (msg,e); if (bits & U_MODEL) - MSG_WriteByte (msg, ent->v.modelindex); + MSG_WriteShort (msg, ent->v.modelindex); if (bits & U_FRAME) MSG_WriteByte (msg, ent->v.frame); if (bits & U_COLORMAP) @@ -1045,7 +1045,7 @@ void SV_CreateBaseline (void) MSG_WriteByte (&sv.signon,svc_spawnbaseline); 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.colormap); MSG_WriteByte (&sv.signon, svent->baseline.skin);