Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/game/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7628,7 +7628,12 @@ namespace server
int sn = getint(p), val = getint(p);
clientinfo *cp = (clientinfo *)getinfo(sn);

if(!cp || (val ? (cp->state == CS_SPECTATOR || cp->actortype > A_PLAYER) : cp->state != CS_SPECTATOR))
if(!cp)
{
srvmsgf(ci->clientnum, colourorange, "Sync error: unable to modify spectator - %d - invalid", sn);
break;
}
if(val ? (cp->state == CS_SPECTATOR || cp->actortype > A_PLAYER) : cp->state != CS_SPECTATOR)
{
srvmsgf(ci->clientnum, colourorange, "Sync error: %s unable to modify spectator - %d [%d, %d] - invalid", colourname(cp), cp->state, cp->lastdeath, gamemillis);
break;
Expand Down