mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed SV_AllowSaveGame always returning true
This commit is contained in:
parent
8b17d81545
commit
6dfefa04f5
1 changed files with 8 additions and 1 deletions
|
@ -1364,32 +1364,39 @@ qboolean SV_AllowSaveGame( void )
|
|||
if( !com_sv_running || !com_sv_running->integer )
|
||||
{
|
||||
Com_DPrintf( "You must be in a game with a server to save.\n" );
|
||||
return qfalse;
|
||||
}
|
||||
else if( !com_cl_running || !com_cl_running->integer )
|
||||
{
|
||||
Com_DPrintf( "You must be in a game with a client to save.\n" );
|
||||
return qfalse;
|
||||
}
|
||||
else if( sv.state != SS_GAME )
|
||||
{
|
||||
Com_DPrintf( "You must be in game to save.\n" );
|
||||
return qfalse;
|
||||
}
|
||||
#ifdef CLIENT
|
||||
else if( clc.state != CA_DISCONNECTED && cg_gametype->integer )
|
||||
{
|
||||
Com_DPrintf( "Can't savegame in a multiplayer game\n" );
|
||||
return qfalse;
|
||||
}
|
||||
#endif
|
||||
else if( g_gametype->integer )
|
||||
{
|
||||
Com_DPrintf( "Can't savegame in a multiplayer game\n" );
|
||||
return qfalse;
|
||||
}
|
||||
else if( !svs.clients || svs.clients->gentity == NULL || svs.clients->gentity->client == NULL || svs.clients->gentity->client->ps.stats[ 0 ] )
|
||||
else if( !svs.clients || svs.clients->gentity == NULL || svs.clients->gentity->client == NULL || !svs.clients->gentity->client->ps.stats[ 0 ] )
|
||||
{
|
||||
Com_DPrintf( "Can't savegame when dead\n" );
|
||||
return qfalse;
|
||||
}
|
||||
else if( sv.state == SS_LOADING || sv.state == SS_LOADING2 )
|
||||
{
|
||||
Com_DPrintf( "Can't save game when loading\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue