mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 08:44:31 +00:00
engine: fix client can use kill command while not connected (#492)
This commit is contained in:
parent
9b1fccd1fa
commit
18d8ef287d
@ -1893,6 +1893,12 @@ static qboolean SV_Kill_f( sv_client_t *cl )
|
|||||||
{
|
{
|
||||||
if( !SV_IsValidEdict( cl->edict ))
|
if( !SV_IsValidEdict( cl->edict ))
|
||||||
return true;
|
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 )
|
if( cl->edict->v.health <= 0.0f )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user