- fixed: Due to the iteration limit of 100 in the path traverse code, running a trace was effectively limited to somewhere around 12800 map units. Also added the safer exit condition checks from the sight checking code to FPathTraverse.

This commit is contained in:
Christoph Oelckers 2016-04-03 21:41:58 +02:00
commit 3f5e0c682e
2 changed files with 17 additions and 8 deletions

View file

@ -713,7 +713,7 @@ bool SightCheck::P_SightPathTraverse ()
// step through map blocks
// Count is present to prevent a round off error from skipping the break
for (count = 0 ; count < 100 ; count++)
for (count = 0 ; count < 1000 ; count++)
{
// end traversing when reaching the end of the blockmap
// an early out is not possible because with portals a trace can easily land outside the map's bounds.
@ -737,7 +737,7 @@ bool SightCheck::P_SightPathTraverse ()
case 0: // neither xintercept nor yintercept match!
sightcounts[5]++;
// Continuing won't make things any better, so we might as well stop right here
count = 100;
count = 1000;
break;
case 1: // xintercept matches