#include "quakedef.h"
#include "cdaudio.h"
#include "cl_collision.h"
+#include "csprogs.h"
char *svc_strings[128] =
{
"svc_spawnbaseline2", // 55 // short modelindex instead of byte
"svc_spawnstatic2", // 56 // short modelindex instead of byte
"svc_entities", // 57 // [int] deltaframe [int] thisframe [float vector] eye [variable length] entitydata
- "svc_unusedlh3", // 58
+ "svc_csqcentities", // 58 // [short] entnum [variable length] entitydata ... [short] 0x0000
"svc_spawnstaticsound2", // 59 // [coord3] [short] samp [byte] vol [byte] aten
};
// disable until we get textures for it
R_ResetSkyBox();
+ memset(cl.csqc_model_precache, 0, sizeof(cl.csqc_model_precache)); //[515]: csqc
memset(cl.model_precache, 0, sizeof(cl.model_precache));
memset(cl.sound_precache, 0, sizeof(cl.sound_precache));
if (!s->active)
return;
- if (s->modelindex >= MAX_MODELS)
- Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)", s->modelindex, MAX_MODELS);
+ if (s->modelindex >= MAX_MODELS && (65536-s->modelindex) >= MAX_MODELS)
+ Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)\n", s->modelindex, MAX_MODELS);
// colormap is client index + 1
if ((!s->flags & RENDER_COLORMAPPED) && s->colormap > cl.maxclients)
cl.stats[STAT_ITEMS] = MSG_ReadLong ();
cl.onground = (bits & SU_ONGROUND) != 0;
+ csqc_onground = cl.onground; //[515]: cause without this csqc will receive not right value on svc_print =/
cl.inwater = (bits & SU_INWATER) != 0;
if (cl.protocol == PROTOCOL_DARKPLACES5)
#define SHOWNET(x) if(cl_shownet.integer==2)Con_Printf("%3i:%s\n", msg_readcount-1, x);
+//[515]: csqc
+void CL_VM_Init (void);
+qboolean CL_VM_Parse_TempEntity (void);
+void CL_VM_Parse_StuffCmd (const char *msg);
+void CL_VM_Parse_CenterPrint (const char *msg);
+void CSQC_AddPrintText (const char *msg);
+void CSQC_ReadEntities (void);
+//
static unsigned char cgamenetbuffer[65536];
/*
break;
case svc_print:
- Con_Print(MSG_ReadString());
+ CSQC_AddPrintText(MSG_ReadString()); //[515]: csqc
break;
case svc_centerprint:
- SCR_CenterPrint(MSG_ReadString ());
+ CL_VM_Parse_CenterPrint(MSG_ReadString ()); //[515]: csqc
break;
case svc_stufftext:
- Cbuf_AddText (MSG_ReadString ());
+ CL_VM_Parse_StuffCmd(MSG_ReadString ()); //[515]: csqc
break;
case svc_damage:
case svc_serverinfo:
CL_ParseServerInfo ();
+ CL_VM_Init(); //[515]: init csqc
break;
case svc_setangle:
CL_ParseStatic (true);
break;
case svc_temp_entity:
- CL_ParseTempEntity ();
+ if(!CL_VM_Parse_TempEntity())
+ CL_ParseTempEntity ();
break;
case svc_setpause:
else
EntityFrame5_CL_ReadFrame();
break;
+ case svc_csqcentities:
+ CSQC_ReadEntities();
+ break;
}
}