Track projectiles in minimap (toggleable).
This commit is contained in:
parent
0501f876d3
commit
f8016516d5
8 changed files with 69 additions and 38 deletions
|
|
@ -236,6 +236,18 @@ extend Class SWWMHandler
|
|||
continue;
|
||||
SWWMSimpleTracker.Track(a);
|
||||
}
|
||||
// we need to refer to the suckables array to find missiles
|
||||
for ( int i=0; i<suckableactors.Size(); i++ )
|
||||
{
|
||||
let a = suckableactors[i];
|
||||
if ( !a || !a.bMISSILE ) continue;
|
||||
Vector2 rv = a.pos.xy-players[consoleplayer].Camera.pos.xy;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
continue;
|
||||
if ( !thesight && !(a.target && a.target.IsFriend(players[consoleplayer].mo)) && !players[consoleplayer].Camera.CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(a);
|
||||
}
|
||||
if ( swwm_mm_portaloverlay && (psectors.Size() > 1) )
|
||||
{
|
||||
// oh boy here we go
|
||||
|
|
@ -266,6 +278,18 @@ extend Class SWWMHandler
|
|||
continue;
|
||||
SWWMSimpleTracker.Track(a);
|
||||
}
|
||||
// we need to refer to the suckables array to find missiles
|
||||
for ( int i=0; i<suckableactors.Size(); i++ )
|
||||
{
|
||||
let a = suckableactors[i];
|
||||
if ( !a || !a.bMISSILE ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
continue;
|
||||
if ( !thesight && !(a.target && a.target.IsFriend(players[consoleplayer].mo)) && !players[consoleplayer].Camera.CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
SWWMSimpleTracker trk = strackers;
|
||||
|
|
@ -279,7 +303,8 @@ extend Class SWWMHandler
|
|||
// "last breath" update
|
||||
if ( (trk.target.bKILLED || (trk.target.Health <= 0))
|
||||
|| ((trk.target is 'Inventory') && (!trk.target.bSPECIAL || Inventory(trk.target).Owner))
|
||||
|| ((trk.target is 'Chancebox') && (trk.target.CurState != trk.target.SpawnState)) )
|
||||
|| ((trk.target is 'Chancebox') && (trk.target.CurState != trk.target.SpawnState))
|
||||
|| (trk.target.default.bMISSILE && !trk.target.bMISSILE) )
|
||||
trk.Update();
|
||||
}
|
||||
// prune expired trackers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue