diff options
author | Mikko Tiusanen <ams@daug.net> | 2014-08-19 21:47:12 +0300 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2014-08-19 21:47:12 +0300 |
commit | a7ca0aa8c8a66adce30b8ac21d4849b91e4fc75b (patch) | |
tree | 03f08069aaae71ce18dcfd08e32892dd5573977e /src/game/g_buildable.c | |
parent | 5618f2bb4b91f4942d6936fdd18b42e354feee9c (diff) |
Added support for selecting layout with map vote.
Removed outdated comments and moved trapper accuracy to tremulous header.
Disabled map votes during first minute even when there's only one player connected.
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 |