Skip to content
Snippets Groups Projects
Commit bf9cfc67 authored by bitten2up's avatar bitten2up
Browse files

starting to document netcode

parent a373d96d
Branches
No related tags found
No related merge requests found
......@@ -641,6 +641,8 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
msg = (char *)*p;
SKIPSTRINGL(*p, HU_MAXMSGLEN + 1);
// check if player is sending a say command while muted
// or if they are sending a csay and are not an admin
if ((cv_mute.value || flags & (HU_CSAY|HU_SERVER_SAY)) && playernum != serverplayer && !(IsPlayerAdmin(playernum)))
{
CONS_Alert(CONS_WARNING, cv_mute.value ?
......
......@@ -39,6 +39,7 @@ void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(UINT8 **p, INT32 playernum))
void SendNetXCmd(netxcmd_t id, const void *param, size_t nparam)
{
// +1 for the size and another +1 for the ID.
if (localtextcmd[0] + 2 + nparam > MAXTEXTCMD)
{
// for future reference: if (cv_debug) != debug disabled.
......@@ -57,6 +58,7 @@ void SendNetXCmd(netxcmd_t id, const void *param, size_t nparam)
// splitscreen player
void SendNetXCmd2(netxcmd_t id, const void *param, size_t nparam)
{
// +1 for the size and another +1 for the ID.
if (localtextcmd2[0] + 2 + nparam > MAXTEXTCMD)
{
I_Error("No more place in the buffer for netcmd %d\n",id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment