Bump zscript ver to 4.14.1, plus a whole lot of stuff.
- Try to get rid of all implicit casts from string to name, color or class. - Use FindClass where needed. - Used a map in a case where a dictionary was unneeded. - Use new bounce flags where needed. - Replace Legacy of Rust weapons/ammo.
This commit is contained in:
parent
ceae806b68
commit
80db58b0d0
128 changed files with 3074 additions and 3088 deletions
|
|
@ -82,13 +82,13 @@ Class SWWMHandler : EventHandler
|
|||
|
||||
static play void ToggleStore( bool val )
|
||||
{
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||
if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check
|
||||
hnd.gdat.disablestore = !val;
|
||||
}
|
||||
static play void ToggleRevive( bool val )
|
||||
{
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||
if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check
|
||||
hnd.gdat.disablerevive = !val;
|
||||
}
|
||||
|
|
@ -103,17 +103,9 @@ Class SWWMHandler : EventHandler
|
|||
indoomvacation = -1;
|
||||
inultdoom2 = -1;
|
||||
// class-checking ones can be initialized here easily
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( cls.GetClassName() == "RLMonster" ) hasdrlamonsters = true;
|
||||
else if ( cls.GetClassName() == "LOBZombieman" ) haslegionofbones = true;
|
||||
}
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
if ( cls.GetClassName() != "CCards_Global" ) continue;
|
||||
ccloaded = true;
|
||||
break;
|
||||
}
|
||||
if ( FindClass('RLMonster','Actor') ) hasdrlamonsters = true;
|
||||
if ( FindClass('LOBZombieman','Actor') ) haslegionofbones = true;
|
||||
if ( FindClass('CCards_Global','Thinker') ) ccloaded = true;
|
||||
if ( LevelInfo.MapExists("Z1M1") && (LevelInfo.MapChecksum("Z1M1") ~== "2B7744234ED2C162AD08A3255E979F65") )
|
||||
iskdizd = true;
|
||||
// read bludtype files if they can be found
|
||||
|
|
@ -155,10 +147,10 @@ Class SWWMHandler : EventHandler
|
|||
// cache various services into the handler on register
|
||||
// this dramatically reduces overhead by not having to use an iterator every time they're needed
|
||||
// especially noticeable for fun tags, as they're looked up for every monster on map load
|
||||
let si = ServiceIterator.Find("FunTagService");
|
||||
let si = ServiceIterator.Find('FunTagService');
|
||||
Service sv;
|
||||
while ( sv = si.Next() ) funtagsv.Push(sv);
|
||||
si = ServiceIterator.Find("MergeMonsterService");
|
||||
si = ServiceIterator.Find('MergeMonsterService');
|
||||
while ( sv = si.Next() ) mergemonstersv.Push(sv);
|
||||
// start profiling
|
||||
if ( swwm_profstart <= 0 ) return;
|
||||
|
|
@ -181,7 +173,7 @@ Class SWWMHandler : EventHandler
|
|||
if ( !mnotify && (level.maptime >= 5) )
|
||||
{
|
||||
mnotify = true;
|
||||
let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC);
|
||||
let ti = ThinkerIterator.Create('SWWMStats',Thinker.STAT_STATIC);
|
||||
SWWMStats s;
|
||||
while ( s = SWWMStats(ti.Next()) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue