Skip to content

Commit

Permalink
Use original area depth when pr_checkextension is set to 0
Browse files Browse the repository at this point in the history
See andrei-drexler/ironwail#124 for discussion.
This makes pr_checkextension 0 match the original behavior (mge2m2 needs either
this or the modified traces pr_checkextension 1 gives to avoid a softlock)
  • Loading branch information
temx committed Sep 6, 2022
1 parent 60ed247 commit a97f2f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Quake/progs.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ typedef struct areanode_s
link_t trigger_edicts;
link_t solid_edicts;
} areanode_t;
#define VANILLA_AREA_DEPTH 4
#define MAX_AREA_DEPTH 9
#define AREA_NODES (2<<MAX_AREA_DEPTH)

Expand Down
2 changes: 1 addition & 1 deletion Quake/world.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ areanode_t *SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs)
else
anode->axis = 1;

if (depth == MAX_AREA_DEPTH || size[anode->axis] < 500)
if (pr_checkextension.value ? depth == MAX_AREA_DEPTH || size[anode->axis] < 500 : depth == VANILLA_AREA_DEPTH)
{
anode->axis = -1;
anode->children[0] = anode->children[1] = NULL;
Expand Down

0 comments on commit a97f2f8

Please sign in to comment.