Revert "Replace usage of ThinkerIterator and BlockThingsIterator in various places where we can instead loop through sector thing lists."

This reverts commit 2bd1cb0657.
This commit is contained in:
Mari the Deer 2023-07-29 13:48:33 +02:00
commit 3b10e684b6
17 changed files with 220 additions and 113 deletions

View file

@ -3,6 +3,7 @@
extend Class SWWMHandler
{
ui SWWMProjectionData projdata;
transient ui ThinkerIterator dbgti;
private ui void DrawWorldLine( RenderEvent e, Vector3 apos, Vector3 bpos, Color col )
{
@ -102,7 +103,10 @@ extend Class SWWMHandler
if ( !swwm_debugview ) return;
// prepare projection data, we're going to need this
SWWMUtility.PrepareProjData(projdata,e.ViewPos,e.ViewAngle,e.ViewPitch,e.ViewRoll,players[consoleplayer].fov);
foreach ( s:level.Sectors ) for ( Actor a=s.thinglist; a; a=a.snext )
if ( !dbgti ) dbgti = ThinkerIterator.Create("Actor");
else dbgti.Reinit();
Actor a;
while ( a = Actor(dbgti.Next()) )
{
if ( (a == players[consoleplayer].Camera) && !(players[consoleplayer].cheats&CF_CHASECAM) ) continue;
if ( a.bINVISIBLE && !(a is 'DynamicLight') ) continue;