Reimplement reverted commit but with some important safety checks.

This commit is contained in:
Mari the Deer 2023-07-29 14:02:52 +02:00
commit d4043c2353
17 changed files with 138 additions and 227 deletions

View file

@ -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;