diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-05-18 14:37:21 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-05-18 14:37:21 +0000 |
commit | cb43ed08c3cf6410fe4ce22dac3d07952db92893 (patch) | |
tree | 0b2b2790941743db47913cdf06b819c36b89e161 /source/cmodel.c | |
parent | 179f701f7aec100ac1228fc02778fc4af47b75f0 (diff) |
Accept `all' as special argument to `delstuffcmd' command.
Cleaned up Cvar_Get and fixed semantic bug.
Accept `background keyword in menu scripts.
Renamed `gl_fastsky' to `gl_drawsky'.
If at least one of the sky env maps fails lo load, disable entire sky drawing.
Reworked loading screen.
Fixed Com_Quit argument string handling.
Catch more signals on *nix.
Updated server docs.
Diffstat (limited to 'source/cmodel.c')
-rw-r--r-- | source/cmodel.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/cmodel.c b/source/cmodel.c index 999186b..c2c1aa3 100644 --- a/source/cmodel.c +++ b/source/cmodel.c @@ -602,7 +602,7 @@ const char *CM_LoadMapEx( cm_t *cm, const char *name, int flags, uint32_t *check // // load the file // - length = FS_LoadFileEx( name, (void **)&buf, FS_FLAG_CACHE, TAG_FREE ); + length = FS_LoadFile( name, (void **)&buf ); if( !buf ) { return "file not found"; } @@ -1700,14 +1700,18 @@ qboolean CM_AreasConnected( cm_t *cm, int area1, int area2 ) { if( !cache ) { return qfalse; } - if( map_noareas->integer ) + if( map_noareas->integer ) { return qtrue; - - if( area1 > cache->numareas || area2 > cache->numareas ) + } + if( area1 < 1 || area2 < 1 ) { + return qfalse; + } + if( area1 >= cache->numareas || area2 >= cache->numareas ) { Com_Error( ERR_DROP, "CM_AreasConnected: area > numareas" ); - - if( cm->floodnums[area1] == cm->floodnums[area2] ) + } + if( cm->floodnums[area1] == cm->floodnums[area2] ) { return qtrue; + } return qfalse; } |