cvar_t demo_nehahra = {0, "demo_nehahra", "0"};
cvar_t developer_networkentities = {0, "developer_networkentities", "0"};
-mempool_t *cl_scores_mempool;
-
/*
==================
CL_ParseStartSoundPacket
entity_t *ent;
Con_DPrint("Serverinfo packet received.\n");
+
//
// wipe the client_state_t struct
//
Host_Error("Bad maxclients (%u) from server\n", cl.maxclients);
return;
}
- Mem_EmptyPool(cl_scores_mempool);
- cl.scores = Mem_Alloc(cl_scores_mempool, cl.maxclients*sizeof(*cl.scores));
+ cl.scores = Mem_Alloc(cl_mempool, cl.maxclients*sizeof(*cl.scores));
// parse gametype
cl.gametype = MSG_ReadByte ();
Server information pertaining to this client only
==================
*/
-void CL_ParseClientdata (int bits)
+void CL_ParseClientdata (void)
{
- int i, j;
+ int i, j, bits;
VectorCopy (cl.mpunchangle[0], cl.mpunchangle[1]);
VectorCopy (cl.mpunchvector[0], cl.mpunchvector[1]);
cl.mvelocity[0][2] = 0;
cl.mviewzoom[0] = 1;
- bits &= 0xFFFF;
+ bits = (unsigned short) MSG_ReadShort ();
if (bits & SU_EXTEND1)
bits |= (MSG_ReadByte() << 16);
if (bits & SU_EXTEND2)
}
}
- if (bits & SU_ITEMS)
+ // LordHavoc: hipnotic demos don't have this bit set but should
+ if (bits & SU_ITEMS || cl.protocol != PROTOCOL_DARKPLACES6)
cl.stats[STAT_ITEMS] = MSG_ReadLong ();
cl.onground = (bits & SU_ONGROUND) != 0;
case TE_CUSTOMFLASH:
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
- radius = MSG_ReadByte() * 8;
+ radius = (MSG_ReadByte() + 1) * 8;
velspeed = (MSG_ReadByte() + 1) * (1.0 / 256.0);
color[0] = MSG_ReadByte() * (2.0f / 255.0f);
color[1] = MSG_ReadByte() * (2.0f / 255.0f);
qbyte cmdlog[32];
char *cmdlogname[32], *temp;
int cmdindex, cmdcount = 0;
+ qboolean sendmove = false;
if (cls.demorecording)
CL_WriteDemoMessage ();
case svc_time:
cl.mtime[1] = cl.mtime[0];
cl.mtime[0] = MSG_ReadFloat ();
+ sendmove = true;
break;
case svc_clientdata:
- i = (unsigned short) MSG_ReadShort ();
- CL_ParseClientdata (i);
+ CL_ParseClientdata();
break;
case svc_version:
EntityFrameQuake_ISeeDeadEntities();
+ if (sendmove)
+ {
+ // send one move per server frame
+ CL_SendMove();
+ }
+
parsingerror = false;
}
void CL_Parse_Init(void)
{
// LordHavoc: added demo_nehahra cvar
- cl_scores_mempool = Mem_AllocPool("client player info", 0, NULL);
Cvar_RegisterVariable (&demo_nehahra);
if (gamemode == GAME_NEHAHRA)
Cvar_SetValue("demo_nehahra", 1);
void CL_Parse_Shutdown(void)
{
- Mem_FreePool (&cl_scores_mempool);
}