Replace usage of ThinkerIterator and BlockThingsIterator in various places where we can instead loop through sector thing lists.
While in the latter case this may result in longer loops, it also reduces GC thrashing by not needing to allocate an iterator every time. This also simplifies the DoBlast code as there is no longer a need to manually traverse portals vertically.
This commit is contained in:
parent
ea86ab99d0
commit
2bd1cb0657
17 changed files with 113 additions and 220 deletions
|
|
@ -3,7 +3,6 @@
|
|||
extend Class SWWMHandler
|
||||
{
|
||||
ui SWWMProjectionData projdata;
|
||||
transient ui ThinkerIterator dbgti;
|
||||
|
||||
private ui void DrawWorldLine( RenderEvent e, Vector3 apos, Vector3 bpos, Color col )
|
||||
{
|
||||
|
|
@ -103,10 +102,7 @@ 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);
|
||||
if ( !dbgti ) dbgti = ThinkerIterator.Create("Actor");
|
||||
else dbgti.Reinit();
|
||||
Actor a;
|
||||
while ( a = Actor(dbgti.Next()) )
|
||||
foreach ( s:level.Sectors ) for ( Actor a=s.thinglist; a; a=a.snext )
|
||||
{
|
||||
if ( (a == players[consoleplayer].Camera) && !(players[consoleplayer].cheats&CF_CHASECAM) ) continue;
|
||||
if ( a.bINVISIBLE && !(a is 'DynamicLight') ) continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue