diff options
author | Tony J. White <tjw@tjw.org> | 2006-12-31 21:41:50 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2006-12-31 21:41:50 +0000 |
commit | 2556ac4c9b09454585992601d797e5765d055aa0 (patch) | |
tree | 9ffdf756547166ee1d21541b881cbb0eff54836c /src/game/g_admin.c | |
parent | 47cd6c14c46bf7da97a9ad14ccd5f63b026a03e0 (diff) |
* (bug 2973) added a special name for the map's built-in layout "*BUILTIN*"
so this can be named in the list of layouts to be selected from without
having to create a .dat file for it.
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r-- | src/game/g_admin.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index f16c961a..515192b7 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -1907,8 +1907,9 @@ qboolean G_admin_map( gentity_t *ent, int skiparg ) if( G_SayArgc( ) > 2 + skiparg ) { G_SayArgv( skiparg + 2, layout, sizeof( layout ) ); - if( trap_FS_FOpenFile( va( "layouts/%s/%s.dat", map, layout ), - NULL, FS_READ ) > 0 ) + if( !Q_stricmp( layout, "*BUILTIN*" ) || + trap_FS_FOpenFile( va( "layouts/%s/%s.dat", map, layout ), + NULL, FS_READ ) > 0 ) { trap_Cvar_Set( "g_layouts", layout ); } @@ -2643,8 +2644,9 @@ qboolean G_admin_restart( gentity_t *ent, int skiparg ) trap_Cvar_VariableStringBuffer( "mapname", map, sizeof( map ) ); G_SayArgv( skiparg + 1, layout, sizeof( layout ) ); - if( trap_FS_FOpenFile( va( "layouts/%s/%s.dat", map, layout ), - NULL, FS_READ ) > 0 ) + if( !Q_stricmp( layout, "*BUILTIN*" ) || + trap_FS_FOpenFile( va( "layouts/%s/%s.dat", map, layout ), + NULL, FS_READ ) > 0 ) { trap_Cvar_Set( "g_layouts", layout ); } |