summaryrefslogtreecommitdiff
path: root/src/game/g_admin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r--src/game/g_admin.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 4d4c15a7..25e63f46 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -2068,11 +2068,12 @@ qboolean G_admin_changemap( gentity_t *ent )
admin_log( map );
admin_log( layout );
- trap_SendConsoleCommand( EXEC_APPEND, va( "map \"%s\"\n", map ) );
- level.restarted = qtrue;
AP( va( "print \"^3changemap: ^7map '%s' started by %s^7 %s\n\"", map,
( ent ) ? ent->client->pers.netname : "console",
( layout[ 0 ] ) ? va( "(forcing layout '%s')", layout ) : "" ) );
+
+ G_PerformMapChange( map );
+
return qtrue;
}
@@ -2771,12 +2772,13 @@ qboolean G_admin_restart( gentity_t *ent )
!Q_stricmp( teampref, "keepteamslock" ) )
trap_Cvar_Set( "g_lockTeamsAtStart", "1" );
- trap_SendConsoleCommand( EXEC_APPEND, "map_restart\n" );
-
AP( va( "print \"^3restart: ^7map restarted by %s %s %s\n\"",
( ent ) ? ent->client->pers.netname : "console",
( layout[ 0 ] ) ? va( "^7(forcing layout '%s^7')", layout ) : "",
( teampref[ 0 ] ) ? va( "^7(with teams option: '%s^7')", teampref ) : "" ) );
+
+ G_PerformMapRestart();
+
return qtrue;
}