diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 1 | ||||
-rw-r--r-- | src/game/g_main.c | 8 | ||||
-rw-r--r-- | src/game/g_svcmds.c | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 1af65c55..fbe8eb52 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -1938,6 +1938,7 @@ qboolean G_admin_map( gentity_t *ent, int skiparg ) } trap_SendConsoleCommand( EXEC_APPEND, va( "map %s", map ) ); + level.restarted = qtrue; AP( va( "print \"^3!map: ^7map '%s' started by %s %s\n\"", map, ( ent ) ? ent->client->pers.netname : "console", ( layout[ 0 ] ) ? va( "(forcing layout '%s')", layout ) : "" ) ); diff --git a/src/game/g_main.c b/src/game/g_main.c index 6a217bdc..e142b21a 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -661,6 +661,8 @@ void G_ShutdownGame( int restart ) G_admin_cleanup( ); G_admin_namelog_cleanup( ); + + level.restarted = qfalse; } @@ -1517,6 +1519,7 @@ void ExitLevel( void ) else trap_SendConsoleCommand( EXEC_APPEND, "map_restart\n" ); + level.restarted = qtrue; level.changemap = NULL; level.intermissiontime = 0; @@ -1931,6 +1934,11 @@ void CheckVote( void ) level.voteExecuteTime = 0; trap_SendConsoleCommand( EXEC_APPEND, va( "%s\n", level.voteString ) ); + if( !Q_stricmp( level.voteString, "map_restart" ) || + !Q_stricmpn( level.voteString, "map", 3 ) ) + { + level.restarted = qtrue; + } } if( !level.voteTime ) diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index be2a4da6..df656446 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -541,6 +541,7 @@ void Svcmd_LayoutLoad_f( void ) Q_strncpyz( layouts, s, sizeof( layouts ) ); trap_Cvar_Set( "g_layouts", layouts ); trap_SendConsoleCommand( EXEC_APPEND, "map_restart\n" ); + level.restarted = qtrue; } /* |