mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
parent
0084c53cb9
commit
edff9efc98
@ -431,6 +431,13 @@ void R_Init (void)
|
||||
subsector_t *R_PointInSubsector(fixed_t x, fixed_t y)
|
||||
{
|
||||
int nodenum = numnodes-1;
|
||||
|
||||
// [FG] fix crash when loading trivial single subsector maps
|
||||
if (!numnodes)
|
||||
{
|
||||
return subsectors;
|
||||
}
|
||||
|
||||
while (!(nodenum & NF_SUBSECTOR))
|
||||
nodenum = nodes[nodenum].children[R_PointOnSide(x, y, nodes+nodenum)];
|
||||
return &subsectors[nodenum & ~NF_SUBSECTOR];
|
||||
|
Loading…
x
Reference in New Issue
Block a user