diff options
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 3783053..61a3460 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2091,9 +2091,6 @@ void HNone_Think( gentity_t *self ) self->nextthink = level.time + 1000; } - -#define TRAPPER_ACCURACY 9 // lower is better - /* ================ ATrapper_FireOnEnemy @@ -5072,6 +5069,28 @@ static void G_LayoutBuildItem( buildable_t buildable, vec3_t origin, } /* +============== +G_LayoutExists + +Check if a layout with the given name exists for the given map. +============== +*/ +qboolean G_LayoutExists( char *mapName, char *layoutName ) +{ + fileHandle_t f; + int len; + if( !layoutName[ 0 ] || !Q_stricmp( layoutName, "*BUILTIN*" ) ) + return qtrue; + + len = trap_FS_FOpenFile( va( "layouts/%s/%s.dat", mapName, layoutName ), &f, FS_READ ); + if( len < 0 ) + return qfalse; + + trap_FS_FCloseFile( f ); + return qtrue; +} + +/* ============ G_LayoutLoad |