Skip to content

Commit

Permalink
added an opportunity to draw world areas behind doors etc
Browse files Browse the repository at this point in the history
  • Loading branch information
entdark committed May 2, 2016
1 parent 642b5f5 commit 1ead82a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions codemp/rd-vanilla/tr_init.cpp
Expand Up @@ -180,6 +180,7 @@ cvar_t *r_modelpoolmegs;

cvar_t *r_backEndMegs;

cvar_t *r_drawAllAreas;
/*
Ghoul2 Insert Start
*/
Expand Down Expand Up @@ -1079,6 +1080,8 @@ Ghoul2 Insert End
if (ri.Sys_LowPhysicalMemory() )
ri.Cvar_Set("r_modelpoolmegs", "0");

r_drawAllAreas = ri.Cvar_Get("r_drawAllAreas", "0", CVAR_TEMP | CVAR_CHEAT);

// make sure all the commands added here are also
// removed in R_Shutdown
ri.Cmd_AddCommand( "imagelist", R_ImageList_f );
Expand Down
1 change: 1 addition & 0 deletions codemp/rd-vanilla/tr_local.h
Expand Up @@ -1287,6 +1287,7 @@ extern cvar_t *r_simpleMipMaps;
extern cvar_t *r_showImages;
extern cvar_t *r_debugSort;

extern cvar_t *r_drawAllAreas;

//extern cvar_t *mme_aviFormat;
//extern cvar_t *mme_screenshotName;
Expand Down
6 changes: 4 additions & 2 deletions codemp/rd-vanilla/tr_world.cpp
Expand Up @@ -1665,8 +1665,10 @@ static void R_MarkLeaves (void) {
}

// check for door connection
if ( (tr.refdef.areamask[leaf->area>>3] & (1<<(leaf->area&7)) ) ) {
continue; // not visible
if (!r_drawAllAreas->integer) {
if ((tr.refdef.areamask[leaf->area >> 3] & (1 << (leaf->area & 7)))) {
continue; // not visible
}
}

parent = leaf;
Expand Down

0 comments on commit 1ead82a

Please sign in to comment.