Healthbar / Damnum backport from sidemods.
This commit is contained in:
parent
12018e364e
commit
b40d8d0633
1743 changed files with 683 additions and 869 deletions
|
|
@ -257,40 +257,6 @@ extend Class SWWMHandler
|
|||
Console.Printf("Extended hitboxes can't be re-enabled at runtime. Please restart the map.");
|
||||
return;
|
||||
}
|
||||
else if ( e.Name ~== "swwmupdatetrackers" )
|
||||
{
|
||||
if ( multiplayer && (e.player != Net_Arbitrator) )
|
||||
{
|
||||
if ( e.player == consoleplayer )
|
||||
Console.Printf("Only the net arbitrator can call this event.");
|
||||
return;
|
||||
}
|
||||
if ( swwm_notrack )
|
||||
{
|
||||
int n = trackers_cnt;
|
||||
while ( trackers )
|
||||
{
|
||||
let next = trackers.next;
|
||||
trackers.Destroy(); // wow that's simple, all in one line
|
||||
trackers = next;
|
||||
}
|
||||
trackers_cnt = 0;
|
||||
Console.Printf("%d trackers removed.",n);
|
||||
return;
|
||||
}
|
||||
int n = trackers_cnt;
|
||||
let ti = ThinkerIterator.Create("Actor");
|
||||
Actor a;
|
||||
while ( a = Actor(ti.Next()) )
|
||||
{
|
||||
if ( (!a.bSHOOTABLE && !a.bISMONSTER) || (a is 'LampMoth') || (a is 'CompanionLamp') ) continue;
|
||||
let trk = SWWMCombatTracker.Spawn(self,a,true);
|
||||
if ( !a.player ) trk.maxhealth = max(a.health,a.GetSpawnHealth());
|
||||
}
|
||||
n = (trackers_cnt-n);
|
||||
Console.Printf("%d trackers added.",n);
|
||||
return;
|
||||
}
|
||||
else if ( e.Name ~== "swwmtrimsuckables" )
|
||||
{
|
||||
if ( multiplayer && (e.player != Net_Arbitrator) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue