summaryrefslogtreecommitdiff
path: root/src/game/g_admin.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-03-09 08:57:14 +0100
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:16 +0100
commit253fda567163917b0305f0df6156f22ca0a9ca70 (patch)
tree3db9971cb09268f8d2c169c25d6aa1a1f2f125fb /src/game/g_admin.c
parent0b0e4c0db6886b98fcd593c3ca496e75c24b8a1e (diff)
add G_LayoutExists() and use it
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r--src/game/g_admin.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 24330aa2..c4d3c427 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -2053,9 +2053,7 @@ qboolean G_admin_changemap( gentity_t *ent )
if( trap_Argc( ) > 2 )
{
trap_Argv( 2, layout, sizeof( layout ) );
- if( !Q_stricmp( layout, "*BUILTIN*" ) ||
- trap_FS_FOpenFile( va( "layouts/%s/%s.dat", map, layout ),
- NULL, FS_READ ) > 0 )
+ if( G_LayoutExists( map, layout ) )
{
trap_Cvar_Set( "g_nextLayout", layout );
}
@@ -2713,9 +2711,7 @@ qboolean G_admin_restart( gentity_t *ent )
Q_stricmp( layout, "switchteams" ) &&
Q_stricmp( layout, "switchteamslock" ) )
{
- if( !Q_stricmp( layout, "*BUILTIN*" ) ||
- trap_FS_FOpenFile( va( "layouts/%s/%s.dat", map, layout ),
- NULL, FS_READ ) > 0 )
+ if( G_LayoutExists( map, layout ) )
{
trap_Cvar_Set( "g_nextLayout", layout );
}