Browse Source

engine: fix client can use kill command while not connected (#492)

pull/2/head
Barış 3 years ago committed by GitHub
parent
commit
18d8ef287d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      engine/server/sv_client.c

6
engine/server/sv_client.c

@ -1893,6 +1893,12 @@ static qboolean SV_Kill_f( sv_client_t *cl ) @@ -1893,6 +1893,12 @@ static qboolean SV_Kill_f( sv_client_t *cl )
{
if( !SV_IsValidEdict( cl->edict ))
return true;
if( cl->state != cs_spawned )
{
SV_ClientPrintf( cl, "Can't suicide - not connected!\n" );
return true;
}
if( cl->edict->v.health <= 0.0f )
{

Loading…
Cancel
Save