"", // 48
"", // 49
"svc_cgame", // 50 // [short] length [bytes] data
- "svc_fog", // 51 // unfinished and obsolete
+ "svc_unusedlh1", // 51 // unused
"svc_effect", // 52 // [vector] org [byte] modelindex [byte] startframe [byte] framecount [byte] framerate
"svc_effect2", // 53 // [vector] org [short] modelindex [short] startframe [byte] framecount [byte] framerate
"svc_sound2", // 54 // short soundindex instead of byte
*/
entity_t *CL_EntityNum (int num)
{
- /*
- if (num >= cl.num_entities)
- {
- if (num >= MAX_EDICTS)
- Host_Error ("CL_EntityNum: %i is an invalid number",num);
- cl.num_entities = num;
-// while (cl.num_entities <= num)
-// {
-// cl_entities[cl.num_entities].colormap = -1; // no special coloring
-// cl.num_entities++;
-// }
- }
- */
if (num >= MAX_EDICTS)
Host_Error ("CL_EntityNum: %i is an invalid number",num);
pos[i] = MSG_ReadCoord ();
S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0, attenuation);
-}
+}
/*
==================
float time;
static float lastmsg;
int ret;
+ int c;
sizebuf_t old;
qbyte olddata[8192];
switch (ret)
{
default:
- Host_Error ("CL_KeepaliveMessage: CL_GetMessage failed");
+ Host_Error ("CL_KeepaliveMessage: CL_GetMessage failed");
case 0:
break; // nothing waiting
case 1:
Host_Error ("CL_KeepaliveMessage: received a message");
break;
case 2:
- if (MSG_ReadByte() != svc_nop)
+ c = MSG_ReadByte();
+ if (c != svc_nop)
Host_Error ("CL_KeepaliveMessage: datagram wasn't a nop");
break;
}
break;
case 4:
- SCR_EndLoadingPlaque (); // allow normal screen updates
Con_ClearNotify();
break;
}
if (bits & U_EFFECTS2) new.effects = (new.effects & 0x00FF) | (MSG_ReadByte() << 8);
if (bits & U_GLOWSIZE) new.glowsize = MSG_ReadByte();
if (bits & U_GLOWCOLOR) new.glowcolor = MSG_ReadByte();
-#if 0
- if (bits & U_COLORMOD) {int i = MSG_ReadByte();float r = (((int) i >> 5) & 7) * 1.0 / 7, g = (((int) i >> 2) & 7) * 1.0 / 7, b = ((int) i & 3) * 1.0 / 3;Con_Printf("warning: U_COLORMOD %i (%1.2f %1.2f %1.2f) ignored\n", i, r, g, b);}
-#else
// apparently the dpcrush demo uses this (unintended, and it uses white anyway)
if (bits & U_COLORMOD) MSG_ReadByte();
-#endif
if (bits & U_GLOWTRAIL) new.flags |= RENDER_GLOWTRAIL;
if (bits & U_FRAME2) new.frame = (new.frame & 0x00FF) | (MSG_ReadByte() << 8);
if (bits & U_MODEL2) new.modelindex = (new.modelindex & 0x00FF) | (MSG_ReadByte() << 8);
int j = MSG_ReadFloat() * 255.0f;
if (i == 2)
{
- if (MSG_ReadFloat())
+ i = MSG_ReadFloat();
+ if (i)
new.effects |= EF_FULLBRIGHT;
}
if (j < 0)
Con_Printf("bitprofile: %i updates\n");
if (bitprofilecount)
for (i = 0;i < 32;i++)
-// if (bitprofile[i])
- Con_Printf("%s: %i %3.2f%%\n", bitprofilenames[i], bitprofile[i], bitprofile[i] * 100.0 / bitprofilecount);
+ Con_Printf("%s: %i %3.2f%%\n", bitprofilenames[i], bitprofile[i], bitprofile[i] * 100.0 / bitprofilecount);
Con_Printf("\n");
for (i = 0;i < 32;i++)
bitprofile[i] = 0;
break;
case svc_nop:
-// Con_Printf ("svc_nop\n");
break;
case svc_time:
case svc_serverinfo:
CL_ParseServerInfo ();
-// vid.recalc_refdef = true; // leave intermission full screen
break;
case svc_setangle:
case svc_intermission:
cl.intermission = 1;
cl.completed_time = cl.time;
-// vid.recalc_refdef = true; // go to full screen
break;
case svc_finale:
cl.intermission = 2;
cl.completed_time = cl.time;
-// vid.recalc_refdef = true; // go to full screen
SCR_CenterPrint (MSG_ReadString ());
break;
case svc_cutscene:
cl.intermission = 3;
cl.completed_time = cl.time;
-// vid.recalc_refdef = true; // go to full screen
SCR_CenterPrint (MSG_ReadString ());
break;
{
int length;
length = (int) ((unsigned short) MSG_ReadShort());
- /*
- if (cgamenetbuffersize < length)
- {
- cgamenetbuffersize = length;
- if (cgamenetbuffer)
- Mem_Free(cgamenetbuffer);
- cgamenetbuffer = Mem_Alloc(cgamenetbuffersize);
- }
- */
for (i = 0;i < length;i++)
cgamenetbuffer[i] = MSG_ReadByte();
if (!msg_badread)
if (entitiesupdated)
CL_EntityUpdateEnd();
}
+