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:
Mari the Deer 2025-03-13 14:45:01 +01:00
commit 80db58b0d0
128 changed files with 3074 additions and 3088 deletions

View file

@ -17,8 +17,8 @@ Class BlastSuitItem : SWWMSpareArmor
Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png"; Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png";
Inventory.PickupMessage "$T_BLASTSUIT"; Inventory.PickupMessage "$T_BLASTSUIT";
Inventory.UseSound "armor/blastsuit"; Inventory.UseSound "armor/blastsuit";
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMSpareArmor.GiveArmor "BlastSuit"; SWWMSpareArmor.GiveArmor 'BlastSuit';
+NOGRAVITY; +NOGRAVITY;
} }
States States
@ -44,8 +44,8 @@ Class WarArmorItem : SWWMSpareArmor
Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png"; Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png";
Inventory.PickupMessage "$T_WARARMOR"; Inventory.PickupMessage "$T_WARARMOR";
Inventory.UseSound "armor/wararmor"; Inventory.UseSound "armor/wararmor";
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMSpareArmor.GiveArmor "WarArmor"; SWWMSpareArmor.GiveArmor 'WarArmor';
+NOGRAVITY; +NOGRAVITY;
} }
States States

View file

@ -1,3 +1,3 @@
[default] [default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1196 \cu(dom 09 mar 2025 17:08:51 CET)\c-"; SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1198 \cu(jue 13 mar 2025 14:50:58 CET)\c-";
SWWM_SHORTVER="\cw1.3pre r1196 \cu(2025-03-09 17:08:51)\c-"; SWWM_SHORTVER="\cw1.3pre r1198 \cu(2025-03-13 14:50:58)\c-";

View file

@ -1,4 +1,4 @@
version "4.14" version "4.14.1"
/* /*
DEMOLITIONIST Main Codebase DEMOLITIONIST Main Codebase

View file

@ -58,7 +58,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor
SetSectorSpecial(13,0); SetSectorSpecial(13,0);
// paint it black // paint it black
for ( int i=1; i<4; i++ ) for ( int i=1; i<4; i++ )
level.Sectors[13].SetSpecialColor(i,"Black"); level.Sectors[13].SetSpecialColor(i,0xFF000000);
// teleport sequence // teleport sequence
for ( int i=299; i<=306; i++ ) for ( int i=299; i<=306; i++ )
SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT')); SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT'));
@ -76,7 +76,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor
SetSectorSpecial(66,0); SetSectorSpecial(66,0);
// paint it black // paint it black
for ( int i=1; i<4; i++ ) for ( int i=1; i<4; i++ )
level.Sectors[66].SetSpecialColor(i,"Black"); level.Sectors[66].SetSpecialColor(i,0xFF000000);
// teleport sequence // teleport sequence
for ( int i=299; i<=306; i++ ) for ( int i=299; i<=306; i++ )
SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT')); SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT'));
@ -95,7 +95,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor
SetSectorSpecial(538,0); SetSectorSpecial(538,0);
// paint it black // paint it black
for ( int i=1; i<4; i++ ) for ( int i=1; i<4; i++ )
level.Sectors[538].SetSpecialColor(i,"Black"); level.Sectors[538].SetSpecialColor(i,0xFF000000);
// teleport sequence // teleport sequence
static const int exitlines[] = static const int exitlines[] =
{ {

View file

@ -24,12 +24,8 @@ Class SWWMHDoomHandler : StaticEventHandler
override void OnRegister() override void OnRegister()
{ {
foreach ( cls:AllActorClasses ) if ( FindClass('HDoomPlayer','PlayerPawn') )
{
if ( cls.GetClassName() != "HDoomPlayer" ) continue;
detected = true; detected = true;
break;
}
if ( !detected ) if ( !detected )
return; return;
callout_len = int(ceil((S_GetLength("hdoom/horny")*GameTicRate)/16)*16); callout_len = int(ceil((S_GetLength("hdoom/horny")*GameTicRate)/16)*16);

View file

@ -36,27 +36,22 @@ Class SWWMBrutalHandler : StaticEventHandler
override void OnRegister() override void OnRegister()
{ {
// check for brutal doom // check for brutal doom
foreach ( cls:AllActorClasses ) if ( FindClass('Doomer','PlayerPawn') || FindClass('BDoomer','PlayerPawn') || FindClass('BEDoomer','PlayerPawn') )
{ detected = true;
if ( (cls.GetClassName() == 'Doomer') || (cls.GetClassName() == 'BDoomer') || (cls.GetClassName() == 'BEDoomer') ) if ( !detected )
{ return;
detected = true; let shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
} shnd.isbd = true;
if ( !detected ) continue; Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,
let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); "\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n"
shnd.isbd = true; "\cx┃ \cfIf you have BD on your autoload you really shouldn't.\cx ┃\c-\n"
Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, "\cx┃ \cfIf you manually loaded it with this mod, why would you?\cx ┃\c-\n"
"\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n" "\cx┃ \cfThey're not compatible and never will be.\cx ┃\c-\n"
"\cx┃ \cfIf you have BD on your autoload you really shouldn't.\cx ┃\c-\n" "\cx┃ \cfThis mod will now shit the bed once you go in-game,\cx ┃\c-\n"
"\cx┃ \cfIf you manually loaded it with this mod, why would you?\cx ┃\c-\n" "\cx┃ \cfand trust me, it's better this way.\cx ┃\c-\n"
"\cx┃ \cfThey're not compatible and never will be.\cx ┃\c-\n" "\cx┃ \cf<See you again, have a nice day>\cx ┃\c-\n"
"\cx┃ \cfThis mod will now shit the bed once you go in-game,\cx ┃\c-\n" "\cx┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\c-");
"\cx┃ \cfand trust me, it's better this way.\cx ┃\c-\n" S_StartSound("compat/warn",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
"\cx┃ \cf<See you again, have a nice day>\cx ┃\c-\n"
"\cx┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\c-");
S_StartSound("compat/warn",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
break;
}
} }
override void WorldLoaded( WorldEvent e ) override void WorldLoaded( WorldEvent e )
@ -95,12 +90,12 @@ Class SWWMBrutalHandler : StaticEventHandler
eztextpos[2] = (80.,140.); eztextpos[2] = (80.,140.);
eztextpos[3] = (100.,1660.); eztextpos[3] = (100.,1660.);
eztextpos[4] = (300.,1660.); eztextpos[4] = (300.,1660.);
ezcolor[0] = Font.FindFontColor("BDSayaRed"); ezcolor[0] = Font.FindFontColor('BDSayaRed');
ezcolor[1] = Font.FindFontColor("BDSayaRed"); ezcolor[1] = Font.FindFontColor('BDSayaRed');
ezcolor[2] = Font.FindFontColor("BDDemoGreen"); ezcolor[2] = Font.FindFontColor('BDDemoGreen');
ezcolor[3] = Font.FindFontColor("BDDemoGreen"); ezcolor[3] = Font.FindFontColor('BDDemoGreen');
ezcolor[4] = Font.FindFontColor("BDSayaRed"); ezcolor[4] = Font.FindFontColor('BDSayaRed');
fnt = Font.GetFont("TewiFontOutline"); fnt = Font.GetFont('TewiFontOutline');
for ( int i=0; i<5; i++ ) for ( int i=0; i<5; i++ )
{ {
ezlines[i] = fnt.BreakLines(eztext[i],1000); ezlines[i] = fnt.BreakLines(eztext[i],1000);
@ -175,30 +170,30 @@ Class SWWMBrutalHandler : StaticEventHandler
override void RenderOverlay( RenderEvent e ) override void RenderOverlay( RenderEvent e )
{ {
if ( !detected ) return; if ( !detected ) return;
Screen.Dim("Black",clamp((timer+e.fractic)/50.,0.,.5),0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFF000000,clamp((timer+e.fractic)/50.,0.,.5),0,0,Screen.GetWidth(),Screen.GetHeight());
if ( timer < 50 ) return; if ( timer < 50 ) return;
double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.)/6.; double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.)/6.;
Vector2 pos = ((Screen.GetWidth()-(2800.*hs))/2.,(Screen.GetHeight()-(2100.*hs))/2.); Vector2 pos = ((Screen.GetWidth()-(2800.*hs))/2.,(Screen.GetHeight()-(2100.*hs))/2.);
if ( timer > 300 ) if ( timer > 300 )
{ {
double fact = clamp(((timer+e.fractic)-300.)/100.,0.,1.); double fact = clamp(((timer+e.fractic)-300.)/100.,0.,1.);
Screen.Dim("Red",fact,0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Add); Screen.Dim(0xFFFF0000,fact,0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Add);
rss = MSTime()/10; rss = MSTime()/10;
pos.x += RandomShiver()*128.*hs*fact*fact; pos.x += RandomShiver()*128.*hs*fact*fact;
pos.y += RandomShiver()*128.*hs*fact*fact; pos.y += RandomShiver()*128.*hs*fact*fact;
} }
Screen.SetClipRect(int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs)); Screen.SetClipRect(int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs));
Screen.Dim("White",1.,int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs)); Screen.Dim(0xFFFFFFFF,1.,int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs));
rss = MSTime()/40; rss = MSTime()/40;
for ( int i=0; i<6; i++ ) for ( int i=0; i<6; i++ )
{ {
double ypos = RandomOffset()*2100.*hs; double ypos = RandomOffset()*2100.*hs;
Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,8.*hs,"Black"); Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,8.*hs,0xFF000000);
} }
for ( int i=0; i<12; i++ ) for ( int i=0; i<12; i++ )
{ {
double ypos = RandomOffset()*2100.*hs; double ypos = RandomOffset()*2100.*hs;
Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,2.*hs,"Black"); Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,2.*hs,0xFF000000);
} }
if ( ezstate[1] ) if ( ezstate[1] )
Screen.DrawTexture(eztex[2],false,pos.x+SWWMUtility.Lerp(ezslide[3],ezslide[2],e.fractic),pos.y,DTA_ScaleX,hs,DTA_ScaleY,hs); Screen.DrawTexture(eztex[2],false,pos.x+SWWMUtility.Lerp(ezslide[3],ezslide[2],e.fractic),pos.y,DTA_ScaleX,hs,DTA_ScaleY,hs);
@ -218,6 +213,6 @@ Class SWWMBrutalHandler : StaticEventHandler
Screen.ClearClipRect(); Screen.ClearClipRect();
Screen.DrawTexture(eztex[0],false,pos.x,pos.y,DTA_ScaleX,hs,DTA_ScaleY,hs); Screen.DrawTexture(eztex[0],false,pos.x,pos.y,DTA_ScaleX,hs,DTA_ScaleY,hs);
if ( timer > 300 ) if ( timer > 300 )
Screen.Dim("Red",clamp(((timer+e.fractic)-350.)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Translucent); Screen.Dim(0xFFFF0000,clamp(((timer+e.fractic)-350.)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Translucent);
} }
} }

View file

@ -215,7 +215,7 @@ Class RayBolt : MagAmmo
Tag "$T_RAYBOLT"; Tag "$T_RAYBOLT";
MagAmmo.PickupTag "RAYBOLT"; MagAmmo.PickupTag "RAYBOLT";
Stamina -8000; Stamina -8000;
MagAmmo.ParentAmmo "RayAmmo"; MagAmmo.ParentAmmo 'RayAmmo';
MagAmmo.ClipSize 10; MagAmmo.ClipSize 10;
MagAmmo.BackpackAmount 2; MagAmmo.BackpackAmount 2;
Inventory.MaxAmount 10; Inventory.MaxAmount 10;
@ -254,7 +254,7 @@ Class RayAmmo : SWWMAmmo
Ammo.BackpackAmount 0; Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 5; Ammo.BackpackMaxAmount 5;
Ammo.DropAmount 1; Ammo.DropAmount 1;
SWWMAmmo.MagAmmoType "RayBolt"; SWWMAmmo.MagAmmoType 'RayBolt';
Accuracy 90; Accuracy 90;
} }
States States
@ -272,7 +272,7 @@ Class MisterRound : MagAmmo
Tag "$T_MRROUND"; Tag "$T_MRROUND";
MagAmmo.PickupTag "MRROUND"; MagAmmo.PickupTag "MRROUND";
Stamina -16000; Stamina -16000;
MagAmmo.ParentAmmo "MisterAmmo"; MagAmmo.ParentAmmo 'MisterAmmo';
MagAmmo.ClipSize 12; MagAmmo.ClipSize 12;
MagAmmo.BackpackAmount 1; MagAmmo.BackpackAmount 1;
Inventory.MaxAmount 12; Inventory.MaxAmount 12;
@ -318,7 +318,7 @@ Class MisterAmmo : SWWMAmmo
Ammo.BackpackAmount 0; Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 3; Ammo.BackpackMaxAmount 3;
Ammo.DropAmount 1; Ammo.DropAmount 1;
SWWMAmmo.MagAmmoType "MisterRound"; SWWMAmmo.MagAmmoType 'MisterRound';
Accuracy 90; Accuracy 90;
} }
States States
@ -359,7 +359,7 @@ Class MisterGAmmo : SWWMAmmo
MagAmmo.PickupTag "ULTIMATEPOD"; MagAmmo.PickupTag "ULTIMATEPOD";
Stamina -400000; Stamina -400000;
Inventory.PickupSound "misc/bullet_pkup_vip"; Inventory.PickupSound "misc/bullet_pkup_vip";
MagAmmo.ParentAmmo "UltimateAmmo"; MagAmmo.ParentAmmo 'UltimateAmmo';
MagAmmo.ClipSize 4; MagAmmo.ClipSize 4;
Inventory.MaxAmount 4; Inventory.MaxAmount 4;
} }
@ -384,7 +384,7 @@ Class UltimateAmmo : SWWMAmmo
Ammo.BackpackAmount 0; Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 2; Ammo.BackpackMaxAmount 2;
Ammo.DropAmount 1; Ammo.DropAmount 1;
SWWMAmmo.MagAmmoType "UltimatePod"; SWWMAmmo.MagAmmoType 'UltimatePod';
} }
States States
{ {

View file

@ -36,7 +36,7 @@ Class PlasmaBlast : SWWMWeapon
Weapon.SlotPriority 3.; Weapon.SlotPriority 3.;
Weapon.SelectionOrder 1100; Weapon.SelectionOrder 1100;
Inventory.MaxAmount 2; Inventory.MaxAmount 2;
Weapon.SisterWeapon "DualPlasmaBlast"; Weapon.SisterWeapon 'DualPlasmaBlast';
Stamina 7000; Stamina 7000;
PlasmaBlast.ClipCount 8; PlasmaBlast.ClipCount 8;
+WEAPON.EXPLOSIVE; +WEAPON.EXPLOSIVE;
@ -66,7 +66,7 @@ Class DualPlasmaBlast : SWWMWeapon
Weapon.SlotNumber 2; Weapon.SlotNumber 2;
Weapon.SlotPriority 4.; Weapon.SlotPriority 4.;
Weapon.SelectionOrder 1050; Weapon.SelectionOrder 1050;
Weapon.SisterWeapon "PlasmaBlast"; Weapon.SisterWeapon 'PlasmaBlast';
DualPlasmaBlast.ClipCount 8; DualPlasmaBlast.ClipCount 8;
+WEAPON.EXPLOSIVE; +WEAPON.EXPLOSIVE;
+SWWMWEAPON.HIDEINMENU; +SWWMWEAPON.HIDEINMENU;

View file

@ -39,11 +39,11 @@ Class ModernSparkster : SWWMWeapon
Weapon.SlotNumber 7; Weapon.SlotNumber 7;
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 550; Weapon.SelectionOrder 550;
Weapon.AmmoType1 "SparksterBAmmo"; Weapon.AmmoType1 'SparksterBAmmo';
Weapon.AmmoGive1 1; Weapon.AmmoGive1 1;
Weapon.AmmoType2 "SparksterRAmmo"; Weapon.AmmoType2 'SparksterRAmmo';
Weapon.AmmoGive2 1; Weapon.AmmoGive2 1;
SWWMWeapon.DropAmmoType "SWWMCellAmmoSmall"; SWWMWeapon.DropAmmoType 'SWWMCellAmmoSmall';
ModernSparkster.ClipCount 4; ModernSparkster.ClipCount 4;
ModernSparkster.ClipCount2 4; ModernSparkster.ClipCount2 4;
Stamina 220000; Stamina 220000;

View file

@ -153,7 +153,7 @@ extend Class MisterRifle
y -= pady/2; y -= pady/2;
w += padx; w += padx;
h += pady; h += pady;
TouchScreen.Dim("Black",.8,x,y,w,h); TouchScreen.Dim(0xFF000000,.8,x,y,w,h);
TouchScreen.DrawTexture(FrameTex,false,x,y,DTA_SrcX,0.,DTA_SrcY,0.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,1,DTA_DestHeight,1); TouchScreen.DrawTexture(FrameTex,false,x,y,DTA_SrcX,0.,DTA_SrcY,0.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,1,DTA_DestHeight,1);
if ( w > 2 ) TouchScreen.DrawTexture(FrameTex,false,x+1,y,DTA_SrcX,1.,DTA_SrcY,0.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,int(w-2),DTA_DestHeight,1); if ( w > 2 ) TouchScreen.DrawTexture(FrameTex,false,x+1,y,DTA_SrcX,1.,DTA_SrcY,0.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,int(w-2),DTA_DestHeight,1);
if ( h > 2 ) TouchScreen.DrawTexture(FrameTex,false,x,y+1,DTA_SrcX,0.,DTA_SrcY,1.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,1,DTA_DestHeight,int(h-2)); if ( h > 2 ) TouchScreen.DrawTexture(FrameTex,false,x,y+1,DTA_SrcX,0.,DTA_SrcY,1.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,1,DTA_DestHeight,int(h-2));
@ -182,14 +182,14 @@ extend Class MisterRifle
oldgrenade = gstate; oldgrenade = gstate;
// Side touchscreen // Side touchscreen
if ( !TouchScreen ) TouchScreen = TexMan.GetCanvas("MORTLED1"); if ( !TouchScreen ) TouchScreen = TexMan.GetCanvas("MORTLED1");
if ( !MortalFontSmall ) MortalFontSmall = Font.GetFont("MortalFont20"); if ( !MortalFontSmall ) MortalFontSmall = Font.GetFont('MortalFont20');
if ( !MortalFontMed ) MortalFontMed = Font.GetFont("MortalFont40"); if ( !MortalFontMed ) MortalFontMed = Font.GetFont('MortalFont40');
if ( !MortalFontBig ) MortalFontBig = Font.GetFont("MortalFont80"); if ( !MortalFontBig ) MortalFontBig = Font.GetFont('MortalFont80');
if ( !MortalBG ) MortalBG = TexMan.CheckForTexture("models/canvas/MortalBG.png"); if ( !MortalBG ) MortalBG = TexMan.CheckForTexture("models/canvas/MortalBG.png");
if ( !MortalIcons[0] ) MortalIcons[0] = TexMan.CheckForTexture("models/canvas/MortalFireIcons.png"); if ( !MortalIcons[0] ) MortalIcons[0] = TexMan.CheckForTexture("models/canvas/MortalFireIcons.png");
if ( !MortalIcons[1] ) MortalIcons[1] = TexMan.CheckForTexture("models/canvas/MortalGrenadeIcons.png"); if ( !MortalIcons[1] ) MortalIcons[1] = TexMan.CheckForTexture("models/canvas/MortalGrenadeIcons.png");
TouchScreen.DrawTexture(MortalBG,false,0,0); TouchScreen.DrawTexture(MortalBG,false,0,0);
TouchScreen.Dim("Black",.8,0,0,256,22); TouchScreen.Dim(0xFF000000,.8,0,0,256,22);
String str = "MR\cu-\c-"..serialnum; String str = "MR\cu-\c-"..serialnum;
TouchScreen.DrawText(MortalFontSmall,Font.CR_WHITE,8,0,str); TouchScreen.DrawText(MortalFontSmall,Font.CR_WHITE,8,0,str);
str = DemolitionistMenu.CrimeTime(c_year,c_month,c_day,c_hour,c_minute,c_tz,true); str = DemolitionistMenu.CrimeTime(c_year,c_month,c_day,c_hour,c_minute,c_tz,true);
@ -200,20 +200,20 @@ extend Class MisterRifle
int fw = MortalFontBig.StringWidth(str), fh = MortalFontBig.GetHeight(); int fw = MortalFontBig.StringWidth(str), fh = MortalFontBig.GetHeight();
DrawWindowFrame(80-fw/2,72-fh/2,fw,fh,32); DrawWindowFrame(80-fw/2,72-fh/2,fw,fh,32);
bool blink = (ingun<=4)&&(gametic%16<=8); bool blink = (ingun<=4)&&(gametic%16<=8);
if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniBlurp"),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000); if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniBlurp'),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000);
else else
{ {
TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniBlurp"),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000); TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniBlurp'),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000);
if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniBlurp"),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000); if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniBlurp'),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000);
} }
if ( ammoflash && (gametic < ammoflash) ) if ( ammoflash && (gametic < ammoflash) )
{ {
double alph = (increase?clamp((ammoflash-(gametic+e.fractic))/25.,0.,1.):clamp((ammoflash-(gametic+e.fractic))/5.,0.,1.))**2.; double alph = (increase?clamp((ammoflash-(gametic+e.fractic))/25.,0.,1.):clamp((ammoflash-(gametic+e.fractic))/5.,0.,1.))**2.;
if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniWhiteFlash"),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniWhiteFlash'),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add);
else else
{ {
TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniWhiteFlash"),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniWhiteFlash'),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add);
if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniWhiteFlash"),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniWhiteFlash'),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add);
} }
} }
fw = 64; fw = 64;
@ -242,7 +242,7 @@ extend Class MisterRifle
fw = MortalFontMed.StringWidth(str); fw = MortalFontMed.StringWidth(str);
fh = MortalFontMed.GetHeight(); fh = MortalFontMed.GetHeight();
DrawWindowFrame(128-fw/2,72-fh/2,fw,fh,8,4); DrawWindowFrame(128-fw/2,72-fh/2,fw,fh,8,4);
TouchScreen.DrawText(MortalFontMed,Font.FindFontColor("MiniBrass"),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%8>=4)?0x80000000:0x000000); TouchScreen.DrawText(MortalFontMed,Font.FindFontColor('MiniBrass'),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%8>=4)?0x80000000:0x000000);
} }
if ( noammotic && (noammotic > gametic) ) if ( noammotic && (noammotic > gametic) )
{ {
@ -251,7 +251,7 @@ extend Class MisterRifle
fw = MortalFontBig.StringWidth(str); fw = MortalFontBig.StringWidth(str);
fh = MortalFontBig.GetHeight(); fh = MortalFontBig.GetHeight();
DrawWindowFrame(128-fw/2,72-fh/2,fw,fh,16,8); DrawWindowFrame(128-fw/2,72-fh/2,fw,fh,16,8);
TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniRed"),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%16>=8)?0x80000000:0x000000); TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniRed'),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%16>=8)?0x80000000:0x000000);
} }
if ( prefirecnt > 0 ) if ( prefirecnt > 0 )
{ {
@ -279,12 +279,12 @@ extend Class MisterRifle
double bw = PreFireInter.GetValue(e.FracTic); double bw = PreFireInter.GetValue(e.FracTic);
Color barcol = SWWMUtility.LerpColor(0xFF000080,0xFF00C0FF,bw/100.); Color barcol = SWWMUtility.LerpColor(0xFF000080,0xFF00C0FF,bw/100.);
TouchScreen.Dim(barcol,1.,128-50,72+(fh/2-12),int(bw),8); TouchScreen.Dim(barcol,1.,128-50,72+(fh/2-12),int(bw),8);
TouchScreen.DrawText(fnt,Font.FindFontColor("MiniCyanblu"),128-strw/2,72-fh/2+fofs,str); TouchScreen.DrawText(fnt,Font.FindFontColor('MiniCyanblu'),128-strw/2,72-fh/2+fofs,str);
if ( (prefirecnt >= 100) && ((gametic-holdtic)%32 <= 16) ) if ( (prefirecnt >= 100) && ((gametic-holdtic)%32 <= 16) )
{ {
double alph = clamp(1.-((gametic-holdtic)%32)/16.,0.,1.)**2.; double alph = clamp(1.-((gametic-holdtic)%32)/16.,0.,1.)**2.;
TouchScreen.Dim(0xFFFFFFFF,alph*.8,128-50,72+(fh/2-12),int(bw),8,STYLE_Add); TouchScreen.Dim(0xFFFFFFFF,alph*.8,128-50,72+(fh/2-12),int(bw),8,STYLE_Add);
TouchScreen.DrawText(fnt,Font.FindFontColor("MiniWhiteFlash"),128-strw/2,72-fh/2+fofs,str,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); TouchScreen.DrawText(fnt,Font.FindFontColor('MiniWhiteFlash'),128-strw/2,72-fh/2+fofs,str,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add);
} }
} }
// Holo sub-screen // Holo sub-screen

View file

@ -158,7 +158,7 @@ extend Class MisterRifle
if ( !ModeFont ) ModeFont = Font.GetFont('MiniHUDShadow'); if ( !ModeFont ) ModeFont = Font.GetFont('MiniHUDShadow');
Screen.DrawTexture(WeaponBox,false,bx-23,by-32,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawTexture(WeaponBox,false,bx-23,by-32,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
static const int fmod[] = {0x0050,0x0043,0x0053,0x004F}; static const int fmod[] = {0x0050,0x0043,0x0053,0x004F};
Screen.DrawChar(ModeFont,Font.FindFontColor("MiniBrass"),bx-20,by-20,fmod[firemode],DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawChar(ModeFont,Font.FindFontColor('MiniBrass'),bx-20,by-20,fmod[firemode],DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( chambered ) Screen.DrawTexture(BulletTex[0],false,bx-12,by-30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,fired?0x80000000:0x00000000); if ( chambered ) Screen.DrawTexture(BulletTex[0],false,bx-12,by-30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,fired?0x80000000:0x00000000);
for ( int i=0; i<clipcount; i++ ) for ( int i=0; i<clipcount; i++ )
Screen.DrawTexture(BulletTex[0],false,bx-12,(by-27)+2*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawTexture(BulletTex[0],false,bx-12,(by-27)+2*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);

View file

@ -24,7 +24,7 @@ Class ItamexHammer : SWWMWeapon
A_BumpFOV(.9); A_BumpFOV(.9);
A_QuakeEx(5.,5.,5.,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.35); A_QuakeEx(5.,5.,5.,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.35);
A_AlertMonsters(swwm_uncapalert?0:800); A_AlertMonsters(swwm_uncapalert?0:800);
return nojump?ResolveState(null):ResolveState("FireHit"); return nojump?ResolveState(null):ResolveState('FireHit');
} }
A_BumpFOV(.95); A_BumpFOV(.95);
A_QuakeEx(.5,.5,.5,15,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.1); A_QuakeEx(.5,.5,.5,15,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.1);
@ -124,7 +124,7 @@ Class ItamexHammer : SWWMWeapon
{ {
A_StartSound("itamex/swing",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("itamex/swing",CHAN_WEAPON,CHANF_OVERLAP);
invoker.bSpinning = false; invoker.bSpinning = false;
return ResolveState("ZoomEnd"); return ResolveState('ZoomEnd');
} }
return ResolveState(null); return ResolveState(null);
} }
@ -159,7 +159,7 @@ Class ItamexHammer : SWWMWeapon
if ( !(player.cmd.buttons&BT_ALTATTACK) ) if ( !(player.cmd.buttons&BT_ALTATTACK) )
{ {
A_WeaponOffset(0,32,WOF_INTERPOLATE); A_WeaponOffset(0,32,WOF_INTERPOLATE);
return ResolveState("AltRelease"); return ResolveState('AltRelease');
} }
return ResolveState(null); return ResolveState(null);
} }
@ -189,7 +189,7 @@ Class ItamexHammer : SWWMWeapon
A_BumpFOV(.85); A_BumpFOV(.85);
A_QuakeEx(8.,8.,8.,10,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:1.); A_QuakeEx(8.,8.,8.,10,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:1.);
A_AlertMonsters(swwm_uncapalert?0:2500); A_AlertMonsters(swwm_uncapalert?0:2500);
let s = Spawn("HammerShockwave",(pos.x,pos.y,floorz)); let s = Spawn('HammerShockwave',(pos.x,pos.y,floorz));
s.target = self; s.target = self;
s.special1 = int(invoker.charge*3); s.special1 = int(invoker.charge*3);
} }
@ -318,7 +318,7 @@ Class ItamexHammer : SWWMWeapon
invoker.hitcnt = 0; invoker.hitcnt = 0;
invoker.bFalling = true; invoker.bFalling = true;
A_StartSound("itamex/spin",CHAN_WEAPONEXTRA,CHANF_LOOP); A_StartSound("itamex/spin",CHAN_WEAPONEXTRA,CHANF_LOOP);
return ResolveState("AltFall"); return ResolveState('AltFall');
} }
A_BumpView(3.); A_BumpView(3.);
A_HammerAltHit(); A_HammerAltHit();

View file

@ -17,7 +17,7 @@ Class HammerShockwave : SWWMNonInteractiveActor
for ( int i=0; i<360; i+=5 ) for ( int i=0; i<360; i+=5 )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,3); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,3);
let s = Spawn("SWWMSmoke",Vec3Angle(4,i,8)); let s = Spawn('SWWMSmoke',Vec3Angle(4,i,8));
s.vel = pvel+SWWMUtility.AngleToVector3(i,7.); s.vel = pvel+SWWMUtility.AngleToVector3(i,7.);
s.SetShade(Color(1,1,1)*Random[ExploS](64,224)); s.SetShade(Color(1,1,1)*Random[ExploS](64,224));
s.special1 = Random[ExploS](1,4); s.special1 = Random[ExploS](1,4);
@ -26,7 +26,7 @@ Class HammerShockwave : SWWMNonInteractiveActor
} }
for ( int i=0; i<360; i+=5 ) for ( int i=0; i<360; i+=5 )
{ {
let r = Spawn("HammerRadiusShockwave",Vec3Angle(5,i)); let r = Spawn('HammerRadiusShockwave',Vec3Angle(5,i));
r.target = target; r.target = target;
r.angle = i; r.angle = i;
r.vel.xy = AngleToVector(i,r.speed+special1*.1); r.vel.xy = AngleToVector(i,r.speed+special1*.1);
@ -36,12 +36,12 @@ Class HammerShockwave : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
let raging = RagekitPower(target.FindInventory("RagekitPower")); let raging = RagekitPower(target.FindInventory('RagekitPower'));
// bust the floor // bust the floor
let tempme = new("LineTracer"); // gross hack to pass needed data let tempme = new('LineTracer'); // gross hack to pass needed data
int dmg = 300+special1*4; int dmg = 300+special1*4;
if ( raging ) dmg *= 8; if ( raging ) dmg *= 8;
F3DFloor ff; F3DFloor ff;
@ -57,7 +57,7 @@ Class HammerShockwave : SWWMNonInteractiveActor
BusterWall.Bust(tempme.Results,dmg,target,(0,0,-1),pos.z); BusterWall.Bust(tempme.Results,dmg,target,(0,0,-1),pos.z);
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",pos); let ps = Spawn('BigPunchSplash',pos);
ps.damagetype = 'GroundPound'; ps.damagetype = 'GroundPound';
ps.target = target; ps.target = target;
ps.special1 = dmg; ps.special1 = dmg;

View file

@ -11,13 +11,13 @@ Class PiercingTracer : SpreadgunTracer
// liquid splashes // liquid splashes
if ( Results.CrossedWater ) if ( Results.CrossedWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.CrossedWaterPos; hl.hitpos = Results.CrossedWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
else if ( Results.Crossed3DWater ) else if ( Results.Crossed3DWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.Crossed3DWaterPos; hl.hitpos = Results.Crossed3DWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
@ -25,7 +25,7 @@ Class PiercingTracer : SpreadgunTracer
{ {
if ( Results.HitActor.bSHOOTABLE ) if ( Results.HitActor.bSHOOTABLE )
{ {
let ent = new("HitListEntry"); let ent = new('HitListEntry');
ent.hitactor = Results.HitActor; ent.hitactor = Results.HitActor;
ent.hitlocation = Results.HitPos; ent.hitlocation = Results.HitPos;
ent.x = Results.HitVector; ent.x = Results.HitVector;
@ -80,7 +80,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
let [x, y, z] = SWWMUtility.GetPlayerAxes(self); let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,4,8,-12); Vector3 origin = SWWMUtility.GetFireOffset(self,4,8,-12);
let c = Spawn("SheenCasing",origin); let c = Spawn('SheenCasing',origin);
c.angle = angle; c.angle = angle;
c.pitch = pitch; c.pitch = pitch;
c.vel = x*FRandom[Junk](-.5,.5)+y*FRandom[Junk](.5,2.)-(0,0,FRandom[Junk](2.,5.)); c.vel = x*FRandom[Junk](-.5,.5)+y*FRandom[Junk](.5,2.)-(0,0,FRandom[Junk](2.,5.));
@ -111,7 +111,7 @@ Class HeavyMahSheenGun : SWWMWeapon
A_QuakeEx(2.,2.,2.,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.25); A_QuakeEx(2.,2.,2.,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.25);
A_StartSound("sheen/700rpm",CHAN_WEAPONEXTRA,CHANF_LOOPING,attenuation:.5); A_StartSound("sheen/700rpm",CHAN_WEAPONEXTRA,CHANF_LOOPING,attenuation:.5);
invoker.vibrate = .25; invoker.vibrate = .25;
A_Overlay(-9999,"EjectRound3"); A_Overlay(-9999,'EjectRound3');
SWWMUtility.DoKnockback(self,-x,9000.); SWWMUtility.DoKnockback(self,-x,9000.);
SWWMUtility.AchievementProgress("dakka",(gametic-invoker.firetimer)/GameTicRate,player); SWWMUtility.AchievementProgress("dakka",(gametic-invoker.firetimer)/GameTicRate,player);
} }
@ -125,7 +125,7 @@ Class HeavyMahSheenGun : SWWMWeapon
A_StartSound("sheen/2100rpm",CHAN_WEAPONEXTRA,CHANF_LOOPING,attenuation:.4); A_StartSound("sheen/2100rpm",CHAN_WEAPONEXTRA,CHANF_LOOPING,attenuation:.4);
invoker.vibrate = min(1.,invoker.vibrate*1.05+.05); invoker.vibrate = min(1.,invoker.vibrate*1.05+.05);
SWWMUtility.DoKnockback(self,-x,15000.); SWWMUtility.DoKnockback(self,-x,15000.);
A_Overlay(-9999,"EjectRound1"); A_Overlay(-9999,'EjectRound1');
} }
else if ( invoker.firespeed == 0 ) else if ( invoker.firespeed == 0 )
{ {
@ -136,7 +136,7 @@ Class HeavyMahSheenGun : SWWMWeapon
A_QuakeEx(1.4,1.4,1.4,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.25); A_QuakeEx(1.4,1.4,1.4,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.25);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6);
SWWMUtility.DoKnockback(self,-x,6000.); SWWMUtility.DoKnockback(self,-x,6000.);
A_Overlay(-9999,"EjectRound7"); A_Overlay(-9999,'EjectRound7');
} }
if ( invoker.barrelheat > 100. ) if ( invoker.barrelheat > 100. )
{ {
@ -150,7 +150,7 @@ Class HeavyMahSheenGun : SWWMWeapon
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self); let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
double a = FRandom[Sheen](0,360), s = FRandom[Sheen](.002,.02)*spreadfct; double a = FRandom[Sheen](0,360), s = FRandom[Sheen](.002,.02)*spreadfct;
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s); Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
if ( !invoker.st ) invoker.st = new("PiercingTracer"); if ( !invoker.st ) invoker.st = new('PiercingTracer');
let st = invoker.st; // thanks zscript let st = invoker.st; // thanks zscript
st.penetration = 25.+invoker.barrelheat/6.; st.penetration = 25.+invoker.barrelheat/6.;
st.resist = .6+invoker.barrelheat/600.; st.resist = .6+invoker.barrelheat/600.;
@ -170,14 +170,14 @@ Class HeavyMahSheenGun : SWWMWeapon
} }
foreach ( w:st.WaterHitList ) foreach ( w:st.WaterHitList )
{ {
let b = Spawn("InvisibleSplasher",w.hitpos); let b = Spawn('InvisibleSplasher',w.hitpos);
b.target = self; b.target = self;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
for ( int i=5; i<st.Results.Distance; i+=10 ) for ( int i=5; i<st.Results.Distance; i+=10 )
{ {
if ( !Random[Boolet](0,2) ) continue; if ( !Random[Boolet](0,2) ) continue;
let b = SWWMAnimSprite.SpawnAt("SWWMHalfBubble",level.Vec3Offset(origin,dir*i)); let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i));
b.Scale *= FRandom[Boolet](.1,.3); b.Scale *= FRandom[Boolet](.1,.3);
} }
foreach ( hit:st.HitList ) foreach ( hit:st.HitList )
@ -188,7 +188,7 @@ Class HeavyMahSheenGun : SWWMWeapon
SWWMUtility.DoKnockback(hit.HitActor,hit.x+(0,0,0.025),15000.*FRandom[Sheen](0.4,1.2)); SWWMUtility.DoKnockback(hit.HitActor,hit.x+(0,0,0.025),15000.*FRandom[Sheen](0.4,1.2));
if ( hit.HitActor.bNOBLOOD || hit.HitActor.bDORMANT || hit.HitActor.bINVULNERABLE ) if ( hit.HitActor.bNOBLOOD || hit.HitActor.bDORMANT || hit.HitActor.bINVULNERABLE )
{ {
let p = Spawn("SWWMBulletImpact",hit.HitLocation); let p = Spawn('SWWMBulletImpact',hit.HitLocation);
p.angle = atan2(hit.x.y,hit.x.x)+180; p.angle = atan2(hit.x.y,hit.x.x)+180;
p.pitch = asin(hit.x.z); p.pitch = asin(hit.x.z);
p.target = self; p.target = self;
@ -203,7 +203,7 @@ Class HeavyMahSheenGun : SWWMWeapon
if ( (st.Results.HitType != TRACE_HitNone) && (st.Results.HitType != TRACE_HitActor) ) if ( (st.Results.HitType != TRACE_HitNone) && (st.Results.HitType != TRACE_HitActor) )
{ {
Vector3 hitnormal = SWWMUtility.GetLineTracerHitNormal(st.Results); Vector3 hitnormal = SWWMUtility.GetLineTracerHitNormal(st.Results);
let p = Spawn("SWWMBulletImpact",st.Results.HitPos+hitnormal*4); let p = Spawn('SWWMBulletImpact',st.Results.HitPos+hitnormal*4);
p.angle = atan2(hitnormal.y,hitnormal.x); p.angle = atan2(hitnormal.y,hitnormal.x);
p.pitch = asin(-hitnormal.z); p.pitch = asin(-hitnormal.z);
p.target = self; p.target = self;
@ -212,7 +212,7 @@ Class HeavyMahSheenGun : SWWMWeapon
} }
for ( int i=0; i<(5-invoker.firespeed); i++ ) for ( int i=0; i<(5-invoker.firespeed); i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.scale *= .5; s.scale *= .5;
s.alpha *= .1; s.alpha *= .1;
s.speed *= .7; s.speed *= .7;
@ -259,7 +259,7 @@ Class HeavyMahSheenGun : SWWMWeapon
break; break;
} }
} }
let t = Spawn("SheenTrail",origin); let t = Spawn('SheenTrail',origin);
t.target = self; t.target = self;
t.angle = atan2(dir.y,dir.x); t.angle = atan2(dir.y,dir.x);
t.pitch = asin(-dir.z); t.pitch = asin(-dir.z);
@ -368,9 +368,9 @@ Class HeavyMahSheenGun : SWWMWeapon
Weapon.SlotNumber 5; Weapon.SlotNumber 5;
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 250; Weapon.SelectionOrder 250;
Weapon.AmmoType1 "SheenAmmo"; Weapon.AmmoType1 'SheenAmmo';
Weapon.AmmoGive1 30; Weapon.AmmoGive1 30;
SWWMWeapon.DropAmmoType "SWWMClipAmmoMed"; SWWMWeapon.DropAmmoType 'SWWMClipAmmoMed';
+SWWMWEAPON.HASSCRTEX; +SWWMWEAPON.HASSCRTEX;
Stamina 100000; Stamina 100000;
} }
@ -411,11 +411,11 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
invoker.firstshot = false; invoker.firstshot = false;
if ( (invoker.firespeed == 0) || (invoker.Ammo1.Amount <= 1) && !(player.cmd.buttons&BT_ATTACK) ) if ( (invoker.firespeed == 0) || (invoker.Ammo1.Amount <= 1) && !(player.cmd.buttons&BT_ATTACK) )
return A_Jump(256,"SlowFire1","SlowFire2","SlowFire3"); return A_Jump(256,'SlowFire1','SlowFire2','SlowFire3');
if ( invoker.firespeed == 1 ) if ( invoker.firespeed == 1 )
return A_Jump(256,"FastFire1","FastFire2","FastFire3"); return A_Jump(256,'FastFire1','FastFire2','FastFire3');
if ( invoker.firespeed == 2 ) if ( invoker.firespeed == 2 )
return ResolveState("VeryFastFire"); return ResolveState('VeryFastFire');
return ResolveState(null); return ResolveState(null);
} }
Goto Ready; Goto Ready;
@ -426,7 +426,7 @@ Class HeavyMahSheenGun : SWWMWeapon
XZW2 Z 0 XZW2 Z 0
{ {
if ( !invoker.incooldown && (invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) ) if ( !invoker.incooldown && (invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) )
return A_Jump(256,"SlowFire2","SlowFire3"); return A_Jump(256,'SlowFire2','SlowFire3');
return ResolveState(null); return ResolveState(null);
} }
Goto StopFire; Goto StopFire;
@ -437,7 +437,7 @@ Class HeavyMahSheenGun : SWWMWeapon
XZW2 Z 0 XZW2 Z 0
{ {
if ( !invoker.incooldown &&(invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) ) if ( !invoker.incooldown &&(invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) )
return A_Jump(256,"SlowFire1","SlowFire3"); return A_Jump(256,'SlowFire1','SlowFire3');
return ResolveState(null); return ResolveState(null);
} }
Goto StopFire; Goto StopFire;
@ -447,7 +447,7 @@ Class HeavyMahSheenGun : SWWMWeapon
XZW3 U 0 XZW3 U 0
{ {
if ( !invoker.incooldown &&(invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) ) if ( !invoker.incooldown &&(invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) )
return A_Jump(256,"SlowFire1","SlowFire2"); return A_Jump(256,'SlowFire1','SlowFire2');
return ResolveState(null); return ResolveState(null);
} }
Goto StopFire; Goto StopFire;
@ -457,7 +457,7 @@ Class HeavyMahSheenGun : SWWMWeapon
XZW3 X 0 XZW3 X 0
{ {
A_CheckContinueFire(); A_CheckContinueFire();
if ( !invoker.stopfire ) return A_Jump(256,"FastFire2","FastFire3"); if ( !invoker.stopfire ) return A_Jump(256,'FastFire2','FastFire3');
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState(null); return ResolveState(null);
@ -469,7 +469,7 @@ Class HeavyMahSheenGun : SWWMWeapon
XZW4 A 0 XZW4 A 0
{ {
A_CheckContinueFire(); A_CheckContinueFire();
if ( !invoker.stopfire ) return A_Jump(256,"FastFire1","FastFire3"); if ( !invoker.stopfire ) return A_Jump(256,'FastFire1','FastFire3');
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState(null); return ResolveState(null);
@ -481,7 +481,7 @@ Class HeavyMahSheenGun : SWWMWeapon
XZW4 D 0 XZW4 D 0
{ {
A_CheckContinueFire(); A_CheckContinueFire();
if ( !invoker.stopfire ) return A_Jump(256,"FastFire1","FastFire2"); if ( !invoker.stopfire ) return A_Jump(256,'FastFire1','FastFire2');
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState(null); return ResolveState(null);
@ -496,7 +496,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast1"); return ResolveState('EndFireFast1');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -508,7 +508,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast2"); return ResolveState('EndFireFast2');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -520,7 +520,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast3"); return ResolveState('EndFireFast3');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -532,7 +532,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast4"); return ResolveState('EndFireFast4');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -544,7 +544,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast5"); return ResolveState('EndFireFast5');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -556,7 +556,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast6"); return ResolveState('EndFireFast6');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -569,7 +569,7 @@ Class HeavyMahSheenGun : SWWMWeapon
{ {
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2);
return ResolveState("EndFireFast7"); return ResolveState('EndFireFast7');
} }
A_SheenFire(); A_SheenFire();
return ResolveState(null); return ResolveState(null);
@ -688,7 +688,7 @@ Class HeavyMahSheenGun : SWWMWeapon
psp.frame = Random[GunFlash](0,23); psp.frame = Random[GunFlash](0,23);
if ( (invoker.firespeed != 2) || !(invoker.shotcnt%3) ) if ( (invoker.firespeed != 2) || !(invoker.shotcnt%3) )
{ {
let l = Spawn("SWWMWeaponLight",pos); let l = Spawn('SWWMWeaponLight',pos);
l.target = self; l.target = self;
l.Args[3] -= (psp.frame%3)*20; l.Args[3] -= (psp.frame%3)*20;
} }

View file

@ -14,7 +14,7 @@ Class SheenPhantom : SWWMNonInteractiveActor
{ {
+INTERPOLATEANGLES; +INTERPOLATEANGLES;
Alpha .5; Alpha .5;
RenderStyle "Add"; RenderStyle 'Add';
} }
override void Tick() override void Tick()
{ {
@ -44,7 +44,7 @@ Class SheenTrail : SWWMNonInteractiveActor
+FORCERADIUSDMG; +FORCERADIUSDMG;
+NODAMAGETHRUST; +NODAMAGETHRUST;
Speed 200; Speed 200;
RenderStyle "Add"; RenderStyle 'Add';
} }
override void Tick() override void Tick()
@ -63,7 +63,7 @@ Class SheenTrail : SWWMNonInteractiveActor
special1++; special1++;
for ( int i=0; i<4; i++ ) for ( int i=0; i<4; i++ )
{ {
let p = Spawn("SheenPhantom",level.Vec3Offset(oldpos,dir*(i+1)*50.)); let p = Spawn('SheenPhantom',level.Vec3Offset(oldpos,dir*(i+1)*50.));
p.angle = angle; p.angle = angle;
p.pitch = pitch; p.pitch = pitch;
p.frame = special2; p.frame = special2;
@ -81,7 +81,7 @@ Class SheenTrail : SWWMNonInteractiveActor
prev = oldpos; // interpolation prev = oldpos; // interpolation
SetOrigin(newpos,true); SetOrigin(newpos,true);
specialf1 -= speed; specialf1 -= speed;
if ( specialf1 <= 0 ) SetStateLabel("Death"); if ( specialf1 <= 0 ) SetStateLabel('Death');
return; return;
} }
if ( !CheckNoDelay() || (tics == -1) ) return; if ( !CheckNoDelay() || (tics == -1) ) return;

View file

@ -33,19 +33,19 @@ Class MisterRailTracer : LineTracer
// liquid splashes // liquid splashes
if ( Results.CrossedWater ) if ( Results.CrossedWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.CrossedWaterPos; hl.hitpos = Results.CrossedWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
else if ( Results.Crossed3DWater ) else if ( Results.Crossed3DWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.Crossed3DWaterPos; hl.hitpos = Results.Crossed3DWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
if ( Results.HitType == TRACE_CrossingPortal ) if ( Results.HitType == TRACE_CrossingPortal )
{ {
let seg = new("MRRailSeg"); let seg = new('MRRailSeg');
seg.enter = Results.HitPos; seg.enter = Results.HitPos;
seg.exit = Results.SrcFromTarget; seg.exit = Results.SrcFromTarget;
portalseg.Push(seg); portalseg.Push(seg);
@ -54,7 +54,7 @@ Class MisterRailTracer : LineTracer
{ {
if ( Results.HitActor.bSHOOTABLE ) if ( Results.HitActor.bSHOOTABLE )
{ {
let ent = new("MRHitListEntry"); let ent = new('MRHitListEntry');
ent.hitactor = Results.HitActor; ent.hitactor = Results.HitActor;
ent.hitlocation = Results.HitPos; ent.hitlocation = Results.HitPos;
ent.x = Results.HitVector; ent.x = Results.HitVector;
@ -63,7 +63,7 @@ Class MisterRailTracer : LineTracer
hitlist.Push(ent); hitlist.Push(ent);
// also include exit point // also include exit point
Vector3 exit = SWWMUtility.TraceExit(Results.HitActor,Results.HitPos,Results.HitVector); Vector3 exit = SWWMUtility.TraceExit(Results.HitActor,Results.HitPos,Results.HitVector);
ent = new("MRHitListEntry"); ent = new('MRHitListEntry');
ent.hitactor = Results.HitActor; ent.hitactor = Results.HitActor;
ent.hitlocation = exit; ent.hitlocation = exit;
ent.x = Results.HitVector; ent.x = Results.HitVector;
@ -233,13 +233,13 @@ Class MisterRifle : SWWMWeapon
override bool ReportHUDAmmo() override bool ReportHUDAmmo()
{ {
return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv("MisterRound")>0)||(gchambered&&!gfired)||(Ammo2.Amount>0); return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv('MisterRound')>0)||(gchambered&&!gfired)||(Ammo2.Amount>0);
} }
override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount ) override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount )
{ {
if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true; if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true;
if ( firemode == PrimaryFire ) return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv("MisterRound")>0); if ( firemode == PrimaryFire ) return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv('MisterRound')>0);
if ( firemode == AltFire ) return (gchambered&&!gfired)||(Ammo2.Amount>0); if ( firemode == AltFire ) return (gchambered&&!gfired)||(Ammo2.Amount>0);
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount); return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
} }
@ -253,10 +253,10 @@ Class MisterRifle : SWWMWeapon
// give bullets? // give bullets?
if ( (clipcount > 0) || (chambered && !fired) ) if ( (clipcount > 0) || (chambered && !fired) )
{ {
Inventory cur = Owner.FindInventory("MisterRound"); Inventory cur = Owner.FindInventory('MisterRound');
if ( !cur ) if ( !cur )
{ {
cur = Inventory(Spawn("MisterRound")); cur = Inventory(Spawn('MisterRound'));
cur.Amount = 0; cur.Amount = 0;
cur.AttachToOwner(Owner); cur.AttachToOwner(Owner);
} }
@ -270,10 +270,10 @@ Class MisterRifle : SWWMWeapon
// give grenade? // give grenade?
if ( gchambered && !gfired ) if ( gchambered && !gfired )
{ {
Inventory cur = Owner.FindInventory("MisterGAmmo"); Inventory cur = Owner.FindInventory('MisterGAmmo');
if ( !cur ) if ( !cur )
{ {
cur = Inventory(Spawn("MisterGAmmo")); cur = Inventory(Spawn('MisterGAmmo'));
cur.Amount = 0; cur.Amount = 0;
cur.AttachToOwner(Owner); cur.AttachToOwner(Owner);
} }
@ -344,7 +344,7 @@ Class MisterRifle : SWWMWeapon
// brass it up (though it's not made of brass) // brass it up (though it's not made of brass)
let [x, y, z] = SWWMUtility.GetPlayerAxes(self); let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,2,3,-18); Vector3 origin = SWWMUtility.GetFireOffset(self,2,3,-18);
let c = Spawn("MisterCasing",origin); let c = Spawn('MisterCasing',origin);
c.angle = angle; c.angle = angle;
c.pitch = pitch; c.pitch = pitch;
c.vel = x*FRandom[Junk](-.25,.25)+y*FRandom[Junk](-.25,.25)-(0,0,FRandom[Junk](4.,6.)); c.vel = x*FRandom[Junk](-.25,.25)+y*FRandom[Junk](-.25,.25)-(0,0,FRandom[Junk](4.,6.));
@ -365,16 +365,16 @@ Class MisterRifle : SWWMWeapon
A_PlayerReload(); A_PlayerReload();
A_StartSound("mister/magout",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/magout",CHAN_WEAPON,CHANF_OVERLAP);
A_ChangeModel("",1,"","",7,"models",(invoker.clipcount>0)?"MortalMag.png":"MortalMag_Empty.png",CMDL_USESURFACESKIN,-1); A_ChangeModel("",1,"","",7,"models",(invoker.clipcount>0)?"MortalMag.png":"MortalMag_Empty.png",CMDL_USESURFACESKIN,-1);
MagAmmo ma = MagAmmo(FindInventory("MisterRound")); MagAmmo ma = MagAmmo(FindInventory('MisterRound'));
if ( !ma ) if ( !ma )
{ {
ma = MagAmmo(Spawn("MisterRound")); ma = MagAmmo(Spawn('MisterRound'));
ma.Amount = 0; ma.Amount = 0;
ma.AttachToOwner(self); ma.AttachToOwner(self);
} }
int maxgiveamt = min(ma.MaxAmount-ma.Amount,invoker.clipcount); int maxgiveamt = min(ma.MaxAmount-ma.Amount,invoker.clipcount);
int dropamt = invoker.clipcount-maxgiveamt; int dropamt = invoker.clipcount-maxgiveamt;
if ( dropamt > 0 ) invoker.BufferMagAmmo("MisterRound",dropamt); if ( dropamt > 0 ) invoker.BufferMagAmmo('MisterRound',dropamt);
ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount); ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount);
ma.MagFill(); ma.MagFill();
invoker.clipcount = 0; invoker.clipcount = 0;
@ -388,7 +388,7 @@ Class MisterRifle : SWWMWeapon
// drop it // drop it
let [x, y, z] = SWWMUtility.GetPlayerAxes(self); let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,6,3,-18); Vector3 origin = SWWMUtility.GetFireOffset(self,6,3,-18);
let c = Spawn("MisterMag",origin); let c = Spawn('MisterMag',origin);
c.angle = angle; c.angle = angle;
c.pitch = pitch; c.pitch = pitch;
c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2.,4.)); c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2.,4.));
@ -404,7 +404,7 @@ Class MisterRifle : SWWMWeapon
action void A_MagIn() action void A_MagIn()
{ {
MagAmmo sb = MagAmmo(FindInventory("MisterRound")); MagAmmo sb = MagAmmo(FindInventory('MisterRound'));
if ( sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) ) if ( sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) )
invoker.clipcount = invoker.default.clipcount; invoker.clipcount = invoker.default.clipcount;
else if ( (invoker.Ammo1.Amount <= 0) || (sb.Amount >= sb.ClipSize) ) else if ( (invoker.Ammo1.Amount <= 0) || (sb.Amount >= sb.ClipSize) )
@ -413,9 +413,9 @@ Class MisterRifle : SWWMWeapon
invoker.clipcount = takeamt; invoker.clipcount = takeamt;
sb.Amount -= takeamt; sb.Amount -= takeamt;
int req = invoker.default.ClipCount-invoker.clipcount; int req = invoker.default.ClipCount-invoker.clipcount;
if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo("MisterRound",req); if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo('MisterRound',req);
} }
else if ( invoker.FetchBufferedMagAmmo("MisterRound",sb.ClipSize,true) ) else if ( invoker.FetchBufferedMagAmmo('MisterRound',sb.ClipSize,true) )
invoker.clipcount = invoker.default.clipcount; invoker.clipcount = invoker.default.clipcount;
else else
{ {
@ -432,13 +432,13 @@ Class MisterRifle : SWWMWeapon
{ {
// auto-chamber just in case (rarely ever happens) // auto-chamber just in case (rarely ever happens)
if ( invoker.ClipCount > 0 ) if ( invoker.ClipCount > 0 )
return ResolveState("AutoCycle"); return ResolveState('AutoCycle');
// auto-reload if we're out // auto-reload if we're out
if ( (invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || (CountInv("MisterRound") > 0) || sv_infiniteammo || FindInventory("PowerInfiniteAmmo")) ) if ( (invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || (CountInv('MisterRound') > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo')) )
return ResolveState("Reload"); return ResolveState('Reload');
} }
// this one is handled separately // this one is handled separately
if ( invoker.firemode >= 3 ) return ResolveState("FireOverpressure"); if ( invoker.firemode >= 3 ) return ResolveState('FireOverpressure');
A_PlayerFire(); A_PlayerFire();
A_SWWMFlash(); A_SWWMFlash();
invoker.fired = true; invoker.fired = true;
@ -450,7 +450,7 @@ Class MisterRifle : SWWMWeapon
SWWMHandler.DoFlash(self,Color(32,64,224,255),2); SWWMHandler.DoFlash(self,Color(32,64,224,255),2);
A_AlertMonsters(swwm_uncapalert?0:4000); A_AlertMonsters(swwm_uncapalert?0:4000);
A_MisterFireStream(0); A_MisterFireStream(0);
return ResolveState("FireStream"); return ResolveState('FireStream');
} }
SWWMHandler.DoFlash(self,Color(48,64,224,255),3); SWWMHandler.DoFlash(self,Color(48,64,224,255),3);
Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 x = SWWMUtility.GetPlayerViewDir(self);
@ -465,7 +465,7 @@ Class MisterRifle : SWWMWeapon
A_AlertMonsters(swwm_uncapalert?0:8000); A_AlertMonsters(swwm_uncapalert?0:8000);
for ( int i=0; i<10; i++ ) for ( int i=0; i<10; i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.scale *= .6; s.scale *= .6;
s.alpha *= .15; s.alpha *= .15;
s.speed *= .8; s.speed *= .8;
@ -498,12 +498,12 @@ Class MisterRifle : SWWMWeapon
{ {
if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT ) if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT )
{ {
let p = Spawn("SpreadImpact",d.HitLocation); let p = Spawn('SpreadImpact',d.HitLocation);
p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
p.pitch = asin(d.HitDir.z); p.pitch = asin(d.HitDir.z);
p.target = self; p.target = self;
} }
let b = Spawn("MisterBuckshotImpact",d.HitLocation-d.HitDir*4.); let b = Spawn('MisterBuckshotImpact',d.HitLocation-d.HitDir*4.);
b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
b.pitch = asin(d.HitDir.z); b.pitch = asin(d.HitDir.z);
b.target = self; b.target = self;
@ -512,12 +512,12 @@ Class MisterRifle : SWWMWeapon
else if ( d.HitType != TRACE_HitNone ) else if ( d.HitType != TRACE_HitNone )
{ {
Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d);
let p = Spawn("SpreadImpact",d.HitLocation+hitnormal*0.01); let p = Spawn('SpreadImpact',d.HitLocation+hitnormal*0.01);
p.angle = atan2(hitnormal.y,hitnormal.x); p.angle = atan2(hitnormal.y,hitnormal.x);
p.pitch = asin(-hitnormal.z); p.pitch = asin(-hitnormal.z);
p.target = self; p.target = self;
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation);
let b = Spawn("MisterBuckshotImpact",d.HitLocation+hitnormal*4.); let b = Spawn('MisterBuckshotImpact',d.HitLocation+hitnormal*4.);
b.angle = atan2(hitnormal.y,hitnormal.x); b.angle = atan2(hitnormal.y,hitnormal.x);
b.pitch = asin(-hitnormal.z); b.pitch = asin(-hitnormal.z);
b.target = self; b.target = self;
@ -525,7 +525,7 @@ Class MisterRifle : SWWMWeapon
if ( swwm_omnibust ) BusterWall.BustLinetrace(d,444,self,d.HitDir,d.HitLocation.z); if ( swwm_omnibust ) BusterWall.BustLinetrace(d,444,self,d.HitDir,d.HitLocation.z);
} }
} }
return ResolveState("FireCluster"); return ResolveState('FireCluster');
} }
// precision shot // precision shot
A_StartSound("mister/firesemi",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/firesemi",CHAN_WEAPON,CHANF_OVERLAP);
@ -535,7 +535,7 @@ Class MisterRifle : SWWMWeapon
A_AlertMonsters(swwm_uncapalert?0:6000); A_AlertMonsters(swwm_uncapalert?0:6000);
for ( int i=0; i<6; i++ ) for ( int i=0; i<6; i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.scale *= .4; s.scale *= .4;
s.alpha *= .1; s.alpha *= .1;
s.speed *= .5; s.speed *= .5;
@ -550,12 +550,12 @@ Class MisterRifle : SWWMWeapon
{ {
if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT ) if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT )
{ {
let p = Spawn("SWWMBulletImpact",d.HitLocation); let p = Spawn('SWWMBulletImpact',d.HitLocation);
p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
p.pitch = asin(d.HitDir.z); p.pitch = asin(d.HitDir.z);
p.target = self; p.target = self;
} }
let b = Spawn("MisterBulletImpact",d.HitLocation-d.HitDir*4.); let b = Spawn('MisterBulletImpact',d.HitLocation-d.HitDir*4.);
b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
b.pitch = asin(d.HitDir.z); b.pitch = asin(d.HitDir.z);
b.target = self; b.target = self;
@ -564,12 +564,12 @@ Class MisterRifle : SWWMWeapon
else if ( d.HitType != TRACE_HitNone ) else if ( d.HitType != TRACE_HitNone )
{ {
Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d);
let p = Spawn("SWWMBulletImpact",d.HitLocation+hitnormal*0.01); let p = Spawn('SWWMBulletImpact',d.HitLocation+hitnormal*0.01);
p.angle = atan2(hitnormal.y,hitnormal.x); p.angle = atan2(hitnormal.y,hitnormal.x);
p.pitch = asin(-hitnormal.z); p.pitch = asin(-hitnormal.z);
p.target = self; p.target = self;
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation);
let b = Spawn("MisterBulletImpact",d.HitLocation+hitnormal*4.); let b = Spawn('MisterBulletImpact',d.HitLocation+hitnormal*4.);
b.angle = atan2(hitnormal.y,hitnormal.x); b.angle = atan2(hitnormal.y,hitnormal.x);
b.pitch = asin(-hitnormal.z); b.pitch = asin(-hitnormal.z);
b.target = self; b.target = self;
@ -585,7 +585,7 @@ Class MisterRifle : SWWMWeapon
{ {
A_PlayerFire(); A_PlayerFire();
SWWMHandler.DoFlash(self,Color(32,64,224,255),2); SWWMHandler.DoFlash(self,Color(32,64,224,255),2);
A_SWWMFlash("FastFlash"); A_SWWMFlash('FastFlash');
} }
Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 x = SWWMUtility.GetPlayerViewDir(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-2.4); Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-2.4);
@ -595,7 +595,7 @@ Class MisterRifle : SWWMWeapon
if ( index == 0 ) A_AlertMonsters(swwm_uncapalert?0:5000); if ( index == 0 ) A_AlertMonsters(swwm_uncapalert?0:5000);
for ( int i=0; i<3; i++ ) for ( int i=0; i<3; i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.scale *= .4; s.scale *= .4;
s.alpha *= .1; s.alpha *= .1;
s.speed *= .5; s.speed *= .5;
@ -613,12 +613,12 @@ Class MisterRifle : SWWMWeapon
{ {
if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT ) if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT )
{ {
let p = Spawn("SWWMBulletImpact",d.HitLocation); let p = Spawn('SWWMBulletImpact',d.HitLocation);
p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
p.pitch = asin(d.HitDir.z); p.pitch = asin(d.HitDir.z);
p.target = self; p.target = self;
} }
let b = Spawn("MisterStreamImpact",d.HitLocation-d.HitDir*4.); let b = Spawn('MisterStreamImpact',d.HitLocation-d.HitDir*4.);
b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
b.pitch = asin(d.HitDir.z); b.pitch = asin(d.HitDir.z);
b.target = self; b.target = self;
@ -627,12 +627,12 @@ Class MisterRifle : SWWMWeapon
else if ( d.HitType != TRACE_HitNone ) else if ( d.HitType != TRACE_HitNone )
{ {
Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d);
let p = Spawn("SWWMBulletImpact",d.HitLocation+hitnormal*0.01); let p = Spawn('SWWMBulletImpact',d.HitLocation+hitnormal*0.01);
p.angle = atan2(hitnormal.y,hitnormal.x); p.angle = atan2(hitnormal.y,hitnormal.x);
p.pitch = asin(-hitnormal.z); p.pitch = asin(-hitnormal.z);
p.target = self; p.target = self;
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation);
let b = Spawn("MisterStreamImpact",d.HitLocation+hitnormal*4.); let b = Spawn('MisterStreamImpact',d.HitLocation+hitnormal*4.);
b.angle = atan2(hitnormal.y,hitnormal.x); b.angle = atan2(hitnormal.y,hitnormal.x);
b.pitch = asin(-hitnormal.z); b.pitch = asin(-hitnormal.z);
b.target = self; b.target = self;
@ -669,7 +669,7 @@ Class MisterRifle : SWWMWeapon
invoker.prefirecnt = 0; invoker.prefirecnt = 0;
A_StopSound(CHAN_WEAPONEXTRA); A_StopSound(CHAN_WEAPONEXTRA);
A_StartSound("mister/cancelover",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/cancelover",CHAN_WEAPON,CHANF_OVERLAP);
return ResolveState("FireOverpressureCancel"); return ResolveState('FireOverpressureCancel');
} }
if ( invoker.prefirecnt < 100 ) if ( invoker.prefirecnt < 100 )
{ {
@ -684,7 +684,7 @@ Class MisterRifle : SWWMWeapon
A_SoundPitch(CHAN_WEAPONEXTRA,clamp(.5+invoker.prefirecnt*.005,.5,1.)**.5); A_SoundPitch(CHAN_WEAPONEXTRA,clamp(.5+invoker.prefirecnt*.005,.5,1.)**.5);
if ( (invoker.prefirecnt >= 100) && !((gametic-invoker.holdtic)%32) && CheckLocalView() ) if ( (invoker.prefirecnt >= 100) && !((gametic-invoker.holdtic)%32) && CheckLocalView() )
A_StartSound("mister/beepover",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/beepover",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf((invoker.prefirecnt>=100)&&!(player.cmd.buttons&BT_ATTACK),"FireOverpressureRelease"); return A_JumpIf((invoker.prefirecnt>=100)&&!(player.cmd.buttons&BT_ATTACK),'FireOverpressureRelease');
} }
action void A_MisterFireRail() action void A_MisterFireRail()
@ -695,7 +695,7 @@ Class MisterRifle : SWWMWeapon
Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 x = SWWMUtility.GetPlayerViewDir(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-2.4); Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-2.4);
SWWMHandler.DoFlash(self,Color(64,64,224,255),9); SWWMHandler.DoFlash(self,Color(64,64,224,255),9);
A_SWWMFlash("RailFlash"); A_SWWMFlash('RailFlash');
invoker.fired = true; invoker.fired = true;
A_StartSound("mister/fireover",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/fireover",CHAN_WEAPON,CHANF_OVERLAP);
SWWMUtility.DoKnockback(self,-x,90000.); SWWMUtility.DoKnockback(self,-x,90000.);
@ -704,7 +704,7 @@ Class MisterRifle : SWWMWeapon
A_AlertMonsters(swwm_uncapalert?0:12000); A_AlertMonsters(swwm_uncapalert?0:12000);
for ( int i=0; i<12; i++ ) for ( int i=0; i<12; i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.scale *= .4; s.scale *= .4;
s.alpha *= .1; s.alpha *= .1;
s.vel += vel*.5+x*FRandom[Mister](1.,12.); s.vel += vel*.5+x*FRandom[Mister](1.,12.);
@ -712,7 +712,7 @@ Class MisterRifle : SWWMWeapon
} }
Vector3 dir, startdir; Vector3 dir, startdir;
startdir = dir = SWWMUtility.GetPlayerAimDir(self); startdir = dir = SWWMUtility.GetPlayerAimDir(self);
let mrt = new("MisterRailTracer"); // I pity the fool let mrt = new('MisterRailTracer'); // I pity the fool
mrt.hitlist.Clear(); mrt.hitlist.Clear();
mrt.shootthroughlist.Clear(); mrt.shootthroughlist.Clear();
mrt.waterhitlist.Clear(); mrt.waterhitlist.Clear();
@ -732,7 +732,7 @@ Class MisterRifle : SWWMWeapon
dir = mrt.Results.HitVector; dir = mrt.Results.HitVector;
} }
while ( !mrt.fullstop ); while ( !mrt.fullstop );
let mrc = new("MisterRailCounter"); let mrc = new('MisterRailCounter');
mrc.ChangeStatNum(STAT_USER); // so it can tick mrc.ChangeStatNum(STAT_USER); // so it can tick
mrc.player = player; mrc.player = player;
Vector3 sstart = origin; Vector3 sstart = origin;
@ -745,7 +745,7 @@ Class MisterRifle : SWWMWeapon
Actor b; Actor b;
if ( sdist > 32 ) if ( sdist > 32 )
{ {
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
b.target = self; b.target = self;
b.frame = 1; b.frame = 1;
b.speed = 32; b.speed = 32;
@ -754,11 +754,11 @@ Class MisterRifle : SWWMWeapon
mrc.effectors.Push(b); mrc.effectors.Push(b);
sstart += sdir*32; sstart += sdir*32;
sdist -= 32; sdist -= 32;
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
} }
else else
{ {
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
b.frame = 1; b.frame = 1;
} }
b.target = self; b.target = self;
@ -777,7 +777,7 @@ Class MisterRifle : SWWMWeapon
{ {
if ( sdist > 32 ) if ( sdist > 32 )
{ {
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
b.target = self; b.target = self;
b.frame = 1; b.frame = 1;
b.speed = 32; b.speed = 32;
@ -786,15 +786,15 @@ Class MisterRifle : SWWMWeapon
mrc.effectors.Push(b); mrc.effectors.Push(b);
sstart += sdir*32; sstart += sdir*32;
sdist -= 32; sdist -= 32;
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
} }
else else
{ {
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
b.frame = 1; b.frame = 1;
} }
} }
else b = Spawn("MisterRailBeam",sstart); else b = Spawn('MisterRailBeam',sstart);
b.target = self; b.target = self;
b.speed = sdist; b.speed = sdist;
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist); [b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist);
@ -806,7 +806,7 @@ Class MisterRifle : SWWMWeapon
sdir = mrt.Results.HitPos-sstart; sdir = mrt.Results.HitPos-sstart;
sdist = sdir.length(); sdist = sdir.length();
sdir /= sdist; sdir /= sdist;
b = Spawn("MisterRailBeam",sstart); b = Spawn('MisterRailBeam',sstart);
b.target = self; b.target = self;
b.speed = sdist; b.speed = sdist;
[b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist); [b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist);
@ -821,7 +821,7 @@ Class MisterRifle : SWWMWeapon
} }
foreach ( w:mrt.WaterHitList ) foreach ( w:mrt.WaterHitList )
{ {
let b = Spawn("InvisibleSplasher",w.hitpos); let b = Spawn('InvisibleSplasher',w.hitpos);
b.target = self; b.target = self;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
@ -850,7 +850,7 @@ Class MisterRifle : SWWMWeapon
} }
if ( mrt.HitList[i].bExit ) if ( mrt.HitList[i].bExit )
{ {
let b = MisterBulletImpact(Spawn("MisterRailExitImpact",mrt.hitlist[i].HitLocation-mrt.hitlist[i].x*4.)); let b = MisterBulletImpact(Spawn('MisterRailExitImpact',mrt.hitlist[i].HitLocation-mrt.hitlist[i].x*4.));
b.angle = atan2(mrt.HitList[i].x.y,mrt.HitList[i].x.x); b.angle = atan2(mrt.HitList[i].x.y,mrt.HitList[i].x.x);
b.pitch = asin(-mrt.HitList[i].x.z); b.pitch = asin(-mrt.HitList[i].x.z);
b.target = self; b.target = self;
@ -860,7 +860,7 @@ Class MisterRifle : SWWMWeapon
bi.Push(b); bi.Push(b);
continue; continue;
} }
let b = MisterBulletImpact(Spawn("MisterRailEntryImpact",mrt.hitlist[i].HitLocation+mrt.hitlist[i].x*4.)); let b = MisterBulletImpact(Spawn('MisterRailEntryImpact',mrt.hitlist[i].HitLocation+mrt.hitlist[i].x*4.));
b.angle = atan2(mrt.HitList[i].x.y,mrt.HitList[i].x.x)+180; b.angle = atan2(mrt.HitList[i].x.y,mrt.HitList[i].x.x)+180;
b.pitch = asin(mrt.HitList[i].x.z); b.pitch = asin(mrt.HitList[i].x.z);
b.target = self; b.target = self;
@ -869,7 +869,7 @@ Class MisterRifle : SWWMWeapon
mrc.effectors.Push(b); mrc.effectors.Push(b);
bi.Push(b); bi.Push(b);
} }
LineTracer faketracer = new("LineTracer"); LineTracer faketracer = new('LineTracer');
for ( int i=0; i<mrt.wallpenetratelist.Size(); i++ ) for ( int i=0; i<mrt.wallpenetratelist.Size(); i++ )
{ {
if ( mrt.WallPenetrateList[i].hittype == TRACE_HitWall ) if ( mrt.WallPenetrateList[i].hittype == TRACE_HitWall )
@ -898,7 +898,7 @@ Class MisterRifle : SWWMWeapon
} }
Vector3 hitpos = mrt.WallPenetrateList[i].hitpos; Vector3 hitpos = mrt.WallPenetrateList[i].hitpos;
Vector3 hitnormal = mrt.WallPenetrateList[i].hitnormal; Vector3 hitnormal = mrt.WallPenetrateList[i].hitnormal;
let b = MisterBulletImpact(Spawn(bExit?"MisterRailExitImpact":"MisterRailEntryImpact",hitpos+hitnormal*4.)); let b = MisterBulletImpact(Spawn(bExit?'MisterRailExitImpact':'MisterRailEntryImpact',hitpos+hitnormal*4.));
b.angle = atan2(hitnormal.y,hitnormal.x); b.angle = atan2(hitnormal.y,hitnormal.x);
b.pitch = asin(-hitnormal.z); b.pitch = asin(-hitnormal.z);
b.target = self; b.target = self;
@ -909,7 +909,7 @@ Class MisterRifle : SWWMWeapon
if ( (mrt.Results.HitType != TRACE_HitNone) && (mrt.Results.HitType != TRACE_HitActor) ) if ( (mrt.Results.HitType != TRACE_HitNone) && (mrt.Results.HitType != TRACE_HitActor) )
{ {
Vector3 hitnormal = SWWMUtility.GetLineTracerHitNormal(mrt.Results); Vector3 hitnormal = SWWMUtility.GetLineTracerHitNormal(mrt.Results);
let b = MisterBulletImpact(Spawn("MisterRailEntryImpact",mrt.Results.HitPos+hitnormal*4.)); let b = MisterBulletImpact(Spawn('MisterRailEntryImpact',mrt.Results.HitPos+hitnormal*4.));
b.angle = atan2(hitnormal.y,hitnormal.x); b.angle = atan2(hitnormal.y,hitnormal.x);
b.pitch = asin(-hitnormal.z); b.pitch = asin(-hitnormal.z);
b.target = self; b.target = self;
@ -925,7 +925,7 @@ Class MisterRifle : SWWMWeapon
{ {
Vector3 p = level.Vec3Offset(origin,startdir*d); Vector3 p = level.Vec3Offset(origin,startdir*d);
if ( !level.IsPointInlevel(p) ) continue; if ( !level.IsPointInlevel(p) ) continue;
Spawn("MisterRailLight",p); Spawn('MisterRailLight',p);
} }
if ( mrt.wallpenetratelist.Size() > 0 ) if ( mrt.wallpenetratelist.Size() > 0 )
{ {
@ -945,7 +945,7 @@ Class MisterRifle : SWWMWeapon
mrh.Explode(); mrh.Explode();
continue; continue;
} }
mrh = MisterRailHit(Spawn("MisterRailHit",ofs)); mrh = MisterRailHit(Spawn('MisterRailHit',ofs));
mrh.target = self; mrh.target = self;
mrh.mrc = mrc; mrh.mrc = mrc;
mrc.effectors.Push(mrh); mrc.effectors.Push(mrh);
@ -956,7 +956,7 @@ Class MisterRifle : SWWMWeapon
if ( !Random[ExploS](0,1) ) continue; if ( !Random[ExploS](0,1) ) continue;
Vector3 ofs = level.Vec3Offset(start,tdir*d); Vector3 ofs = level.Vec3Offset(start,tdir*d);
if ( !level.IsPointInLevel(ofs) ) continue; if ( !level.IsPointInLevel(ofs) ) continue;
let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs);
b.Scale *= FRandom[ExploS](.7,1.4); b.Scale *= FRandom[ExploS](.7,1.4);
b.alpha *= .2; b.alpha *= .2;
b.framestep = Random[ExploS](2,4); b.framestep = Random[ExploS](2,4);
@ -980,7 +980,7 @@ Class MisterRifle : SWWMWeapon
mrh.Explode(); mrh.Explode();
continue; continue;
} }
mrh = MisterRailHit(Spawn("MisterRailHit",ofs)); mrh = MisterRailHit(Spawn('MisterRailHit',ofs));
mrh.target = self; mrh.target = self;
mrh.mrc = mrc; mrh.mrc = mrc;
mrc.effectors.Push(mrh); mrc.effectors.Push(mrh);
@ -991,7 +991,7 @@ Class MisterRifle : SWWMWeapon
if ( !Random[ExploS](0,1) ) continue; if ( !Random[ExploS](0,1) ) continue;
Vector3 ofs = level.Vec3Offset(start,tdir*d); Vector3 ofs = level.Vec3Offset(start,tdir*d);
if ( !level.IsPointInLevel(ofs) ) continue; if ( !level.IsPointInLevel(ofs) ) continue;
let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs);
b.Scale *= FRandom[ExploS](.7,1.4); b.Scale *= FRandom[ExploS](.7,1.4);
b.alpha *= .2; b.alpha *= .2;
b.framestep = Random[ExploS](2,4); b.framestep = Random[ExploS](2,4);
@ -1012,7 +1012,7 @@ Class MisterRifle : SWWMWeapon
mrh.Explode(); mrh.Explode();
continue; continue;
} }
mrh = MisterRailHit(Spawn("MisterRailHit",ofs)); mrh = MisterRailHit(Spawn('MisterRailHit',ofs));
mrh.target = self; mrh.target = self;
mrh.mrc = mrc; mrh.mrc = mrc;
mrc.effectors.Push(mrh); mrc.effectors.Push(mrh);
@ -1023,7 +1023,7 @@ Class MisterRifle : SWWMWeapon
if ( !Random[ExploS](0,1) ) continue; if ( !Random[ExploS](0,1) ) continue;
Vector3 ofs = level.Vec3Offset(origin,startdir*d); Vector3 ofs = level.Vec3Offset(origin,startdir*d);
if ( !level.IsPointInLevel(ofs) ) continue; if ( !level.IsPointInLevel(ofs) ) continue;
let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs);
b.Scale *= FRandom[ExploS](.7,1.4); b.Scale *= FRandom[ExploS](.7,1.4);
b.alpha *= .2; b.alpha *= .2;
b.framestep = Random[ExploS](2,4); b.framestep = Random[ExploS](2,4);
@ -1038,7 +1038,7 @@ Class MisterRifle : SWWMWeapon
Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 x = SWWMUtility.GetPlayerViewDir(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-4); Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-4);
SWWMHandler.DoFlash(self,Color(64,64,224,255),3); SWWMHandler.DoFlash(self,Color(64,64,224,255),3);
A_SWWMFlash("AltFlash"); A_SWWMFlash('AltFlash');
invoker.gfired = true; invoker.gfired = true;
A_StartSound("mister/grenade",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/grenade",CHAN_WEAPON,CHANF_OVERLAP);
SWWMUtility.DoKnockback(self,-x,12000.); SWWMUtility.DoKnockback(self,-x,12000.);
@ -1047,14 +1047,14 @@ Class MisterRifle : SWWMWeapon
A_AlertMonsters(swwm_uncapalert?0:5000); A_AlertMonsters(swwm_uncapalert?0:5000);
for ( int i=0; i<9; i++ ) for ( int i=0; i<9; i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.scale *= .4; s.scale *= .4;
s.alpha *= .1; s.alpha *= .1;
s.vel += vel*.5+x*FRandom[Mister](1.,4.); s.vel += vel*.5+x*FRandom[Mister](1.,4.);
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
} }
Vector3 dir = SWWMUtility.GetPlayerAimDir(self); Vector3 dir = SWWMUtility.GetPlayerAimDir(self);
let p = Spawn("MisterGrenade",origin); let p = Spawn('MisterGrenade',origin);
p.target = self; p.target = self;
p.angle = atan2(dir.y,dir.x); p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z); p.pitch = asin(-dir.z);
@ -1092,7 +1092,7 @@ Class MisterRifle : SWWMWeapon
// droppage // droppage
let [x, y, z] = SWWMUtility.GetPlayerAxes(self); let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,8,3,-18); Vector3 origin = SWWMUtility.GetFireOffset(self,8,3,-18);
let c = Spawn("MisterGCasing",origin); let c = Spawn('MisterGCasing',origin);
c.angle = angle; c.angle = angle;
c.pitch = pitch; c.pitch = pitch;
c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2.,4.)); c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2.,4.));
@ -1110,7 +1110,7 @@ Class MisterRifle : SWWMWeapon
action void A_GrenadeIn() action void A_GrenadeIn()
{ {
A_StartSound("mister/grenadein",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/grenadein",CHAN_WEAPON,CHANF_OVERLAP);
if ( !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') )
invoker.Ammo2.Amount = max(0,invoker.Ammo2.Amount-1); invoker.Ammo2.Amount = max(0,invoker.Ammo2.Amount-1);
invoker.gchambered = true; invoker.gchambered = true;
invoker.gfired = false; invoker.gfired = false;
@ -1199,11 +1199,11 @@ Class MisterRifle : SWWMWeapon
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 850; Weapon.SelectionOrder 850;
Weapon.UpSound "mister/select"; Weapon.UpSound "mister/select";
Weapon.AmmoType1 "MisterAmmo"; Weapon.AmmoType1 'MisterAmmo';
Weapon.AmmoGive1 1; Weapon.AmmoGive1 1;
Weapon.AmmoType2 "MisterGAmmo"; Weapon.AmmoType2 'MisterGAmmo';
Weapon.AmmoGive2 0; Weapon.AmmoGive2 0;
SWWMWeapon.DropAmmoType "SWWMCellAmmoBig"; SWWMWeapon.DropAmmoType 'SWWMCellAmmoBig';
MisterRifle.ClipCount 12; MisterRifle.ClipCount 12;
Stamina 1600000; Stamina 1600000;
+SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.NOFIRSTGIVE;
@ -1217,9 +1217,9 @@ Class MisterRifle : SWWMWeapon
{ {
A_ChangeModel("",1,"","",7,"models","MortalMag.png",CMDL_USESURFACESKIN,-1); A_ChangeModel("",1,"","",7,"models","MortalMag.png",CMDL_USESURFACESKIN,-1);
A_FullRaise(); A_FullRaise();
if ( invoker.boltlock ) return ResolveState("SelectLock"); if ( invoker.boltlock ) return ResolveState('SelectLock');
if ( (invoker.clipcount > 0) && (!invoker.chambered || invoker.fired) ) if ( (invoker.clipcount > 0) && (!invoker.chambered || invoker.fired) )
return ResolveState("SelectCycle"); return ResolveState('SelectCycle');
return ResolveState(null); return ResolveState(null);
} }
XZW2 QRSTUV 2; XZW2 QRSTUV 2;
@ -1250,7 +1250,7 @@ Class MisterRifle : SWWMWeapon
{ {
int flg = (WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1); int flg = (WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1);
// can't alt-fire if we have no grenades left // can't alt-fire if we have no grenades left
if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') )
flg |= WRF_NOSECONDARY; flg |= WRF_NOSECONDARY;
A_WeaponReady(flg); A_WeaponReady(flg);
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) ) if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) )
@ -1262,10 +1262,10 @@ Class MisterRifle : SWWMWeapon
{ {
int flg = (WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1); int flg = (WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1);
// can't alt-fire if we have no grenades left // can't alt-fire if we have no grenades left
if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') )
flg |= WRF_NOSECONDARY; flg |= WRF_NOSECONDARY;
// can't use primary fire if we have no ammo to reload from // can't use primary fire if we have no ammo to reload from
if ( (invoker.Ammo1.Amount <= 0) && (CountInv("MisterRound") <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) if ( (invoker.Ammo1.Amount <= 0) && (CountInv('MisterRound') <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') )
flg |= WRF_NOPRIMARY; flg |= WRF_NOPRIMARY;
A_WeaponReady(flg); A_WeaponReady(flg);
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) ) if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) )
@ -1273,7 +1273,7 @@ Class MisterRifle : SWWMWeapon
} }
Wait; Wait;
AutoCycle: AutoCycle:
XZW2 A 1 A_JumpIf(invoker.clipcount<=0,"AutoCycleLock"); XZW2 A 1 A_JumpIf(invoker.clipcount<=0,'AutoCycleLock');
XZW6 H 2 A_BoltBack(true); XZW6 H 2 A_BoltBack(true);
XZW6 IJ 2; XZW6 IJ 2;
XZW6 K 2 A_BoltForward(); XZW6 K 2 A_BoltForward();
@ -1323,9 +1323,9 @@ Class MisterRifle : SWWMWeapon
XZW2 A 1 XZW2 A 1
{ {
if ( !invoker.gchambered || invoker.gfired ) if ( !invoker.gchambered || invoker.gfired )
return invoker.boltlock?ResolveState("AltReloadLock"):ResolveState("AltReload"); return invoker.boltlock?ResolveState('AltReloadLock'):ResolveState('AltReload');
A_MisterFireGrenade(); A_MisterFireGrenade();
return A_JumpIf(invoker.boltlock,"AltFireLock"); return A_JumpIf(invoker.boltlock,'AltFireLock');
} }
XZW4 OP 1; XZW4 OP 1;
XZW4 QR 2; XZW4 QR 2;
@ -1380,10 +1380,10 @@ Class MisterRifle : SWWMWeapon
Reload: Reload:
XZW2 A 2 XZW2 A 2
{ {
if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && (CountInv("MisterRound") <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo")) ) if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && (CountInv('MisterRound') <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo')) )
return invoker.boltlock?ResolveState("IdleLock"):ResolveState("Idle"); return invoker.boltlock?ResolveState('IdleLock'):ResolveState('Idle');
A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.boltlock,"ReloadLock"); return A_JumpIf(invoker.boltlock,'ReloadLock');
} }
XZW9 KLMNOPQRST 2; XZW9 KLMNOPQRST 2;
XZW9 U 2 A_MagOut(); XZW9 U 2 A_MagOut();
@ -1461,13 +1461,13 @@ Class MisterRifle : SWWMWeapon
XZW2 A 2 XZW2 A 2
{ {
A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.boltlock,"ZoomLock"); return A_JumpIf(invoker.boltlock,'ZoomLock');
} }
XZW6 PQRSTUVW 2; XZW6 PQRSTUVW 2;
XZW6 X 2 A_FireSelect(); XZW6 X 2 A_FireSelect();
XZW6 YZ 2; XZW6 YZ 2;
XZW7 A 2; XZW7 A 2;
XZW7 B 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,"ReZoom"); XZW7 B 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,'ReZoom');
XZW7 CD 2; XZW7 CD 2;
XZW7 E 2 A_StartSound("mister/meleeend",CHAN_WEAPON,CHANF_OVERLAP,starttime:.35); XZW7 E 2 A_StartSound("mister/meleeend",CHAN_WEAPON,CHANF_OVERLAP,starttime:.35);
XZW7 FGHI 2; XZW7 FGHI 2;
@ -1480,7 +1480,7 @@ Class MisterRifle : SWWMWeapon
XZWE BCDEFGHI 2; XZWE BCDEFGHI 2;
XZWE J 2 A_FireSelect(); XZWE J 2 A_FireSelect();
XZWE KLM 2; XZWE KLM 2;
XZWE N 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,"ReZoomLock"); XZWE N 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,'ReZoomLock');
XZWE OP 2; XZWE OP 2;
XZWE Q 2 A_StartSound("mister/meleeend",CHAN_WEAPON,CHANF_OVERLAP,starttime:.35); XZWE Q 2 A_StartSound("mister/meleeend",CHAN_WEAPON,CHANF_OVERLAP,starttime:.35);
XZWE RSTU 2; XZWE RSTU 2;
@ -1492,7 +1492,7 @@ Class MisterRifle : SWWMWeapon
XZW2 A 2 XZW2 A 2
{ {
A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.boltlock,"User1Lock"); return A_JumpIf(invoker.boltlock,'User1Lock');
} }
XZW8 MN 2; XZW8 MN 2;
XZW8 O 2 XZW8 O 2
@ -1530,7 +1530,7 @@ Class MisterRifle : SWWMWeapon
XZW2 A 2 XZW2 A 2
{ {
A_StartSound("mister/deselect",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("mister/deselect",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.boltlock,"DeselectLock"); return A_JumpIf(invoker.boltlock,'DeselectLock');
} }
XZW2 BCDE 2; XZW2 BCDE 2;
XZW2 FGHIJKLMNO 1; XZW2 FGHIJKLMNO 1;
@ -1546,7 +1546,7 @@ Class MisterRifle : SWWMWeapon
{ {
let psp = player.FindPSprite(PSP_FLASH); let psp = player.FindPSprite(PSP_FLASH);
psp.frame = Random[GunFlash](0,3); psp.frame = Random[GunFlash](0,3);
let l = Spawn("MisterWeaponLight",pos); let l = Spawn('MisterWeaponLight',pos);
l.target = self; l.target = self;
} }
Stop; Stop;
@ -1562,7 +1562,7 @@ Class MisterRifle : SWWMWeapon
{ {
let psp = player.FindPSprite(PSP_FLASH); let psp = player.FindPSprite(PSP_FLASH);
psp.frame = Random[GunFlash](4,7); psp.frame = Random[GunFlash](4,7);
let l = Spawn("MisterWeaponLight",pos); let l = Spawn('MisterWeaponLight',pos);
l.target = self; l.target = self;
A_OverlayFlags(PSP_FLASH,PSPF_ALPHA|PSPF_FORCEALPHA,true); A_OverlayFlags(PSP_FLASH,PSPF_ALPHA|PSPF_FORCEALPHA,true);
} }
@ -1580,7 +1580,7 @@ Class MisterRifle : SWWMWeapon
{ {
let psp = player.FindPSprite(PSP_FLASH); let psp = player.FindPSprite(PSP_FLASH);
psp.frame = Random[GunFlash](8,11); psp.frame = Random[GunFlash](8,11);
let l = Spawn("MisterWeaponLight",pos); let l = Spawn('MisterWeaponLight',pos);
l.target = self; l.target = self;
} }
Stop; Stop;

View file

@ -81,7 +81,7 @@ Class MisterRing : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale 1.5; Scale 1.5;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -131,7 +131,7 @@ Class MisterBulletImpactPop : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale 6.; Scale 6.;
+NODAMAGETHRUST; +NODAMAGETHRUST;
+FORCERADIUSDMG; +FORCERADIUSDMG;
@ -178,7 +178,7 @@ Class MisterFuzzy : SWWMNonInteractiveActor
{ {
Obituary "$O_MORTALRIFLE"; Obituary "$O_MORTALRIFLE";
DamageType 'CoAb44'; DamageType 'CoAb44';
RenderStyle "Add"; RenderStyle 'Add';
+NODAMAGETHRUST; +NODAMAGETHRUST;
+FORCERADIUSDMG; +FORCERADIUSDMG;
+FOILINVUL; +FOILINVUL;
@ -256,7 +256,7 @@ Class MisterFuzzy : SWWMNonInteractiveActor
traildir /= len; traildir /= len;
for ( double i=0.; i<len; i+=4. ) for ( double i=0.; i<len; i+=4. )
{ {
let p = Spawn("MisterFuzzyTrail",level.Vec3Offset(oldpos,traildir*i)); let p = Spawn('MisterFuzzyTrail',level.Vec3Offset(oldpos,traildir*i));
p.vel = dir*FRandom[ExploS](1.,4.); p.vel = dir*FRandom[ExploS](1.,4.);
p.scale *= special1/specialf1; p.scale *= special1/specialf1;
} }
@ -272,7 +272,7 @@ Class MisterFuzzyTrail : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale 1.5; Scale 1.5;
Alpha .25; Alpha .25;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
@ -306,7 +306,7 @@ Class MisterPop : SWWMNonInteractiveActor
{ {
Obituary "$O_MORTALRIFLE"; Obituary "$O_MORTALRIFLE";
DamageType 'CoAb44'; DamageType 'CoAb44';
RenderStyle "Add"; RenderStyle 'Add';
Scale .2; Scale .2;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+NODAMAGETHRUST; +NODAMAGETHRUST;
@ -333,7 +333,7 @@ Class MisterPop : SWWMNonInteractiveActor
} }
TNT1 A 1 TNT1 A 1
{ {
let p = Spawn("MisterFuzzyTrail",pos); let p = Spawn('MisterFuzzyTrail',pos);
p.alpha *= 1.5; p.alpha *= 1.5;
p.scale *= .5; p.scale *= .5;
} }
@ -348,7 +348,7 @@ Class MisterBulletImpact : SWWMNonInteractiveActor
{ {
Obituary "$O_MORTALRIFLE"; Obituary "$O_MORTALRIFLE";
DamageType 'CoAb44'; DamageType 'CoAb44';
RenderStyle "Add"; RenderStyle 'Add';
Scale 1.5; Scale 1.5;
+NODAMAGETHRUST; +NODAMAGETHRUST;
+FORCERADIUSDMG; +FORCERADIUSDMG;
@ -370,7 +370,7 @@ Class MisterBulletImpact : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,8);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](1,3); s.special1 = Random[ExploS](1,3);
@ -381,26 +381,26 @@ Class MisterBulletImpact : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](6,16); numpt = Random[ExploS](6,16);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](15,20); numpt = Random[ExploS](15,20);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
} }
Spawn("MisterExLight",pos); Spawn('MisterExLight',pos);
Spawn("MisterBulletImpactPop",pos); Spawn('MisterBulletImpactPop',pos);
} }
virtual void A_BulletSubExplode() virtual void A_BulletSubExplode()
{ {
@ -412,7 +412,7 @@ Class MisterBulletImpact : SWWMNonInteractiveActor
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
} }
} }
@ -451,7 +451,7 @@ Class MisterBuckshotImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,4); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,4);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](0,2); s.special1 = Random[ExploS](0,2);
@ -462,28 +462,28 @@ Class MisterBuckshotImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,6); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,6);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](2,4); numpt = Random[ExploS](2,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,8);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](-2,4); numpt = Random[ExploS](-2,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
s.special1 -= 3; s.special1 -= 3;
s.special2 = -1; s.special2 = -1;
} }
Spawn("MisterExLightTiny",pos); Spawn('MisterExLightTiny',pos);
let p = Spawn("MisterBulletImpactPop",pos); let p = Spawn('MisterBulletImpactPop',pos);
p.A_SetScale(1.5); p.A_SetScale(1.5);
} }
override void A_BulletSubExplode() override void A_BulletSubExplode()
@ -496,7 +496,7 @@ Class MisterBuckshotImpact : MisterBulletImpact
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
} }
} }
@ -536,7 +536,7 @@ Class MisterStreamImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,8);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](0,2); s.special1 = Random[ExploS](0,2);
@ -547,27 +547,27 @@ Class MisterStreamImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](3,6); numpt = Random[ExploS](3,6);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](4,8); numpt = Random[ExploS](4,8);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
s.special1 -= 2; s.special1 -= 2;
} }
Spawn("MisterExLightSmall",pos); Spawn('MisterExLightSmall',pos);
let p = Spawn("MisterBulletImpactPop",pos); let p = Spawn('MisterBulletImpactPop',pos);
p.A_SetScale(3.); p.A_SetScale(3.);
} }
override void A_BulletSubExplode() override void A_BulletSubExplode()
@ -580,7 +580,7 @@ Class MisterStreamImpact : MisterBulletImpact
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
} }
} }
@ -620,7 +620,7 @@ Class MisterRailEntryImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,10); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,10);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](0,2); s.special1 = Random[ExploS](0,2);
@ -631,20 +631,20 @@ Class MisterRailEntryImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](2,4); numpt = Random[ExploS](2,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](3,6); numpt = Random[ExploS](3,6);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
@ -653,8 +653,8 @@ Class MisterRailEntryImpact : MisterBulletImpact
MisterFuzzy(s).mrc = mrc; MisterFuzzy(s).mrc = mrc;
mrc.effectors.Push(s); mrc.effectors.Push(s);
} }
Spawn("MisterExLightTiny",pos); Spawn('MisterExLightTiny',pos);
let p = Spawn("MisterBulletImpactPop",pos); let p = Spawn('MisterBulletImpactPop',pos);
p.A_SetScale(4.); p.A_SetScale(4.);
} }
override void A_BulletSubExplode() override void A_BulletSubExplode()
@ -668,7 +668,7 @@ Class MisterRailEntryImpact : MisterBulletImpact
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
if ( !mrc ) continue; if ( !mrc ) continue;
MisterPop(p).mrc = mrc; MisterPop(p).mrc = mrc;
@ -711,7 +711,7 @@ Class MisterRailExitImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,12);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](1,3); s.special1 = Random[ExploS](1,3);
@ -722,20 +722,20 @@ Class MisterRailExitImpact : MisterBulletImpact
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](4,12); numpt = Random[ExploS](4,12);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](4,16);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](4,8); numpt = Random[ExploS](4,8);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
@ -743,8 +743,8 @@ Class MisterRailExitImpact : MisterBulletImpact
MisterFuzzy(s).mrc = mrc; MisterFuzzy(s).mrc = mrc;
mrc.effectors.Push(s); mrc.effectors.Push(s);
} }
Spawn("MisterExLightBig",pos); Spawn('MisterExLightBig',pos);
let p = Spawn("MisterBulletImpactPop",pos); let p = Spawn('MisterBulletImpactPop',pos);
p.A_SetScale(8.); p.A_SetScale(8.);
} }
override void A_BulletSubExplode() override void A_BulletSubExplode()
@ -758,7 +758,7 @@ Class MisterRailExitImpact : MisterBulletImpact
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,16)*special1);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
if ( !mrc ) continue; if ( !mrc ) continue;
MisterPop(p).mrc = mrc; MisterPop(p).mrc = mrc;
@ -823,7 +823,7 @@ Class MisterRailBeam : SWWMNonInteractiveActor
Default Default
{ {
Obituary "$O_MORTALRIFLE"; Obituary "$O_MORTALRIFLE";
RenderStyle "Add"; RenderStyle 'Add';
RenderRadius 10000.; RenderRadius 10000.;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+FOILINVUL; +FOILINVUL;
@ -831,7 +831,7 @@ Class MisterRailBeam : SWWMNonInteractiveActor
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
let b = Spawn("MisterRailChildBeam",pos); let b = Spawn('MisterRailChildBeam',pos);
b.frame = frame; b.frame = frame;
b.scale.y = scale.y; b.scale.y = scale.y;
b.angle = angle; b.angle = angle;
@ -847,7 +847,7 @@ Class MisterRailBeam : SWWMNonInteractiveActor
if ( isFrozen() ) return; if ( isFrozen() ) return;
A_SetScale(scale.x*.85,scale.y); A_SetScale(scale.x*.85,scale.y);
A_FadeOut(.05); A_FadeOut(.05);
if ( !cbt ) cbt = new("CandyBeamTracer"); if ( !cbt ) cbt = new('CandyBeamTracer');
cbt.hitlist.Clear(); cbt.hitlist.Clear();
Vector3 dir = SWWMUtility.Vec3FromAngles(angle,pitch-90); Vector3 dir = SWWMUtility.Vec3FromAngles(angle,pitch-90);
cbt.ShootThroughList.Clear(); cbt.ShootThroughList.Clear();
@ -873,7 +873,7 @@ Class MisterRailChildBeam : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Alpha .5; Alpha .5;
RenderRadius 10000.; RenderRadius 10000.;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
@ -901,7 +901,7 @@ Class MisterGrenadeFlare : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
override void Tick() override void Tick()
@ -966,6 +966,7 @@ Class MisterGrenade : Actor
+BOUNCEONWALLS; +BOUNCEONWALLS;
+BOUNCEONFLOORS; +BOUNCEONFLOORS;
+BOUNCEONCEILINGS; +BOUNCEONCEILINGS;
+BOUNCEMODIFIESPITCH;
+THRUACTORS; +THRUACTORS;
+CANBOUNCEWATER; +CANBOUNCEWATER;
} }
@ -974,7 +975,7 @@ Class MisterGrenade : Actor
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
oldvel = vel; oldvel = vel;
let t = Spawn("MisterGrenadeFlare",pos); let t = Spawn('MisterGrenadeFlare',pos);
t.master = self; t.master = self;
t.scale *= Radius/4.; t.scale *= Radius/4.;
} }
@ -997,7 +998,7 @@ Class MisterGrenade : Actor
A_Stop(); A_Stop();
ClearBounce(); ClearBounce();
bINTERPOLATEANGLES = false; bINTERPOLATEANGLES = false;
SetStateLabel("Rest"); SetStateLabel('Rest');
return; return;
} }
// direct hit from main grenade // direct hit from main grenade
@ -1017,7 +1018,7 @@ Class MisterGrenade : Actor
int numpt = bAMBUSH?1:3; int numpt = bAMBUSH?1:3;
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",Vec3Offset(0,0,Height/2)); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',Vec3Offset(0,0,Height/2));
s.scolor = Color(1,4,2)*Random[Mister](48,63); s.scolor = Color(1,4,2)*Random[Mister](48,63);
s.scale *= FRandom[Mister](.5,1.1); s.scale *= FRandom[Mister](.5,1.1);
s.framestep = Random[Mister](1,3); s.framestep = Random[Mister](1,3);
@ -1100,7 +1101,7 @@ Class MisterGrenade : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,12);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](1,4); s.special1 = Random[ExploS](1,4);
@ -1111,20 +1112,20 @@ Class MisterGrenade : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,16);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](10,20); numpt = Random[ExploS](10,20);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,24); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,24);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](16,24); numpt = Random[ExploS](16,24);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
@ -1132,7 +1133,7 @@ Class MisterGrenade : Actor
} }
// gather seekable targets // gather seekable targets
Array<Actor> candidates; Array<Actor> candidates;
let tt = new("TargetTracer"); let tt = new('TargetTracer');
tt.target = target; tt.target = target;
foreach ( s:level.Sectors ) for ( Actor t=s.thinglist; t; t=t.snext ) foreach ( s:level.Sectors ) for ( Actor t=s.thinglist; t; t=t.snext )
{ {
@ -1172,7 +1173,7 @@ Class MisterGrenade : Actor
double ang = j; double ang = j;
double pt = i; double pt = i;
Vector3 dir = SWWMUtility.Vec3FromAngles(ang,pt); Vector3 dir = SWWMUtility.Vec3FromAngles(ang,pt);
let p = MisterSubGrenade(Spawn("MisterSubGrenade",pos)); let p = MisterSubGrenade(Spawn('MisterSubGrenade',pos));
p.angle = ang; p.angle = ang;
p.pitch = pt; p.pitch = pt;
p.vel = dir*p.speed; p.vel = dir*p.speed;
@ -1184,8 +1185,8 @@ Class MisterGrenade : Actor
k = (k+1)%candidates.Size(); k = (k+1)%candidates.Size();
} }
} }
Spawn("MisterExLightBig",pos); Spawn('MisterExLightBig',pos);
Spawn("MisterRing",pos); Spawn('MisterRing',pos);
} }
virtual void A_GrenadeSubExplode() virtual void A_GrenadeSubExplode()
@ -1198,7 +1199,7 @@ Class MisterGrenade : Actor
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,20)*special2); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,20)*special2);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
} }
} }
@ -1300,7 +1301,7 @@ Class MisterSubGrenade : MisterGrenade
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,8);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](1,4); s.special1 = Random[ExploS](1,4);
@ -1311,26 +1312,26 @@ Class MisterSubGrenade : MisterGrenade
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,12);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](5,10); numpt = Random[ExploS](5,10);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](8,16);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](6,8); numpt = Random[ExploS](6,8);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("MisterFuzzy",pos); let s = Spawn('MisterFuzzy',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.target = target; s.target = target;
s.special1 -= 2; s.special1 -= 2;
} }
Spawn("MisterExLight",pos); Spawn('MisterExLight',pos);
} }
override void A_GrenadeSubExplode() override void A_GrenadeSubExplode()
{ {
@ -1342,7 +1343,7 @@ Class MisterSubGrenade : MisterGrenade
{ {
Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,10)*special2); Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,10)*special2);
if ( !level.IsPointInLevel(np) ) continue; if ( !level.IsPointInLevel(np) ) continue;
let p = Spawn("MisterPop",np); let p = Spawn('MisterPop',np);
p.target = target; p.target = target;
} }
} }

View file

@ -43,8 +43,8 @@ Class Quadravol : SWWMWeapon
action State A_QuadFire( bool bMelee = false ) action State A_QuadFire( bool bMelee = false )
{ {
static const String BaseNum[] = {"one","two","three","four","five"}; static const String BaseNum[] = {"one","two","three","four","five"};
static const StateLabel FireStates[] = {"FireOne","FireTwo","FireThree","FireFour","FireFive"}; static const StateLabel FireStates[] = {'FireOne','FireTwo','FireThree','FireFour','FireFive'};
static const StateLabel FireStates1H[] = {"FireOne1H","FireTwo1H","FireThree1H","FireFour1H","FireFive1H"}; static const StateLabel FireStates1H[] = {'FireOne1H','FireTwo1H','FireThree1H','FireFour1H','FireFive1H'};
int idx = clamp(invoker.chargelevel-1,0,4); int idx = clamp(invoker.chargelevel-1,0,4);
A_StartSound("quadshot/fire"..BaseNum[idx],CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("quadshot/fire"..BaseNum[idx],CHAN_WEAPON,CHANF_OVERLAP);
A_PlayerFire(); A_PlayerFire();
@ -95,7 +95,7 @@ Class Quadravol : SWWMWeapon
SWWMHandler.DoFlash(self,Color(64,255,192,64),5); SWWMHandler.DoFlash(self,Color(64,255,192,64),5);
A_AlertMonsters(swwm_uncapalert?0:2000); A_AlertMonsters(swwm_uncapalert?0:2000);
SWWMUtility.DoKnockback(self,-x,20000.); SWWMUtility.DoKnockback(self,-x,20000.);
p = Spawn("QuadProj",origin); p = Spawn('QuadProj',origin);
p.target = self; p.target = self;
p.angle = atan2(x2.y,x2.x); p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z); p.pitch = asin(-x2.z);
@ -117,7 +117,7 @@ Class Quadravol : SWWMWeapon
SWWMHandler.DoFlash(self,Color(64,255,192,64),7); SWWMHandler.DoFlash(self,Color(64,255,192,64),7);
A_AlertMonsters(swwm_uncapalert?0:3000); A_AlertMonsters(swwm_uncapalert?0:3000);
SWWMUtility.DoKnockback(self,-x,40000.); SWWMUtility.DoKnockback(self,-x,40000.);
p = Spawn("QuadProj2",origin); p = Spawn('QuadProj2',origin);
p.target = self; p.target = self;
p.angle = atan2(x2.y,x2.x); p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z); p.pitch = asin(-x2.z);
@ -139,7 +139,7 @@ Class Quadravol : SWWMWeapon
SWWMHandler.DoFlash(self,Color(64,255,192,64),8); SWWMHandler.DoFlash(self,Color(64,255,192,64),8);
A_AlertMonsters(swwm_uncapalert?0:4000); A_AlertMonsters(swwm_uncapalert?0:4000);
SWWMUtility.DoKnockback(self,-x,80000.); SWWMUtility.DoKnockback(self,-x,80000.);
p = Spawn("QuadProj3",origin); p = Spawn('QuadProj3',origin);
p.target = self; p.target = self;
p.angle = atan2(x2.y,x2.x); p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z); p.pitch = asin(-x2.z);
@ -163,7 +163,7 @@ Class Quadravol : SWWMWeapon
SWWMUtility.DoKnockback(self,-x,150000.); SWWMUtility.DoKnockback(self,-x,150000.);
if ( pointblank || bMelee ) if ( pointblank || bMelee )
{ {
p = Spawn("QuadProj3",origin); p = Spawn('QuadProj3',origin);
p.target = self; p.target = self;
p.angle = atan2(x2.y,x2.x); p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z); p.pitch = asin(-x2.z);
@ -180,7 +180,7 @@ Class Quadravol : SWWMWeapon
s = FRandom[Quadravol](0,.2); s = FRandom[Quadravol](0,.2);
a = (i%4)*90 + FRandom[Quadravol](-50,50)*s; a = (i%4)*90 + FRandom[Quadravol](-50,50)*s;
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s); dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
p = Spawn("QuadProjSub2",origin); p = Spawn('QuadProjSub2',origin);
p.target = self; p.target = self;
p.angle = atan2(dir.y,dir.x); p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z); p.pitch = asin(-dir.z);
@ -209,7 +209,7 @@ Class Quadravol : SWWMWeapon
s = FRandom[Quadravol](0,bExtra?.5:.4); s = FRandom[Quadravol](0,bExtra?.5:.4);
a = (i%4)*90 + FRandom[Quadravol](-50,50)*s; a = (i%4)*90 + FRandom[Quadravol](-50,50)*s;
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s); dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
p = Spawn("QuadExplArm2",origin); p = Spawn('QuadExplArm2',origin);
p.target = self; p.target = self;
p.tracer = self; p.tracer = self;
p.angle = atan2(dir.y,dir.x); p.angle = atan2(dir.y,dir.x);
@ -217,13 +217,13 @@ Class Quadravol : SWWMWeapon
p.special1 = bExtra*4; p.special1 = bExtra*4;
p.special2 = bExtra*10; p.special2 = bExtra*10;
} }
Spawn("QuadExplLight3",origin); Spawn('QuadExplLight3',origin);
break; break;
} }
if ( pointblank || bMelee ) self.DamageMobj(invoker,self,bMelee?(5+idx*2):(10+idx*4),'Fire',DMG_EXPLOSION); if ( pointblank || bMelee ) self.DamageMobj(invoker,self,bMelee?(5+idx*2):(10+idx*4),'Fire',DMG_EXPLOSION);
for ( int i=0; i<(4+idx); i++ ) for ( int i=0; i<(4+idx); i++ )
{ {
let s = Spawn("SWWMSmoke",origin); let s = Spawn('SWWMSmoke',origin);
s.special1 = 1; s.special1 = 1;
s.scale *= 1.3; s.scale *= 1.3;
s.alpha *= .2; s.alpha *= .2;
@ -232,7 +232,7 @@ Class Quadravol : SWWMWeapon
} }
for ( int i=0; i<(10+2*idx); i++ ) for ( int i=0; i<(10+2*idx); i++ )
{ {
let s = Spawn("SWWMSpark",origin); let s = Spawn('SWWMSpark',origin);
s.scale *= .3; s.scale *= .3;
s.alpha *= .4; s.alpha *= .4;
s.vel += vel*.5+x*FRandom[Quadravol](4.,8.)+y*FRandom[Quadravol](-1.,1.)+z*FRandom[Quadravol](-1.,1.); s.vel += vel*.5+x*FRandom[Quadravol](4.,8.)+y*FRandom[Quadravol](-1.,1.)+z*FRandom[Quadravol](-1.,1.);
@ -254,8 +254,8 @@ Class Quadravol : SWWMWeapon
if ( invoker.waschambered ) if ( invoker.waschambered )
{ {
A_ChangeModel("",2,"","",0,"models",invoker.wascharged?"QuadCell_Used.png":"QuadCell.png",CMDL_USESURFACESKIN,-1); A_ChangeModel("",2,"","",0,"models",invoker.wascharged?"QuadCell_Used.png":"QuadCell.png",CMDL_USESURFACESKIN,-1);
if ( invoker.onehand ) A_Overlay(PSP_WEAPON+1,"DropCasing1H"); if ( invoker.onehand ) A_Overlay(PSP_WEAPON+1,'DropCasing1H');
else A_Overlay(PSP_WEAPON+1,"DropCasing"); else A_Overlay(PSP_WEAPON+1,'DropCasing');
invoker.wastecycle = 0; invoker.wastecycle = 0;
} }
else if ( !Demolitionist(self) || !(Demolitionist(self).mystats) || swwm_nomapmsg ) return; else if ( !Demolitionist(self) || !(Demolitionist(self).mystats) || swwm_nomapmsg ) return;
@ -277,7 +277,7 @@ Class Quadravol : SWWMWeapon
A_PlayerReload(true); A_PlayerReload(true);
A_StartSound("demolitionist/handsdown",CHAN_WEAPON,CHANF_OVERLAP,.8); A_StartSound("demolitionist/handsdown",CHAN_WEAPON,CHANF_OVERLAP,.8);
A_ChangeModel("",2,"","",0,"models","QuadCell.png",CMDL_USESURFACESKIN,-1); A_ChangeModel("",2,"","",0,"models","QuadCell.png",CMDL_USESURFACESKIN,-1);
A_Overlay(PSP_WEAPON+1,"LoadOverlay"); A_Overlay(PSP_WEAPON+1,'LoadOverlay');
} }
action void A_Load() action void A_Load()
@ -302,7 +302,7 @@ Class Quadravol : SWWMWeapon
Vector3 origin = SWWMUtility.GetFireOffset(self,-8,8,-16); Vector3 origin = SWWMUtility.GetFireOffset(self,-8,8,-16);
if ( invoker.wascharged ) if ( invoker.wascharged )
{ {
let c = Spawn("QuadravolCasing",origin); let c = Spawn('QuadravolCasing',origin);
c.angle = angle; c.angle = angle;
c.pitch = pitch-90; c.pitch = pitch-90;
c.vel = x*FRandom[Junk](-2.5,-1.5)+y*FRandom[Junk](.5,1.)-(0,0,FRandom[Junk](2.,5.)); c.vel = x*FRandom[Junk](-2.5,-1.5)+y*FRandom[Junk](.5,1.)-(0,0,FRandom[Junk](2.,5.));
@ -311,7 +311,7 @@ Class Quadravol : SWWMWeapon
} }
if ( invoker.Ammo1.Amount >= invoker.Ammo1.MaxAmount ) if ( invoker.Ammo1.Amount >= invoker.Ammo1.MaxAmount )
{ {
let a = Inventory(Spawn("QuadravolAmmo",origin)); let a = Inventory(Spawn('QuadravolAmmo',origin));
a.bDROPPED = true; a.bDROPPED = true;
a.DropTime = 30; a.DropTime = 30;
a.bSpecial = a.bSolid = false; a.bSpecial = a.bSolid = false;
@ -426,9 +426,9 @@ Class Quadravol : SWWMWeapon
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 650; Weapon.SelectionOrder 650;
Weapon.UpSound "quadshot/select"; Weapon.UpSound "quadshot/select";
Weapon.AmmoType1 "QuadravolAmmo"; Weapon.AmmoType1 'QuadravolAmmo';
Weapon.AmmoGive1 3; Weapon.AmmoGive1 3;
SWWMWeapon.DropAmmoType "SWWMRocketAmmoSmall"; SWWMWeapon.DropAmmoType 'SWWMRocketAmmoSmall';
Quadravol.ClipCount 5; Quadravol.ClipCount 5;
Stamina 80000; Stamina 80000;
+SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.NOFIRSTGIVE;
@ -444,7 +444,7 @@ Class Quadravol : SWWMWeapon
XZW2 R 1 XZW2 R 1
{ {
A_FullRaise(); A_FullRaise();
return A_JumpIf(invoker.onehand,"Select1H"); return A_JumpIf(invoker.onehand,'Select1H');
} }
XZW2 STUVWXYZ 1; XZW2 STUVWXYZ 1;
XZW3 ABCDEFGHI 1; XZW3 ABCDEFGHI 1;
@ -467,9 +467,9 @@ Class Quadravol : SWWMWeapon
{ {
if ( invoker.chargelevel <= 0 ) if ( invoker.chargelevel <= 0 )
{ {
if ( invoker.clipcount > 0 ) return ResolveState("AltFire"); if ( invoker.clipcount > 0 ) return ResolveState('AltFire');
invoker.fromfire = true; invoker.fromfire = true;
return ResolveState("Reload"); return ResolveState('Reload');
} }
return A_QuadFire(); return A_QuadFire();
} }
@ -506,7 +506,7 @@ Class Quadravol : SWWMWeapon
XZW2 A 2 XZW2 A 2
{ {
A_PlayerCheckGun(); A_PlayerCheckGun();
return A_JumpIf(invoker.onehand,"AltFire1H"); return A_JumpIf(invoker.onehand,'AltFire1H');
} }
XZW5 C 2; XZW5 C 2;
XZW5 D 2 A_LeverForward(); XZW5 D 2 A_LeverForward();
@ -527,8 +527,8 @@ Class Quadravol : SWWMWeapon
XZW2 A 2 XZW2 A 2
{ {
if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) ) if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) )
return invoker.onehand?ResolveState("Idle1H"):ResolveState("Idle"); return invoker.onehand?ResolveState('Idle1H'):ResolveState('Idle');
if ( invoker.onehand ) return ResolveState("Reload1H"); if ( invoker.onehand ) return ResolveState('Reload1H');
A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP);
return ResolveState(null); return ResolveState(null);
} }
@ -547,12 +547,12 @@ Class Quadravol : SWWMWeapon
XZW5 P 2 XZW5 P 2
{ {
if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) ) if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) )
return A_JumpIf(invoker.onehand,"ReloadEnd1H"); return A_JumpIf(invoker.onehand,'ReloadEnd1H');
if ( invoker.fromfire && (player.cmd.buttons&BT_ATTACK) ) if ( invoker.fromfire && (player.cmd.buttons&BT_ATTACK) )
return ResolveState("ReloadHold"); return ResolveState('ReloadHold');
invoker.fromfire = false; invoker.fromfire = false;
if ( player.cmd.buttons&BT_RELOAD ) return ResolveState("ReloadHold"); if ( player.cmd.buttons&BT_RELOAD ) return ResolveState('ReloadHold');
return A_JumpIf(invoker.onehand,"ReloadEnd1H"); return A_JumpIf(invoker.onehand,'ReloadEnd1H');
} }
XZW6 B 2 A_StartSound("quadshot/twohand",CHAN_WEAPON,CHANF_OVERLAP); XZW6 B 2 A_StartSound("quadshot/twohand",CHAN_WEAPON,CHANF_OVERLAP);
XZW6 CDEF 2; XZW6 CDEF 2;
@ -578,7 +578,7 @@ Class Quadravol : SWWMWeapon
if ( invoker.onehand ) if ( invoker.onehand )
{ {
invoker.onehand = false; invoker.onehand = false;
return ResolveState("Zoom1H"); return ResolveState('Zoom1H');
} }
A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP);
invoker.onehand = true; invoker.onehand = true;
@ -591,7 +591,7 @@ Class Quadravol : SWWMWeapon
XZW2 A 1 XZW2 A 1
{ {
A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.onehand,"User11H"); return A_JumpIf(invoker.onehand,'User11H');
} }
XZW7 BCD 1; XZW7 BCD 1;
XZW7 E 2 XZW7 E 2
@ -602,14 +602,14 @@ Class Quadravol : SWWMWeapon
XZW7 FG 2; XZW7 FG 2;
XZW7 H 2 A_Parry(6); XZW7 H 2 A_Parry(6);
XZW7 I 1; XZW7 I 1;
XZW7 J 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),"Bayonet"); XZW7 J 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),'Bayonet');
XZW7 KLM 1; XZW7 KLM 1;
XZW7 NOPQRSTUVWX 2; XZW7 NOPQRSTUVWX 2;
Goto Ready; Goto Ready;
Bayonet: Bayonet:
XZW7 J 1 A_FireBayonet(); XZW7 J 1 A_FireBayonet();
XZW7 YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire"); XZW7 YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire');
XZW8 ABC 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire"); XZW8 ABC 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire');
XZW8 D 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP); XZW8 D 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP);
XZW8 EFGH 1; XZW8 EFGH 1;
XZW8 IJKL 2; XZW8 IJKL 2;
@ -625,7 +625,7 @@ Class Quadravol : SWWMWeapon
XZW2 A 1 XZW2 A 1
{ {
A_StartSound(invoker.onehand?"quadshot/deselectfast":"quadshot/deselect",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound(invoker.onehand?"quadshot/deselectfast":"quadshot/deselect",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.onehand,"Deselect1H"); return A_JumpIf(invoker.onehand,'Deselect1H');
} }
XZW2 BCDEFGHIJKLMNOPQ 1; XZW2 BCDEFGHIJKLMNOPQ 1;
XZW2 R -1 A_FullLower(); XZW2 R -1 A_FullLower();
@ -635,7 +635,7 @@ Class Quadravol : SWWMWeapon
{ {
let psp = player.GetPSprite(PSP_FLASH); let psp = player.GetPSprite(PSP_FLASH);
psp.frame = Random[GunFlash](0,9)+invoker.onehand*10; psp.frame = Random[GunFlash](0,9)+invoker.onehand*10;
let l = Spawn("SWWMWeaponLight",pos); let l = Spawn('SWWMWeaponLight',pos);
l.target = self; l.target = self;
} }
Stop; Stop;
@ -741,15 +741,15 @@ Class Quadravol : SWWMWeapon
XZWD DE 2; XZWD DE 2;
XZWD F 2 A_Parry(6); XZWD F 2 A_Parry(6);
XZWD G 1; XZWD G 1;
XZWD H 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),"Bayonet1H"); XZWD H 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),'Bayonet1H');
XZWD IJK 1; XZWD IJK 1;
XZWD LMNOPQRSTUV 2; XZWD LMNOPQRSTUV 2;
Goto Ready1H; Goto Ready1H;
Bayonet1H: Bayonet1H:
XZWD H 1 A_FireBayonet(); XZWD H 1 A_FireBayonet();
XZWD WX 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H"); XZWD WX 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire1H');
XZWD YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H"); XZWD YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire1H');
XZWE A 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H"); XZWE A 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire1H');
XZWE B 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP); XZWE B 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP);
XZWE CDEF 1; XZWE CDEF 1;
XZWE GHIJ 2; XZWE GHIJ 2;

View file

@ -47,7 +47,7 @@ Class QuadFlare : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Alpha .5; Alpha .5;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -89,7 +89,7 @@ Class QuadTrail : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Alpha .5; Alpha .5;
Scale 1.5; Scale 1.5;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
@ -178,7 +178,7 @@ Class QuadExplRing : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale 1.2; Scale 1.2;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -202,7 +202,7 @@ Class QuadProj : Actor
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
A_StartSound("quadshot/fly",CHAN_BODY,CHANF_LOOP); A_StartSound("quadshot/fly",CHAN_BODY,CHANF_LOOP);
let t = Spawn("QuadFlare",pos); let t = Spawn('QuadFlare',pos);
t.master = self; t.master = self;
t.scale = scale*2.; t.scale = scale*2.;
} }
@ -224,17 +224,17 @@ Class QuadProj : Actor
virtual void A_QuadTrail() virtual void A_QuadTrail()
{ {
let t = Spawn("QuadTrail",pos); let t = Spawn('QuadTrail',pos);
t.scale *= .6; t.scale *= .6;
t.vel = vel*.2; t.vel = vel*.2;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4; s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4;
s.vel += vel*.3; s.vel += vel*.3;
s.alpha *= .4; s.alpha *= .4;
int numpt = Random[Quadravol](5,15); int numpt = Random[Quadravol](5,15);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.3; e.vel += vel*.3;
} }
} }
@ -259,13 +259,13 @@ Class QuadProj : Actor
A_StartSound("quadshot/hit",CHAN_WEAPON,attenuation:.6); A_StartSound("quadshot/hit",CHAN_WEAPON,attenuation:.6);
A_StartSound("quadshot/hit",CHAN_VOICE,attenuation:.4); A_StartSound("quadshot/hit",CHAN_VOICE,attenuation:.4);
A_AlertMonsters(swwm_uncapalert?0:1500,AMF_EMITFROMTARGET); A_AlertMonsters(swwm_uncapalert?0:1500,AMF_EMITFROMTARGET);
Spawn("QuadExplLight",pos); Spawn('QuadExplLight',pos);
Spawn("QuadExplRing",pos); Spawn('QuadExplRing',pos);
int numpt = Random[Quadravol](12,18); int numpt = Random[Quadravol](12,18);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,8);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.special1 = Random[Quadravol](2,3); s.special1 = Random[Quadravol](2,3);
s.scale *= 4.; s.scale *= 4.;
@ -275,14 +275,14 @@ Class QuadProj : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[Quadravol](4,8); numpt = Random[Quadravol](4,8);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
s.scale *= FRandom[Quadravol](0.9,1.8); s.scale *= FRandom[Quadravol](0.9,1.8);
} }
@ -315,7 +315,7 @@ Class QuadProj : Actor
+HITMASTER; +HITMASTER;
+NOFRICTION; +NOFRICTION;
+SKYEXPLODE; +SKYEXPLODE;
RenderStyle "Add"; RenderStyle 'Add';
} }
States States
@ -364,11 +364,11 @@ Class QuadExplArm : Actor
Spawn: Spawn:
TNT1 A 1 TNT1 A 1
{ {
Spawn("QuadExplTrail",pos); Spawn('QuadExplTrail',pos);
if ( !(ReactionTime%2) ) if ( !(ReactionTime%2) )
SWWMUtility.DoExplosion(self,8+reactiontime*3,0,40+5*reactiontime,20,DE_QUADRAVOL|DE_NOSPLASH,ignoreme:tracer); SWWMUtility.DoExplosion(self,8+reactiontime*3,0,40+5*reactiontime,20,DE_QUADRAVOL|DE_NOSPLASH,ignoreme:tracer);
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = pvel+vel*.3; s.vel = pvel+vel*.3;
s.framestep = Random[ExploS](2,4); s.framestep = Random[ExploS](2,4);
s.scale *= 3.; s.scale *= 3.;
@ -376,7 +376,7 @@ Class QuadExplArm : Actor
int numpt = Random[Quadravol](1,4); int numpt = Random[Quadravol](1,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.4; e.vel += vel*.4;
} }
A_CountDown(); A_CountDown();
@ -399,7 +399,7 @@ Class QuadExplArm2 : QuadExplArm
Spawn: Spawn:
TNT1 A 1 TNT1 A 1
{ {
Spawn("QuadExplTrail2",pos); Spawn('QuadExplTrail2',pos);
if ( !(ReactionTime%2) ) if ( !(ReactionTime%2) )
{ {
SWWMUtility.DoExplosion(self,0,80000+reactiontime*5000,120+6*reactiontime,50,DE_BLAST|DE_EXTRAZTHRUST,ignoreme:tracer); SWWMUtility.DoExplosion(self,0,80000+reactiontime*5000,120+6*reactiontime,50,DE_BLAST|DE_EXTRAZTHRUST,ignoreme:tracer);
@ -407,7 +407,7 @@ Class QuadExplArm2 : QuadExplArm
SWWMUtility.DoExplosion(self,80+reactiontime*10,0,100+4*reactiontime,50,DE_HOWL|DE_NOSPLASH,ignoreme:tracer); SWWMUtility.DoExplosion(self,80+reactiontime*10,0,100+4*reactiontime,50,DE_HOWL|DE_NOSPLASH,ignoreme:tracer);
} }
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,5); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,5);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = pvel+vel*.6; s.vel = pvel+vel*.6;
s.framestep = Random[ExploS](3,5); s.framestep = Random[ExploS](3,5);
s.scale *= 3.2; s.scale *= 3.2;
@ -415,7 +415,7 @@ Class QuadExplArm2 : QuadExplArm
int numpt = Random[Quadravol](1,5); int numpt = Random[Quadravol](1,5);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.7; e.vel += vel*.7;
} }
A_CountDown(); A_CountDown();
@ -428,7 +428,7 @@ Class QuadExplTrail : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
Scale 1.2; Scale 1.2;
} }
@ -478,17 +478,17 @@ Class QuadProj2 : QuadProj
} }
override void A_QuadTrail() override void A_QuadTrail()
{ {
let t = Spawn("QuadTrail",pos); let t = Spawn('QuadTrail',pos);
t.scale *= .8; t.scale *= .8;
t.vel = vel*.3; t.vel = vel*.3;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4; s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4;
s.vel += vel*.4; s.vel += vel*.4;
s.alpha *= .6; s.alpha *= .6;
int numpt = Random[Quadravol](5,25); int numpt = Random[Quadravol](5,25);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.4; e.vel += vel*.4;
} }
} }
@ -512,13 +512,13 @@ Class QuadProj2 : QuadProj
A_StartSound("quadshot/twohit",CHAN_WEAPON,attenuation:.5); A_StartSound("quadshot/twohit",CHAN_WEAPON,attenuation:.5);
A_StartSound("quadshot/twohit",CHAN_VOICE,attenuation:.25); A_StartSound("quadshot/twohit",CHAN_VOICE,attenuation:.25);
A_AlertMonsters(swwm_uncapalert?0:2500,AMF_EMITFROMTARGET); A_AlertMonsters(swwm_uncapalert?0:2500,AMF_EMITFROMTARGET);
Spawn("QuadExplLight2",pos); Spawn('QuadExplLight2',pos);
Spawn("QuadExplRing2",pos); Spawn('QuadExplRing2',pos);
int numpt = Random[Quadravol](20,30); int numpt = Random[Quadravol](20,30);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,12);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.special1 = Random[Quadravol](2,3); s.special1 = Random[Quadravol](2,3);
s.scale *= 4.; s.scale *= 4.;
@ -528,21 +528,21 @@ Class QuadProj2 : QuadProj
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[Quadravol](8,12); numpt = Random[Quadravol](8,12);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
s.scale *= FRandom[Quadravol](0.9,1.8); s.scale *= FRandom[Quadravol](0.9,1.8);
} }
numpt = Random[Quadravol](12,16); numpt = Random[Quadravol](12,16);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("QuadExplArm",pos); let s = Spawn('QuadExplArm',pos);
s.target = target; s.target = target;
s.tracer = tracer; s.tracer = tracer;
} }
@ -572,17 +572,17 @@ Class QuadProjSub : QuadProj
} }
override void A_QuadTrail() override void A_QuadTrail()
{ {
let t = Spawn("QuadTrail",pos); let t = Spawn('QuadTrail',pos);
t.scale *= .5; t.scale *= .5;
t.vel = vel*.3; t.vel = vel*.3;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4; s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4;
s.vel += vel*.4; s.vel += vel*.4;
s.alpha *= .2; s.alpha *= .2;
int numpt = Random[Quadravol](1,4); int numpt = Random[Quadravol](1,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.4; e.vel += vel*.4;
} }
} }
@ -604,12 +604,12 @@ Class QuadProjSub : QuadProj
SWWMUtility.DoExplosion(self,150,0,100,40,DE_HOWL|DE_NOSPLASH,ignoreme:tracer); SWWMUtility.DoExplosion(self,150,0,100,40,DE_HOWL|DE_NOSPLASH,ignoreme:tracer);
A_StartSound("quadshot/hit",CHAN_WEAPON,attenuation:.8,pitch:1.2); A_StartSound("quadshot/hit",CHAN_WEAPON,attenuation:.8,pitch:1.2);
A_AlertMonsters(swwm_uncapalert?0:800,AMF_EMITFROMTARGET); A_AlertMonsters(swwm_uncapalert?0:800,AMF_EMITFROMTARGET);
Spawn("QuadExplLight",pos); Spawn('QuadExplLight',pos);
int numpt = Random[Quadravol](6,12); int numpt = Random[Quadravol](6,12);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,8);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.special1 = Random[Quadravol](2,3); s.special1 = Random[Quadravol](2,3);
s.scale *= 4.; s.scale *= 4.;
@ -619,14 +619,14 @@ Class QuadProjSub : QuadProj
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[Quadravol](2,4); numpt = Random[Quadravol](2,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
s.scale *= FRandom[Quadravol](0.9,1.8); s.scale *= FRandom[Quadravol](0.9,1.8);
} }
@ -655,17 +655,17 @@ Class QuadProjSub2 : QuadProj
} }
override void A_QuadTrail() override void A_QuadTrail()
{ {
let t = Spawn("QuadTrail",pos); let t = Spawn('QuadTrail',pos);
t.scale *= .3; t.scale *= .3;
t.vel = vel*.3; t.vel = vel*.3;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4; s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4;
s.vel += vel*.4; s.vel += vel*.4;
s.alpha *= .2; s.alpha *= .2;
int numpt = Random[Quadravol](1,4); int numpt = Random[Quadravol](1,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.4; e.vel += vel*.4;
} }
} }
@ -687,12 +687,12 @@ Class QuadProjSub2 : QuadProj
SWWMUtility.DoExplosion(self,180,0,100,40,DE_HOWL|DE_NOSPLASH,ignoreme:tracer); SWWMUtility.DoExplosion(self,180,0,100,40,DE_HOWL|DE_NOSPLASH,ignoreme:tracer);
A_StartSound("quadshot/hit",CHAN_WEAPON,attenuation:.6,pitch:1.1); A_StartSound("quadshot/hit",CHAN_WEAPON,attenuation:.6,pitch:1.1);
A_AlertMonsters(swwm_uncapalert?0:600,AMF_EMITFROMTARGET); A_AlertMonsters(swwm_uncapalert?0:600,AMF_EMITFROMTARGET);
Spawn("QuadExplLight",pos); Spawn('QuadExplLight',pos);
int numpt = Random[Quadravol](6,12); int numpt = Random[Quadravol](6,12);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,8);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.special1 = Random[Quadravol](2,3); s.special1 = Random[Quadravol](2,3);
s.scale *= 4.; s.scale *= 4.;
@ -702,14 +702,14 @@ Class QuadProjSub2 : QuadProj
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[Quadravol](2,4); numpt = Random[Quadravol](2,4);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
s.scale *= FRandom[Quadravol](0.9,1.8); s.scale *= FRandom[Quadravol](0.9,1.8);
} }
@ -753,10 +753,10 @@ Class QuadProj3 : QuadProj
} }
override void A_QuadTrail() override void A_QuadTrail()
{ {
let t = Spawn("QuadTrail",pos); let t = Spawn('QuadTrail',pos);
t.scale *= 1.2; t.scale *= 1.2;
t.vel = vel*.4; t.vel = vel*.4;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4; s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4;
s.vel += vel*.6; s.vel += vel*.6;
s.alpha *= .8; s.alpha *= .8;
@ -764,7 +764,7 @@ Class QuadProj3 : QuadProj
int numpt = Random[Quadravol](5,30); int numpt = Random[Quadravol](5,30);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let e = SWWMStaticSprite.SpawnAt("QuadEmber",pos); let e = SWWMStaticSprite.SpawnAt('QuadEmber',pos);
e.vel += vel*.6; e.vel += vel*.6;
} }
} }
@ -789,13 +789,13 @@ Class QuadProj3 : QuadProj
A_StartSound("quadshot/twohit",CHAN_VOICE,attenuation:.3,pitch:.8); A_StartSound("quadshot/twohit",CHAN_VOICE,attenuation:.3,pitch:.8);
A_StartSound("quadshot/extrahit",CHAN_ITEM,attenuation:.2,pitch:1.1); A_StartSound("quadshot/extrahit",CHAN_ITEM,attenuation:.2,pitch:1.1);
A_AlertMonsters(swwm_uncapalert?0:3500,AMF_EMITFROMTARGET); A_AlertMonsters(swwm_uncapalert?0:3500,AMF_EMITFROMTARGET);
Spawn("QuadExplLight3",pos); Spawn('QuadExplLight3',pos);
Spawn("QuadExplRing3",pos); Spawn('QuadExplRing3',pos);
int numpt = Random[Quadravol](25,35); int numpt = Random[Quadravol](25,35);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](2,12);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.special1 = Random[Quadravol](2,3); s.special1 = Random[Quadravol](2,3);
s.scale *= 4.; s.scale *= 4.;
@ -805,21 +805,21 @@ Class QuadProj3 : QuadProj
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](4,16);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[Quadravol](10,15); numpt = Random[Quadravol](10,15);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*FRandom[Quadravol](6,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
s.scale *= FRandom[Quadravol](0.9,1.8); s.scale *= FRandom[Quadravol](0.9,1.8);
} }
numpt = Random[Quadravol](16,20); numpt = Random[Quadravol](16,20);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("QuadExplArm",pos); let s = Spawn('QuadExplArm',pos);
s.target = target; s.target = target;
s.tracer = tracer; s.tracer = tracer;
s.special1 = 10; s.special1 = 10;
@ -830,7 +830,7 @@ Class QuadProj3 : QuadProj
double pt = j+FRandom[ExploS](-15,15); double pt = j+FRandom[ExploS](-15,15);
// skip if directly hitting a wall // skip if directly hitting a wall
if ( LineTrace(ang,40,pt,TRF_THRUACTORS|TRF_THRUHITSCAN) ) continue; if ( LineTrace(ang,40,pt,TRF_THRUACTORS|TRF_THRUHITSCAN) ) continue;
let s = Spawn("QuadProjSub",pos); let s = Spawn('QuadProjSub',pos);
s.target = target; s.target = target;
s.tracer = tracer; s.tracer = tracer;
s.angle = ang; s.angle = ang;
@ -893,7 +893,7 @@ Class OnFire : Inventory
{ {
Super.AttachToOwner(other); Super.AttachToOwner(other);
cnt = 1; cnt = 1;
lite = Spawn("OnFireLight",other.pos); lite = Spawn('OnFireLight',other.pos);
lite.specialf1 = 3; lite.specialf1 = 3;
OnFireLight(lite).of = self; OnFireLight(lite).of = self;
} }
@ -918,7 +918,7 @@ Class OnFire : Inventory
// note: cannot spread to Demolitionist // note: cannot spread to Demolitionist
if ( !(target is 'Demolitionist') ) if ( !(target is 'Demolitionist') )
{ {
let t = OnFire(target.FindInventory("OnFire")); let t = OnFire(target.FindInventory('OnFire'));
if ( !t ) if ( !t )
{ {
t = Apply(target,instigator,min(Damage,int(Amount*.6))); // prevent "escalating" spread t = Apply(target,instigator,min(Damage,int(Amount*.6))); // prevent "escalating" spread
@ -986,12 +986,12 @@ Class OnFire : Inventory
double pt = FRandom[FlameT](-90,90); double pt = FRandom[FlameT](-90,90);
if ( amount > 0 ) if ( amount > 0 )
{ {
let c = SWWMAnimSprite.SpawnAt("OnFireTrail",tpos); let c = SWWMAnimSprite.SpawnAt('OnFireTrail',tpos);
c.scale *= max(.35,mult*.6); c.scale *= max(.35,mult*.6);
c.vel = Owner.vel*.5+SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[FlameT](.5,2.)*c.scale.x; c.vel = Owner.vel*.5+SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[FlameT](.5,2.)*c.scale.x;
} }
if ( Random[FlameT](0,3) ) continue; if ( Random[FlameT](0,3) ) continue;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",tpos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',tpos);
s.scale *= max(.35,mult*.5); s.scale *= max(.35,mult*.5);
s.alpha *= min(amount+30,100)*.005; s.alpha *= min(amount+30,100)*.005;
s.vel = Owner.vel*.5+SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[FlameT](.2,.6)*s.scale.x; s.vel = Owner.vel*.5+SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[FlameT](.2,.6)*s.scale.x;
@ -1000,7 +1000,7 @@ Class OnFire : Inventory
static OnFire Apply( Actor victim, Actor instigator, int amount ) static OnFire Apply( Actor victim, Actor instigator, int amount )
{ {
let t = OnFire(victim.FindInventory("OnFire")); let t = OnFire(victim.FindInventory('OnFire'));
if ( t ) if ( t )
{ {
t.instigator = instigator; t.instigator = instigator;
@ -1008,7 +1008,7 @@ Class OnFire : Inventory
t.cnt = min(t.cnt,5); t.cnt = min(t.cnt,5);
return t; return t;
} }
t = OnFire(Spawn("ONFire")); t = OnFire(Spawn('OnFire'));
t.AttachToOwner(victim); t.AttachToOwner(victim);
t.instigator = instigator; t.instigator = instigator;
t.amount = min(t.maxamount,amount); t.amount = min(t.maxamount,amount);
@ -1022,7 +1022,7 @@ Class OnFire : Inventory
static clearscope OnFire IsOnFire( Actor victim ) static clearscope OnFire IsOnFire( Actor victim )
{ {
let t = OnFire(victim.FindInventory("OnFire")); let t = OnFire(victim.FindInventory('OnFire'));
if ( t && (t.amount > 0) ) return t; if ( t && (t.amount > 0) ) return t;
return null; return null;
} }
@ -1064,7 +1064,7 @@ Class OnFireTrail : SWWMAnimSprite
} }
if ( !Random[FlameT](0,int(40*(.3-alpha))) ) if ( !Random[FlameT](0,int(40*(.3-alpha))) )
{ {
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = SWWMUtility.Vec3FromAngles(FRandom[FlameT](0,360),FRandom[FlameT](-90,90))*.2; s.vel = SWWMUtility.Vec3FromAngles(FRandom[FlameT](0,360),FRandom[FlameT](-90,90))*.2;
s.vel += vel*.3; s.vel += vel*.3;
s.alpha *= alpha*.5; s.alpha *= alpha*.5;

View file

@ -31,9 +31,9 @@ Class PuntzerBeta : SWWMWeapon
Weapon.SlotNumber 3; Weapon.SlotNumber 3;
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 450; Weapon.SelectionOrder 450;
Weapon.AmmoType1 "SMW05Ammo"; Weapon.AmmoType1 'SMW05Ammo';
Weapon.AmmoGive1 6; Weapon.AmmoGive1 6;
SWWMWeapon.DropAmmoType "SWWMShellAmmoSmall"; SWWMWeapon.DropAmmoType 'SWWMShellAmmoSmall';
Stamina 10000; Stamina 10000;
+SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.NOFIRSTGIVE;
} }

View file

@ -28,9 +28,9 @@ Class PuntzerGamma : SWWMWeapon
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 350; Weapon.SelectionOrder 350;
PuntzerGamma.ClipCount 30; PuntzerGamma.ClipCount 30;
Weapon.AmmoType1 "SMW05Ammo"; Weapon.AmmoType1 'SMW05Ammo';
Weapon.AmmoGive1 30; Weapon.AmmoGive1 30;
SWWMWeapon.DropAmmoType "SWWMShellAmmoBig"; SWWMWeapon.DropAmmoType 'SWWMShellAmmoBig';
Stamina 30000; Stamina 30000;
+SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.NOFIRSTGIVE;
+SWWMWEAPON.HASSCRTEX; +SWWMWEAPON.HASSCRTEX;

View file

@ -46,9 +46,9 @@ Class RayKhom : SWWMWeapon
Weapon.SlotNumber 8; Weapon.SlotNumber 8;
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 750; Weapon.SelectionOrder 750;
Weapon.AmmoType1 "RayAmmo"; Weapon.AmmoType1 'RayAmmo';
Weapon.AmmoGive1 1; Weapon.AmmoGive1 1;
SWWMWeapon.DropAmmoType "SWWMCellAmmoSmall"; SWWMWeapon.DropAmmoType 'SWWMCellAmmoSmall';
RayKhom.ClipCount 10; RayKhom.ClipCount 10;
Stamina 500000; Stamina 500000;
+SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.NOFIRSTGIVE;

View file

@ -41,9 +41,9 @@ Class RafanKos : SWWMWeapon
Weapon.SlotNumber 0; Weapon.SlotNumber 0;
Weapon.SlotPriority 2.; Weapon.SlotPriority 2.;
Weapon.SelectionOrder 8000; Weapon.SelectionOrder 8000;
Weapon.AmmoType1 "UltimateAmmo"; Weapon.AmmoType1 'UltimateAmmo';
Weapon.AmmoGive1 1; Weapon.AmmoGive1 1;
SWWMWeapon.DropAmmoType "SWWMCellAmmoBig"; SWWMWeapon.DropAmmoType 'SWWMCellAmmoBig';
RafanKos.ClipCount 4; RafanKos.ClipCount 4;
Stamina -5000000; Stamina -5000000;
+SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.NOFIRSTGIVE;

View file

@ -82,13 +82,13 @@ Class SWWMHandler : EventHandler
static play void ToggleStore( bool val ) 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 if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check
hnd.gdat.disablestore = !val; hnd.gdat.disablestore = !val;
} }
static play void ToggleRevive( bool 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 if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check
hnd.gdat.disablerevive = !val; hnd.gdat.disablerevive = !val;
} }
@ -103,17 +103,9 @@ Class SWWMHandler : EventHandler
indoomvacation = -1; indoomvacation = -1;
inultdoom2 = -1; inultdoom2 = -1;
// class-checking ones can be initialized here easily // class-checking ones can be initialized here easily
foreach ( cls:AllActorClasses ) if ( FindClass('RLMonster','Actor') ) hasdrlamonsters = true;
{ if ( FindClass('LOBZombieman','Actor') ) haslegionofbones = true;
if ( cls.GetClassName() == "RLMonster" ) hasdrlamonsters = true; if ( FindClass('CCards_Global','Thinker') ) ccloaded = true;
else if ( cls.GetClassName() == "LOBZombieman" ) haslegionofbones = true;
}
foreach ( cls:AllClasses )
{
if ( cls.GetClassName() != "CCards_Global" ) continue;
ccloaded = true;
break;
}
if ( LevelInfo.MapExists("Z1M1") && (LevelInfo.MapChecksum("Z1M1") ~== "2B7744234ED2C162AD08A3255E979F65") ) if ( LevelInfo.MapExists("Z1M1") && (LevelInfo.MapChecksum("Z1M1") ~== "2B7744234ED2C162AD08A3255E979F65") )
iskdizd = true; iskdizd = true;
// read bludtype files if they can be found // read bludtype files if they can be found
@ -155,10 +147,10 @@ Class SWWMHandler : EventHandler
// cache various services into the handler on register // cache various services into the handler on register
// this dramatically reduces overhead by not having to use an iterator every time they're needed // 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 // 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; Service sv;
while ( sv = si.Next() ) funtagsv.Push(sv); while ( sv = si.Next() ) funtagsv.Push(sv);
si = ServiceIterator.Find("MergeMonsterService"); si = ServiceIterator.Find('MergeMonsterService');
while ( sv = si.Next() ) mergemonstersv.Push(sv); while ( sv = si.Next() ) mergemonstersv.Push(sv);
// start profiling // start profiling
if ( swwm_profstart <= 0 ) return; if ( swwm_profstart <= 0 ) return;
@ -181,7 +173,7 @@ Class SWWMHandler : EventHandler
if ( !mnotify && (level.maptime >= 5) ) if ( !mnotify && (level.maptime >= 5) )
{ {
mnotify = true; mnotify = true;
let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC); let ti = ThinkerIterator.Create('SWWMStats',Thinker.STAT_STATIC);
SWWMStats s; SWWMStats s;
while ( s = SWWMStats(ti.Next()) ) while ( s = SWWMStats(ti.Next()) )
{ {

View file

@ -91,9 +91,9 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("misc/w_pkup",CHAN_VOICE,CHANF_UI); S_StartSound("misc/w_pkup",CHAN_VOICE,CHANF_UI);
} }
if ( players[e.Args[0]].mo.FindInventory("Ynykron") ) if ( players[e.Args[0]].mo.FindInventory('Ynykron') )
players[e.Args[0]].mo.GiveInventory("YnykronAmmo",1); players[e.Args[0]].mo.GiveInventory('YnykronAmmo',1);
else players[e.Args[0]].mo.GiveInventory("Ynykron",1); else players[e.Args[0]].mo.GiveInventory('Ynykron',1);
} }
else if ( e.Name ~== "swwmgravcheat" ) else if ( e.Name ~== "swwmgravcheat" )
{ {
@ -103,9 +103,9 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI);
} }
let g = GravityPower(players[e.Args[0]].mo.FindInventory("GravityPower")); let g = GravityPower(players[e.Args[0]].mo.FindInventory('GravityPower'));
if ( g ) g.EffectTics += g.default.EffectTics; if ( g ) g.EffectTics += g.default.EffectTics;
else players[e.Args[0]].mo.GiveInventory("GravityPower",1); else players[e.Args[0]].mo.GiveInventory('GravityPower',1);
} }
else if ( e.Name ~== "swwminvischeat" ) else if ( e.Name ~== "swwminvischeat" )
{ {
@ -115,9 +115,9 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI);
} }
let g = GhostPower(players[e.Args[0]].mo.FindInventory("GhostPower")); let g = GhostPower(players[e.Args[0]].mo.FindInventory('GhostPower'));
if ( g ) g.EffectTics += g.default.EffectTics; if ( g ) g.EffectTics += g.default.EffectTics;
else players[e.Args[0]].mo.GiveInventory("GhostPower",1); else players[e.Args[0]].mo.GiveInventory('GhostPower',1);
} }
else if ( e.Name ~== "swwmbarriercheat" ) else if ( e.Name ~== "swwmbarriercheat" )
{ {
@ -127,9 +127,9 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI);
} }
let b = BarrierPower(players[e.Args[0]].mo.FindInventory("BarrierPower")); let b = BarrierPower(players[e.Args[0]].mo.FindInventory('BarrierPower'));
if ( b ) b.EffectTics += b.default.EffectTics; if ( b ) b.EffectTics += b.default.EffectTics;
else players[e.Args[0]].mo.GiveInventory("BarrierPower",1); else players[e.Args[0]].mo.GiveInventory('BarrierPower',1);
} }
else if ( e.Name ~== "swwmammocheat" ) else if ( e.Name ~== "swwmammocheat" )
{ {
@ -139,7 +139,7 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("misc/ammo_pkup",CHAN_VOICE,CHANF_UI); S_StartSound("misc/ammo_pkup",CHAN_VOICE,CHANF_UI);
} }
players[e.Args[0]].mo.GiveInventory("TradedHammerspaceEmbiggener",8,true); players[e.Args[0]].mo.GiveInventory('TradedHammerspaceEmbiggener',8,true);
for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv ) for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv )
{ {
if ( !(i is 'Ammo') ) continue; if ( !(i is 'Ammo') ) continue;
@ -171,7 +171,7 @@ extend Class SWWMHandler
S_StartSound("fabricator/use",CHAN_VOICE,CHANF_UI); S_StartSound("fabricator/use",CHAN_VOICE,CHANF_UI);
} }
players[e.Args[0]].health = players[e.Args[0]].mo.health = 1000; players[e.Args[0]].health = players[e.Args[0]].mo.health = 1000;
players[e.Args[0]].mo.GiveInventory("TradedHammerspaceEmbiggener",8,true); players[e.Args[0]].mo.GiveInventory('TradedHammerspaceEmbiggener',8,true);
for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv ) for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv )
{ {
if ( !(i is 'Ammo') ) continue; if ( !(i is 'Ammo') ) continue;
@ -200,14 +200,14 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
} }
let mo = players[e.Args[0]].mo; let mo = players[e.Args[0]].mo;
Actor f = Actor(ThinkerIterator.Create("SWWMFlag").Next()); Actor f = Actor(ThinkerIterator.Create('SWWMFlag').Next());
if ( !f ) f = mo.Spawn("SWWMFlag"); if ( !f ) f = mo.Spawn('SWWMFlag');
Vector2 spos = mo.Vec2Angle(40.,mo.angle); Vector2 spos = mo.Vec2Angle(40.,mo.angle);
Sector sat = level.PointInSector(spos); Sector sat = level.PointInSector(spos);
double sz = sat.NextLowestFloorAt(spos.x,spos.y,mo.player.viewz-32.); double sz = sat.NextLowestFloorAt(spos.x,spos.y,mo.player.viewz-32.);
f.SetOrigin((spos.x,spos.y,sz),false); f.SetOrigin((spos.x,spos.y,sz),false);
f.A_SetAngle(mo.angle); f.A_SetAngle(mo.angle);
f.Spawn("SWWMItemFog",f.pos); f.Spawn('SWWMItemFog',f.pos);
f.A_StartSound("bestsound",CHAN_ITEMEXTRA); f.A_StartSound("bestsound",CHAN_ITEMEXTRA);
} }
else if ( e.Name ~== "swwmballcheat" ) else if ( e.Name ~== "swwmballcheat" )
@ -268,7 +268,7 @@ extend Class SWWMHandler
S_StartSound("misc/omgfart",CHAN_VOICE,CHANF_UI); S_StartSound("misc/omgfart",CHAN_VOICE,CHANF_UI);
} }
else mo.A_StartSound("misc/omgfart",CHAN_VOICE,CHANF_OVERLAP,1.,.5); else mo.A_StartSound("misc/omgfart",CHAN_VOICE,CHANF_OVERLAP,1.,.5);
let f = mo.Spawn("SWWMGasCloudSpawner",mo.Vec3Angle(mo.radius*.5,mo.angle-180,mo.Height*.4)); let f = mo.Spawn('SWWMGasCloudSpawner',mo.Vec3Angle(mo.radius*.5,mo.angle-180,mo.Height*.4));
f.target = mo; f.target = mo;
f.angle = mo.angle+180; f.angle = mo.angle+180;
f.pitch = -mo.pitch; f.pitch = -mo.pitch;
@ -281,9 +281,9 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI);
} }
let i = InvinciballPower(players[e.Args[0]].mo.FindInventory("InvinciballPower")); let i = InvinciballPower(players[e.Args[0]].mo.FindInventory('InvinciballPower'));
if ( i ) i.EffectTics += i.default.EffectTics; if ( i ) i.EffectTics += i.default.EffectTics;
else players[e.Args[0]].mo.GiveInventory("InvinciballPower",1); else players[e.Args[0]].mo.GiveInventory('InvinciballPower',1);
} }
else if ( e.Name ~== "swwmstonecheat" ) else if ( e.Name ~== "swwmstonecheat" )
{ {
@ -301,12 +301,12 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
} }
let mo = players[e.Args[0]].mo; let mo = players[e.Args[0]].mo;
Actor f = Actor(ThinkerIterator.Create("FroggyChair").Next()); Actor f = Actor(ThinkerIterator.Create('FroggyChair').Next());
if ( !f ) f = mo.Spawn("FroggyChair"); if ( !f ) f = mo.Spawn('FroggyChair');
Vector2 ofs = Actor.AngleToVector(mo.angle,40.); Vector2 ofs = Actor.AngleToVector(mo.angle,40.);
f.SetOrigin(mo.Vec2OffsetZ(ofs.x,ofs.y,mo.player.viewz-32.),false); f.SetOrigin(mo.Vec2OffsetZ(ofs.x,ofs.y,mo.player.viewz-32.),false);
f.A_SetAngle(f.AngleTo(mo)); f.A_SetAngle(f.AngleTo(mo));
f.Spawn("SWWMItemFog",f.pos); f.Spawn('SWWMItemFog',f.pos);
f.A_StartSound("bestsound",CHAN_ITEMEXTRA); f.A_StartSound("bestsound",CHAN_ITEMEXTRA);
} }
else if ( e.Name ~== "swwmamnesiacheat" ) else if ( e.Name ~== "swwmamnesiacheat" )
@ -317,7 +317,7 @@ extend Class SWWMHandler
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("bestsound",CHAN_VOICE,CHANF_UI); S_StartSound("bestsound",CHAN_VOICE,CHANF_UI);
} }
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
{ {
@ -332,10 +332,10 @@ extend Class SWWMHandler
Console.Printf("\cyLet's mop up that big mess over there.\c-"); Console.Printf("\cyLet's mop up that big mess over there.\c-");
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
} }
let cc = SWWMCorpseCleaner(ThinkerIterator.Create("SWWMCorpseCleaner",Thinker.STAT_USER).Next()); let cc = SWWMCorpseCleaner(ThinkerIterator.Create('SWWMCorpseCleaner',Thinker.STAT_USER).Next());
if ( !cc ) if ( !cc )
{ {
cc = new("SWWMCorpseCleaner"); cc = new('SWWMCorpseCleaner');
cc.ChangeStatNum(Thinker.STAT_USER); cc.ChangeStatNum(Thinker.STAT_USER);
cc.Init(players[e.Args[0]].mo); cc.Init(players[e.Args[0]].mo);
} }
@ -343,7 +343,7 @@ extend Class SWWMHandler
} }
else if ( e.Name ~== "swwmonfirecheat" ) else if ( e.Name ~== "swwmonfirecheat" )
{ {
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
bool burned = false; bool burned = false;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
@ -481,7 +481,7 @@ extend Class SWWMHandler
double shine = clamp((klinger-(gametic+e.fractic+40))/20.,0.,1.); double shine = clamp((klinger-(gametic+e.fractic+40))/20.,0.,1.);
int col = (kcode>4)?0:(kfail)?2:1; int col = (kcode>4)?0:(kfail)?2:1;
int tlen = chstr.CodePointCount(); int tlen = chstr.CodePointCount();
if ( !CheatFont ) CheatFont = Font.GetFont("TewiFontOutline"); if ( !CheatFont ) CheatFont = Font.GetFont('TewiFontOutline');
int width = (CheatFont.StringWidth(chstr)+3*(tlen-1)); int width = (CheatFont.StringWidth(chstr)+3*(tlen-1));
double xx = int(Screen.GetWidth()-width*scl)/2; double xx = int(Screen.GetWidth()-width*scl)/2;
double yy = int(Screen.GetHeight()-CheatFont.GetHeight()*scl)/2; double yy = int(Screen.GetHeight()-CheatFont.GetHeight()*scl)/2;

View file

@ -51,7 +51,7 @@ extend Class SWWMHandler
tactive[i] = true; tactive[i] = true;
} }
let mo = players[consoleplayer].mo; let mo = players[consoleplayer].mo;
if ( !ctr ) ctr = new("SWWMCrosshairTracer"); if ( !ctr ) ctr = new('SWWMCrosshairTracer');
Vector3 ofs, origin; Vector3 ofs, origin;
Color col; Color col;
let [x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll); let [x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);

View file

@ -19,16 +19,16 @@ extend Class SWWMHandler
if ( (e.DamageType == 'Ynykron') || (e.DamageType == 'Massacre') ) return; if ( (e.DamageType == 'Ynykron') || (e.DamageType == 'Massacre') ) return;
int gibhealth = e.Thing.GetGibHealth(); int gibhealth = e.Thing.GetGibHealth();
bool gotgibbed = (!e.Thing.bDONTGIB && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.DamageSource && e.DamageSource.bEXTREMEDEATH) || (e.DamageType == 'Extreme') || (e.Thing.Health < gibhealth)) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) && (!e.DamageSource || !e.DamageSource.bNOEXTREMEDEATH)); bool gotgibbed = (!e.Thing.bDONTGIB && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.DamageSource && e.DamageSource.bEXTREMEDEATH) || (e.DamageType == 'Extreme') || (e.Thing.Health < gibhealth)) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) && (!e.DamageSource || !e.DamageSource.bNOEXTREMEDEATH));
if ( !e.Thing.FindState("XDeath",true) && !e.Thing.FindState("Death.Extreme",true) ) if ( !e.Thing.FindState('XDeath',true) && !e.Thing.FindState('Death.Extreme',true) )
gotgibbed = false; gotgibbed = false;
// only do special handling if they use our blood // only do special handling if they use our blood
if ( (e.Thing.GetBloodType(0) != "mkBlood") || e.Thing.bNOBLOOD ) if ( (e.Thing.GetBloodType(0) != 'mkBlood') || e.Thing.bNOBLOOD )
return; return;
CorpseFallTracker.TrackBody(e.Thing); CorpseFallTracker.TrackBody(e.Thing);
// special handling of some monsters // special handling of some monsters
if ( e.Thing.GetClass() == "Cyberdemon" ) if ( e.Thing.GetClass() == 'Cyberdemon' )
{ {
let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR); let [b, a] = e.Thing.A_SpawnItemEx('mkGibber',flags:SXF_USEBLOODCOLOR);
if ( !b ) return; if ( !b ) return;
mkGibber(a).gibbed = e.Thing; mkGibber(a).gibbed = e.Thing;
mkGibber(a).delay = 40; mkGibber(a).delay = 40;
@ -37,9 +37,9 @@ extend Class SWWMHandler
a.A_SetSize(e.Thing.default.radius,e.Thing.default.height); a.A_SetSize(e.Thing.default.radius,e.Thing.default.height);
return; return;
} }
else if ( e.Thing.GetClass() == "SpiderMastermind" ) else if ( e.Thing.GetClass() == 'SpiderMastermind' )
{ {
let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR); let [b, a] = e.Thing.A_SpawnItemEx('mkGibber',flags:SXF_USEBLOODCOLOR);
if ( !b ) return; if ( !b ) return;
mkGibber(a).gibbed = e.Thing; mkGibber(a).gibbed = e.Thing;
mkGibber(a).delay = 60; mkGibber(a).delay = 60;
@ -49,7 +49,7 @@ extend Class SWWMHandler
} }
else if ( gotgibbed ) else if ( gotgibbed )
{ {
let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR); let [b, a] = e.Thing.A_SpawnItemEx('mkGibber',flags:SXF_USEBLOODCOLOR);
if ( !b ) return; if ( !b ) return;
mkGibber(a).gibbed = e.Thing; mkGibber(a).gibbed = e.Thing;
a.A_SetSize(e.Thing.default.radius,e.Thing.default.height); a.A_SetSize(e.Thing.default.radius,e.Thing.default.height);
@ -92,17 +92,17 @@ extend Class SWWMHandler
if ( e.Damage > s.topdealt ) s.topdealt = e.Damage; if ( e.Damage > s.topdealt ) s.topdealt = e.Damage;
} }
SWWMFlyTracker.Track(e.Thing,e.DamageSource); SWWMFlyTracker.Track(e.Thing,e.DamageSource);
if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) if ( e.Thing.bBOSS || e.Thing.FindInventory('BossMarker') )
{ {
let tk = e.Thing.FindInventory("DeepImpactOnlyToken"); let tk = e.Thing.FindInventory('DeepImpactOnlyToken');
if ( !tk ) if ( !tk )
{ {
tk = Inventory(Actor.Spawn("DeepImpactOnlyToken")); tk = Inventory(Actor.Spawn('DeepImpactOnlyToken'));
tk.AttachToOwner(e.Thing); tk.AttachToOwner(e.Thing);
tk.special1 = 0; tk.special1 = 0;
} }
Inventory pb; Inventory pb;
if ( (tk.special1 != -1) && ((e.DamageType == 'Push') || (e.Inflictor && (pb = e.Inflictor.FindInventory("ParriedBuff")) && pb.bAMBUSH)) ) if ( (tk.special1 != -1) && ((e.DamageType == 'Push') || (e.Inflictor && (pb = e.Inflictor.FindInventory('ParriedBuff')) && pb.bAMBUSH)) )
tk.special1 = 1; tk.special1 = 1;
else tk.special1 = -1; else tk.special1 = -1;
} }
@ -121,7 +121,7 @@ extend Class SWWMHandler
{ {
if ( e.Thing.IsFriend(e.DamageSource) ) if ( e.Thing.IsFriend(e.DamageSource) )
lastcombat = AddOneliner("friendhit",1,10); lastcombat = AddOneliner("friendhit",1,10);
else if ( (!lastcombat || (gametic > lastcombat+90)) && !Random[DemoLines](0,(e.DamageSource.bBOSS||e.DamageSource.FindInventory("BossMarker"))?2:5) ) else if ( (!lastcombat || (gametic > lastcombat+90)) && !Random[DemoLines](0,(e.DamageSource.bBOSS||e.DamageSource.FindInventory('BossMarker'))?2:5) )
lastcombat = AddOneliner("gethit",1,15); lastcombat = AddOneliner("gethit",1,15);
} }
highesttic = gametic; highesttic = gametic;
@ -176,13 +176,13 @@ extend Class SWWMHandler
int lc = 0; int lc = 0;
Inventory buff = inflictor?inflictor.FindInventory('ParriedBuff'):null; Inventory buff = inflictor?inflictor.FindInventory('ParriedBuff'):null;
if ( !Random[DemoLines](0,2) && buff && (e.Thing is 'Cyberdemon') && (inflictor is 'Rocket') && (buff.tracer == e.Thing) ) lc = AddOneliner("cybully",1,15); if ( !Random[DemoLines](0,2) && buff && (e.Thing is 'Cyberdemon') && (inflictor is 'Rocket') && (buff.tracer == e.Thing) ) lc = AddOneliner("cybully",1,15);
else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?1:2) && (e.DamageType == 'CriticalConcussion') ) lc = AddOneliner("ballskill",1,15); else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?1:2) && (e.DamageType == 'CriticalConcussion') ) lc = AddOneliner("ballskill",1,15);
else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?2:4) && (e.DamageType == 'Buttslam') ) lc = AddOneliner("asskill",1,15); else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?2:4) && (e.DamageType == 'Buttslam') ) lc = AddOneliner("asskill",1,15);
else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?3:5) && ((inflictor is 'HeavyMahSheenGun') || (inflictor is 'SheenTrail')) ) else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?3:5) && ((inflictor is 'HeavyMahSheenGun') || (inflictor is 'SheenTrail')) )
lc = AddOneliner("sheenkill",1,15); lc = AddOneliner("sheenkill",1,15);
if ( !lc ) if ( !lc )
{ {
if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?2:4) ) if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?2:4) )
lastcombat = AddOneliner("scorekill",1,15); lastcombat = AddOneliner("scorekill",1,15);
} }
else lastcombat = lc; else lastcombat = lc;
@ -193,7 +193,7 @@ extend Class SWWMHandler
// achievement stuff // achievement stuff
if ( e.Thing.IsHostile(src) && (e.Thing.bISMONSTER || e.Thing.player) ) if ( e.Thing.IsHostile(src) && (e.Thing.bISMONSTER || e.Thing.player) )
{ {
if ( (e.Thing.bBOSS||e.Thing.FindInventory("BossMarker")) && ((e.DamageType == 'Dash') || (e.DamageType == 'Buttslam')) ) if ( (e.Thing.bBOSS||e.Thing.FindInventory('BossMarker')) && ((e.DamageType == 'Dash') || (e.DamageType == 'Buttslam')) )
SWWMUtility.AchievementProgressInc("bossdash",1,src.player); SWWMUtility.AchievementProgressInc("bossdash",1,src.player);
if ( (inflictor is 'DeepImpact') && (e.DamageType == 'Push') ) if ( (inflictor is 'DeepImpact') && (e.DamageType == 'Push') )
SWWMUtility.AchievementProgressInc("sneeze",1,src.player); SWWMUtility.AchievementProgressInc("sneeze",1,src.player);
@ -213,7 +213,7 @@ extend Class SWWMHandler
SWWMUtility.MarkAchievement("cybully",src.player); SWWMUtility.MarkAchievement("cybully",src.player);
} }
Inventory tk; Inventory tk;
if ( (tk = e.Thing.FindInventory("DeepImpactOnlyToken")) && (tk.special1 == 1) ) if ( (tk = e.Thing.FindInventory('DeepImpactOnlyToken')) && (tk.special1 == 1) )
SWWMUtility.MarkAchievement("shame",src.player); SWWMUtility.MarkAchievement("shame",src.player);
SWWMUtility.AchievementProgressInc("mega",1,src.player); SWWMUtility.AchievementProgressInc("mega",1,src.player);
if ( src.player.Health == 1 ) if ( src.player.Health == 1 )
@ -295,7 +295,7 @@ extend Class SWWMHandler
if ( (spreecount[pnum] > 0) && scr ) if ( (spreecount[pnum] > 0) && scr )
scr.AppendXString(StringTable.Localize("$SWWM_SPREEKILL"),spreecount[pnum]); scr.AppendXString(StringTable.Localize("$SWWM_SPREEKILL"),spreecount[pnum]);
} }
if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) if ( e.Thing.bBOSS || e.Thing.FindInventory('BossMarker') )
{ {
score += 2000; score += 2000;
if ( scr ) scr.AppendXString(StringTable.Localize("$SWWM_BOSSKILL")); if ( scr ) scr.AppendXString(StringTable.Localize("$SWWM_BOSSKILL"));

View file

@ -66,27 +66,27 @@ extend Class SWWMHandler
Vector3 b1, b2; Vector3 b1, b2;
b1 = pos-(a.radius,a.radius,0); b1 = pos-(a.radius,a.radius,0);
b2 = pos+(a.radius,a.radius,a.height); b2 = pos+(a.radius,a.radius,a.height);
DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b2.y,b1.z),"White"); DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b2.y,b1.z),0xFFFFFFFF);
DrawWorldLine(e,(b1.x,b2.y,b1.z),(b2.x,b2.y,b1.z),"White"); DrawWorldLine(e,(b1.x,b2.y,b1.z),(b2.x,b2.y,b1.z),0xFFFFFFFF);
DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b1.y,b1.z),"White"); DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b1.y,b1.z),0xFFFFFFFF);
DrawWorldLine(e,(b2.x,b1.y,b1.z),(b1.x,b1.y,b1.z),"White"); DrawWorldLine(e,(b2.x,b1.y,b1.z),(b1.x,b1.y,b1.z),0xFFFFFFFF);
DrawWorldLine(e,(b1.x,b1.y,b2.z),(b1.x,b2.y,b2.z),"White"); DrawWorldLine(e,(b1.x,b1.y,b2.z),(b1.x,b2.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b1.x,b2.y,b2.z),(b2.x,b2.y,b2.z),"White"); DrawWorldLine(e,(b1.x,b2.y,b2.z),(b2.x,b2.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b2.x,b2.y,b2.z),(b2.x,b1.y,b2.z),"White"); DrawWorldLine(e,(b2.x,b2.y,b2.z),(b2.x,b1.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b2.x,b1.y,b2.z),(b1.x,b1.y,b2.z),"White"); DrawWorldLine(e,(b2.x,b1.y,b2.z),(b1.x,b1.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b1.y,b2.z),"White"); DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b1.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b2.x,b1.y,b1.z),(b2.x,b1.y,b2.z),"White"); DrawWorldLine(e,(b2.x,b1.y,b1.z),(b2.x,b1.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b1.x,b2.y,b1.z),(b1.x,b2.y,b2.z),"White"); DrawWorldLine(e,(b1.x,b2.y,b1.z),(b1.x,b2.y,b2.z),0xFFFFFFFF);
DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b2.y,b2.z),"White"); DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b2.y,b2.z),0xFFFFFFFF);
} }
let [x, y, z] = SWWMUtility.GetAxes(a.angle,a.pitch,a.roll); let [x, y, z] = SWWMUtility.GetAxes(a.angle,a.pitch,a.roll);
DrawWorldLine(e,pos,pos+x*16,"Red"); DrawWorldLine(e,pos,pos+x*16,0xFFFF0000);
DrawWorldLine(e,pos,pos+y*16,"Green"); DrawWorldLine(e,pos,pos+y*16,0xFF00FF00);
DrawWorldLine(e,pos,pos+z*16,"Blue"); DrawWorldLine(e,pos,pos+z*16,0xFF0000FF);
if ( a.vel != (0,0,0) ) DrawWorldLine(e,pos,pos+a.vel*GameTicRate,"Yellow"); if ( a.vel != (0,0,0) ) DrawWorldLine(e,pos,pos+a.vel*GameTicRate,0xFFFFFF00);
if ( a.target ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.target.prev,a.target.pos,e.FracTic),"Gold"); if ( a.target ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.target.prev,a.target.pos,e.FracTic),0xFFFFA000);
if ( a.tracer ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.tracer.prev,a.tracer.pos,e.FracTic),"Orange"); if ( a.tracer ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.tracer.prev,a.tracer.pos,e.FracTic),0xFFFF8000);
if ( a.master ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.master.prev,a.master.pos,e.FracTic),"Purple"); if ( a.master ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.master.prev,a.master.pos,e.FracTic),0xFF8000FF);
double hdiff = a.Height/2; double hdiff = a.Height/2;
if ( a.bFLOATBOB ) hdiff += a.GetBobOffset(); if ( a.bFLOATBOB ) hdiff += a.GetBobOffset();
Vector3 ndc = SWWMUtility.ProjectPoint(projdata,e.viewpos+level.Vec3Diff(e.viewpos,pos+(0,0,hdiff))); Vector3 ndc = SWWMUtility.ProjectPoint(projdata,e.viewpos+level.Vec3Diff(e.viewpos,pos+(0,0,hdiff)));

View file

@ -11,14 +11,14 @@ extend Class SWWMHandler
static void HealthFlash( int p ) static void HealthFlash( int p )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd || (p == -1) ) return; if ( !hnd || (p == -1) ) return;
hnd.hflash[p] = gametic+5; hnd.hflash[p] = gametic+5;
} }
static void ArmorFlash( int p ) static void ArmorFlash( int p )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd || (p == -1) ) return; if ( !hnd || (p == -1) ) return;
hnd.aflash[p] = gametic+5; hnd.aflash[p] = gametic+5;
} }
@ -27,7 +27,7 @@ extend Class SWWMHandler
{ {
// don't flash when paused // don't flash when paused
if ( menuactive && (menuactive != Menu.OnNoPause) ) return; if ( menuactive && (menuactive != Menu.OnNoPause) ) return;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.flash_camera = camera; hnd.flash_camera = camera;
hnd.flash_color = c; hnd.flash_color = c;

View file

@ -19,7 +19,7 @@ extend Class SWWMHandler
dmult = acsre-3; dmult = acsre-3;
} }
if ( iwantdie <= 0 ) return; if ( iwantdie <= 0 ) return;
if ( SWWMUtility.ValidProjectile(e.Thing) && !e.Thing.FindInventory("DontDuplicate") && (e.Thing.target && e.Thing.target.bISMONSTER && !e.Thing.target.player) ) if ( SWWMUtility.ValidProjectile(e.Thing) && !e.Thing.FindInventory('DontDuplicate') && (e.Thing.target && e.Thing.target.bISMONSTER && !e.Thing.target.player) )
{ {
e.Thing.speed *= smult; e.Thing.speed *= smult;
e.Thing.vel *= smult; e.Thing.vel *= smult;
@ -33,7 +33,7 @@ extend Class SWWMHandler
double s = FRandom[ExtraMissiles](0,.1); double s = FRandom[ExtraMissiles](0,.1);
Vector3 dir = SWWMUtility.ConeSpread(x,y,z,a,s); Vector3 dir = SWWMUtility.ConeSpread(x,y,z,a,s);
let p = Actor.Spawn(e.Thing.GetClass(),e.Thing.pos); let p = Actor.Spawn(e.Thing.GetClass(),e.Thing.pos);
p.GiveInventory("DontDuplicate",1); p.GiveInventory('DontDuplicate',1);
p.target = e.Thing.target; p.target = e.Thing.target;
p.tracer = e.Thing.tracer; p.tracer = e.Thing.tracer;
p.master = e.Thing.master; p.master = e.Thing.master;
@ -48,7 +48,7 @@ extend Class SWWMHandler
// avoid if it has some sort of special handling // avoid if it has some sort of special handling
if ( e.Thing.special || e.Thing.tid || e.Thing.bDORMANT ) return; if ( e.Thing.special || e.Thing.tid || e.Thing.bDORMANT ) return;
// random chance to spawn doubles // random chance to spawn doubles
if ( e.Thing.FindInventory("DontDuplicate") || Random[ExtraMissiles](0,2) ) return; if ( e.Thing.FindInventory('DontDuplicate') || Random[ExtraMissiles](0,2) ) return;
int numpt = Random[ExtraMissiles](1,dmult); int numpt = Random[ExtraMissiles](1,dmult);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
@ -67,7 +67,7 @@ extend Class SWWMHandler
{ {
x.angle = e.Thing.angle; x.angle = e.Thing.angle;
x.bAMBUSH = e.Thing.bAMBUSH; x.bAMBUSH = e.Thing.bAMBUSH;
x.GiveInventory("DontDuplicate",1); x.GiveInventory('DontDuplicate',1);
break; break;
} }
} }

View file

@ -16,11 +16,11 @@ extend Class SWWMHandler
// only Demolitionist can play voice lines // only Demolitionist can play voice lines
if ( !(players[consoleplayer].mo is 'Demolitionist') ) if ( !(players[consoleplayer].mo is 'Demolitionist') )
return 0; return 0;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return 0; if ( !hnd ) return 0;
String voicetype = CVar.FindCVar('swwm_voicetype').GetString(); String voicetype = CVar.FindCVar('swwm_voicetype').GetString();
// suppress non-rage comments when ragekit is active, only screaming allowed // suppress non-rage comments when ragekit is active, only screaming allowed
if ( players[consoleplayer].mo.FindInventory("RagekitPower") && (type != "ragekit") ) return 0; if ( players[consoleplayer].mo.FindInventory('RagekitPower') && (type != "ragekit") ) return 0;
// suppress beep-boop lines if voice channel already in use // suppress beep-boop lines if voice channel already in use
if ( ((type == "buttonpush") || (type == "mrtouch") || (type == "mrflick")) if ( ((type == "buttonpush") || (type == "mrtouch") || (type == "mrflick"))
&& players[consoleplayer].mo.IsActorPlayingSound(CHAN_DEMOVOICE) && players[consoleplayer].mo.IsActorPlayingSound(CHAN_DEMOVOICE)
@ -92,7 +92,7 @@ extend Class SWWMHandler
{ {
// ez // ez
whichline = Random[DemoLines](1,countem); whichline = Random[DemoLines](1,countem);
let lst = new("OnelinerHistory"); let lst = new('OnelinerHistory');
lst.type = type; lst.type = type;
lst.lines.Push(whichline); lst.lines.Push(whichline);
hnd.gdat.lastlines.Push(lst); hnd.gdat.lastlines.Push(lst);
@ -114,7 +114,7 @@ extend Class SWWMHandler
static void CancelOneliner( String type ) static void CancelOneliner( String type )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
if ( (hnd.onelinertype != type) || (hnd.onelinertic < gametic) ) return; if ( (hnd.onelinertype != type) || (hnd.onelinertic < gametic) ) return;
hnd.onelinertic = 0; hnd.onelinertic = 0;

View file

@ -19,7 +19,7 @@ extend Class SWWMHandler
{ {
if ( !(p.mo is pc.Type) ) continue; if ( !(p.mo is pc.Type) ) continue;
// perform a hotswap, code adapted from my .flow player morph in spooktober // perform a hotswap, code adapted from my .flow player morph in spooktober
let n = PlayerPawn(Actor.Spawn("Demolitionist",p.mo.pos)); let n = PlayerPawn(Actor.Spawn('Demolitionist',p.mo.pos));
n.player = p; n.player = p;
n.angle = p.mo.angle; n.angle = p.mo.angle;
n.pitch = p.mo.pitch; n.pitch = p.mo.pitch;
@ -27,7 +27,7 @@ extend Class SWWMHandler
p.mo.Destroy(); p.mo.Destroy();
p.mo = n; p.mo = n;
n.GiveDefaultInventory(); n.GiveDefaultInventory();
let e = Weapon(n.FindInventory("ExplodiumGun")); let e = Weapon(n.FindInventory('ExplodiumGun'));
if ( e ) if ( e )
{ {
p.ReadyWeapon = null; p.ReadyWeapon = null;
@ -44,14 +44,14 @@ extend Class SWWMHandler
SWWMCredits c = SWWMCredits.Find(p); SWWMCredits c = SWWMCredits.Find(p);
if ( !c ) if ( !c )
{ {
c = new("SWWMCredits"); c = new('SWWMCredits');
c.ChangeStatNum(Thinker.STAT_STATIC); c.ChangeStatNum(Thinker.STAT_STATIC);
c.myplayer = p; c.myplayer = p;
} }
SWWMLoreLibrary l = SWWMLoreLibrary.Find(p); SWWMLoreLibrary l = SWWMLoreLibrary.Find(p);
if ( !l ) if ( !l )
{ {
l = new("SWWMLoreLibrary"); l = new('SWWMLoreLibrary');
l.ChangeStatNum(Thinker.STAT_STATIC); l.ChangeStatNum(Thinker.STAT_STATIC);
l.myplayer = p; l.myplayer = p;
} }
@ -82,7 +82,7 @@ extend Class SWWMHandler
SWWMStats s = SWWMStats.Find(p); SWWMStats s = SWWMStats.Find(p);
if ( !s ) if ( !s )
{ {
s = new("SWWMStats"); s = new('SWWMStats');
s.ChangeStatNum(Thinker.STAT_STATIC); s.ChangeStatNum(Thinker.STAT_STATIC);
s.myplayer = p; s.myplayer = p;
s.lastspawn = level.totaltime; s.lastspawn = level.totaltime;

View file

@ -104,7 +104,7 @@ extend Class SWWMHandler
Class<Key> k = kname; Class<Key> k = kname;
if ( k ) if ( k )
{ {
let kg = new("KeyGet"); let kg = new('KeyGet');
kg.got = k; kg.got = k;
kg.flashtime = gametic+25; kg.flashtime = gametic+25;
bar.keyflash.Push(kg); bar.keyflash.Push(kg);
@ -155,7 +155,7 @@ extend Class SWWMHandler
bar.cstip.Poke(wa,wb); bar.cstip.Poke(wa,wb);
return; return;
} }
let tt = new("SWWMWeaponSwapTip").Init(wa,wb); let tt = new('SWWMWeaponSwapTip').Init(wa,wb);
bar.cstip = tt; bar.cstip = tt;
bar.AttachMessage(tt,-2911); bar.AttachMessage(tt,-2911);
} }
@ -169,7 +169,7 @@ extend Class SWWMHandler
} }
else if ( e.Name ~== "swwmdoflash" ) else if ( e.Name ~== "swwmdoflash" )
{ {
GenericFlash gf = new("GenericFlash").Setup(flash_camera,flash_color,flash_duration); GenericFlash gf = new('GenericFlash').Setup(flash_camera,flash_color,flash_duration);
StatusBar.AttachMessage(gf,0,BaseStatusBar.HUDMSGLayer_UnderHUD); StatusBar.AttachMessage(gf,0,BaseStatusBar.HUDMSGLayer_UnderHUD);
} }
else if ( e.Name ~== "swwmsendplayerstep" ) else if ( e.Name ~== "swwmsendplayerstep" )
@ -374,7 +374,7 @@ extend Class SWWMHandler
{ {
if ( !playeringame[i] || !players[i].mo ) continue; if ( !playeringame[i] || !players[i].mo ) continue;
let mo = players[i].mo; let mo = players[i].mo;
Inventory hams = mo.FindInventory("HammerspaceEmbiggener"); Inventory hams = mo.FindInventory('HammerspaceEmbiggener');
if ( hams ) if ( hams )
{ {
if ( hams.MaxAmount != hams.default.MaxAmount ) if ( hams.MaxAmount != hams.default.MaxAmount )
@ -490,8 +490,8 @@ extend Class SWWMHandler
if ( item is 'Weapon' ) if ( item is 'Weapon' )
{ {
// special case, select dual guns if we bought a second one // special case, select dual guns if we bought a second one
if ( (item is 'ExplodiumGun') && (players[e.Args[0]].mo.CountInv("ExplodiumGun") > 1) ) if ( (item is 'ExplodiumGun') && (players[e.Args[0]].mo.CountInv('ExplodiumGun') > 1) )
players[e.Args[0]].mo.A_SelectWeapon("DualExplodiumGun"); players[e.Args[0]].mo.A_SelectWeapon('DualExplodiumGun');
else players[e.Args[0]].mo.A_SelectWeapon((Class<Weapon>)(item)); else players[e.Args[0]].mo.A_SelectWeapon((Class<Weapon>)(item));
} }
} }
@ -519,7 +519,7 @@ extend Class SWWMHandler
if ( c && c.SisterWeapon && (players[e.Args[0]].ReadyWeapon == c.SisterWeapon) ) if ( c && c.SisterWeapon && (players[e.Args[0]].ReadyWeapon == c.SisterWeapon) )
{ {
players[e.Args[0]].ReadyWeapon = c; players[e.Args[0]].ReadyWeapon = c;
players[e.Args[0]].SetPSprite(PSP_WEAPON,c.FindState("Ready")); players[e.Args[0]].SetPSprite(PSP_WEAPON,c.FindState('Ready'));
players[e.Args[0]].SetPSprite(PSP_WEAPON+1,null); // delete left weapon psprite players[e.Args[0]].SetPSprite(PSP_WEAPON+1,null); // delete left weapon psprite
} }
} }
@ -691,7 +691,7 @@ extend Class SWWMHandler
// only if player owns any selectable weapons // only if player owns any selectable weapons
if ( !wsel && SWWMWeaponSelect.PlayerHasWeapons(players[consoleplayer].mo) ) if ( !wsel && SWWMWeaponSelect.PlayerHasWeapons(players[consoleplayer].mo) )
{ {
wsel = new("SWWMWeaponSelect").Init(players[consoleplayer].mo); wsel = new('SWWMWeaponSelect').Init(players[consoleplayer].mo);
StatusBar.AttachMessage(wsel,-2920,layer:StatusBar.HUDMSGLayer_UnderHUD); StatusBar.AttachMessage(wsel,-2920,layer:StatusBar.HUDMSGLayer_UnderHUD);
if ( WeapSel == 1 ) wsel.WeapNext(); if ( WeapSel == 1 ) wsel.WeapNext();
else if ( WeapSel == -1 ) wsel.WeapPrev(); else if ( WeapSel == -1 ) wsel.WeapPrev();

View file

@ -15,7 +15,7 @@ extend Class SWWMHandler
static void QueueCasing( SWWMCasing c ) static void QueueCasing( SWWMCasing c )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.casings_cnt++; hnd.casings_cnt++;
if ( !hnd.casings ) if ( !hnd.casings )
@ -35,7 +35,7 @@ extend Class SWWMHandler
} }
static void DeQueueCasing( SWWMCasing c ) static void DeQueueCasing( SWWMCasing c )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd || !hnd.casings ) return; if ( !hnd || !hnd.casings ) return;
if ( (hnd.casings != c) && !c.prevcasing && !c.nextcasing ) return; if ( (hnd.casings != c) && !c.prevcasing && !c.nextcasing ) return;
hnd.casings_cnt--; hnd.casings_cnt--;
@ -49,7 +49,7 @@ extend Class SWWMHandler
} }
static void QueueChip( SWWMChip c ) static void QueueChip( SWWMChip c )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.chips_cnt++; hnd.chips_cnt++;
if ( !hnd.chips ) if ( !hnd.chips )
@ -69,7 +69,7 @@ extend Class SWWMHandler
} }
static void DeQueueChip( SWWMChip c ) static void DeQueueChip( SWWMChip c )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd || !hnd.chips ) return; if ( !hnd || !hnd.chips ) return;
if ( (hnd.chips != c) && !c.prevchip && !c.nextchip ) return; if ( (hnd.chips != c) && !c.prevchip && !c.nextchip ) return;
hnd.chips_cnt--; hnd.chips_cnt--;
@ -83,7 +83,7 @@ extend Class SWWMHandler
} }
static void QueueBlod( mkBloodDrop b ) static void QueueBlod( mkBloodDrop b )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.blods_cnt++; hnd.blods_cnt++;
if ( !hnd.blods ) if ( !hnd.blods )
@ -103,7 +103,7 @@ extend Class SWWMHandler
} }
static void DeQueueBlod( mkBloodDrop b ) static void DeQueueBlod( mkBloodDrop b )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd || !hnd.blods ) return; if ( !hnd || !hnd.blods ) return;
if ( (hnd.blods != b) && !b.prevblod && !b.nextblod ) return; if ( (hnd.blods != b) && !b.prevblod && !b.nextblod ) return;
hnd.blods_cnt--; hnd.blods_cnt--;
@ -117,7 +117,7 @@ extend Class SWWMHandler
} }
static void QueueMeat( mkFlyingGib m ) static void QueueMeat( mkFlyingGib m )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.meats_cnt++; hnd.meats_cnt++;
if ( !hnd.meats ) if ( !hnd.meats )
@ -137,7 +137,7 @@ extend Class SWWMHandler
} }
static void DeQueueMeat( mkFlyingGib m ) static void DeQueueMeat( mkFlyingGib m )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd || !hnd.meats ) return; if ( !hnd || !hnd.meats ) return;
if ( (hnd.meats != m) && !m.prevmeat && !m.nextmeat ) return; if ( (hnd.meats != m) && !m.prevmeat && !m.nextmeat ) return;
hnd.meats_cnt--; hnd.meats_cnt--;

View file

@ -6,203 +6,203 @@ extend Class SWWMHandler
private Class<Actor> GetDRLAReplacee( Class<Actor> a ) private Class<Actor> GetDRLAReplacee( Class<Actor> a )
{ {
static const String refpool[] = static const Name refpool[] =
{ {
"Zombieman", 'Zombieman',
"Shotgunguy", 'Shotgunguy',
"Chaingunguy", 'Chaingunguy',
"DoomImp", 'DoomImp',
"Demon", 'Demon',
"Spectre", 'Spectre',
"LostSoul", 'LostSoul',
"Cacodemon", 'Cacodemon',
"HellKnight", 'HellKnight',
"BaronOfHell", 'BaronOfHell',
"Arachnotron", 'Arachnotron',
"PainElemental", 'PainElemental',
"Revenant", 'Revenant',
"Fatso", 'Fatso',
"Archvile", 'Archvile',
"Cyberdemon", 'Cyberdemon',
"SpiderMastermind", 'SpiderMastermind',
"BossEye", 'BossEye',
"BossBrain" 'BossBrain'
}; };
static const String babypool[] = static const Name babypool[] =
{ {
"RLFormerHumanPistol", 'RLFormerHumanPistol',
"RLFormerSergeantShotgun", 'RLFormerSergeantShotgun',
"RLFormerCommandoChaingun", 'RLFormerCommandoChaingun',
"RLImp", 'RLImp',
"RLDemon", 'RLDemon',
"RLSpectre", 'RLSpectre',
"RLLostSoul", 'RLLostSoul',
"RLCacodemon", 'RLCacodemon',
"RLHellKnight", 'RLHellKnight',
"RLBaronOfHell", 'RLBaronOfHell',
"RLArachnotron", 'RLArachnotron',
"RLPainElemental", 'RLPainElemental',
"RLRevenant", 'RLRevenant',
"RLMancubus", 'RLMancubus',
"RLArchvile", 'RLArchvile',
"RLCyberdemon", 'RLCyberdemon',
"RLSpiderMastermindVariantSpawner", 'RLSpiderMastermindVariantSpawner',
"RLEasyBossEye", 'RLEasyBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String easypool[] = static const Name easypool[] =
{ {
"RLFormerHumanNoArmageddonSpawner", 'RLFormerHumanNoArmageddonSpawner',
"RLFormerSergeantNoArmageddonSpawner", 'RLFormerSergeantNoArmageddonSpawner',
"RLFormerCommandoNoArmageddonSpawner", 'RLFormerCommandoNoArmageddonSpawner',
"RLImpNoArmageddonSpawner", 'RLImpNoArmageddonSpawner',
"RLDemonNoArmageddonSpawner", 'RLDemonNoArmageddonSpawner',
"RLSpectreNoArmageddonSpawner", 'RLSpectreNoArmageddonSpawner',
"RLLostSoulNoArmageddonSpawner", 'RLLostSoulNoArmageddonSpawner',
"RLCacodemonNoArmageddonSpawner", 'RLCacodemonNoArmageddonSpawner',
"RLHellKnightNoArmageddonSpawner", 'RLHellKnightNoArmageddonSpawner',
"RLBaronOfHellNoArmageddonSpawner", 'RLBaronOfHellNoArmageddonSpawner',
"RLArachnotronNoArmageddonSpawner", 'RLArachnotronNoArmageddonSpawner',
"RLPainElementalNoArmageddonSpawner", 'RLPainElementalNoArmageddonSpawner',
"RLRevenantNoArmageddonSpawner", 'RLRevenantNoArmageddonSpawner',
"RLMancubusNoArmageddonSpawner", 'RLMancubusNoArmageddonSpawner',
"RLArchvileNoArmageddonSpawner", 'RLArchvileNoArmageddonSpawner',
"RLCyberdemonNoArmageddonSpawner", 'RLCyberdemonNoArmageddonSpawner',
"RLSpiderMastermindNoArmageddonSpawner", 'RLSpiderMastermindNoArmageddonSpawner',
"RLBossEye", 'RLBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String normalpool[] = static const Name normalpool[] =
{ {
"RLFormerHumanNoArmageddonSpawner", 'RLFormerHumanNoArmageddonSpawner',
"RLFormerSergeantNoArmageddonSpawner", 'RLFormerSergeantNoArmageddonSpawner',
"RLFormerCommandoNoArmageddonSpawner", 'RLFormerCommandoNoArmageddonSpawner',
"RLImpNoArmageddonSpawner", 'RLImpNoArmageddonSpawner',
"RLDemonNoArmageddonSpawner", 'RLDemonNoArmageddonSpawner',
"RLSpectreNoArmageddonSpawner", 'RLSpectreNoArmageddonSpawner',
"RLLostSoulNoArmageddonSpawner", 'RLLostSoulNoArmageddonSpawner',
"RLCacodemonNoArmageddonSpawner", 'RLCacodemonNoArmageddonSpawner',
"RLHellKnightNoArmageddonSpawner", 'RLHellKnightNoArmageddonSpawner',
"RLBaronOfHellNoArmageddonSpawner", 'RLBaronOfHellNoArmageddonSpawner',
"RLArachnotronNoArmageddonSpawner", 'RLArachnotronNoArmageddonSpawner',
"RLPainElementalNoArmageddonSpawner", 'RLPainElementalNoArmageddonSpawner',
"RLRevenantNoArmageddonSpawner", 'RLRevenantNoArmageddonSpawner',
"RLMancubusNoArmageddonSpawner", 'RLMancubusNoArmageddonSpawner',
"RLArchvileNoArmageddonSpawner", 'RLArchvileNoArmageddonSpawner',
"RLCyberdemonNoArmageddonSpawner", 'RLCyberdemonNoArmageddonSpawner',
"RLSpiderMastermindNoArmageddonSpawner", 'RLSpiderMastermindNoArmageddonSpawner',
"RLBossEye", 'RLBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String hardpool[] = static const Name hardpool[] =
{ {
"RLFormerHumanSpawner", 'RLFormerHumanSpawner',
"RLFormerSergeantSpawner", 'RLFormerSergeantSpawner',
"RLFormerCommandoSpawner", 'RLFormerCommandoSpawner',
"RLImpSpawner", 'RLImpSpawner',
"RLDemonSpawner", 'RLDemonSpawner',
"RLSpectreSpawner", 'RLSpectreSpawner',
"RLLostSoulSpawner", 'RLLostSoulSpawner',
"RLCacodemonSpawner", 'RLCacodemonSpawner',
"RLHellKnightSpawner", 'RLHellKnightSpawner',
"RLBaronOfHellSpawner", 'RLBaronOfHellSpawner',
"RLArachnotronSpawner", 'RLArachnotronSpawner',
"RLPainElementalSpawner", 'RLPainElementalSpawner',
"RLRevenantSpawner", 'RLRevenantSpawner',
"RLMancubusSpawner", 'RLMancubusSpawner',
"RLArchvileSpawner", 'RLArchvileSpawner',
"RLCyberdemonSpawner", 'RLCyberdemonSpawner',
"RLSpiderMastermindSpawner", 'RLSpiderMastermindSpawner',
"RLUVBossEye", 'RLUVBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String nightmarepool[] = static const Name nightmarepool[] =
{ {
"RLEliteFormerHumanSpawner", 'RLEliteFormerHumanSpawner',
"RLEliteFormerSergeantSpawner", 'RLEliteFormerSergeantSpawner',
"RLEliteFormerCommandoSpawner", 'RLEliteFormerCommandoSpawner',
"RLNightmareImp", 'RLNightmareImp',
"RLNightmareDemon", 'RLNightmareDemon',
"RLNightmareSpectre", 'RLNightmareSpectre',
"RLNightmareLostSoul", 'RLNightmareLostSoul',
"RLNightmareCacodemon", 'RLNightmareCacodemon',
"RLNightmareHellKnight", 'RLNightmareHellKnight',
"RLNightmareBaronOfHell", 'RLNightmareBaronOfHell',
"RLNightmareArachnotron", 'RLNightmareArachnotron',
"RLNightmarePainElemental", 'RLNightmarePainElemental',
"RLNightmareRevenant", 'RLNightmareRevenant',
"RLNightmareMancubus", 'RLNightmareMancubus',
"RLNightmareArchvile", 'RLNightmareArchvile',
"RLNightmareCyberdemonSpawner", 'RLNightmareCyberdemonSpawner',
"RLNightmareSpiderMastermindSpawner", 'RLNightmareSpiderMastermindSpawner',
"RLNightmareBossEye", 'RLNightmareBossEye',
"RLNightmareBossBrain" 'RLNightmareBossBrain'
}; };
static const String technophobiapool[] = static const Name technophobiapool[] =
{ {
"RLFormerCyborgBattleRifle", 'RLFormerCyborgBattleRifle',
"RLFormerCyborgBattleRifle", 'RLFormerCyborgBattleRifle',
"RLFormerCyborgBattleRifle", 'RLFormerCyborgBattleRifle',
"RLCyberneticImp", 'RLCyberneticImp',
"RLCyberneticDemon", 'RLCyberneticDemon',
"RLCyberneticSpectre", 'RLCyberneticSpectre',
"RLCyberneticLostSoul", 'RLCyberneticLostSoul',
"RLCacodemon", 'RLCacodemon',
"RLCyberneticHellKnight", 'RLCyberneticHellKnight',
"RLCyberneticBaronOfHell", 'RLCyberneticBaronOfHell',
"RLCyberneticArachnotron", 'RLCyberneticArachnotron',
"RLCyberneticPainElemental", 'RLCyberneticPainElemental',
"RLCyberneticRevenant", 'RLCyberneticRevenant',
"RLCyberneticMancubus", 'RLCyberneticMancubus',
"RLCyberneticArchvile", 'RLCyberneticArchvile',
"RLCyberneticCyberdemonSpawner", 'RLCyberneticCyberdemonSpawner',
"RLCyberneticSpiderMastermindSpawner", 'RLCyberneticSpiderMastermindSpawner',
"RLTechnophobiaBossEye", 'RLTechnophobiaBossEye',
"RLTechnophobiaBossBrain" 'RLTechnophobiaBossBrain'
}; };
static const String armageddonpool[] = static const Name armageddonpool[] =
{ {
"RLFormerAssaultTrooper", 'RLFormerAssaultTrooper',
"RLFormerOverwatch", 'RLFormerOverwatch',
"RLFormerShocktrooper", 'RLFormerShocktrooper',
"RLArmageddonImp", 'RLArmageddonImp',
"RLArmageddonDemon", 'RLArmageddonDemon',
"RLArmageddonSpectreSpawner", 'RLArmageddonSpectreSpawner',
"RLTheHungrySpawner", 'RLTheHungrySpawner',
"RLArmageddonCacodemon", 'RLArmageddonCacodemon',
"RLArmageddonHellKnightSpawner", 'RLArmageddonHellKnightSpawner',
"RLArmageddonBaronOfHell", 'RLArmageddonBaronOfHell',
"RLArmageddonArachnotron", 'RLArmageddonArachnotron',
"RLArmageddonPainElemental", 'RLArmageddonPainElemental',
"RLArmageddonRevenant", 'RLArmageddonRevenant',
"RLArmageddonMancubus", 'RLArmageddonMancubus',
"RLArmageddonArchvileSpawner", 'RLArmageddonArchvileSpawner',
"RLArmageddonCyberdemonSpawner", 'RLArmageddonCyberdemonSpawner',
"RLArmageddonSpiderMastermindSpawner", 'RLArmageddonSpiderMastermindSpawner',
"RLArmageddonBossEye", 'RLArmageddonBossEye',
"RLArmageddonBossBrain" 'RLArmageddonBossBrain'
}; };
static const String adaptivepool[] = static const Name adaptivepool[] =
{ {
"RLAdaptiveFormerHuman", 'RLAdaptiveFormerHuman',
"RLAdaptiveFormerSergeant", 'RLAdaptiveFormerSergeant',
"RLAdaptiveFormerCommando", 'RLAdaptiveFormerCommando',
"RLAdaptiveImp", 'RLAdaptiveImp',
"RLAdaptiveDemon", 'RLAdaptiveDemon',
"RLAdaptiveSpectre", 'RLAdaptiveSpectre',
"RLAdaptiveLostSoul", 'RLAdaptiveLostSoul',
"RLAdaptiveCacodemon", 'RLAdaptiveCacodemon',
"RLAdaptiveHellKnight", 'RLAdaptiveHellKnight',
"RLAdaptiveBaronOfHell", 'RLAdaptiveBaronOfHell',
"RLAdaptiveArachnotron", 'RLAdaptiveArachnotron',
"RLAdaptivePainElemental", 'RLAdaptivePainElemental',
"RLAdaptiveRevenant", 'RLAdaptiveRevenant',
"RLAdaptiveMancubus", 'RLAdaptiveMancubus',
"RLAdaptiveArchvile", 'RLAdaptiveArchvile',
"RLAdaptiveCyberdemon", 'RLAdaptiveCyberdemon',
"RLAdaptiveSpiderMastermind", 'RLAdaptiveSpiderMastermind',
"RLUVBossEye", 'RLUVBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
switch ( swwm_drlaskill ) switch ( swwm_drlaskill )
{ {
@ -269,37 +269,37 @@ extend Class SWWMHandler
private Class<Actor> GetLOBReplacee( Class<Actor> a ) private Class<Actor> GetLOBReplacee( Class<Actor> a )
{ {
static const String refpool[] = static const Name refpool[] =
{ {
"Zombieman", 'Zombieman',
"Shotgunguy", 'Shotgunguy',
"Chaingunguy", 'Chaingunguy',
"DoomImp", 'DoomImp',
"Demon", 'Demon',
"Spectre", 'Spectre',
"Cacodemon", 'Cacodemon',
"HellKnight", 'HellKnight',
"BaronOfHell", 'BaronOfHell',
"Revenant", 'Revenant',
"Fatso", 'Fatso',
"Arachnotron", 'Arachnotron',
"Archvile" 'Archvile'
}; };
static const String reppool[] = static const Name reppool[] =
{ {
"LOBZombieman", 'LOBZombieman',
"LOBShotgunguy", 'LOBShotgunguy',
"LOBChaingunguy", 'LOBChaingunguy',
"LOBDoomImp", 'LOBDoomImp',
"LOBDemon", 'LOBDemon',
"LOBSpectre", 'LOBSpectre',
"LOBCacodemon", 'LOBCacodemon',
"LOBHellKnight", 'LOBHellKnight',
"LOBBaronOfHell", 'LOBBaronOfHell',
"LOBRevenant", 'LOBRevenant',
"LOBFatso", 'LOBFatso',
"LOBArachnotron", 'LOBArachnotron',
"LOBArchvile" 'LOBArchvile'
}; };
for ( int i=0; i<13; i++ ) for ( int i=0; i<13; i++ )
{ {
@ -315,7 +315,7 @@ extend Class SWWMHandler
// these are all needed so boss deaths work // these are all needed so boss deaths work
if ( e.Replacement is 'DSparilHax' ) if ( e.Replacement is 'DSparilHax' )
e.Replacee = 'Sorcerer2'; e.Replacee = 'Sorcerer2';
// LOB "double death" stuff // LOB 'double death' stuff
if ( haslegionofbones && swwm_lobdoubled ) if ( haslegionofbones && swwm_lobdoubled )
{ {
let rep = GetLOBReplacee(e.Replacement); let rep = GetLOBReplacee(e.Replacement);
@ -339,203 +339,203 @@ extend Class SWWMHandler
private Class<Actor> GetDRLAReplacement( Class<Actor> a ) private Class<Actor> GetDRLAReplacement( Class<Actor> a )
{ {
static const String refpool[] = static const Name refpool[] =
{ {
"Zombieman", 'Zombieman',
"Shotgunguy", 'Shotgunguy',
"Chaingunguy", 'Chaingunguy',
"DoomImp", 'DoomImp',
"Demon", 'Demon',
"Spectre", 'Spectre',
"LostSoul", 'LostSoul',
"Cacodemon", 'Cacodemon',
"HellKnight", 'HellKnight',
"BaronOfHell", 'BaronOfHell',
"Arachnotron", 'Arachnotron',
"PainElemental", 'PainElemental',
"Revenant", 'Revenant',
"Fatso", 'Fatso',
"Archvile", 'Archvile',
"Cyberdemon", 'Cyberdemon',
"SpiderMastermind", 'SpiderMastermind',
"BossEye", 'BossEye',
"BossBrain" 'BossBrain'
}; };
static const String babypool[] = static const Name babypool[] =
{ {
"RLFormerHumanPistol", 'RLFormerHumanPistol',
"RLFormerSergeantShotgun", 'RLFormerSergeantShotgun',
"RLFormerCommandoChaingun", 'RLFormerCommandoChaingun',
"RLImp", 'RLImp',
"RLDemon", 'RLDemon',
"RLSpectre", 'RLSpectre',
"RLLostSoul", 'RLLostSoul',
"RLCacodemon", 'RLCacodemon',
"RLHellKnight", 'RLHellKnight',
"RLBaronOfHell", 'RLBaronOfHell',
"RLArachnotron", 'RLArachnotron',
"RLPainElemental", 'RLPainElemental',
"RLRevenant", 'RLRevenant',
"RLMancubus", 'RLMancubus',
"RLArchvile", 'RLArchvile',
"RLCyberdemon", 'RLCyberdemon',
"RLSpiderMastermindVariantSpawner", 'RLSpiderMastermindVariantSpawner',
"RLEasyBossEye", 'RLEasyBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String easypool[] = static const Name easypool[] =
{ {
"RLFormerHumanNoArmageddonSpawner", 'RLFormerHumanNoArmageddonSpawner',
"RLFormerSergeantNoArmageddonSpawner", 'RLFormerSergeantNoArmageddonSpawner',
"RLFormerCommandoNoArmageddonSpawner", 'RLFormerCommandoNoArmageddonSpawner',
"RLImpNoArmageddonSpawner", 'RLImpNoArmageddonSpawner',
"RLDemonNoArmageddonSpawner", 'RLDemonNoArmageddonSpawner',
"RLSpectreNoArmageddonSpawner", 'RLSpectreNoArmageddonSpawner',
"RLLostSoulNoArmageddonSpawner", 'RLLostSoulNoArmageddonSpawner',
"RLCacodemonNoArmageddonSpawner", 'RLCacodemonNoArmageddonSpawner',
"RLHellKnightNoArmageddonSpawner", 'RLHellKnightNoArmageddonSpawner',
"RLBaronOfHellNoArmageddonSpawner", 'RLBaronOfHellNoArmageddonSpawner',
"RLArachnotronNoArmageddonSpawner", 'RLArachnotronNoArmageddonSpawner',
"RLPainElementalNoArmageddonSpawner", 'RLPainElementalNoArmageddonSpawner',
"RLRevenantNoArmageddonSpawner", 'RLRevenantNoArmageddonSpawner',
"RLMancubusNoArmageddonSpawner", 'RLMancubusNoArmageddonSpawner',
"RLArchvileNoArmageddonSpawner", 'RLArchvileNoArmageddonSpawner',
"RLCyberdemonNoArmageddonSpawner", 'RLCyberdemonNoArmageddonSpawner',
"RLSpiderMastermindNoArmageddonSpawner", 'RLSpiderMastermindNoArmageddonSpawner',
"RLBossEye", 'RLBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String normalpool[] = static const Name normalpool[] =
{ {
"RLFormerHumanNoArmageddonSpawner", 'RLFormerHumanNoArmageddonSpawner',
"RLFormerSergeantNoArmageddonSpawner", 'RLFormerSergeantNoArmageddonSpawner',
"RLFormerCommandoNoArmageddonSpawner", 'RLFormerCommandoNoArmageddonSpawner',
"RLImpNoArmageddonSpawner", 'RLImpNoArmageddonSpawner',
"RLDemonNoArmageddonSpawner", 'RLDemonNoArmageddonSpawner',
"RLSpectreNoArmageddonSpawner", 'RLSpectreNoArmageddonSpawner',
"RLLostSoulNoArmageddonSpawner", 'RLLostSoulNoArmageddonSpawner',
"RLCacodemonNoArmageddonSpawner", 'RLCacodemonNoArmageddonSpawner',
"RLHellKnightNoArmageddonSpawner", 'RLHellKnightNoArmageddonSpawner',
"RLBaronOfHellNoArmageddonSpawner", 'RLBaronOfHellNoArmageddonSpawner',
"RLArachnotronNoArmageddonSpawner", 'RLArachnotronNoArmageddonSpawner',
"RLPainElementalNoArmageddonSpawner", 'RLPainElementalNoArmageddonSpawner',
"RLRevenantNoArmageddonSpawner", 'RLRevenantNoArmageddonSpawner',
"RLMancubusNoArmageddonSpawner", 'RLMancubusNoArmageddonSpawner',
"RLArchvileNoArmageddonSpawner", 'RLArchvileNoArmageddonSpawner',
"RLCyberdemonNoArmageddonSpawner", 'RLCyberdemonNoArmageddonSpawner',
"RLSpiderMastermindNoArmageddonSpawner", 'RLSpiderMastermindNoArmageddonSpawner',
"RLBossEye", 'RLBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String hardpool[] = static const Name hardpool[] =
{ {
"RLFormerHumanSpawner", 'RLFormerHumanSpawner',
"RLFormerSergeantSpawner", 'RLFormerSergeantSpawner',
"RLFormerCommandoSpawner", 'RLFormerCommandoSpawner',
"RLImpSpawner", 'RLImpSpawner',
"RLDemonSpawner", 'RLDemonSpawner',
"RLSpectreSpawner", 'RLSpectreSpawner',
"RLLostSoulSpawner", 'RLLostSoulSpawner',
"RLCacodemonSpawner", 'RLCacodemonSpawner',
"RLHellKnightSpawner", 'RLHellKnightSpawner',
"RLBaronOfHellSpawner", 'RLBaronOfHellSpawner',
"RLArachnotronSpawner", 'RLArachnotronSpawner',
"RLPainElementalSpawner", 'RLPainElementalSpawner',
"RLRevenantSpawner", 'RLRevenantSpawner',
"RLMancubusSpawner", 'RLMancubusSpawner',
"RLArchvileSpawner", 'RLArchvileSpawner',
"RLCyberdemonSpawner", 'RLCyberdemonSpawner',
"RLSpiderMastermindSpawner", 'RLSpiderMastermindSpawner',
"RLUVBossEye", 'RLUVBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
static const String nightmarepool[] = static const Name nightmarepool[] =
{ {
"RLEliteFormerHumanSpawner", 'RLEliteFormerHumanSpawner',
"RLEliteFormerSergeantSpawner", 'RLEliteFormerSergeantSpawner',
"RLEliteFormerCommandoSpawner", 'RLEliteFormerCommandoSpawner',
"RLNightmareImp", 'RLNightmareImp',
"RLNightmareDemon", 'RLNightmareDemon',
"RLNightmareSpectre", 'RLNightmareSpectre',
"RLNightmareLostSoul", 'RLNightmareLostSoul',
"RLNightmareCacodemon", 'RLNightmareCacodemon',
"RLNightmareHellKnight", 'RLNightmareHellKnight',
"RLNightmareBaronOfHell", 'RLNightmareBaronOfHell',
"RLNightmareArachnotron", 'RLNightmareArachnotron',
"RLNightmarePainElemental", 'RLNightmarePainElemental',
"RLNightmareRevenant", 'RLNightmareRevenant',
"RLNightmareMancubus", 'RLNightmareMancubus',
"RLNightmareArchvile", 'RLNightmareArchvile',
"RLNightmareCyberdemonSpawner", 'RLNightmareCyberdemonSpawner',
"RLNightmareSpiderMastermindSpawner", 'RLNightmareSpiderMastermindSpawner',
"RLNightmareBossEye", 'RLNightmareBossEye',
"RLNightmareBossBrain" 'RLNightmareBossBrain'
}; };
static const String technophobiapool[] = static const Name technophobiapool[] =
{ {
"RLFormerCyborgBattleRifle", 'RLFormerCyborgBattleRifle',
"RLFormerCyborgBattleRifle", 'RLFormerCyborgBattleRifle',
"RLFormerCyborgBattleRifle", 'RLFormerCyborgBattleRifle',
"RLCyberneticImp", 'RLCyberneticImp',
"RLCyberneticDemon", 'RLCyberneticDemon',
"RLCyberneticSpectre", 'RLCyberneticSpectre',
"RLCyberneticLostSoul", 'RLCyberneticLostSoul',
"RLCacodemon", 'RLCacodemon',
"RLCyberneticHellKnight", 'RLCyberneticHellKnight',
"RLCyberneticBaronOfHell", 'RLCyberneticBaronOfHell',
"RLCyberneticArachnotron", 'RLCyberneticArachnotron',
"RLCyberneticPainElemental", 'RLCyberneticPainElemental',
"RLCyberneticRevenant", 'RLCyberneticRevenant',
"RLCyberneticMancubus", 'RLCyberneticMancubus',
"RLCyberneticArchvile", 'RLCyberneticArchvile',
"RLCyberneticCyberdemonSpawner", 'RLCyberneticCyberdemonSpawner',
"RLCyberneticSpiderMastermindSpawner", 'RLCyberneticSpiderMastermindSpawner',
"RLTechnophobiaBossEye", 'RLTechnophobiaBossEye',
"RLTechnophobiaBossBrain" 'RLTechnophobiaBossBrain'
}; };
static const String armageddonpool[] = static const Name armageddonpool[] =
{ {
"RLFormerAssaultTrooper", 'RLFormerAssaultTrooper',
"RLFormerOverwatch", 'RLFormerOverwatch',
"RLFormerShocktrooper", 'RLFormerShocktrooper',
"RLArmageddonImp", 'RLArmageddonImp',
"RLArmageddonDemon", 'RLArmageddonDemon',
"RLArmageddonSpectreSpawner", 'RLArmageddonSpectreSpawner',
"RLTheHungrySpawner", 'RLTheHungrySpawner',
"RLArmageddonCacodemon", 'RLArmageddonCacodemon',
"RLArmageddonHellKnightSpawner", 'RLArmageddonHellKnightSpawner',
"RLArmageddonBaronOfHell", 'RLArmageddonBaronOfHell',
"RLArmageddonArachnotron", 'RLArmageddonArachnotron',
"RLArmageddonPainElemental", 'RLArmageddonPainElemental',
"RLArmageddonRevenant", 'RLArmageddonRevenant',
"RLArmageddonMancubus", 'RLArmageddonMancubus',
"RLArmageddonArchvileSpawner", 'RLArmageddonArchvileSpawner',
"RLArmageddonCyberdemonSpawner", 'RLArmageddonCyberdemonSpawner',
"RLArmageddonSpiderMastermindSpawner", 'RLArmageddonSpiderMastermindSpawner',
"RLArmageddonBossEye", 'RLArmageddonBossEye',
"RLArmageddonBossBrain" 'RLArmageddonBossBrain'
}; };
static const String adaptivepool[] = static const Name adaptivepool[] =
{ {
"RLAdaptiveFormerHuman", 'RLAdaptiveFormerHuman',
"RLAdaptiveFormerSergeant", 'RLAdaptiveFormerSergeant',
"RLAdaptiveFormerCommando", 'RLAdaptiveFormerCommando',
"RLAdaptiveImp", 'RLAdaptiveImp',
"RLAdaptiveDemon", 'RLAdaptiveDemon',
"RLAdaptiveSpectre", 'RLAdaptiveSpectre',
"RLAdaptiveLostSoul", 'RLAdaptiveLostSoul',
"RLAdaptiveCacodemon", 'RLAdaptiveCacodemon',
"RLAdaptiveHellKnight", 'RLAdaptiveHellKnight',
"RLAdaptiveBaronOfHell", 'RLAdaptiveBaronOfHell',
"RLAdaptiveArachnotron", 'RLAdaptiveArachnotron',
"RLAdaptivePainElemental", 'RLAdaptivePainElemental',
"RLAdaptiveRevenant", 'RLAdaptiveRevenant',
"RLAdaptiveMancubus", 'RLAdaptiveMancubus',
"RLAdaptiveArchvile", 'RLAdaptiveArchvile',
"RLAdaptiveCyberdemon", 'RLAdaptiveCyberdemon',
"RLAdaptiveSpiderMastermind", 'RLAdaptiveSpiderMastermind',
"RLUVBossEye", 'RLUVBossEye',
"RLBossBrain" 'RLBossBrain'
}; };
switch ( swwm_drlaskill ) switch ( swwm_drlaskill )
{ {
@ -602,37 +602,37 @@ extend Class SWWMHandler
private Class<Actor> GetLOBReplacement( Class<Actor> a ) private Class<Actor> GetLOBReplacement( Class<Actor> a )
{ {
static const String refpool[] = static const Name refpool[] =
{ {
"Zombieman", 'Zombieman',
"Shotgunguy", 'Shotgunguy',
"Chaingunguy", 'Chaingunguy',
"DoomImp", 'DoomImp',
"Demon", 'Demon',
"Spectre", 'Spectre',
"Cacodemon", 'Cacodemon',
"HellKnight", 'HellKnight',
"BaronOfHell", 'BaronOfHell',
"Revenant", 'Revenant',
"Fatso", 'Fatso',
"Arachnotron", 'Arachnotron',
"Archvile" 'Archvile'
}; };
static const String reppool[] = static const Name reppool[] =
{ {
"LOBZombieman", 'LOBZombieman',
"LOBShotgunguy", 'LOBShotgunguy',
"LOBChaingunguy", 'LOBChaingunguy',
"LOBDoomImp", 'LOBDoomImp',
"LOBDemon", 'LOBDemon',
"LOBSpectre", 'LOBSpectre',
"LOBCacodemon", 'LOBCacodemon',
"LOBHellKnight", 'LOBHellKnight',
"LOBBaronOfHell", 'LOBBaronOfHell',
"LOBRevenant", 'LOBRevenant',
"LOBFatso", 'LOBFatso',
"LOBArachnotron", 'LOBArachnotron',
"LOBArchvile" 'LOBArchvile'
}; };
for ( int i=0; i<13; i++ ) for ( int i=0; i<13; i++ )
{ {
@ -663,7 +663,7 @@ extend Class SWWMHandler
return; return;
} }
} }
// LOB "double death" stuff // LOB 'double death' stuff
if ( haslegionofbones && swwm_lobdoubled ) if ( haslegionofbones && swwm_lobdoubled )
{ {
let rep = GetLOBReplacement(e.Replacee); let rep = GetLOBReplacement(e.Replacee);
@ -729,10 +729,10 @@ extend Class SWWMHandler
else if ( e.Replacee is 'Crossbow' ) e.Replacement = SWWMUtility.PickDoomSlot3(); else if ( e.Replacee is 'Crossbow' ) e.Replacement = SWWMUtility.PickDoomSlot3();
else if ( (e.Replacee is 'Chaingun') || (e.Replacee is 'Blaster') || (e.Replacee is 'FWeaponPiece3') ) e.Replacement = SWWMUtility.PickSWWMSlot5(); else if ( (e.Replacee is 'Chaingun') || (e.Replacee is 'Blaster') || (e.Replacee is 'FWeaponPiece3') ) e.Replacement = SWWMUtility.PickSWWMSlot5();
else if ( (e.Replacee is 'RocketLauncher') || (e.Replacee is 'PhoenixRod') || (e.Replacee is 'FWeapHammer') ) e.Replacement = SWWMUtility.PickSWWMSlot6(); else if ( (e.Replacee is 'RocketLauncher') || (e.Replacee is 'PhoenixRod') || (e.Replacee is 'FWeapHammer') ) e.Replacement = SWWMUtility.PickSWWMSlot6();
else if ( (e.Replacee is 'PlasmaRifle') || (e.Replacee is 'SkullRod') ) e.Replacement = SWWMUtility.PickDoomSlot6(); else if ( (e.Replacee is 'PlasmaRifle') || (e.Replacee is 'ID24Incinerator') || (e.Replacee is 'SkullRod') ) e.Replacement = SWWMUtility.PickDoomSlot6();
else if ( e.Replacee is 'CWeapFlame' ) e.Replacement = SWWMUtility.PickSWWMSlot7(); else if ( e.Replacee is 'CWeapFlame' ) e.Replacement = SWWMUtility.PickSWWMSlot7();
else if ( e.Replacee is 'MWeapLightning' ) e.Replacement = SWWMUtility.PickSWWMSlot8(); else if ( e.Replacee is 'MWeapLightning' ) e.Replacement = SWWMUtility.PickSWWMSlot8();
else if ( (e.Replacee is 'BFG9000') || (e.Replacee is 'Mace') ) e.Replacement = SWWMUtility.PickDoomSlot7(); else if ( (e.Replacee is 'BFG9000') || (e.Replacee is 'ID24CalamityBlade') || (e.Replacee is 'Mace') ) e.Replacement = SWWMUtility.PickDoomSlot7();
else if ( e.Replacee is 'CWeaponPiece2' ) e.Replacement = SWWMUtility.PickSWWMSlot9(); else if ( e.Replacee is 'CWeaponPiece2' ) e.Replacement = SWWMUtility.PickSWWMSlot9();
else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = SWWMUtility.PickSWWMSlot0(); else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = SWWMUtility.PickSWWMSlot0();
else if ( (e.Replacee is 'ShellBox') || (e.Replacee is 'CrossbowHefty') ) e.Replacement = 'SWWMShellAmmoBig'; else if ( (e.Replacee is 'ShellBox') || (e.Replacee is 'CrossbowHefty') ) e.Replacement = 'SWWMShellAmmoBig';
@ -743,8 +743,8 @@ extend Class SWWMHandler
else if ( e.Replacee is 'BlasterAmmo' ) e.Replacement = 'SWWMBlastAmmoSmall'; else if ( e.Replacee is 'BlasterAmmo' ) e.Replacement = 'SWWMBlastAmmoSmall';
else if ( (e.Replacee is 'RocketBox') || (e.Replacee is 'PhoenixRodHefty') || (e.Replacee is 'MaceHefty') ) e.Replacement = 'SWWMRocketAmmoBig'; else if ( (e.Replacee is 'RocketBox') || (e.Replacee is 'PhoenixRodHefty') || (e.Replacee is 'MaceHefty') ) e.Replacement = 'SWWMRocketAmmoBig';
else if ( (e.Replacee is 'RocketAmmo') || (e.Replacee is 'PhoenixRodAmmo') || (e.Replacee is 'MaceAmmo') ) e.Replacement = 'SWWMRocketAmmoSmall'; else if ( (e.Replacee is 'RocketAmmo') || (e.Replacee is 'PhoenixRodAmmo') || (e.Replacee is 'MaceAmmo') ) e.Replacement = 'SWWMRocketAmmoSmall';
else if ( (e.Replacee is 'CellPack') || (e.Replacee is 'SkullRodHefty') ) e.Replacement = 'SWWMCellAmmoBig'; else if ( (e.Replacee is 'CellPack') || (e.Replacee is 'ID24FuelTank') || (e.Replacee is 'SkullRodHefty') ) e.Replacement = 'SWWMCellAmmoBig';
else if ( (e.Replacee is 'Cell') || (e.Replacee is 'SkullRodAmmo') ) e.Replacement = 'SWWMCellAmmoSmall'; else if ( (e.Replacee is 'Cell') || (e.Replacee is 'ID24Fuel') || (e.Replacee is 'SkullRodAmmo') ) e.Replacement = 'SWWMCellAmmoSmall';
else if ( e.Replacee is 'Mana1' ) e.Replacement = 'FabricatorTier1'; else if ( e.Replacee is 'Mana1' ) e.Replacement = 'FabricatorTier1';
else if ( e.Replacee is 'Mana2' ) e.Replacement = 'FabricatorTier2'; else if ( e.Replacee is 'Mana2' ) e.Replacement = 'FabricatorTier2';
else if ( e.Replacee is 'Mana3' ) e.Replacement = 'FabricatorTier3'; else if ( e.Replacee is 'Mana3' ) e.Replacement = 'FabricatorTier3';

View file

@ -39,7 +39,7 @@ extend Class SWWMHandler
PPShader.SetUniform1f("BokehSel","strength",salph); PPShader.SetUniform1f("BokehSel","strength",salph);
} }
else PPShader.SetEnabled("BokehSel",false); else PPShader.SetEnabled("BokehSel",false);
let divi = DivineSpriteEffect(mo.FindInventory("DivineSpriteEffect")); let divi = DivineSpriteEffect(mo.FindInventory('DivineSpriteEffect'));
if ( divi ) if ( divi )
{ {
PPShader.SetEnabled("DivineShader",true); PPShader.SetEnabled("DivineShader",true);
@ -48,7 +48,7 @@ extend Class SWWMHandler
PPShader.SetUniform1f("DivineShader","str",str); PPShader.SetUniform1f("DivineShader","str",str);
} }
else PPShader.SetEnabled("DevastationShader",false); else PPShader.SetEnabled("DevastationShader",false);
let deva = AngeryPower(mo.FindInventory("AngeryPower")); let deva = AngeryPower(mo.FindInventory('AngeryPower'));
if ( deva ) if ( deva )
{ {
PPShader.SetEnabled("DevastationShader",true); PPShader.SetEnabled("DevastationShader",true);
@ -57,7 +57,7 @@ extend Class SWWMHandler
PPShader.SetUniform1f("DevastationShader","xtrastr",xstrastr**2.); PPShader.SetUniform1f("DevastationShader","xtrastr",xstrastr**2.);
} }
else PPShader.SetEnabled("DevastationShader",false); else PPShader.SetEnabled("DevastationShader",false);
let rage = RagekitPower(mo.FindInventory("RagekitPower")); let rage = RagekitPower(mo.FindInventory('RagekitPower'));
if ( rage ) if ( rage )
{ {
PPShader.SetEnabled("RagekitShader",true); PPShader.SetEnabled("RagekitShader",true);
@ -66,10 +66,10 @@ extend Class SWWMHandler
PPShader.SetUniform1f("RagekitShader","xtrastr",xstrastr**2.); PPShader.SetUniform1f("RagekitShader","xtrastr",xstrastr**2.);
} }
else PPShader.SetEnabled("RagekitShader",false); else PPShader.SetEnabled("RagekitShader",false);
let ghost = GhostPower(mo.FindInventory("GhostPower")); let ghost = GhostPower(mo.FindInventory('GhostPower'));
if ( ghost ) PPShader.SetEnabled("GhostShader",true); if ( ghost ) PPShader.SetEnabled("GhostShader",true);
else PPShader.SetEnabled("GhostShader",false); else PPShader.SetEnabled("GhostShader",false);
let sunny = InvinciballPower(mo.FindInventory("InvinciballPower")); let sunny = InvinciballPower(mo.FindInventory('InvinciballPower'));
if ( sunny ) if ( sunny )
{ {
PPShader.SetEnabled("InvinciShader",true); PPShader.SetEnabled("InvinciShader",true);
@ -77,7 +77,7 @@ extend Class SWWMHandler
PPShader.SetUniform1f("InvinciShader","str",str); PPShader.SetUniform1f("InvinciShader","str",str);
} }
else PPShader.SetEnabled("InvinciShader",false); else PPShader.SetEnabled("InvinciShader",false);
let coat = BarrierPower(mo.FindInventory("BarrierPower")); let coat = BarrierPower(mo.FindInventory('BarrierPower'));
if ( coat ) if ( coat )
{ {
PPShader.SetEnabled("BarrierShader",true); PPShader.SetEnabled("BarrierShader",true);
@ -154,7 +154,7 @@ extend Class SWWMHandler
} }
} }
else PPShader.SetEnabled("WindBlur",false); else PPShader.SetEnabled("WindBlur",false);
if ( !demo.InStateSequence(demo.CurState,demo.FindState("Dash")) ) if ( !demo.InStateSequence(demo.CurState,demo.FindState('Dash')) )
{ {
PPShader.SetEnabled("ZoomBlur",false); PPShader.SetEnabled("ZoomBlur",false);
return; return;

View file

@ -60,15 +60,15 @@ Class ROM3R0Death : Inventory
override void OwnerDied() override void OwnerDied()
{ {
// copied from boss brain // copied from boss brain
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
{ {
if ( a is 'BossEye' ) a.SetStateLabel("Null"); if ( a is 'BossEye' ) a.SetStateLabel('Null');
else if ( a is 'SpawnShot' ) else if ( a is 'SpawnShot' )
{ {
a.Spawn("SpawnFire",a.pos,ALLOW_REPLACE); a.Spawn('SpawnFire',a.pos,ALLOW_REPLACE);
a.SetStateLabel("Null"); a.SetStateLabel('Null');
} }
else if ( (a.Health > 0) && (a.bBossSpawned || a.bCOUNTKILL) ) else if ( (a.Health > 0) && (a.bBossSpawned || a.bCOUNTKILL) )
a.DamageMobj(self,self,a.Health,'EndMii',DMG_FORCED|DMG_THRUSTLESS); a.DamageMobj(self,self,a.Health,'EndMii',DMG_FORCED|DMG_THRUSTLESS);
@ -129,7 +129,7 @@ extend Class SWWMHandler
static play void AddBoss( int tid, String tag, bool endgame = false ) static play void AddBoss( int tid, String tag, bool endgame = false )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.bossactors.Clear(); hnd.bossactors.Clear();
hnd.initialized = false; hnd.initialized = false;
@ -144,7 +144,7 @@ extend Class SWWMHandler
{ {
hnd.bossbrainactor = a; hnd.bossbrainactor = a;
// look for boss eyes // look for boss eyes
let eye = Actor(ThinkerIterator.Create("BossEye").Next()); let eye = Actor(ThinkerIterator.Create('BossEye').Next());
hnd.bossviewactor = eye; hnd.bossviewactor = eye;
} }
} }
@ -155,7 +155,7 @@ extend Class SWWMHandler
static play void AddBossActor( Actor a, String tag, bool endgame = false ) static play void AddBossActor( Actor a, String tag, bool endgame = false )
{ {
if ( !a ) return; if ( !a ) return;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.bossactors.Clear(); hnd.bossactors.Clear();
hnd.initialized = false; hnd.initialized = false;
@ -167,7 +167,7 @@ extend Class SWWMHandler
{ {
hnd.bossbrainactor = a; hnd.bossbrainactor = a;
// look for boss eyes // look for boss eyes
let eye = Actor(ThinkerIterator.Create("BossEye").Next()); let eye = Actor(ThinkerIterator.Create('BossEye').Next());
hnd.bossviewactor = eye; hnd.bossviewactor = eye;
} }
} }
@ -438,14 +438,14 @@ extend Class SWWMHandler
} }
else if ( bossmap == MAP_EVMAP30 ) else if ( bossmap == MAP_EVMAP30 )
{ {
if ( e.Thing.GetClassName() == "Archangelus" ) if ( e.Thing.GetClassName() == 'Archangelus' )
{ {
bossactors.Push(e.Thing); bossactors.Push(e.Thing);
bossviewactor = e.Thing; bossviewactor = e.Thing;
bosstag = "$BT_ARCHANGELUS"; bosstag = "$BT_ARCHANGELUS";
e.Thing.GiveInventory('ArchangelusMessage',1); e.Thing.GiveInventory('ArchangelusMessage',1);
} }
else if ( e.Thing.GetClassName() == "ArchangelusA" ) else if ( e.Thing.GetClassName() == 'ArchangelusA' )
{ {
// first phase // first phase
bossactors.Clear(); bossactors.Clear();
@ -457,7 +457,7 @@ extend Class SWWMHandler
e.Thing.GiveInventory('BossMarker',1); e.Thing.GiveInventory('BossMarker',1);
e.Thing.GiveInventory('EndgameBossMarker',1); e.Thing.GiveInventory('EndgameBossMarker',1);
} }
else if ( e.Thing.GetClassName() == "ArchangelusB" ) else if ( e.Thing.GetClassName() == 'ArchangelusB' )
{ {
// second phase // second phase
bossactors.Clear(); bossactors.Clear();
@ -474,7 +474,7 @@ extend Class SWWMHandler
} }
else if ( bossmap == MAP_EVIIMAP30 ) else if ( bossmap == MAP_EVIIMAP30 )
{ {
if ( (e.Thing.GetClassName() == "The_Origin_Phase_1_Spawner") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1_Spawner") ) if ( (e.Thing.GetClassName() == 'The_Origin_Phase_1_Spawner') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1_Spawner') )
{ {
bossactors.Push(e.Thing); bossactors.Push(e.Thing);
bossviewactor = e.Thing; bossviewactor = e.Thing;
@ -482,7 +482,7 @@ extend Class SWWMHandler
// hack to avoid "all clear" between phases // hack to avoid "all clear" between phases
level.total_monsters += 3; level.total_monsters += 3;
} }
else if ( (e.Thing.GetClassName() == "The_Origin_Phase_1") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1") ) else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_1') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1') )
{ {
// first phase // first phase
bossactors.Clear(); bossactors.Clear();
@ -496,7 +496,7 @@ extend Class SWWMHandler
// undo the hack (part 1) // undo the hack (part 1)
level.total_monsters--; level.total_monsters--;
} }
else if ( (e.Thing.GetClassName() == "The_Origin_Phase_2") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_2") ) else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_2') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_2') )
{ {
// second phase // second phase
bossactors.Clear(); bossactors.Clear();
@ -516,7 +516,7 @@ extend Class SWWMHandler
// undo the hack (part 2) // undo the hack (part 2)
level.total_monsters--; level.total_monsters--;
} }
else if ( (e.Thing.GetClassName() == "The_Origin_Phase_3") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_3") ) else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_3') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_3') )
{ {
// third phase // third phase
bossactors.Clear(); bossactors.Clear();
@ -538,7 +538,7 @@ extend Class SWWMHandler
level.total_monsters--; level.total_monsters--;
} }
} }
if ( ccloaded && (e.Thing.GetClassName() == "CCards_Boss_Romero") ) if ( ccloaded && (e.Thing.GetClassName() == 'CCards_Boss_Romero') )
{ {
bossactors.Push(e.Thing); bossactors.Push(e.Thing);
e.Thing.StartHealth = e.Thing.Health *= 10; e.Thing.StartHealth = e.Thing.Health *= 10;
@ -584,11 +584,11 @@ extend Class SWWMHandler
else if ( bossmap == MAP_EVIIMAP30 ) else if ( bossmap == MAP_EVIIMAP30 )
{ {
highesttic = gametic; highesttic = gametic;
if ( (a.GetClassName() == "The_Origin_Phase_1") || (a.GetClassName() == "The_Absolute_Origin_Phase_1") ) if ( (a.GetClassName() == 'The_Origin_Phase_1') || (a.GetClassName() == 'The_Absolute_Origin_Phase_1') )
lastcombat = AddOneliner("origin1",1,40); lastcombat = AddOneliner("origin1",1,40);
else if ( (a.GetClassName() == "The_Origin_Phase_2") || (a.GetClassName() == "The_Absolute_Origin_Phase_2") ) else if ( (a.GetClassName() == 'The_Origin_Phase_2') || (a.GetClassName() == 'The_Absolute_Origin_Phase_2') )
lastcombat = AddOneliner("origin2",1,40); lastcombat = AddOneliner("origin2",1,40);
else if ( (a.GetClassName() == "The_Origin_Phase_3") || (a.GetClassName() == "The_Absolute_Origin_Phase_3") ) else if ( (a.GetClassName() == 'The_Origin_Phase_3') || (a.GetClassName() == 'The_Absolute_Origin_Phase_3') )
lastcombat = AddOneliner("origin3",1,40); lastcombat = AddOneliner("origin3",1,40);
} }
break; break;

View file

@ -59,7 +59,7 @@ extend Class SWWMHandler
// level end stats // level end stats
override void WorldUnloaded( WorldEvent e ) override void WorldUnloaded( WorldEvent e )
{ {
let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC); let ti = ThinkerIterator.Create('SWWMStats',Thinker.STAT_STATIC);
SWWMStats s; SWWMStats s;
while ( s = SWWMStats(ti.Next()) ) while ( s = SWWMStats(ti.Next()) )
{ {
@ -113,7 +113,7 @@ extend Class SWWMHandler
s.AddLevelStats(); s.AddLevelStats();
s.lastcluster = level.cluster; s.lastcluster = level.cluster;
// nazi cleanup // nazi cleanup
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
bool hasnazis = false; bool hasnazis = false;
bool livenazis = false; bool livenazis = false;
@ -219,7 +219,7 @@ extend Class SWWMHandler
sbounds.Resize(level.Sectors.Size()); sbounds.Resize(level.Sectors.Size());
foreach ( s:level.Sectors ) foreach ( s:level.Sectors )
{ {
let sb = new("SectorBounds"); let sb = new('SectorBounds');
sb.portalgroup = s.portalgroup; sb.portalgroup = s.portalgroup;
sb.bounds = ( 32767, 32767, -32768, -32768 ); sb.bounds = ( 32767, 32767, -32768, -32768 );
foreach ( l:s.Lines ) foreach ( l:s.Lines )
@ -267,15 +267,10 @@ extend Class SWWMHandler
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.DIMPLE"); SendInterfaceEvent(consoleplayer,"swwmsetdialogue.DIMPLE");
break; break;
case MAP_DMAP30: case MAP_DMAP30:
bool rampancy = false; if ( FindClass('Robot_BossBrain','Actor') )
foreach ( cls:AllActorClasses ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.RAMPANCY");
{ else
if ( cls.GetClassName() != "Robot_BossBrain" ) continue; SendInterfaceEvent(consoleplayer,"swwmsetdialogue.IOS");
rampancy = true;
break;
}
if ( rampancy ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.RAMPANCY");
else SendInterfaceEvent(consoleplayer,"swwmsetdialogue.IOS");
break; break;
case MAP_DLVL08: case MAP_DLVL08:
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.NERVE"); SendInterfaceEvent(consoleplayer,"swwmsetdialogue.NERVE");
@ -418,14 +413,14 @@ extend Class SWWMHandler
|| (level.GetChecksum() ~== "A52BD2038CF814101AAB7D9C78F9ACE2") ) || (level.GetChecksum() ~== "A52BD2038CF814101AAB7D9C78F9ACE2") )
level.ExecuteSpecial(ACS_Execute,null,null,false,-Int('DVACATION_UNSCREW')); level.ExecuteSpecial(ACS_Execute,null,null,false,-Int('DVACATION_UNSCREW'));
// rampancy boss brain fix (repeatedly triggering "map clear") // rampancy boss brain fix (repeatedly triggering "map clear")
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a, brain; Actor a, brain;
bool haseye = false; bool haseye = false;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
{ {
if ( a.GetClassName() == "Robot_BossEye" ) if ( a.GetClassName() == 'Robot_BossEye' )
haseye = true; haseye = true;
if ( a.GetClassName() == "Robot_BossBrain" ) if ( a.GetClassName() == 'Robot_BossBrain' )
brain = a; brain = a;
} }
if ( haseye && brain ) if ( haseye && brain )
@ -433,7 +428,7 @@ extend Class SWWMHandler
brain.bCOUNTKILL = true; brain.bCOUNTKILL = true;
level.total_monsters++; level.total_monsters++;
// while we're at it // while we're at it
Actor.Spawn("RampancyLogonDummy"); Actor.Spawn('RampancyLogonDummy');
} }
// KDiKDiZD abort fix due to voodoo doll post-spawn replacement // KDiKDiZD abort fix due to voodoo doll post-spawn replacement
// (we have our own mikoportal compatibility, anyway) // (we have our own mikoportal compatibility, anyway)
@ -442,18 +437,15 @@ extend Class SWWMHandler
// since KDiKDiZD requires software rendering, while this is a // since KDiKDiZD requires software rendering, while this is a
// hardware-only mod... but hey, they can sort-of-work together // hardware-only mod... but hey, they can sort-of-work together
// (with broken visual effects, but still... somewhat working) // (with broken visual effects, but still... somewhat working)
foreach ( cls:AllClasses ) if ( FindClass('KdikdizdCompatEventHandler','EventHandler') )
{ {
if ( cls.GetClassName() != 'KdikdizdCompatEventHandler' ) ti = ThinkerIterator.Create('Thinker');
continue;
ti = ThinkerIterator.Create("Thinker");
foreach ( t:ti ) foreach ( t:ti )
{ {
if ( t.GetClassName() != 'VoodooPusher' ) if ( t.GetClassName() != 'VoodooPusher' )
continue; continue;
t.Destroy(); t.Destroy();
} }
break;
} }
// Eviternity II MAP33 fix. Player movement physics need to // Eviternity II MAP33 fix. Player movement physics need to
// have ground anchoring disabled, as it will make some // have ground anchoring disabled, as it will make some
@ -478,7 +470,7 @@ extend Class SWWMHandler
// while we're at it, add teleporter sparks // while we're at it, add teleporter sparks
if ( SWWMUtility.IsTeleportLine(l) ) if ( SWWMUtility.IsTeleportLine(l) )
{ {
let a = SWWMTeleportLine(Actor.Spawn("SWWMTeleportLine")); let a = SWWMTeleportLine(Actor.Spawn('SWWMTeleportLine'));
a.tline = l; a.tline = l;
} }
let [isexit, exittype] = SWWMUtility.IsExitLine(l); let [isexit, exittype] = SWWMUtility.IsExitLine(l);
@ -533,7 +525,7 @@ extend Class SWWMHandler
if ( !deathmatch ) Chancebox.SpawnChanceboxes(); if ( !deathmatch ) Chancebox.SpawnChanceboxes();
// list map keys // list map keys
maphaskeys = false; maphaskeys = false;
ti = ThinkerIterator.Create("Key"); ti = ThinkerIterator.Create('Key');
Key k; Key k;
while ( k = Key(ti.Next()) ) while ( k = Key(ti.Next()) )
{ {

View file

@ -16,7 +16,7 @@ extend Class SWWMHandler
|| SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) ) || SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) )
{ {
// you can pet the dog, and you can also pet the caco (and friends) // you can pet the dog, and you can also pet the caco (and friends)
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
} }
if ( !(e.Thing is 'PlayerPawn') ) if ( !(e.Thing is 'PlayerPawn') )
@ -53,12 +53,12 @@ extend Class SWWMHandler
for ( int i=0; i<MAXPLAYERS; i++ ) for ( int i=0; i<MAXPLAYERS; i++ )
{ {
if ( !playeringame[i] || !players[i].mo ) continue; if ( !playeringame[i] || !players[i].mo ) continue;
let cg = players[i].mo.FindInventory("GoldShell"); let cg = players[i].mo.FindInventory('GoldShell');
if ( cg ) totalneeded += cg.MaxAmount-cg.Amount; if ( cg ) totalneeded += cg.MaxAmount-cg.Amount;
else totalneeded = GetDefaultByType("GoldShell").MaxAmount; else totalneeded = GetDefaultByType('GoldShell').MaxAmount;
} }
// subtract any shells already in the world // subtract any shells already in the world
let ti = ThinkerIterator.Create("GoldShell"); let ti = ThinkerIterator.Create('GoldShell');
GoldShell g; GoldShell g;
while ( g = GoldShell(ti.Next()) ) while ( g = GoldShell(ti.Next()) )
{ {
@ -71,7 +71,7 @@ extend Class SWWMHandler
override void WorldThingDied( WorldEvent e ) override void WorldThingDied( WorldEvent e )
{ {
if ( profiling ) ProfileTick(); if ( profiling ) ProfileTick();
if ( e.Thing.default.bISMONSTER && e.Thing.default.bCOUNTKILL && ((e.Thing.default.bBOSS) || (e.Thing.GetSpawnHealth() >= 1000) || e.Thing.FindInventory("BossMarker")) && (alreadygold.Find(e.Thing) == alreadygold.Size()) ) if ( e.Thing.default.bISMONSTER && e.Thing.default.bCOUNTKILL && ((e.Thing.default.bBOSS) || (e.Thing.GetSpawnHealth() >= 1000) || e.Thing.FindInventory('BossMarker')) && (alreadygold.Find(e.Thing) == alreadygold.Size()) )
{ {
// make sure we can't farm drops from revivable enemies // make sure we can't farm drops from revivable enemies
// (or cause some things to spam-spawn gold shells) // (or cause some things to spam-spawn gold shells)
@ -89,7 +89,7 @@ extend Class SWWMHandler
int gchance = int(ceil(ShouldSpawnGold()/2.)); int gchance = int(ceil(ShouldSpawnGold()/2.));
if ( !Random[GoldDrop](0,dropweight) && Random[GoldDrop](0,gchance) ) if ( !Random[GoldDrop](0,dropweight) && Random[GoldDrop](0,gchance) )
{ {
let g = Actor.Spawn("GoldShell",e.Thing.Vec3Offset(0,0,e.Thing.Height/2.)); let g = Actor.Spawn('GoldShell',e.Thing.Vec3Offset(0,0,e.Thing.Height/2.));
double ang = FRandom[SpareShells](0.,360.); double ang = FRandom[SpareShells](0.,360.);
g.vel.xy = Actor.AngleToVector(ang,FRandom[SpareShells](.4,.8)); g.vel.xy = Actor.AngleToVector(ang,FRandom[SpareShells](.4,.8));
g.vel.z = FRandom[SpareShells](2.,4.); g.vel.z = FRandom[SpareShells](2.,4.);
@ -113,21 +113,21 @@ extend Class SWWMHandler
level.ExecuteSpecial(Door_Open,e.Thing,null,false,10,16); level.ExecuteSpecial(Door_Open,e.Thing,null,false,10,16);
// keep the portal closed, you can't leave unless you // keep the portal closed, you can't leave unless you
// kill everyone else // kill everyone else
let t = new("KoraxYeeted"); let t = new('KoraxYeeted');
t.ChangeStatNum(Thinker.STAT_USER); t.ChangeStatNum(Thinker.STAT_USER);
} }
// Archangelus instakill // Archangelus instakill
if ( (e.Thing.GetClassName() == "ArchangelusA") && (e.Thing.DamageType == 'Ynykron') ) if ( (e.Thing.GetClassName() == 'ArchangelusA') && (e.Thing.DamageType == 'Ynykron') )
{ {
// this will skip the second phase dialogue // this will skip the second phase dialogue
// (note that you can only have an Ynykron in this fight by cheating, tho) // (note that you can only have an Ynykron in this fight by cheating, tho)
archangelus_zapped = true; archangelus_zapped = true;
} }
// Archangelus death // Archangelus death
if ( e.Thing.GetClassName() == "ArchangelusB" ) if ( e.Thing.GetClassName() == 'ArchangelusB' )
{ {
// kill all other monsters // kill all other monsters
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
{ {
@ -136,8 +136,8 @@ extend Class SWWMHandler
} }
} }
// Origin instakill // Origin instakill
if ( ((e.Thing.GetClassName() == "The_Origin_Phase_1") || (e.Thing.GetClassName() == "The_Origin_Phase_2") if ( ((e.Thing.GetClassName() == 'The_Origin_Phase_1') || (e.Thing.GetClassName() == 'The_Origin_Phase_2')
|| (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_2")) || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_2'))
&& (e.Thing.DamageType == 'Ynykron') ) && (e.Thing.DamageType == 'Ynykron') )
{ {
// this will trigger special dialogue on the next phase // this will trigger special dialogue on the next phase
@ -145,7 +145,7 @@ extend Class SWWMHandler
} }
if ( swwm_partytime ) if ( swwm_partytime )
{ {
let pt = Actor.Spawn("PartyTime",e.Thing.pos); let pt = Actor.Spawn('PartyTime',e.Thing.pos);
pt.target = e.Thing; pt.target = e.Thing;
} }
if ( profiling ) ProfileTock(PT_WORLDTHINGDIED); if ( profiling ) ProfileTock(PT_WORLDTHINGDIED);
@ -180,7 +180,7 @@ extend Class SWWMHandler
// tempfix keys have no tags // tempfix keys have no tags
static void KeyTagFix( Actor a ) static void KeyTagFix( Actor a )
{ {
let hnd = SWWMHandler(Find("SWWMHandler")); let hnd = SWWMHandler(Find('SWWMHandler'));
if ( hnd ) hnd.DoKeyTagFix(a); if ( hnd ) hnd.DoKeyTagFix(a);
} }
@ -234,7 +234,7 @@ extend Class SWWMHandler
IWantDieSpawn(e); IWantDieSpawn(e);
if ( (e.Thing is 'TeleportDest') || (e.Thing is 'BossTarget') ) if ( (e.Thing is 'TeleportDest') || (e.Thing is 'BossTarget') )
{ {
let d = Actor.Spawn("SWWMTeleportDest",e.Thing.pos); let d = Actor.Spawn('SWWMTeleportDest',e.Thing.pos);
d.bNOGRAVITY = e.Thing.bNOGRAVITY; d.bNOGRAVITY = e.Thing.bNOGRAVITY;
} }
if ( e.Thing is 'Inventory' ) if ( e.Thing is 'Inventory' )
@ -244,10 +244,10 @@ extend Class SWWMHandler
{ {
let p = Actor.Spawn(Inventory(e.Thing).PickupFlash,e.Thing.pos); let p = Actor.Spawn(Inventory(e.Thing).PickupFlash,e.Thing.pos);
p.target = e.Thing; p.target = e.Thing;
p.SetStateLabel("Pickup"); p.SetStateLabel('Pickup');
} }
// for notification // for notification
if ( e.Thing.GetClassName() == "LDLegendaryMonsterTransformed" ) if ( e.Thing.GetClassName() == 'LDLegendaryMonsterTransformed' )
legtrack.Push(Inventory(e.Thing)); legtrack.Push(Inventory(e.Thing));
} }
if ( swwm_doomfall && e.Thing.bISMONSTER && !e.Thing.bBOSS ) if ( swwm_doomfall && e.Thing.bISMONSTER && !e.Thing.bBOSS )
@ -262,132 +262,132 @@ extend Class SWWMHandler
if ( e.Thing.GetClass() == 'Pig' ) if ( e.Thing.GetClass() == 'Pig' )
e.Thing.SetTag("$FN_PIG"); // missing in gzdoom e.Thing.SetTag("$FN_PIG"); // missing in gzdoom
// eviternity stuff // eviternity stuff
else if ( (e.Thing.GetClassName() == "Archangelus") else if ( (e.Thing.GetClassName() == 'Archangelus')
|| (e.Thing.GetClassName() == "ArchangelusA") || (e.Thing.GetClassName() == 'ArchangelusA')
|| (e.Thing.GetClassName() == "ArchangelusB") ) || (e.Thing.GetClassName() == 'ArchangelusB') )
e.Thing.SetTag("$FN_ANGEL"); e.Thing.SetTag("$FN_ANGEL");
else if ( e.Thing.GetClassName() == "AstralCaco" ) else if ( e.Thing.GetClassName() == 'AstralCaco' )
e.Thing.SetTag("$FN_ASTRAL"); e.Thing.SetTag("$FN_ASTRAL");
else if ( e.Thing.GetClassName() == "Annihilator" ) else if ( e.Thing.GetClassName() == 'Annihilator' )
e.Thing.SetTag("$FN_ANNIHIL"); e.Thing.SetTag("$FN_ANNIHIL");
else if ( e.Thing.GetClassName() == "FormerCaptain" ) else if ( e.Thing.GetClassName() == 'FormerCaptain' )
e.Thing.SetTag("$FN_FCAPTAIN"); e.Thing.SetTag("$FN_FCAPTAIN");
else if ( e.Thing.GetClassName() == "NightmareDemon" ) else if ( e.Thing.GetClassName() == 'NightmareDemon' )
e.Thing.SetTag("$FN_NDEMON"); e.Thing.SetTag("$FN_NDEMON");
// eviternity 2 stuff // eviternity 2 stuff
else if ( e.Thing.GetClassName() == "FormerCorporal" ) else if ( e.Thing.GetClassName() == 'FormerCorporal' )
e.Thing.SetTag("$FN_FCORPORAL"); e.Thing.SetTag("$FN_FCORPORAL");
else if ( e.Thing.GetClassName() == "AstralArachnotron" ) else if ( e.Thing.GetClassName() == 'AstralArachnotron' )
e.Thing.SetTag("$FN_ASTRALARACH"); e.Thing.SetTag("$FN_ASTRALARACH");
else if ( e.Thing.GetClassName() == "AstralCacodemon" ) else if ( e.Thing.GetClassName() == 'AstralCacodemon' )
e.Thing.SetTag("$FN_ASTRAL"); e.Thing.SetTag("$FN_ASTRAL");
else if ( e.Thing.GetClassName() == "Veilimp" ) else if ( e.Thing.GetClassName() == 'Veilimp' )
e.Thing.SetTag("$FN_VEILIMP"); e.Thing.SetTag("$FN_VEILIMP");
else if ( (e.Thing.GetClassName() == "GoldenAstralCaco") else if ( (e.Thing.GetClassName() == 'GoldenAstralCaco')
|| (e.Thing.GetClassName() == "GoldenAstralCacoBoss") ) || (e.Thing.GetClassName() == 'GoldenAstralCacoBoss') )
e.Thing.SetTag("$FN_ASTRALGOLD"); e.Thing.SetTag("$FN_ASTRALGOLD");
else if ( e.Thing.GetClassName() == "DukeOfHell" ) else if ( e.Thing.GetClassName() == 'DukeOfHell' )
e.Thing.SetTag("$FN_DUKE"); e.Thing.SetTag("$FN_DUKE");
else if ( e.Thing.GetClassName() == "AstralBabycaco" ) else if ( e.Thing.GetClassName() == 'AstralBabycaco' )
e.Thing.SetTag("$FN_ASTRALBABY"); e.Thing.SetTag("$FN_ASTRALBABY");
else if ( e.Thing.GetClassName() == "NightmareCacodemon" ) else if ( e.Thing.GetClassName() == 'NightmareCacodemon' )
e.Thing.SetTag("$FN_NAC"); e.Thing.SetTag("$FN_NAC");
else if ( e.Thing.GetClassName() == "AstralMancubus" ) else if ( e.Thing.GetClassName() == 'AstralMancubus' )
e.Thing.SetTag("$FN_ASTRALFATSO"); e.Thing.SetTag("$FN_ASTRALFATSO");
else if ( (e.Thing.GetClassName() == "NecromenaceA") else if ( (e.Thing.GetClassName() == 'NecromenaceA')
|| (e.Thing.GetClassName() == "NecromenaceB") || (e.Thing.GetClassName() == 'NecromenaceB')
|| (e.Thing.GetClassName() == "NecromenaceC") || (e.Thing.GetClassName() == 'NecromenaceC')
|| (e.Thing.GetClassName() == "NecromenaceD") ) || (e.Thing.GetClassName() == 'NecromenaceD') )
e.Thing.SetTag("$FN_NECROMENACE"); e.Thing.SetTag("$FN_NECROMENACE");
else if ( (e.Thing.GetClassName() == "The_Origin_Phase_1") else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_1')
|| (e.Thing.GetClassName() == "The_Origin_Phase_2") || (e.Thing.GetClassName() == 'The_Origin_Phase_2')
|| (e.Thing.GetClassName() == "The_Origin_Phase_3") || (e.Thing.GetClassName() == 'The_Origin_Phase_3')
|| (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1") || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1')
|| (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_2") || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_2')
|| (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_3") ) || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_3') )
e.Thing.SetTag("$FN_ORIGIN"); e.Thing.SetTag("$FN_ORIGIN");
else if ( e.Thing.GetClassName() == "SpectralAstralCacodemon" ) else if ( e.Thing.GetClassName() == 'SpectralAstralCacodemon' )
e.Thing.SetTag("$FN_SAC"); e.Thing.SetTag("$FN_SAC");
else if ( e.Thing.GetClassName() == "GrandDukeofHell" ) else if ( e.Thing.GetClassName() == 'GrandDukeofHell' )
e.Thing.SetTag("$FN_GDUKE"); e.Thing.SetTag("$FN_GDUKE");
// doom vacation stuff // doom vacation stuff
else if ( indoomvacation ) else if ( indoomvacation )
{ {
if ( e.Thing.GetClassName() == "Babe" ) if ( e.Thing.GetClassName() == 'Babe' )
{ {
e.Thing.bSHOOTABLE = false; // no hurt e.Thing.bSHOOTABLE = false; // no hurt
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .2; HeadpatTracker(hp).heightfix = .2;
} }
else if ( e.Thing.GetClassName() == "CommanderKeen" ) else if ( e.Thing.GetClassName() == 'CommanderKeen' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .4; HeadpatTracker(hp).heightfix = .4;
HeadpatTracker(hp).angfix = 5; HeadpatTracker(hp).angfix = 5;
} }
else if ( e.Thing.GetClassName() == "BBChair" ) else if ( e.Thing.GetClassName() == 'BBChair' )
{ {
e.Thing.bUSESPECIAL = false; e.Thing.bUSESPECIAL = false;
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .2; HeadpatTracker(hp).heightfix = .2;
HeadpatTracker(hp).angfix = 15; HeadpatTracker(hp).angfix = 15;
HeadpatTracker(hp).patstate = e.Thing.MeleeState; HeadpatTracker(hp).patstate = e.Thing.MeleeState;
} }
else if ( e.Thing.GetClassName() == "EvilEye" ) else if ( e.Thing.GetClassName() == 'EvilEye' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .1; HeadpatTracker(hp).heightfix = .1;
} }
else if ( e.Thing.GetClassName() == "HeadCandles" ) else if ( e.Thing.GetClassName() == 'HeadCandles' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).angfix = 20; HeadpatTracker(hp).angfix = 20;
} }
else if ( e.Thing.GetClassName() == "HeartColumn" ) else if ( e.Thing.GetClassName() == 'HeartColumn' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = -.3; HeadpatTracker(hp).heightfix = -.3;
} }
else if ( e.Thing.GetClassName() == "Meat2" ) else if ( e.Thing.GetClassName() == 'Meat2' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .6; HeadpatTracker(hp).heightfix = .6;
HeadpatTracker(hp).angfix = -15; HeadpatTracker(hp).angfix = -15;
HeadpatTracker(hp).dvacationarghack = true; HeadpatTracker(hp).dvacationarghack = true;
} }
else if ( e.Thing.GetClassName() == "Meat3" ) else if ( e.Thing.GetClassName() == 'Meat3' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .6; HeadpatTracker(hp).heightfix = .6;
HeadpatTracker(hp).angfix = 20; HeadpatTracker(hp).angfix = 20;
HeadpatTracker(hp).dvacationarghack = true; HeadpatTracker(hp).dvacationarghack = true;
} }
else if ( e.Thing.GetClassName() == "LegsBabe" ) else if ( e.Thing.GetClassName() == 'LegsBabe' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = -1.5; HeadpatTracker(hp).heightfix = -1.5;
HeadpatTracker(hp).angfix = 20; HeadpatTracker(hp).angfix = 20;
HeadpatTracker(hp).dvacationarghack = true; HeadpatTracker(hp).dvacationarghack = true;
} }
else if ( e.Thing.GetClassName() == "Meat4" ) else if ( e.Thing.GetClassName() == 'Meat4' )
{ {
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
HeadpatTracker(hp).heightfix = .6; HeadpatTracker(hp).heightfix = .6;
HeadpatTracker(hp).angfix = 15; HeadpatTracker(hp).angfix = 15;
HeadpatTracker(hp).dvacationarghack = true; HeadpatTracker(hp).dvacationarghack = true;
} }
} }
else if ( inultdoom2 && (e.Thing.GetClassName() == "WolfensteinSS") ) else if ( inultdoom2 && (e.Thing.GetClassName() == 'WolfensteinSS') )
{ {
e.Thing.SetTag("$FN_ELITEZOMBIE"); e.Thing.SetTag("$FN_ELITEZOMBIE");
//e.Thing.Obituary = "$OB_ELITEZOMBIE"; //e.Thing.Obituary = "$OB_ELITEZOMBIE";
@ -397,7 +397,7 @@ extend Class SWWMHandler
e.Thing.DeathSound = "grunt/death"; e.Thing.DeathSound = "grunt/death";
e.Thing.ActiveSound = "grunt/active"; e.Thing.ActiveSound = "grunt/active";
} }
else if ( ccloaded && (e.Thing.GetClassName() == "CCards_Token_Glitched") ) else if ( ccloaded && (e.Thing.GetClassName() == 'CCards_Token_Glitched') )
{ {
if ( !gdat.cclilithonce ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.LILITH"); if ( !gdat.cclilithonce ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.LILITH");
gdat.cclilithonce = true; gdat.cclilithonce = true;
@ -406,29 +406,29 @@ extend Class SWWMHandler
|| SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) ) || SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) )
{ {
// you can pet the dog, and you can also pet the caco (and friends) // you can pet the dog, and you can also pet the caco (and friends)
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos);
hp.target = e.Thing; hp.target = e.Thing;
} }
// vanilla blood color changes // vanilla blood color changes
if ( (e.Thing.GetClass() == "BaronOfHell") || (e.Thing.GetClass() == "HellKnight") || (e.Thing.GetClass() == "Bishop") || (e.Thing.GetClass() == "Korax") ) if ( (e.Thing.GetClassName() == 'BaronOfHell') || (e.Thing.GetClassName() == 'HellKnight') || (e.Thing.GetClassName() == 'Bishop') || (e.Thing.GetClassName() == 'Korax') )
{ {
let gb = Actor.Spawn("GreenBloodReference"); let gb = Actor.Spawn('GreenBloodReference');
e.Thing.CopyBloodColor(gb); e.Thing.CopyBloodColor(gb);
gb.Destroy(); gb.Destroy();
} }
else if ( e.Thing.GetClass() == "Cacodemon" ) else if ( e.Thing.GetClassName() == 'Cacodemon' )
{ {
let bb = Actor.Spawn("BlueBloodReference"); let bb = Actor.Spawn('BlueBloodReference');
e.Thing.CopyBloodColor(bb); e.Thing.CopyBloodColor(bb);
bb.Destroy(); bb.Destroy();
} }
else if ( (e.Thing.GetClass() == "Wizard") || (e.Thing.GetClass() == "Heresiarch") || (e.Thing.GetClass() == "Sorcerer2") ) else if ( (e.Thing.GetClassName() == 'Wizard') || (e.Thing.GetClassName() == 'Heresiarch') || (e.Thing.GetClassName() == 'Sorcerer2') )
{ {
let pb = Actor.Spawn("PurpleBloodReference"); let pb = Actor.Spawn('PurpleBloodReference');
e.Thing.CopyBloodColor(pb); e.Thing.CopyBloodColor(pb);
pb.Destroy(); pb.Destroy();
} }
else if ( e.Thing.GetClass() == "LostSoul" ) else if ( e.Thing.GetClassName() == 'LostSoul' )
e.Thing.bNOBLOOD = true; e.Thing.bNOBLOOD = true;
VanillaBossSpawn(e); VanillaBossSpawn(e);
if ( profiling ) ProfileTock(PT_WORLDTHINGSPAWNED); if ( profiling ) ProfileTock(PT_WORLDTHINGSPAWNED);

View file

@ -24,7 +24,7 @@ extend Class SWWMHandler
if ( (language != curlang) || (swwm_funtags != curfuntags) ) if ( (language != curlang) || (swwm_funtags != curfuntags) )
{ {
// manually refresh some tags if language has changed // manually refresh some tags if language has changed
if ( !qti ) qti = ThinkerIterator.Create("SWWMQuickCombatTracker",Thinker.STAT_INVENTORY); if ( !qti ) qti = ThinkerIterator.Create('SWWMQuickCombatTracker',Thinker.STAT_INVENTORY);
else qti.Reinit(); else qti.Reinit();
SWWMQuickCombatTracker qt; SWWMQuickCombatTracker qt;
while ( qt=SWWMQuickCombatTracker(qti.Next()) ) while ( qt=SWWMQuickCombatTracker(qti.Next()) )
@ -126,12 +126,12 @@ extend Class SWWMHandler
combatactors.Push(a); combatactors.Push(a);
combattics.Push(gametic); combattics.Push(gametic);
enteredcombat = true; enteredcombat = true;
if ( a.bBOSS || a.FindInventory("BossMarker") ) if ( a.bBOSS || a.FindInventory('BossMarker') )
bossfound = true; bossfound = true;
} }
} }
// be smart, demo-chan, don't shout if you're invisible, or you'll make it worse // be smart, demo-chan, don't shout if you're invisible, or you'll make it worse
if ( enteredcombat && ((bossfound && (!lastcombat || (gametic > lastcombat+240))) || (!bossfound && (!highesttic || (gametic > highesttic+700)))) && !players[consoleplayer].mo.FindInventory("GhostPower") ) if ( enteredcombat && ((bossfound && (!lastcombat || (gametic > lastcombat+240))) || (!bossfound && (!highesttic || (gametic > highesttic+700)))) && !players[consoleplayer].mo.FindInventory('GhostPower') )
lastcombat = AddOneliner("fightstart",1,10); lastcombat = AddOneliner("fightstart",1,10);
} }
@ -203,7 +203,7 @@ extend Class SWWMHandler
for ( int i=0; i<MAXPLAYERS; i++ ) for ( int i=0; i<MAXPLAYERS; i++ )
{ {
if ( !playeringame[i] || !players[i].mo ) continue; if ( !playeringame[i] || !players[i].mo ) continue;
let f = Actor.Spawn("PartyTime",players[i].mo.pos); let f = Actor.Spawn('PartyTime',players[i].mo.pos);
if ( altclear ) f.bSTANDSTILL = true; if ( altclear ) f.bSTANDSTILL = true;
else f.bAMBUSH = true; else f.bAMBUSH = true;
if ( mapclearagain ) if ( mapclearagain )

View file

@ -21,7 +21,7 @@ Class SWWMStaticHandler : StaticEventHandler
int checktic; int checktic;
int maptime; int maptime;
bool unloading; bool unloading;
ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions ui Map<String, String> menustate; // used by Demolitionist Menu to restore old menu positions
// title stuff // title stuff
ui bool titlefirst; ui bool titlefirst;
// map title stuff // map title stuff
@ -39,7 +39,7 @@ Class SWWMStaticHandler : StaticEventHandler
override void NewGame() override void NewGame()
{ {
// set save version every new session // set save version every new session
let svd = new("SWWMSaveVerData"); let svd = new('SWWMSaveVerData');
svd.ChangeStatNum(Thinker.STAT_STATIC); svd.ChangeStatNum(Thinker.STAT_STATIC);
svd.ver = StringTable.Localize("$SWWM_SHORTVER"); svd.ver = StringTable.Localize("$SWWM_SHORTVER");
uid = 0; uid = 0;
@ -68,7 +68,7 @@ Class SWWMStaticHandler : StaticEventHandler
} }
// sanity check // sanity check
Array<Thinker> stinkers; Array<Thinker> stinkers;
if ( !sti ) sti = ThinkerIterator.Create("SWWMStaticThinker"); if ( !sti ) sti = ThinkerIterator.Create('SWWMStaticThinker');
else sti.Reinit(); else sti.Reinit();
foreach ( t:sti ) stinkers.Push(t); foreach ( t:sti ) stinkers.Push(t);
if ( stinkers.Size() > 0 ) if ( stinkers.Size() > 0 )
@ -101,7 +101,7 @@ Class SWWMStaticHandler : StaticEventHandler
tainted = false; tainted = false;
taintver = ""; taintver = "";
checktic = gametic+5; checktic = gametic+5;
let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC);
let svd = SWWMSaveVerData(ti.Next()); let svd = SWWMSaveVerData(ti.Next());
if ( !svd ) if ( !svd )
{ {
@ -256,7 +256,7 @@ Class SWWMStaticHandler : StaticEventHandler
if ( aprilfools && (gamestate == GS_LEVEL) ) if ( aprilfools && (gamestate == GS_LEVEL) )
{ {
String str = "Unregistered Ultracam"; String str = "Unregistered Ultracam";
if ( !aprfnt ) aprfnt = Font.GetFont("TewiFontOutline"); if ( !aprfnt ) aprfnt = Font.GetFont('TewiFontOutline');
Screen.DrawText(aprfnt,Font.CR_WHITE,(Screen.GetWidth()-aprfnt.StringWidth(str)*CleanXFac_1)/2,2*CleanYFac_1,str,DTA_CleanNoMove_1,true); Screen.DrawText(aprfnt,Font.CR_WHITE,(Screen.GetWidth()-aprfnt.StringWidth(str)*CleanXFac_1)/2,2*CleanYFac_1,str,DTA_CleanNoMove_1,true);
} }
} }
@ -267,7 +267,7 @@ Class SWWMStaticHandler : StaticEventHandler
if ( e.Name ~== "swwmmaptitle" ) if ( e.Name ~== "swwmmaptitle" )
{ {
if ( (gamestate != GS_LEVEL) || !swwm_showmaptitle ) return; if ( (gamestate != GS_LEVEL) || !swwm_showmaptitle ) return;
StatusBar.AttachMessage(new("DSMapTitle").Init(),-7777); StatusBar.AttachMessage(new('DSMapTitle').Init(),-7777);
} }
else if ( e.Name ~== "swwmflushhud" ) else if ( e.Name ~== "swwmflushhud" )
{ {
@ -367,7 +367,7 @@ Class SWWMStaticHandler : StaticEventHandler
} }
else if ( e.Name ~== "swwmgetversion" ) else if ( e.Name ~== "swwmgetversion" )
{ {
let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC);
let svd = SWWMSaveVerData(ti.Next()); let svd = SWWMSaveVerData(ti.Next());
if ( svd ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cj%s\c-",svd.ver); if ( svd ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cj%s\c-",svd.ver);
else Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cg(no version data)\c-"); else Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cg(no version data)\c-");
@ -398,7 +398,7 @@ Class SWWMStaticHandler : StaticEventHandler
stink.Resize(sdefs.Size()); stink.Resize(sdefs.Size());
for ( int i=Thinker.STAT_INFO; i<Thinker.MAX_STATNUM; i++ ) for ( int i=Thinker.STAT_INFO; i<Thinker.MAX_STATNUM; i++ )
{ {
let ti = ThinkerIterator.Create("Thinker",i); let ti = ThinkerIterator.Create('Thinker',i);
foreach ( t:ti ) foreach ( t:ti )
{ {
if ( t is 'Actor' ) continue; if ( t is 'Actor' ) continue;
@ -675,7 +675,7 @@ Class SWWMStaticHandler : StaticEventHandler
if ( e.IsManual ) return; if ( e.IsManual ) return;
if ( e.Name.Left(16) ~== "swwmachievement." ) if ( e.Name.Left(16) ~== "swwmachievement." )
{ {
let c = Actor.Spawn("PartyTime",players[e.Args[0]].mo.pos); let c = Actor.Spawn('PartyTime',players[e.Args[0]].mo.pos);
c.bSTANDSTILL = true; c.bSTANDSTILL = true;
if ( e.Args[0] == consoleplayer ) if ( e.Args[0] == consoleplayer )
{ {
@ -691,7 +691,7 @@ Class SWWMStaticHandler : StaticEventHandler
} }
else if ( e.Name ~== "swwmsessionid" ) else if ( e.Name ~== "swwmsessionid" )
{ {
let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC);
let svd = SWWMSaveVerData(ti.Next()); let svd = SWWMSaveVerData(ti.Next());
if ( !uid ) uid = e.Args[0]; if ( !uid ) uid = e.Args[0];
if ( svd && !svd.uid ) svd.uid = e.Args[0]; if ( svd && !svd.uid ) svd.uid = e.Args[0];
@ -714,7 +714,7 @@ Class SWWMStaticHandler : StaticEventHandler
String cver = StringTable.Localize("$SWWM_SHORTVER"); String cver = StringTable.Localize("$SWWM_SHORTVER");
if ( tainted ) if ( tainted )
{ {
let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC);
let svd = SWWMSaveVerData(ti.Next()); let svd = SWWMSaveVerData(ti.Next());
if ( !svd ) Console.Printf("\cgWARNING:\n \cjSave contains no version data. Issues may happen.\c-"); if ( !svd ) Console.Printf("\cgWARNING:\n \cjSave contains no version data. Issues may happen.\c-");
else else
@ -742,7 +742,7 @@ Class SWWMStaticHandler : StaticEventHandler
msgpick = Random[UIStuff](1,8); msgpick = Random[UIStuff](1,8);
String str = StringTable.Localize("$CRASHMSG"..msgpick.."A"); String str = StringTable.Localize("$CRASHMSG"..msgpick.."A");
Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cf%s\c-",str); Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cf%s\c-",str);
let hnd = SWWMBrutalHandler(StaticEventHandler.Find("SWWMBrutalHandler")); let hnd = SWWMBrutalHandler(StaticEventHandler.Find('SWWMBrutalHandler'));
if ( hnd && hnd.detected ) if ( hnd && hnd.detected )
{ {
S_StartSound("crash/glass",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE); S_StartSound("crash/glass",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);

View file

@ -59,7 +59,7 @@ extend Class SWWMStaticHandler
{ {
achievementstate.Insert(a.basename,"2"); achievementstate.Insert(a.basename,"2");
EventHandler.SendNetworkEvent("swwmachievement."..a.basename,consoleplayer); EventHandler.SendNetworkEvent("swwmachievement."..a.basename,consoleplayer);
let notif = new("SWWMAchievementNotification").Init(a.basename,a.icon,a.hasformat?a.maxval:0); let notif = new('SWWMAchievementNotification').Init(a.basename,a.icon,a.hasformat?a.maxval:0);
StatusBar.AttachMessage(notif,-3478); StatusBar.AttachMessage(notif,-3478);
lastachievementnotify = gametic+200; lastachievementnotify = gametic+200;
} }
@ -97,7 +97,7 @@ extend Class SWWMStaticHandler
{ {
achievementstate.Insert("everything","2"); achievementstate.Insert("everything","2");
EventHandler.SendNetworkEvent("swwmachievement."..achievementinfo[ev].basename,consoleplayer); EventHandler.SendNetworkEvent("swwmachievement."..achievementinfo[ev].basename,consoleplayer);
let notif = new("SWWMAchievementNotification").Init(achievementinfo[ev].basename,achievementinfo[ev].icon); let notif = new('SWWMAchievementNotification').Init(achievementinfo[ev].basename,achievementinfo[ev].icon);
StatusBar.AttachMessage(notif,-3478); StatusBar.AttachMessage(notif,-3478);
lastachievementnotify = gametic+200; lastachievementnotify = gametic+200;
} }
@ -131,7 +131,7 @@ extend Class SWWMStaticHandler
else if ( !(gameinfo.gametype&GAME_HEXEN) && (ln[3] ~== "hexen") ) continue; else if ( !(gameinfo.gametype&GAME_HEXEN) && (ln[3] ~== "hexen") ) continue;
else if ( !(gameinfo.gametype&GAME_RAVEN) && (ln[3] ~== "raven") ) continue; else if ( !(gameinfo.gametype&GAME_RAVEN) && (ln[3] ~== "raven") ) continue;
else if ( !(gameinfo.gametype&(GAME_DOOM|GAME_HERETIC)) && (ln[3] ~== "nothexen") ) continue; else if ( !(gameinfo.gametype&(GAME_DOOM|GAME_HERETIC)) && (ln[3] ~== "nothexen") ) continue;
let ac = new("SWWMAchievementInfo"); let ac = new('SWWMAchievementInfo');
ac.baseindex = bidx; ac.baseindex = bidx;
ac.basename = ln[0]; ac.basename = ln[0];
ac.icon = TexMan.CheckForTexture("graphics/Achievements/Achievement"..ac.basename..".png"); ac.icon = TexMan.CheckForTexture("graphics/Achievements/Achievement"..ac.basename..".png");

View file

@ -226,7 +226,7 @@ Class SWWMStatusBar : BaseStatusBar
override void Tick() override void Tick()
{ {
Super.Tick(); Super.Tick();
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
pausetime = gametic; pausetime = gametic;
SWWMUtility.PrepareProjData(projdata,ViewPos,ViewRot.x,ViewRot.y,ViewRot.z,players[consoleplayer].fov); SWWMUtility.PrepareProjData(projdata,ViewPos,ViewRot.x,ViewRot.y,ViewRot.z,players[consoleplayer].fov);
// interpolators first // interpolators first
@ -326,53 +326,53 @@ Class SWWMStatusBar : BaseStatusBar
mTinyFont = Font.GetFont('MiniwiFont'); mTinyFont = Font.GetFont('MiniwiFont');
mTinyFontOutline = Font.GetFont('MiniwiFontOutline'); mTinyFontOutline = Font.GetFont('MiniwiFontOutline');
mTinyFontOutlineAlt = Font.GetFont('MiniwiFontOutlineAlt'); mTinyFontOutlineAlt = Font.GetFont('MiniwiFontOutlineAlt');
MiniHudFont = Font.GetFont("MiniHUDShadow"); MiniHudFont = Font.GetFont('MiniHUDShadow');
MiniHudFontOutline = Font.GetFont("MiniHUDOutline"); MiniHudFontOutline = Font.GetFont('MiniHUDOutline');
mhudfontcol[MCR_DEMOHUD] = Font.FindFontColor("MiniDemoHUD"); mhudfontcol[MCR_DEMOHUD] = Font.FindFontColor('MiniDemoHUD');
mhudfontcol[MCR_IBUKIHUD] = Font.FindFontColor("MiniIbukiHUD"); mhudfontcol[MCR_IBUKIHUD] = Font.FindFontColor('MiniIbukiHUD');
mhudfontcol[MCR_SAYAHUD] = Font.FindFontColor("MiniSayaHUD"); mhudfontcol[MCR_SAYAHUD] = Font.FindFontColor('MiniSayaHUD');
mhudfontcol[MCR_KIRINHUD] = Font.FindFontColor("MiniKirinHUD"); mhudfontcol[MCR_KIRINHUD] = Font.FindFontColor('MiniKirinHUD');
mhudfontcol[MCR_MARISAHUD] = Font.FindFontColor("MiniMarisaHUD"); mhudfontcol[MCR_MARISAHUD] = Font.FindFontColor('MiniMarisaHUD');
mhudfontcol[MCR_VOIDHUD] = Font.FindFontColor("MiniVoidHUD"); mhudfontcol[MCR_VOIDHUD] = Font.FindFontColor('MiniVoidHUD');
mhudfontcol[MCR_WHITE] = Font.FindFontColor("MiniWhite"); mhudfontcol[MCR_WHITE] = Font.FindFontColor('MiniWhite');
mhudfontcol[MCR_RED] = Font.FindFontColor("MiniRed"); mhudfontcol[MCR_RED] = Font.FindFontColor('MiniRed');
mhudfontcol[MCR_GREEN] = Font.FindFontColor("MiniGreen"); mhudfontcol[MCR_GREEN] = Font.FindFontColor('MiniGreen');
mhudfontcol[MCR_BLUE] = Font.FindFontColor("MiniBlue"); mhudfontcol[MCR_BLUE] = Font.FindFontColor('MiniBlue');
mhudfontcol[MCR_YELLOW] = Font.FindFontColor("MiniYellow"); mhudfontcol[MCR_YELLOW] = Font.FindFontColor('MiniYellow');
mhudfontcol[MCR_CYAN] = Font.FindFontColor("MiniCyan"); mhudfontcol[MCR_CYAN] = Font.FindFontColor('MiniCyan');
mhudfontcol[MCR_PURPLE] = Font.FindFontColor("MiniPurple"); mhudfontcol[MCR_PURPLE] = Font.FindFontColor('MiniPurple');
mhudfontcol[MCR_BRASS] = Font.FindFontColor("MiniBrass"); mhudfontcol[MCR_BRASS] = Font.FindFontColor('MiniBrass');
mhudfontcol[MCR_SILVER] = Font.FindFontColor("MiniSilver"); mhudfontcol[MCR_SILVER] = Font.FindFontColor('MiniSilver');
mhudfontcol[MCR_GOLD] = Font.FindFontColor("MiniGold"); mhudfontcol[MCR_GOLD] = Font.FindFontColor('MiniGold');
mhudfontcol[MCR_MANA] = Font.FindFontColor("MiniMana"); mhudfontcol[MCR_MANA] = Font.FindFontColor('MiniMana');
mhudfontcol[MCR_CRIMSON] = Font.FindFontColor("MiniCrimson"); mhudfontcol[MCR_CRIMSON] = Font.FindFontColor('MiniCrimson');
mhudfontcol[MCR_ELDRITCH] = Font.FindFontColor("MiniEldritch"); mhudfontcol[MCR_ELDRITCH] = Font.FindFontColor('MiniEldritch');
mhudfontcol[MCR_KINYLUM] = Font.FindFontColor("MiniKinylum"); mhudfontcol[MCR_KINYLUM] = Font.FindFontColor('MiniKinylum');
mhudfontcol[MCR_SYDON] = Font.FindFontColor("MiniSydon"); mhudfontcol[MCR_SYDON] = Font.FindFontColor('MiniSydon');
mhudfontcol[MCR_NOKOROKINYLUM] = Font.FindFontColor("MiniNokorokinylum"); mhudfontcol[MCR_NOKOROKINYLUM] = Font.FindFontColor('MiniNokorokinylum');
mhudfontcol[MCR_DEMOBLUE] = Font.FindFontColor("MiniDemoBlue"); mhudfontcol[MCR_DEMOBLUE] = Font.FindFontColor('MiniDemoBlue');
mhudfontcol[MCR_DEMOPINK] = Font.FindFontColor("MiniDemoPink"); mhudfontcol[MCR_DEMOPINK] = Font.FindFontColor('MiniDemoPink');
mhudfontcol[MCR_ORANGE] = Font.FindFontColor("MiniOrange"); mhudfontcol[MCR_ORANGE] = Font.FindFontColor('MiniOrange');
mhudfontcol[MCR_GRASS] = Font.FindFontColor("MiniGrass"); mhudfontcol[MCR_GRASS] = Font.FindFontColor('MiniGrass');
mhudfontcol[MCR_MINT] = Font.FindFontColor("MiniMint"); mhudfontcol[MCR_MINT] = Font.FindFontColor('MiniMint');
mhudfontcol[MCR_AQUA] = Font.FindFontColor("MiniAqua"); mhudfontcol[MCR_AQUA] = Font.FindFontColor('MiniAqua');
mhudfontcol[MCR_MAGENTA] = Font.FindFontColor("MiniMagenta"); mhudfontcol[MCR_MAGENTA] = Font.FindFontColor('MiniMagenta');
mhudfontcol[MCR_PINK] = Font.FindFontColor("MiniPink"); mhudfontcol[MCR_PINK] = Font.FindFontColor('MiniPink');
mhudfontcol[MCR_SKIN] = Font.FindFontColor("MiniSkin"); mhudfontcol[MCR_SKIN] = Font.FindFontColor('MiniSkin');
mhudfontcol[MCR_FIRE] = Font.FindFontColor("MiniFire"); mhudfontcol[MCR_FIRE] = Font.FindFontColor('MiniFire');
mhudfontcol[MCR_SULFUR] = Font.FindFontColor("MiniSulfur"); mhudfontcol[MCR_SULFUR] = Font.FindFontColor('MiniSulfur');
mhudfontcol[MCR_WITCH] = Font.FindFontColor("MiniWitch"); mhudfontcol[MCR_WITCH] = Font.FindFontColor('MiniWitch');
mhudfontcol[MCR_CYANBLU] = Font.FindFontColor("MiniCyanblu"); mhudfontcol[MCR_CYANBLU] = Font.FindFontColor('MiniCyanblu');
mhudfontcol[MCR_ICE] = Font.FindFontColor("MiniIce"); mhudfontcol[MCR_ICE] = Font.FindFontColor('MiniIce');
mhudfontcol[MCR_PURPUR] = Font.FindFontColor("MiniPurpur"); mhudfontcol[MCR_PURPUR] = Font.FindFontColor('MiniPurpur');
mhudfontcol[MCR_TOMATO] = Font.FindFontColor("MiniTomato"); mhudfontcol[MCR_TOMATO] = Font.FindFontColor('MiniTomato');
mhudfontcol[MCR_BLURP] = Font.FindFontColor("MiniBlurp"); mhudfontcol[MCR_BLURP] = Font.FindFontColor('MiniBlurp');
mhudfontcol[MCR_PURB] = Font.FindFontColor("MiniPurb"); mhudfontcol[MCR_PURB] = Font.FindFontColor('MiniPurb');
mhudfontcol[MCR_NOKRON] = Font.FindFontColor("MiniNokron"); mhudfontcol[MCR_NOKRON] = Font.FindFontColor('MiniNokron');
mhudfontcol[MCR_KABBADON] = Font.FindFontColor("MiniKabbadon"); mhudfontcol[MCR_KABBADON] = Font.FindFontColor('MiniKabbadon');
mhudfontcol[MCR_FLASH] = Font.FindFontColor("MiniFlash"); mhudfontcol[MCR_FLASH] = Font.FindFontColor('MiniFlash');
mhudfontcol[MCR_REDFLASH] = Font.FindFontColor("MiniRedFlash"); mhudfontcol[MCR_REDFLASH] = Font.FindFontColor('MiniRedFlash');
mhudfontcol[MCR_WHITEFLASH] = Font.FindFontColor("MiniWhiteFlash"); mhudfontcol[MCR_WHITEFLASH] = Font.FindFontColor('MiniWhiteFlash');
GetMinimapColors(); GetMinimapColors();
tclabel = mhudfontcol[MCR_CYANBLU]; tclabel = mhudfontcol[MCR_CYANBLU];
tcvalue = mhudfontcol[MCR_WHITE]; tcvalue = mhudfontcol[MCR_WHITE];
@ -433,7 +433,7 @@ Class SWWMStatusBar : BaseStatusBar
AmmoOldMaxAmounts[i] = int.min; AmmoOldMaxAmounts[i] = int.min;
} }
ScoreInter = DynamicValueInterpolator.Create(0,.1,1,999999999); ScoreInter = DynamicValueInterpolator.Create(0,.1,1,999999999);
hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
PrevFrame = MSTimeF(); PrevFrame = MSTimeF();
} }
@ -450,7 +450,7 @@ Class SWWMStatusBar : BaseStatusBar
chatopen = gametic+1; // have to add 1 because DrawChat is called after everything else chatopen = gametic+1; // have to add 1 because DrawChat is called after everything else
double xx = 2; double xx = 2;
double yy = ss0.y-14; double yy = ss0.y-14;
Screen.Dim("Black",.8,0,Screen.GetHeight()-int(15*hs0),Screen.GetWidth(),int(15*hs0)); Screen.Dim(0xFF000000,.8,0,Screen.GetHeight()-int(15*hs0),Screen.GetWidth(),int(15*hs0));
String pname = players[consoleplayer].GetUserName(); String pname = players[consoleplayer].GetUserName();
// strip colors // strip colors
SWWMUtility.StripColor(pname); SWWMUtility.StripColor(pname);
@ -483,9 +483,9 @@ Class SWWMStatusBar : BaseStatusBar
Vector2 tsize = TexMan.GetScaledSize(bgtex); Vector2 tsize = TexMan.GetScaledSize(bgtex);
double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y)); double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y));
Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.5); Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000,DTA_Alpha,.5);
} }
else Screen.Dim("Black",.5,0,0,Screen.GetWidth(),Screen.GetHeight()); else Screen.Dim(0xFF000000,.5,0,0,Screen.GetWidth(),Screen.GetHeight());
String str = StringTable.Localize("$SWWM_PAUSE"); String str = StringTable.Localize("$SWWM_PAUSE");
if ( gametic < pausetime+1000 ) if ( gametic < pausetime+1000 )
{ {
@ -553,10 +553,10 @@ Class SWWMStatusBar : BaseStatusBar
if ( goner || (deadtimer > 0) ) if ( goner || (deadtimer > 0) )
{ {
double dimalph = goner?1.:min(deadtimer/80.,.8); double dimalph = goner?1.:min(deadtimer/80.,.8);
Screen.Dim("Black",dimalph,0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFF000000,dimalph,0,0,Screen.GetWidth(),Screen.GetHeight());
if ( demo && (demo.revivefail > level.maptime) ) if ( demo && (demo.revivefail > level.maptime) )
{ {
Screen.Dim("Red",clamp((demo.revivefail-(level.maptime+fractic))/60.,0.,.2),0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFFFF0000,clamp((demo.revivefail-(level.maptime+fractic))/60.,0.,.2),0,0,Screen.GetWidth(),Screen.GetHeight());
str = StringTable.Localize("$SWWM_REFAIL"); str = StringTable.Localize("$SWWM_REFAIL");
len = mSmallFont.StringWidth(str); len = mSmallFont.StringWidth(str);
xx = int((ss0.x-len)/2.); xx = int((ss0.x-len)/2.);
@ -630,7 +630,7 @@ Class SWWMStatusBar : BaseStatusBar
} }
Super.Draw(state,TicFrac); Super.Draw(state,TicFrac);
FrameTime = (CurFrame-PrevFrame)/1000.; FrameTime = (CurFrame-PrevFrame)/1000.;
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
hsA = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.); hsA = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.);
hsT = max(min(floor(Screen.GetWidth()/480.),floor(Screen.GetHeight()/270.)),1.); hsT = max(min(floor(Screen.GetWidth()/480.),floor(Screen.GetHeight()/270.)),1.);
ymargin = clamp(swwm_hudmargin,0,10); ymargin = clamp(swwm_hudmargin,0,10);

View file

@ -244,7 +244,7 @@ extend Class SWWMStatusBar
if ( (rprintlevel < PRINT_LOW) || (rprintlevel > PRINT_TEAMCHAT) ) rprintlevel = PRINT_HIGH; if ( (rprintlevel < PRINT_LOW) || (rprintlevel > PRINT_TEAMCHAT) ) rprintlevel = PRINT_HIGH;
// strip trailing newline (all Printf type messages have this) // strip trailing newline (all Printf type messages have this)
outline.DeleteLastCharacter(); outline.DeleteLastCharacter();
let m = new("MsgLine"); let m = new('MsgLine');
m.str = outline; m.str = outline;
m.type = rprintlevel; m.type = rprintlevel;
m.tic = level.totaltime; m.tic = level.totaltime;
@ -322,7 +322,7 @@ extend Class SWWMStatusBar
yy = ss0.y-(ymargin0+50); yy = ss0.y-(ymargin0+50);
int len = mSmallFont.StringWidth(ntagstr); int len = mSmallFont.StringWidth(ntagstr);
double xx = (ss0.x-len)/2.; double xx = (ss0.x-len)/2.;
Screen.Dim("Black",.8*nalph,int((xx-6)*hs0),int(yy*hs0),int((len+12)*hs0),int((h+4)*hs0)); Screen.Dim(0xFF000000,.8*nalph,int((xx-6)*hs0),int(yy*hs0),int((len+12)*hs0),int((h+4)*hs0));
Screen.DrawText(mSmallFont,ntagcol,int(xx),yy+2,ntagstr,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true,DTA_Alpha,nalph); Screen.DrawText(mSmallFont,ntagcol,int(xx),yy+2,ntagstr,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true,DTA_Alpha,nalph);
} }
if ( PickupQueue.Size() <= 0 ) return; if ( PickupQueue.Size() <= 0 ) return;
@ -344,7 +344,7 @@ extend Class SWWMStatusBar
if ( len > maxlen ) maxlen = len; if ( len > maxlen ) maxlen = len;
} }
double xx = (ss0.x-maxlen)/2.; double xx = (ss0.x-maxlen)/2.;
Screen.Dim("Black",.8*alph,int((xx-6)*hs0),int((yy-h*(l.Count()-1))*hs0),int((maxlen+12)*hs0),int((h*l.Count()+4)*hs0)); Screen.Dim(0xFF000000,.8*alph,int((xx-6)*hs0),int((yy-h*(l.Count()-1))*hs0),int((maxlen+12)*hs0),int((h*l.Count()+4)*hs0));
for ( int j=l.Count()-1; j>=0; j-- ) for ( int j=l.Count()-1; j>=0; j-- )
{ {
int len = mSmallFont.StringWidth(l.StringAt(j)); int len = mSmallFont.StringWidth(l.StringAt(j));
@ -378,7 +378,7 @@ extend Class SWWMStatusBar
xx = int((ss0.x*ssp-maxlen)/2.); xx = int((ss0.x*ssp-maxlen)/2.);
yy = int(ss0.y*ssp*.375); yy = int(ss0.y*ssp*.375);
yy -= (h*midl.Count()+4)/2; // center yy -= (h*midl.Count()+4)/2; // center
Screen.Dim("Black",.8*alph,int((xx-6)*hs0*hsp),int(yy*hs0*hsp),int((maxlen+12)*hs0*hsp),int((h*midl.Count()+4)*hs0*hsp)); Screen.Dim(0xFF000000,.8*alph,int((xx-6)*hs0*hsp),int(yy*hs0*hsp),int((maxlen+12)*hs0*hsp),int((h*midl.Count()+4)*hs0*hsp));
for ( int i=0; i<midl.Count(); i++ ) for ( int i=0; i<midl.Count(); i++ )
{ {
int len = mSmallFont.StringWidth(midl.StringAt(i)); int len = mSmallFont.StringWidth(midl.StringAt(i));

View file

@ -82,7 +82,7 @@ extend Class SWWMStatusBar
let facetimer = demo.facetimer; let facetimer = demo.facetimer;
let blinktime = demo.blinktime; let blinktime = demo.blinktime;
if ( CPlayer.Health <= 0 ) return 11; if ( CPlayer.Health <= 0 ) return 11;
if ( (isInvulnerable() || demo.FindInventory("InvinciballPower")) && (facestate >= FS_PAIN) ) return 12; if ( (isInvulnerable() || demo.FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 12;
if ( facestate == FS_OUCH ) return 10; if ( facestate == FS_OUCH ) return 10;
if ( facestate == FS_PAIN ) return (paindir==1)?8:(paindir==-1)?9:7; if ( facestate == FS_PAIN ) return (paindir==1)?8:(paindir==-1)?9:7;
if ( facestate == FS_GRIN ) return 5; if ( facestate == FS_GRIN ) return 5;
@ -111,18 +111,18 @@ extend Class SWWMStatusBar
double paintime = clamp((demo.lastdamagetimer-(gametic+Fractic))/double(GameTicRate),0.,1.); double paintime = clamp((demo.lastdamagetimer-(gametic+Fractic))/double(GameTicRate),0.,1.);
double noiz = min(demo.lastdamage*.5*paintime,3.); double noiz = min(demo.lastdamage*.5*paintime,3.);
Vector2 shake = (RandomShiver(),RandomShiver())*noiz; Vector2 shake = (RandomShiver(),RandomShiver())*noiz;
if ( !CPlayer.mo.FindInventory("GhostPower") ) if ( !CPlayer.mo.FindInventory('GhostPower') )
{ {
int facecol = CVar.GetCVar('swwm_tagcolor',CPlayer).GetInt(); int facecol = CVar.GetCVar('swwm_tagcolor',CPlayer).GetInt();
if ( (facecol < 0) || (facecol > 15) ) facecol = 0; if ( (facecol < 0) || (facecol > 15) ) facecol = 0;
Screen.DrawTexture(FaceTex[0],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,32,DTA_SrcHeight,32,DTA_DestWidth,32,DTA_DestHeight,32,DTA_SrcX,32*(facecol%4),DTA_SrcY,32*(facecol/4)); Screen.DrawTexture(FaceTex[0],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,32,DTA_SrcHeight,32,DTA_DestWidth,32,DTA_DestHeight,32,DTA_SrcX,32*(facecol%4),DTA_SrcY,32*(facecol/4));
bool raging = CPlayer.mo.FindInventory("RagekitPower"); bool raging = CPlayer.mo.FindInventory('RagekitPower');
bool angy = CPlayer.mo.FindInventory("AngeryPower"); bool angy = CPlayer.mo.FindInventory('AngeryPower');
if ( raging && angy ) Screen.DrawTexture(FaceTex[16],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); if ( raging && angy ) Screen.DrawTexture(FaceTex[16],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
else if ( raging ) Screen.DrawTexture(FaceTex[15],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); else if ( raging ) Screen.DrawTexture(FaceTex[15],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
else if ( angy ) Screen.DrawTexture(FaceTex[13],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); else if ( angy ) Screen.DrawTexture(FaceTex[13],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Color,Color(255,255,0,0),DTA_Alpha,min(1.,noiz)); Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Color,Color(255,255,0,0),DTA_Alpha,min(1.,noiz));
if ( (CPlayer.Health > 0) && (isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower")) ) if ( (CPlayer.Health > 0) && (isInvulnerable() || CPlayer.mo.FindInventory('InvinciballPower')) )
Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.8+.1*sin(gametic+fractic)); Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.8+.1*sin(gametic+fractic));
} }
else else
@ -131,7 +131,7 @@ extend Class SWWMStatusBar
Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_FillColor,Color(255,0,0),DTA_Alpha,.25*min(1.,noiz)); Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_FillColor,Color(255,0,0),DTA_Alpha,.25*min(1.,noiz));
} }
Screen.DrawTexture(FaceTex[GetFaceTex(demo)],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawTexture(FaceTex[GetFaceTex(demo)],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( CPlayer.mo.FindInventory("BarrierPower") ) Screen.DrawTexture(FaceTex[14],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.5,DTA_LegacyRenderStyle,STYLE_Add); if ( CPlayer.mo.FindInventory('BarrierPower') ) Screen.DrawTexture(FaceTex[14],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.5,DTA_LegacyRenderStyle,STYLE_Add);
} }
private void DrawStatus() private void DrawStatus()
@ -149,7 +149,7 @@ extend Class SWWMStatusBar
if ( round(ht) > 500 ) hcolor = MCR_GOLD; if ( round(ht) > 500 ) hcolor = MCR_GOLD;
else if ( round(ht) > 200 ) hcolor = MCR_PURPLE; else if ( round(ht) > 200 ) hcolor = MCR_PURPLE;
else if ( round(ht) > 100 ) hcolor = MCR_AQUA; else if ( round(ht) > 100 ) hcolor = MCR_AQUA;
if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") ) if ( isInvulnerable() || CPlayer.mo.FindInventory('InvinciballPower') )
{ {
Screen.DrawTexture(HealthTex[0],false,xmargin+3+ox,ss.y-(ymargin+19+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0)); Screen.DrawTexture(HealthTex[0],false,xmargin+3+ox,ss.y-(ymargin+19+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0));
Screen.DrawTexture(HealthTex[4],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); Screen.DrawTexture(HealthTex[4],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
@ -175,7 +175,7 @@ extend Class SWWMStatusBar
Screen.DrawTexture(HealthTex[3],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); Screen.DrawTexture(HealthTex[3],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
} }
} }
if ( CPlayer.mo.FindInventory("DivineSpriteEffect") ) if ( CPlayer.mo.FindInventory('DivineSpriteEffect') )
{ {
double falph = clamp((ht-1000)/6000.,0.,1.); double falph = clamp((ht-1000)/6000.,0.,1.);
Screen.DrawTexture(HealthTex[5],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add); Screen.DrawTexture(HealthTex[5],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add);

View file

@ -118,8 +118,8 @@ extend Class SWWMStatusBar
{ {
for ( Inventory i=a.inv; i; i=i.inv ) for ( Inventory i=a.inv; i; i=i.inv )
{ {
if ( (i.GetClassName() == "LDLegendaryMonsterToken") && swwm_ldspoil ) return true; if ( (i.GetClassName() == 'LDLegendaryMonsterToken') && swwm_ldspoil ) return true;
else if ( i.GetClassName() == "LDLegendaryMonsterTransformed" ) return true; else if ( i.GetClassName() == 'LDLegendaryMonsterTransformed' ) return true;
} }
return false; return false;
} }
@ -127,7 +127,7 @@ extend Class SWWMStatusBar
private void DrawTrackers( Vector3 viewvec, bool &projinit ) private void DrawTrackers( Vector3 viewvec, bool &projinit )
{ {
let cam = players[consoleplayer].camera; let cam = players[consoleplayer].camera;
if ( !cti ) cti = ThinkerIterator.Create("SWWMQuickCombatTracker",Thinker.STAT_INVENTORY); if ( !cti ) cti = ThinkerIterator.Create('SWWMQuickCombatTracker',Thinker.STAT_INVENTORY);
else cti.Reinit(); else cti.Reinit();
SWWMQuickCombatTracker ct; SWWMQuickCombatTracker ct;
bool onlymonsters = (swwm_targeter >= 2); bool onlymonsters = (swwm_targeter >= 2);
@ -197,7 +197,7 @@ extend Class SWWMStatusBar
if ( StringTable.Localize("$SWWM_LEGPREFIX") == "R" ) tag = tag..StringTable.Localize("$SWWM_LEG"); if ( StringTable.Localize("$SWWM_LEGPREFIX") == "R" ) tag = tag..StringTable.Localize("$SWWM_LEG");
else tag = StringTable.Localize("$SWWM_LEG")..tag; else tag = StringTable.Localize("$SWWM_LEG")..tag;
} }
if ( ct.Owner.bBOSS || ct.Owner.FindInventory("BossMarker") ) if ( ct.Owner.bBOSS || ct.Owner.FindInventory('BossMarker') )
{ {
if ( swwm_bigtags ) tag = "\cx★\c- "..tag.." \cx★\c-"; if ( swwm_bigtags ) tag = "\cx★\c- "..tag.." \cx★\c-";
else tag = "\cx*\c- "..tag.." \cx*\c-"; // miniwi has no stars else tag = "\cx*\c- "..tag.." \cx*\c-"; // miniwi has no stars
@ -262,9 +262,9 @@ extend Class SWWMStatusBar
String val = String.Format("%d",clamp(ct.lasthealth,0,999)); String val = String.Format("%d",clamp(ct.lasthealth,0,999));
int valw = MiniHUDFontOutline.StringWidth(val); int valw = MiniHUDFontOutline.StringWidth(val);
int col = (ct.lasthealth>500)?mhudfontcol[MCR_GOLD]:(ct.lasthealth>200)?mhudfontcol[MCR_PURPLE]:(ct.lasthealth>100)?mhudfontcol[MCR_AQUA]:mhudfontcol[MCR_RED]; int col = (ct.lasthealth>500)?mhudfontcol[MCR_GOLD]:(ct.lasthealth>200)?mhudfontcol[MCR_PURPLE]:(ct.lasthealth>100)?mhudfontcol[MCR_AQUA]:mhudfontcol[MCR_RED];
if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory("InvinciballPower") ) if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory('InvinciballPower') )
col = mhudfontcol[MCR_WHITE]; col = mhudfontcol[MCR_WHITE];
if ( ct.Owner.FindInventory("DivineSpriteEffect") ) if ( ct.Owner.FindInventory('DivineSpriteEffect') )
{ {
double falph = clamp((ct.intp.GetValue(fractic)-1000)/6000.,0.,1.); double falph = clamp((ct.intp.GetValue(fractic)-1000)/6000.,0.,1.);
String tst; String tst;
@ -295,7 +295,7 @@ extend Class SWWMStatusBar
double ht = clamp(ct.intp.GetValue(fractic),0,10000); double ht = clamp(ct.intp.GetValue(fractic),0,10000);
double hw = (ht*50.)/100.; double hw = (ht*50.)/100.;
double ohw = hw; double ohw = hw;
if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory("InvinciballPower") ) if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory('InvinciballPower') )
Screen.DrawTexture(EnemyHTex[1],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); Screen.DrawTexture(EnemyHTex[1],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw);
else else
{ {
@ -316,7 +316,7 @@ extend Class SWWMStatusBar
Screen.DrawTexture(EnemyHTex[5],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); Screen.DrawTexture(EnemyHTex[5],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw);
} }
} }
if ( ct.Owner.FindInventory("DivineSpriteEffect") ) if ( ct.Owner.FindInventory('DivineSpriteEffect') )
{ {
double falph = clamp((ht-1000)/6000.,0.,1.); double falph = clamp((ht-1000)/6000.,0.,1.);
Screen.DrawTexture(EnemyHTex[6],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph,DTA_LegacyRenderStyle,STYLE_Add); Screen.DrawTexture(EnemyHTex[6],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph,DTA_LegacyRenderStyle,STYLE_Add);

View file

@ -481,7 +481,7 @@ extend Class SWWMStatusBar
int hsz = smol?HALFMAPSIZE_SMALL:HALFMAPSIZE; int hsz = smol?HALFMAPSIZE_SMALL:HALFMAPSIZE;
Vector2 cpos = SWWMUtility.LerpVector2(players[consoleplayer].Camera.prev.xy,players[consoleplayer].Camera.pos.xy,FracTic); Vector2 cpos = SWWMUtility.LerpVector2(players[consoleplayer].Camera.prev.xy,players[consoleplayer].Camera.pos.xy,FracTic);
Sector csec = players[consoleplayer].Camera.CurSector; Sector csec = players[consoleplayer].Camera.CurSector;
if ( !mi ) mi = ThinkerIterator.Create("MapMarker",Thinker.STAT_MAPMARKER); if ( !mi ) mi = ThinkerIterator.Create('MapMarker',Thinker.STAT_MAPMARKER);
else mi.Reinit(); else mi.Reinit();
MapMarker m; MapMarker m;
while ( m = MapMarker(mi.Next()) ) while ( m = MapMarker(mi.Next()) )

View file

@ -13,7 +13,7 @@ Class PayRespects : HUDMessageBase
static PayRespects PressF() static PayRespects PressF()
{ {
let f = new("PayRespects"); let f = new('PayRespects');
f.basepos = (FRandom[FInTheChat](0.,1.),FRandom[FInTheChat](1.02,1.05)); f.basepos = (FRandom[FInTheChat](0.,1.),FRandom[FInTheChat](1.02,1.05));
f.scale = FRandom[FInTheChat](.5,2.); f.scale = FRandom[FInTheChat](.5,2.);
f.lifespan = f.initialspan = Random[FInTheChat](20,80); f.lifespan = f.initialspan = Random[FInTheChat](20,80);
@ -64,7 +64,7 @@ Class SWWMOneLiner : HUDMessageBase
static SWWMOneLiner Make( String whichline, int lifespan ) static SWWMOneLiner Make( String whichline, int lifespan )
{ {
let l = new("SWWMOneLiner"); let l = new('SWWMOneLiner');
if ( StringTable.Localize(whichline) == "" ) l.whichline = ""; if ( StringTable.Localize(whichline) == "" ) l.whichline = "";
else l.whichline = StringTable.Localize("$SWWM_LQUOTE")..StringTable.Localize(whichline)..StringTable.Localize("$SWWM_RQUOTE"); else l.whichline = StringTable.Localize("$SWWM_LQUOTE")..StringTable.Localize(whichline)..StringTable.Localize("$SWWM_RQUOTE");
l.curtime = l.lifespan = lifespan; l.curtime = l.lifespan = lifespan;
@ -117,7 +117,7 @@ Class SWWMOneLiner : HUDMessageBase
double fcurtime = curtime-fractic; double fcurtime = curtime-fractic;
double alph = clamp((fcurtime/20.)+1.,0.,1.); double alph = clamp((fcurtime/20.)+1.,0.,1.);
alph *= clamp((lifespan-fcurtime)/10.,0.,1.); alph *= clamp((lifespan-fcurtime)/10.,0.,1.);
Screen.Dim("Black",alph*.8,int((Screen.GetWidth()-(maxlen+12)*hs)/2.),int(bottom-(ymargin+2+fh)*hs),int((maxlen+12)*hs),int((fh+4)*hs)); Screen.Dim(0xFF000000,alph*.8,int((Screen.GetWidth()-(maxlen+12)*hs)/2.),int(bottom-(ymargin+2+fh)*hs),int((maxlen+12)*hs),int((fh+4)*hs));
int yy = ymargin+fh; int yy = ymargin+fh;
for ( int i=0; i<l.Count(); i++ ) for ( int i=0; i<l.Count(); i++ )
{ {
@ -373,7 +373,7 @@ Class SWWMWeaponSwapTip : HUDMessageBase
int w = max(txtw,icow); int w = max(txtw,icow);
int h = icoh+4+mSmallFont.GetHeight()*l.Count(); int h = icoh+4+mSmallFont.GetHeight()*l.Count();
Vector2 pos = (int(ss.x/2),ss.y-(ymargin+80+h)); Vector2 pos = (int(ss.x/2),ss.y-(ymargin+80+h));
Screen.Dim("Black",.5*alpha,int((pos.x-(w+4)/2)*hs),int((pos.y-2)*hs),int((w+4)*hs),int((h+4)*hs)); Screen.Dim(0xFF000000,.5*alpha,int((pos.x-(w+4)/2)*hs),int((pos.y-2)*hs),int((w+4)*hs),int((h+4)*hs));
// Left Icon // Left Icon
double x = pos.x-(icow/2); double x = pos.x-(icow/2);
if ( icoa.IsValid() ) if ( icoa.IsValid() )
@ -484,7 +484,7 @@ Class SWWMWeaponTooltip : HUDMessageBase
int cw = int(ceil((max(w1,w)+8)/6.))*6; int cw = int(ceil((max(w1,w)+8)/6.))*6;
int h = mSmallFont.GetHeight()+8+mTinyFont.GetHeight()*l.Count(); int h = mSmallFont.GetHeight()+8+mTinyFont.GetHeight()*l.Count();
Vector2 pos = (int(ss.x/2),ss.y-(ymargin+80+h)); Vector2 pos = (int(ss.x/2),ss.y-(ymargin+80+h));
Screen.Dim("Black",.5*alpha,int((pos.x-(cw+4)/2)*hs),int((pos.y-2)*hs),int((cw+4)*hs),int((h+4)*hs)); Screen.Dim(0xFF000000,.5*alpha,int((pos.x-(cw+4)/2)*hs),int((pos.y-2)*hs),int((cw+4)*hs),int((h+4)*hs));
Screen.DrawText(mSmallFont,Font.CR_FIRE,pos.x-w1/2,pos.y,wpn,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); Screen.DrawText(mSmallFont,Font.CR_FIRE,pos.x-w1/2,pos.y,wpn,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha);
for ( int i=0; i<cw; i+=6 ) for ( int i=0; i<cw; i+=6 )
Screen.DrawChar(mSmallFont,Font.CR_FIRE,(pos.x-cw/2)+i,pos.y+6,0x5F,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); Screen.DrawChar(mSmallFont,Font.CR_FIRE,(pos.x-cw/2)+i,pos.y+6,0x5F,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha);
@ -684,7 +684,7 @@ Class SWWMDirectMessage : HUDMessageBase
if ( seqnum < 0 ) if ( seqnum < 0 )
{ {
// if there's a map message active, wait until it isn't // if there's a map message active, wait until it isn't
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd.mapmsg ) return false; if ( hnd.mapmsg ) return false;
delay--; delay--;
if ( delay <= 0 ) if ( delay <= 0 )
@ -781,7 +781,7 @@ Class SWWMDialogueTrigger : SWWMNonInteractiveActor abstract
// this is a huge gross hack that only exists because you can't get arg0str out of actors // this is a huge gross hack that only exists because you can't get arg0str out of actors
// (primarily, because you can convert names to ints, but not viceversa) // (primarily, because you can convert names to ints, but not viceversa)
String dlg = GetClassName(); String dlg = GetClassName();
dlg.StripLeft("SWWMDialogueTrigger"); dlg.StripLeft('SWWMDialogueTrigger');
if ( !bAMBUSH || (activator && (activator.player == players[consoleplayer])) ) if ( !bAMBUSH || (activator && (activator.player == players[consoleplayer])) )
EventHandler.SendInterfaceEvent(consoleplayer,"swwmsetdialogue."..dlg); EventHandler.SendInterfaceEvent(consoleplayer,"swwmsetdialogue."..dlg);
Destroy(); Destroy();
@ -800,12 +800,8 @@ Class SWWMDialogueTriggerSpcEV2BCD : SWWMNonInteractiveActor
{ {
// the one singular astral cacodemon in this map // the one singular astral cacodemon in this map
// needed for everything // needed for everything
foreach ( c:AllActorClasses ) let cacoclass = (Class<Actor>)(FindClass('AstralCacodemon','Actor'));
{ if ( cacoclass ) thecaco = Actor(ThinkerIterator.Create(cacoclass).Next());
if ( c.GetClassName() != "AstralCacodemon" ) continue;
thecaco = Actor(ThinkerIterator.Create(c).Next());
break;
}
if ( !thecaco ) if ( !thecaco )
{ {
Destroy(); Destroy();
@ -1166,7 +1162,7 @@ Class DSMapTitle : HUDMessageBase
} }
if ( ch != 256 ) ThrowAbortException("sub font definition does not list all 256 glyphs"); if ( ch != 256 ) ThrowAbortException("sub font definition does not list all 256 glyphs");
// this is for compat with the dialogues, and should not go into other mods // this is for compat with the dialogues, and should not go into other mods
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) hnd.mapmsg = self; if ( hnd ) hnd.mapmsg = self;
bDontDeleteMe = true; bDontDeleteMe = true;
return self; return self;
@ -1349,7 +1345,7 @@ Class SWWMWeaponSelect : HUDMessageBase
S_StartSound("menu/demotab",CHAN_AUTO,CHANF_UI); S_StartSound("menu/demotab",CHAN_AUTO,CHANF_UI);
stage = 0; stage = 0;
alph = 0.; alph = 0.;
fnt = Font.FindFont("TewiFontOutline"); fnt = Font.FindFont('TewiFontOutline');
olsmoothY = smoothY = curY = CalcHeight(); olsmoothY = smoothY = curY = CalcHeight();
return self; return self;
} }
@ -1575,7 +1571,7 @@ Class SWWMWeaponSelect : HUDMessageBase
double fractic = System.GetTimeFrac(); double fractic = System.GetTimeFrac();
double ssmoothY = SWWMUtility.Lerp(olsmoothY,smoothY,fractic); double ssmoothY = SWWMUtility.Lerp(olsmoothY,smoothY,fractic);
double salph = SWWMUtility.Lerp(olalph,alph,fractic); double salph = SWWMUtility.Lerp(olalph,alph,fractic);
Screen.Dim("Black",.4*salph,0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFF000000,.4*salph,0,0,Screen.GetWidth(),Screen.GetHeight());
double hs; double hs;
Vector2 ss; Vector2 ss;
if ( SWWMStatusBar(StatusBar) ) if ( SWWMStatusBar(StatusBar) )

View file

@ -19,7 +19,7 @@ Class SWWMScoreObj play
static SWWMScoreObj SpawnAtActorBunch( int score, Actor a, int tcolor = -1 ) static SWWMScoreObj SpawnAtActorBunch( int score, Actor a, int tcolor = -1 )
{ {
if ( !a ) return null; if ( !a ) return null;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return null; if ( !hnd ) return null;
Vector3 pos = level.Vec3Offset(a.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,a.Height/2)); Vector3 pos = level.Vec3Offset(a.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,a.Height/2));
return SpawnFromHandler(hnd,score,pos,tcolor); return SpawnFromHandler(hnd,score,pos,tcolor);
@ -28,7 +28,7 @@ Class SWWMScoreObj play
static SWWMScoreObj SpawnAtActor( int score, Actor a, int tcolor = -1 ) static SWWMScoreObj SpawnAtActor( int score, Actor a, int tcolor = -1 )
{ {
if ( !a ) return null; if ( !a ) return null;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return null; if ( !hnd ) return null;
Vector3 pos = a.Vec3Offset(0,0,a.Height/2); Vector3 pos = a.Vec3Offset(0,0,a.Height/2);
return SpawnFromHandler(hnd,score,pos,tcolor); return SpawnFromHandler(hnd,score,pos,tcolor);
@ -36,7 +36,7 @@ Class SWWMScoreObj play
static SWWMScoreObj Spawn( int score, Vector3 pos, int tcolor = -1 ) static SWWMScoreObj Spawn( int score, Vector3 pos, int tcolor = -1 )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return null; if ( !hnd ) return null;
return SpawnFromHandler(hnd,score,pos,tcolor); return SpawnFromHandler(hnd,score,pos,tcolor);
} }
@ -57,7 +57,7 @@ Class SWWMScoreObj play
static SWWMScoreObj SpawnFromHandler( SWWMHandler hnd, int score, Vector3 pos, int tcolor = -1 ) static SWWMScoreObj SpawnFromHandler( SWWMHandler hnd, int score, Vector3 pos, int tcolor = -1 )
{ {
let o = new("SWWMScoreObj"); let o = new('SWWMScoreObj');
o.score = score; o.score = score;
o.pos = pos; o.pos = pos;
o.lifespan = o.initialspan = 60; o.lifespan = o.initialspan = 60;
@ -100,7 +100,7 @@ Class SWWMDamNum play
static SWWMDamNum SpawnAtActor( int damage, Actor a, Name type = '' ) static SWWMDamNum SpawnAtActor( int damage, Actor a, Name type = '' )
{ {
if ( !a ) return null; if ( !a ) return null;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return null; if ( !hnd ) return null;
Vector3 pos = level.Vec3Offset(a.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,a.Height/2)); Vector3 pos = level.Vec3Offset(a.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,a.Height/2));
return SpawnFromHandler(hnd,damage,pos,type); return SpawnFromHandler(hnd,damage,pos,type);
@ -108,7 +108,7 @@ Class SWWMDamNum play
static SWWMDamNum Spawn( int damage, Vector3 pos, Name type = '' ) static SWWMDamNum Spawn( int damage, Vector3 pos, Name type = '' )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return null; if ( !hnd ) return null;
return SpawnFromHandler(hnd,damage,pos,type); return SpawnFromHandler(hnd,damage,pos,type);
} }
@ -122,10 +122,10 @@ Class SWWMDamNum play
static SWWMDamNum SpawnFromHandler( SWWMHandler hnd, int damage, Vector3 pos, Name type = '' ) static SWWMDamNum SpawnFromHandler( SWWMHandler hnd, int damage, Vector3 pos, Name type = '' )
{ {
let o = new("SWWMDamNum"); let o = new('SWWMDamNum');
o.damage = damage; o.damage = damage;
o.pos = pos; o.pos = pos;
o.tcolor = Font.FindFontColor("MiniRed"); o.tcolor = Font.FindFontColor('MiniRed');
if ( swwm_damnums_color ) for ( int i=0; i<hnd.damtypes.Size(); i++ ) if ( swwm_damnums_color ) for ( int i=0; i<hnd.damtypes.Size(); i++ )
{ {
if ( hnd.damtypes[i] != type ) continue; if ( hnd.damtypes[i] != type ) continue;
@ -182,14 +182,14 @@ Class SWWMInterest play
static SWWMInterest Spawn( SWWMHandler hnd, Vector3 pos = (0,0,0), Key thekey = null, Line theline = null, int theexit = 0 ) static SWWMInterest Spawn( SWWMHandler hnd, Vector3 pos = (0,0,0), Key thekey = null, Line theline = null, int theexit = 0 )
{ {
if ( (!thekey && !theline) || (thekey && theline) ) return null; if ( (!thekey && !theline) || (thekey && theline) ) return null;
let i = new("SWWMInterest"); let i = new('SWWMInterest');
i.trackedkey = thekey; i.trackedkey = thekey;
i.trackedline = theline; i.trackedline = theline;
if ( thekey ) if ( thekey )
{ {
i.type = INT_Key; i.type = INT_Key;
i.keytag = thekey.GetTag(); i.keytag = thekey.GetTag();
i.marker = Actor.Spawn("SWWMInterestMarker",thekey.pos); i.marker = Actor.Spawn('SWWMInterestMarker',thekey.pos);
if ( thekey is 'SWWMKey' ) if ( thekey is 'SWWMKey' )
{ {
Class<Key> k = thekey.species; Class<Key> k = thekey.species;
@ -205,7 +205,7 @@ Class SWWMInterest play
{ {
i.type = INT_Exit; i.type = INT_Exit;
i.exittype = theexit; i.exittype = theexit;
i.marker = Actor.Spawn("SWWMInterestMarker",pos); i.marker = Actor.Spawn('SWWMInterestMarker',pos);
i.marker.SetState(i.marker.SpawnState+theexit); i.marker.SetState(i.marker.SpawnState+theexit);
i.marker.bDORMANT = !level.allmap; i.marker.bDORMANT = !level.allmap;
} }
@ -258,7 +258,7 @@ Class SWWMItemSense play
s.pos = item.Vec3Offset(0,0,item.height); s.pos = item.Vec3Offset(0,0,item.height);
return s; return s;
} }
let i = new("SWWMItemSense"); let i = new('SWWMItemSense');
i.item = item; i.item = item;
if ( item is 'SWWMRespawnTimer' ) if ( item is 'SWWMRespawnTimer' )
{ {
@ -398,7 +398,7 @@ Class SWWMSimpleTracker play
t.Update(); t.Update();
return t; return t;
} }
t = new("SWWMSimpleTracker"); t = new('SWWMSimpleTracker');
t.target = target; t.target = target;
t.Update(); t.Update();
t.next = hnd.strackers; t.next = hnd.strackers;

View file

@ -216,7 +216,7 @@ Class AmmoFabricator : Inventory abstract
+FLOATBOB; +FLOATBOB;
+DONTGIB; +DONTGIB;
Inventory.UseSound "fabricator/use"; Inventory.UseSound "fabricator/use";
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
Inventory.MaxAmount 0; Inventory.MaxAmount 0;
FloatBobStrength 0.25; FloatBobStrength 0.25;
} }
@ -544,7 +544,7 @@ Class HammerspaceEmbiggener : Inventory
Amount = min(tamount,MaxAmount); Amount = min(tamount,MaxAmount);
return; return;
} }
let n = Spawn("BulkHammerspaceEmbiggener",pos); let n = Spawn('BulkHammerspaceEmbiggener',pos);
Inventory(n).Amount = min(tamount,MaxAmount); Inventory(n).Amount = min(tamount,MaxAmount);
SWWMUtility.TransferItemProp(self,n); SWWMUtility.TransferItemProp(self,n);
ClearCounters(); ClearCounters();
@ -558,7 +558,7 @@ Class HammerspaceEmbiggener : Inventory
Inventory.PickupMessage "$T_EMBIGGENER"; Inventory.PickupMessage "$T_EMBIGGENER";
Inventory.MaxAmount 8; Inventory.MaxAmount 8;
Inventory.InterHubAmount 8; Inventory.InterHubAmount 8;
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
+INVENTORY.UNDROPPABLE; +INVENTORY.UNDROPPABLE;
+INVENTORY.UNTOSSABLE; +INVENTORY.UNTOSSABLE;
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;

View file

@ -66,7 +66,7 @@ Class GoldShellSparkle : SWWMNonInteractiveActor
} }
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale 0.05; Scale 0.05;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -83,7 +83,7 @@ Class GoldShell : SWWMAmmo
action void A_GoldShellTrail() action void A_GoldShellTrail()
{ {
if ( Random[Goldy](0,2) ) return; if ( Random[Goldy](0,2) ) return;
Spawn("GoldShellSparkle",Vec3Offset(FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](10,18))); Spawn('GoldShellSparkle',Vec3Offset(FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](10,18)));
} }
Default Default
@ -267,7 +267,7 @@ Class SilverBulletAmmo : SWWMAmmo
Ammo.BackpackAmount 0; Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 9; Ammo.BackpackMaxAmount 9;
Ammo.DropAmount 1; Ammo.DropAmount 1;
SWWMAmmo.MagAmmoType "SilverBullets"; SWWMAmmo.MagAmmoType 'SilverBullets';
Accuracy 75; Accuracy 75;
} }
States States
@ -285,7 +285,7 @@ Class SilverBullets : MagAmmo
Tag "$T_XSBBULLET"; Tag "$T_XSBBULLET";
MagAmmo.PickupTag "XSBBULLET"; MagAmmo.PickupTag "XSBBULLET";
Stamina -12000; Stamina -12000;
MagAmmo.ParentAmmo "SilverBulletAmmo"; MagAmmo.ParentAmmo 'SilverBulletAmmo';
MagAmmo.ClipSize 5; MagAmmo.ClipSize 5;
MagAmmo.BackpackAmount 2; MagAmmo.BackpackAmount 2;
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
@ -328,7 +328,7 @@ Class CandyGunAmmo : SWWMAmmo
Ammo.BackpackAmount 0; Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 3; Ammo.BackpackMaxAmount 3;
Ammo.DropAmount 1; Ammo.DropAmount 1;
SWWMAmmo.MagAmmoType "CandyGunBullets"; SWWMAmmo.MagAmmoType 'CandyGunBullets';
Accuracy 90; Accuracy 90;
} }
States States
@ -346,7 +346,7 @@ Class CandyGunBullets : MagAmmo
Tag "$T_CANDYBULLET"; Tag "$T_CANDYBULLET";
MagAmmo.PickupTag "CANDYBULLET"; MagAmmo.PickupTag "CANDYBULLET";
Stamina -14000; Stamina -14000;
MagAmmo.ParentAmmo "CandyGunAmmo"; MagAmmo.ParentAmmo 'CandyGunAmmo';
MagAmmo.ClipSize 7; MagAmmo.ClipSize 7;
MagAmmo.BackpackAmount 1; MagAmmo.BackpackAmount 1;
Inventory.MaxAmount 7; Inventory.MaxAmount 7;
@ -409,11 +409,11 @@ Class CandyGunSpares : SWWMAmmo
Super.DoEffect(); Super.DoEffect();
if ( !Owner ) return; if ( !Owner ) return;
// auto-give an empty gun if the player does not own one // auto-give an empty gun if the player does not own one
if ( Owner.FindInventory("CandyGun") || (Amount <= 0) ) return; if ( Owner.FindInventory('CandyGun') || (Amount <= 0) ) return;
// don't do this if the player owns a Mortal Rifle and swapweapons are enabled // don't do this if the player owns a Mortal Rifle and swapweapons are enabled
if ( Owner.FindInventory("MisterRifle") && swwm_swapweapons ) return; if ( Owner.FindInventory('MisterRifle') && swwm_swapweapons ) return;
Amount--; Amount--;
let g = CandyGun(Spawn("CandyGun")); let g = CandyGun(Spawn('CandyGun'));
g.bInitialized = true; g.bInitialized = true;
g.ammogive1 = 0; g.ammogive1 = 0;
g.ammogive2 = 0; g.ammogive2 = 0;

View file

@ -8,7 +8,7 @@ Class ArmorNugget : SWWMArmor
Inventory.MaxAmount 200; Inventory.MaxAmount 200;
Inventory.InterHubAmount 200; Inventory.InterHubAmount 200;
SWWMArmor.ArmorPriority 3; SWWMArmor.ArmorPriority 3;
SWWMArmor.GiverArmor "ArmorNuggetItem"; SWWMArmor.GiverArmor 'ArmorNuggetItem';
} }
override int HandleDamage( int damage, Name damageType, int flags ) override int HandleDamage( int damage, Name damageType, int flags )
@ -53,7 +53,7 @@ Class ArmorNuggetItem : SWWMSpareArmor
Inventory.MaxAmount 0; Inventory.MaxAmount 0;
Inventory.InterHubAmount 0; Inventory.InterHubAmount 0;
Inventory.UseSound "misc/armor_pkup"; Inventory.UseSound "misc/armor_pkup";
SWWMSpareArmor.GiveArmor "ArmorNugget"; SWWMSpareArmor.GiveArmor 'ArmorNugget';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
} }
States States
@ -78,10 +78,10 @@ Class BlastSuit : SWWMArmor
Inventory.Amount 150; Inventory.Amount 150;
Inventory.MaxAmount 150; Inventory.MaxAmount 150;
Inventory.InterHubAmount 150; Inventory.InterHubAmount 150;
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMArmor.ArmorPriority 4; SWWMArmor.ArmorPriority 4;
SWWMArmor.DrainMessage "$D_BLASTSUIT"; SWWMArmor.DrainMessage "$D_BLASTSUIT";
SWWMArmor.GiverArmor "BlastSuitItem"; SWWMArmor.GiverArmor 'BlastSuitItem';
} }
override int HandleDamage( int damage, Name damageType, int flags ) override int HandleDamage( int damage, Name damageType, int flags )
@ -100,10 +100,10 @@ Class WarArmor : SWWMArmor
Inventory.Amount 250; Inventory.Amount 250;
Inventory.MaxAmount 250; Inventory.MaxAmount 250;
Inventory.InterHubAmount 250; Inventory.InterHubAmount 250;
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMArmor.ArmorPriority 5; SWWMArmor.ArmorPriority 5;
SWWMArmor.DrainMessage "$D_WARARMOR"; SWWMArmor.DrainMessage "$D_WARARMOR";
SWWMArmor.GiverArmor "WarArmorItem"; SWWMArmor.GiverArmor 'WarArmorItem';
} }
override int HandleDamage( int damage, Name damageType, int flags ) override int HandleDamage( int damage, Name damageType, int flags )

View file

@ -17,8 +17,8 @@ Class BlastSuitItem : SWWMSpareArmor
Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png"; Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png";
Inventory.PickupMessage "$T_BLASTSUIT"; Inventory.PickupMessage "$T_BLASTSUIT";
Inventory.UseSound "armor/blastsuit"; Inventory.UseSound "armor/blastsuit";
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMSpareArmor.GiveArmor "BlastSuit"; SWWMSpareArmor.GiveArmor 'BlastSuit';
} }
States States
{ {
@ -43,8 +43,8 @@ Class WarArmorItem : SWWMSpareArmor
Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png"; Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png";
Inventory.PickupMessage "$T_WARARMOR"; Inventory.PickupMessage "$T_WARARMOR";
Inventory.UseSound "armor/wararmor"; Inventory.UseSound "armor/wararmor";
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMSpareArmor.GiveArmor "WarArmor"; SWWMSpareArmor.GiveArmor 'WarArmor';
} }
States States
{ {

View file

@ -19,7 +19,7 @@ Class SWWMAmmo : Ammo
override Class<Ammo> GetParentAmmo() override Class<Ammo> GetParentAmmo()
{ {
Class<Object> type = GetClass(); Class<Object> type = GetClass();
while ( (type.GetParentClass() != "SWWMAmmo") && type.GetParentClass() ) while ( (type.GetParentClass() != 'SWWMAmmo') && type.GetParentClass() )
type = type.GetParentClass(); type = type.GetParentClass();
return (Class<Ammo>)(type); return (Class<Ammo>)(type);
} }
@ -267,7 +267,7 @@ Class SWWMAmmo : Ammo
{ {
+INVENTORY.IGNORESKILL; +INVENTORY.IGNORESKILL;
+DONTGIB; +DONTGIB;
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
+FLOATBOB; +FLOATBOB;
FloatBobStrength 0.25; FloatBobStrength 0.25;
} }
@ -299,7 +299,7 @@ Class MagAmmo : Inventory abstract
+DONTGIB; +DONTGIB;
Inventory.PickupSound "misc/bullet_pkup"; Inventory.PickupSound "misc/bullet_pkup";
Inventory.Amount 1; Inventory.Amount 1;
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
+FLOATBOB; +FLOATBOB;
FloatBobStrength 0.25; FloatBobStrength 0.25;
} }
@ -307,7 +307,7 @@ Class MagAmmo : Inventory abstract
virtual Class<MagAmmo> GetParentMagAmmo() virtual Class<MagAmmo> GetParentMagAmmo()
{ {
Class<Object> type = GetClass(); Class<Object> type = GetClass();
while ( (type.GetParentClass() != "MagAmmo") && type.GetParentClass() ) while ( (type.GetParentClass() != 'MagAmmo') && type.GetParentClass() )
type = type.GetParentClass(); type = type.GetParentClass();
return (Class<MagAmmo>)(type); return (Class<MagAmmo>)(type);
} }

View file

@ -94,7 +94,7 @@ Class SWWMArmor : Armor abstract
if ( healed > 0 ) Owner.GiveBody(healed); if ( healed > 0 ) Owner.GiveBody(healed);
if ( (swwm_strictuntouchable == 1) && (saved > 0) && Owner.player ) if ( (swwm_strictuntouchable == 1) && (saved > 0) && Owner.player )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true; if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true;
} }
if ( !bNODRAIN ) amount -= saved; if ( !bNODRAIN ) amount -= saved;
@ -158,7 +158,7 @@ Class SWWMSpareArmor : Inventory abstract
bool bPlayMe = true; bool bPlayMe = true;
if ( self is 'ArmorNuggetItem' ) if ( self is 'ArmorNuggetItem' )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) if ( hnd )
{ {
if ( hnd.lastnuggettic[Owner.PlayerNumber()] == gametic ) if ( hnd.lastnuggettic[Owner.PlayerNumber()] == gametic )
@ -184,7 +184,7 @@ Class SWWMSpareArmor : Inventory abstract
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMGreenPickupFlash"; Inventory.PickupFlash 'SWWMGreenPickupFlash';
+FLOATBOB; +FLOATBOB;
+DONTGIB; +DONTGIB;
FloatBobStrength 0.25; FloatBobStrength 0.25;

View file

@ -81,7 +81,7 @@ Class SWWMHealth : Inventory abstract
bool bPlayMe = true; bool bPlayMe = true;
if ( self is 'HealthNuggetItem' ) if ( self is 'HealthNuggetItem' )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) if ( hnd )
{ {
if ( hnd.lastnuggettic[Owner.PlayerNumber()] == gametic ) if ( hnd.lastnuggettic[Owner.PlayerNumber()] == gametic )
@ -130,7 +130,7 @@ Class SWWMHealth : Inventory abstract
return; return;
if ( (swwm_strictuntouchable == 1) && Owner.player ) if ( (swwm_strictuntouchable == 1) && Owner.player )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true; if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true;
} }
if ( ((Owner.player == players[consoleplayer]) || bBigPowerup) && (lastautousetic < gametic) ) if ( ((Owner.player == players[consoleplayer]) || bBigPowerup) && (lastautousetic < gametic) )
@ -165,7 +165,7 @@ Class SWWMHealth : Inventory abstract
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.UseSound "misc/health_pkup"; Inventory.UseSound "misc/health_pkup";
Inventory.PickupFlash "SWWMBluePickupFlash"; Inventory.PickupFlash 'SWWMBluePickupFlash';
+FLOATBOB; +FLOATBOB;
FloatBobStrength 0.25; FloatBobStrength 0.25;
} }

View file

@ -86,7 +86,7 @@ Mixin Class SWWMUseToPickup
Vector3 tracedir = level.Vec3Diff(userpos,itempos); Vector3 tracedir = level.Vec3Diff(userpos,itempos);
double dist = tracedir.length(); double dist = tracedir.length();
tracedir /= dist; tracedir /= dist;
let cf = new("CrossLineFinder"); let cf = new('CrossLineFinder');
cf.Trace(userpos,level.PointInSector(userpos.xy),tracedir,dist,0,ignoreallactors:true); cf.Trace(userpos,level.PointInSector(userpos.xy),tracedir,dist,0,ignoreallactors:true);
// trigger all player cross lines found between user and item // trigger all player cross lines found between user and item
for ( int i=0; i<cf.clines.Size(); i++ ) for ( int i=0; i<cf.clines.Size(); i++ )
@ -109,7 +109,7 @@ Mixin Class SWWMOverlapPickupSound
// overlap sounds // overlap sounds
override void PlayPickupSound( Actor toucher ) override void PlayPickupSound( Actor toucher )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) if ( hnd )
{ {
if ( hnd.lastpickuptic[toucher.PlayerNumber()] == gametic ) if ( hnd.lastpickuptic[toucher.PlayerNumber()] == gametic )
@ -144,7 +144,7 @@ Class SWWMRespawnTimer : SWWMNonInteractiveActor
} }
override void Tick() override void Tick()
{ {
if ( !tracer || !tracer.InStateSequence(tracer.CurState,tracer.FindState("HideDoomish")) ) if ( !tracer || !tracer.InStateSequence(tracer.CurState,tracer.FindState('HideDoomish')) )
{ {
Destroy(); Destroy();
return; return;
@ -193,7 +193,7 @@ Mixin Class SWWMPickupGlow
{ {
let p = Spawn(PickupFlash,pos); let p = Spawn(PickupFlash,pos);
p.target = self; p.target = self;
p.SetStateLabel("Pickup"); p.SetStateLabel('Pickup');
} }
return ret; return ret;
} }
@ -203,7 +203,7 @@ Class SWWMItemOverlay : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FLOATBOB; +FLOATBOB;
FloatBobStrength .25; FloatBobStrength .25;
} }
@ -262,7 +262,7 @@ Mixin Class SWWMRespawn
bSPECIAL = false; bSPECIAL = false;
bNOGRAVITY = true; bNOGRAVITY = true;
bINVISIBLE = true; bINVISIBLE = true;
SetState(FindState("HideDoomish")); SetState(FindState('HideDoomish'));
tics = 1050; tics = 1050;
if ( (self is 'Ammo') || (self is 'MagAmmo') ) if ( (self is 'Ammo') || (self is 'MagAmmo') )
tics -= 350; tics -= 350;
@ -273,7 +273,7 @@ Mixin Class SWWMRespawn
{ {
Vector3 oldpos = pos; Vector3 oldpos = pos;
A_RestoreSpecialPosition(); A_RestoreSpecialPosition();
let t = Spawn("SWWMRespawnTimer",pos); let t = Spawn('SWWMRespawnTimer',pos);
t.tracer = self; t.tracer = self;
t.special1 = tics; t.special1 = tics;
t.A_SetSize(radius,height); t.A_SetSize(radius,height);

View file

@ -29,7 +29,7 @@ Class SWWMCollectible : Inventory abstract
Inventory.PickupSound "menu/buyinv"; Inventory.PickupSound "menu/buyinv";
Inventory.Amount 1; Inventory.Amount 1;
Inventory.MaxAmount 1; Inventory.MaxAmount 1;
Inventory.PickupFlash "SWWMCyanPickupFlash"; Inventory.PickupFlash 'SWWMCyanPickupFlash';
SWWMCollectible.Availability AVAIL_All; SWWMCollectible.Availability AVAIL_All;
+INVENTORY.UNTOSSABLE; +INVENTORY.UNTOSSABLE;
+INVENTORY.UNDROPPABLE; +INVENTORY.UNDROPPABLE;
@ -124,7 +124,7 @@ Class GenericCube : SWWMCollectible
{ {
Tag "$T_PERFECTLYGENERIC"; Tag "$T_PERFECTLYGENERIC";
Inventory.PickupMessage "$T_PERFECTLYGENERIC"; Inventory.PickupMessage "$T_PERFECTLYGENERIC";
SWWMCollectible.GestureWeapon "GenericCubeGesture"; SWWMCollectible.GestureWeapon 'GenericCubeGesture';
SWWMCollectible.GetLine "cubeget"; SWWMCollectible.GetLine "cubeget";
Stamina 1000; Stamina 1000;
} }
@ -135,7 +135,7 @@ Class AkariProject : SWWMCollectible
{ {
Tag "$T_AKARIPROJECT"; Tag "$T_AKARIPROJECT";
Inventory.PickupMessage "$T_AKARIPROJECT"; Inventory.PickupMessage "$T_AKARIPROJECT";
SWWMCollectible.GestureWeapon "AkariProjectGesture"; SWWMCollectible.GestureWeapon 'AkariProjectGesture';
SWWMCollectible.GetLine "akariget"; SWWMCollectible.GetLine "akariget";
Stamina 2000; Stamina 2000;
} }
@ -146,7 +146,7 @@ Class LoveSignalsCD : SWWMCollectible
{ {
Tag "$T_LOVESIGNALS"; Tag "$T_LOVESIGNALS";
Inventory.PickupMessage "$T_LOVESIGNALS"; Inventory.PickupMessage "$T_LOVESIGNALS";
SWWMCollectible.GestureWeapon "LoveSignalsCDGesture"; SWWMCollectible.GestureWeapon 'LoveSignalsCDGesture';
SWWMCollectible.GetLine "signalsget"; SWWMCollectible.GetLine "signalsget";
Stamina 3000; Stamina 3000;
} }
@ -157,7 +157,7 @@ Class NutatcoBar : SWWMCollectible
{ {
Tag "$T_NUTATCO"; Tag "$T_NUTATCO";
Inventory.PickupMessage "$T_NUTATCO"; Inventory.PickupMessage "$T_NUTATCO";
SWWMCollectible.GestureWeapon "NutatcoBarGesture"; SWWMCollectible.GestureWeapon 'NutatcoBarGesture';
SWWMCollectible.GetLine "nutatcoget"; SWWMCollectible.GetLine "nutatcoget";
Stamina 200; Stamina 200;
} }
@ -168,7 +168,7 @@ Class FrispyCorn : SWWMCollectible
{ {
Tag "$T_FRISPYCORN"; Tag "$T_FRISPYCORN";
Inventory.PickupMessage "$T_FRISPYCORN"; Inventory.PickupMessage "$T_FRISPYCORN";
SWWMCollectible.GestureWeapon "FrispyCornGesture"; SWWMCollectible.GestureWeapon 'FrispyCornGesture';
SWWMCollectible.GetLine "frispyget"; SWWMCollectible.GetLine "frispyget";
Stamina 400; Stamina 400;
} }
@ -179,7 +179,7 @@ Class SayaBean : SWWMCollectible
{ {
Tag "$T_SAYABEAN"; Tag "$T_SAYABEAN";
Inventory.PickupMessage "$T_SAYABEAN"; Inventory.PickupMessage "$T_SAYABEAN";
SWWMCollectible.GestureWeapon "SayaBeanGesture"; SWWMCollectible.GestureWeapon 'SayaBeanGesture';
SWWMCollectible.GetLine "sayaget"; SWWMCollectible.GetLine "sayaget";
Stamina 5000; Stamina 5000;
} }
@ -207,7 +207,7 @@ Class MothPlushy : SWWMCollectible
{ {
Tag "$T_MOTHPLUSH"; Tag "$T_MOTHPLUSH";
Inventory.PickupMessage "$T_MOTHPLUSH"; Inventory.PickupMessage "$T_MOTHPLUSH";
SWWMCollectible.GestureWeapon "MothPlushyGesture"; SWWMCollectible.GestureWeapon 'MothPlushyGesture';
SWWMCollectible.GetLine "mothget"; SWWMCollectible.GetLine "mothget";
Stamina 7000; Stamina 7000;
} }
@ -219,7 +219,7 @@ Class SayasMug : SWWMCollectible
{ {
Tag "$T_SAYASMUG"; Tag "$T_SAYASMUG";
Inventory.PickupMessage "$T_SAYASMUG"; Inventory.PickupMessage "$T_SAYASMUG";
SWWMCollectible.GestureWeapon "SayasMugGesture"; SWWMCollectible.GestureWeapon 'SayasMugGesture';
SWWMCollectible.GetLine "mugget"; SWWMCollectible.GetLine "mugget";
Stamina 1000; Stamina 1000;
} }
@ -232,7 +232,7 @@ Class DemoPlush : SWWMCollectible
Tag "$T_DEMOPLUSH"; Tag "$T_DEMOPLUSH";
Inventory.PickupMessage "$T_DEMOPLUSH"; Inventory.PickupMessage "$T_DEMOPLUSH";
SWWMCollectible.Availability AVAIL_Heretic; SWWMCollectible.Availability AVAIL_Heretic;
SWWMCollectible.GestureWeapon "DemoPlushGesture"; SWWMCollectible.GestureWeapon 'DemoPlushGesture';
SWWMCollectible.GetLine "demoget"; SWWMCollectible.GetLine "demoget";
Stamina 6000; Stamina 6000;
} }
@ -246,7 +246,7 @@ Class KirinSippy : SWWMCollectible
Tag "$T_PEACH"; Tag "$T_PEACH";
Inventory.PickupMessage "$T_PEACH"; Inventory.PickupMessage "$T_PEACH";
SWWMCollectible.Availability AVAIL_Hexen; SWWMCollectible.Availability AVAIL_Hexen;
SWWMCollectible.GestureWeapon "KirinSippyGesture"; SWWMCollectible.GestureWeapon 'KirinSippyGesture';
SWWMCollectible.GetLine "peachget"; SWWMCollectible.GetLine "peachget";
Stamina 300; Stamina 300;
} }
@ -258,7 +258,7 @@ Class MilkBreads : SWWMCollectible
Tag "$T_MILKBREAD"; Tag "$T_MILKBREAD";
Inventory.PickupMessage "$T_MILKBREAD"; Inventory.PickupMessage "$T_MILKBREAD";
SWWMCollectible.Availability AVAIL_Hexen; SWWMCollectible.Availability AVAIL_Hexen;
SWWMCollectible.GestureWeapon "MilkBreadsGesture"; SWWMCollectible.GestureWeapon 'MilkBreadsGesture';
SWWMCollectible.GetLine "breadget"; SWWMCollectible.GetLine "breadget";
Stamina 900; Stamina 900;
} }
@ -270,7 +270,7 @@ Class KirinManga : SWWMCollectible
Tag "$T_KIRINMANGA"; Tag "$T_KIRINMANGA";
Inventory.PickupMessage "$T_KIRINMANGA"; Inventory.PickupMessage "$T_KIRINMANGA";
SWWMCollectible.Availability AVAIL_Hexen; SWWMCollectible.Availability AVAIL_Hexen;
SWWMCollectible.GestureWeapon "KirinMangaGesture"; SWWMCollectible.GestureWeapon 'KirinMangaGesture';
SWWMCollectible.GetLine "mangaget"; SWWMCollectible.GetLine "mangaget";
Stamina 1600; Stamina 1600;
} }
@ -282,7 +282,7 @@ Class KirinPlush : SWWMCollectible
Tag "$T_KIRINPLUSH"; Tag "$T_KIRINPLUSH";
Inventory.PickupMessage "$T_KIRINPLUSH"; Inventory.PickupMessage "$T_KIRINPLUSH";
SWWMCollectible.Availability AVAIL_Hexen; SWWMCollectible.Availability AVAIL_Hexen;
SWWMCollectible.GestureWeapon "KirinPlushGesture"; SWWMCollectible.GestureWeapon 'KirinPlushGesture';
SWWMCollectible.GetLine "kiringet"; SWWMCollectible.GetLine "kiringet";
Stamina 8000; Stamina 8000;
} }

View file

@ -143,7 +143,7 @@ Class MothPlushyGesture : SWWMItemGesture
{ {
action void A_MothCheck() action void A_MothCheck()
{ {
let realmoth = MothPlushy(FindInventory("MothPlushy")); let realmoth = MothPlushy(FindInventory('MothPlushy'));
if ( !realmoth || realmoth.activated ) return; if ( !realmoth || realmoth.activated ) return;
realmoth.uses = min(10,realmoth.uses+1); realmoth.uses = min(10,realmoth.uses+1);
if ( (realmoth.uses > 1) && !Random[Gesture](0,12-realmoth.uses) ) if ( (realmoth.uses > 1) && !Random[Gesture](0,12-realmoth.uses) )
@ -287,7 +287,7 @@ Class KirinPlushGesture : SWWMItemGesture
int numpt = Random[ExploS](6,9); int numpt = Random[ExploS](6,9);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("LoveHeartSparkle",Vec3Offset(FRandom[ExploS](-.8,.8)*radius,FRandom[ExploS](-.8,.8)*radius,FRandom[ExploS](.1,.9)*height)); let s = Spawn('LoveHeartSparkle',Vec3Offset(FRandom[ExploS](-.8,.8)*radius,FRandom[ExploS](-.8,.8)*radius,FRandom[ExploS](.1,.9)*height));
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
} }

View file

@ -150,7 +150,7 @@ Class FroggyChair : Actor
} }
else dirto /= lento; else dirto /= lento;
vel = (dirto+(0,0,.1))*vsize*.3; vel = (dirto+(0,0,.1))*vsize*.3;
Spawn("SWWMItemFog",pos); Spawn('SWWMItemFog',pos);
other.DamageMobj(self,tracer,int(2.5*vsize),'Melee',DMG_THRUSTLESS); other.DamageMobj(self,tracer,int(2.5*vsize),'Melee',DMG_THRUSTLESS);
A_StartSound("squeak",CHAN_WEAPON); A_StartSound("squeak",CHAN_WEAPON);
} }
@ -295,7 +295,7 @@ Class SWWMGasCloudSpawner : SWWMNonInteractiveActor
if ( !(special1%5) ) if ( !(special1%5) )
{ {
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch); Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
let c = Spawn("SWWMGasCloud",level.Vec3Offset(pos,x*(20+special1*12))); let c = Spawn('SWWMGasCloud',level.Vec3Offset(pos,x*(20+special1*12)));
c.target = target; c.target = target;
c.specialf1 = 1+special1/10.; c.specialf1 = 1+special1/10.;
} }
@ -320,7 +320,7 @@ Class SWWMGasCloud : SWWMNonInteractiveActor
if ( isFrozen() ) return; if ( isFrozen() ) return;
for ( int i=0; i<2; i++ ) for ( int i=0; i<2; i++ )
{ {
let e = Spawn("SWWMFart",level.Vec3Offset(pos,specialf1*SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*20.)); let e = Spawn('SWWMFart',level.Vec3Offset(pos,specialf1*SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*20.));
e.target = target; e.target = target;
e.scale *= specialf1; e.scale *= specialf1;
} }
@ -334,7 +334,7 @@ Class SWWMFart : SWWMSmoke
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Alpha .1; Alpha .1;
} }
States States
@ -457,7 +457,7 @@ Class FancyConfetti : SWWMNonInteractiveActor
pitch = 0; pitch = 0;
roll = 0; roll = 0;
dead = true; dead = true;
SetStateLabel("Death"); SetStateLabel('Death');
break; break;
} }
nstep++; nstep++;
@ -501,7 +501,7 @@ Class SuperFancyTrail : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
XScale 24.; XScale 24.;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -527,7 +527,7 @@ Class SuperFancySparkle : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale .25; Scale .25;
+ROLLSPRITE; +ROLLSPRITE;
+ROLLCENTER; +ROLLCENTER;
@ -572,7 +572,7 @@ Class SuperFancySparkle : SWWMNonInteractiveActor
double dist = dir.length(); double dist = dir.length();
if ( dist < .1 ) return; if ( dist < .1 ) return;
dir /= dist; dir /= dist;
let t = Spawn("SuperFancyTrail",pos); let t = Spawn('SuperFancyTrail',pos);
t.alpha = alpha*.5; t.alpha = alpha*.5;
t.scale.x *= scale.x; t.scale.x *= scale.x;
t.speed = dist; t.speed = dist;
@ -648,17 +648,17 @@ Class PartyTime : SWWMNonInteractiveActor
{ {
ang = FRandom[ExploS](0,360); ang = FRandom[ExploS](0,360);
pt = FRandom[ExploS](-90,30); pt = FRandom[ExploS](-90,30);
let c = Spawn("FancyConfetti",Vec3Offset(0,0,specialf1)); let c = Spawn('FancyConfetti',Vec3Offset(0,0,specialf1));
c.vel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](2,8); c.vel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](2,8);
if ( bAMBUSH ) c.vel *= 2; if ( bAMBUSH ) c.vel *= 2;
} }
if ( !bAMBUSH ) return; if ( !bAMBUSH ) return;
numpt = Random[ExploS](60,90); numpt = Random[ExploS](60,90);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
Spawn("SuperFancySparkle",Vec3Offset(0,0,specialf1)); Spawn('SuperFancySparkle',Vec3Offset(0,0,specialf1));
numpt = Random[ExploS](6,9); numpt = Random[ExploS](6,9);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
Spawn("SuperPartyLight",Vec3Offset(0,0,specialf1)); Spawn('SuperPartyLight',Vec3Offset(0,0,specialf1));
} }
} }
@ -669,19 +669,19 @@ Class ChanceboxSpawner : Actor
if ( deathmatch ) if ( deathmatch )
{ {
// not in DM // not in DM
let b = Spawn("HealthNuggetItem",pos); let b = Spawn('HealthNuggetItem',pos);
SWWMUtility.TransferItemProp(self,b); SWWMUtility.TransferItemProp(self,b);
ClearCounters(); ClearCounters();
Destroy(); Destroy();
return; return;
} }
int numbox = 0; int numbox = 0;
ThinkerIterator ti = ThinkerIterator.Create("Chancebox"); ThinkerIterator ti = ThinkerIterator.Create('Chancebox');
while ( ti.Next() ) numbox++; while ( ti.Next() ) numbox++;
if ( numbox >= 3 ) if ( numbox >= 3 )
{ {
// there's three boxes in the map already // there's three boxes in the map already
let b = Spawn("HealthNuggetItem",pos); let b = Spawn('HealthNuggetItem',pos);
SWWMUtility.TransferItemProp(self,b); SWWMUtility.TransferItemProp(self,b);
ClearCounters(); ClearCounters();
Destroy(); Destroy();
@ -703,13 +703,13 @@ Class ChanceboxSpawner : Actor
if ( tbox[1] > l.bbox[0] ) continue; if ( tbox[1] > l.bbox[0] ) continue;
if ( Level.BoxOnLineSide(pos.xy,32,l) != -1 ) continue; if ( Level.BoxOnLineSide(pos.xy,32,l) != -1 ) continue;
// there isn't enough space to spawn a box here // there isn't enough space to spawn a box here
let b = Spawn("HealthNuggetItem",pos); let b = Spawn('HealthNuggetItem',pos);
SWWMUtility.TransferItemProp(self,b); SWWMUtility.TransferItemProp(self,b);
ClearCounters(); ClearCounters();
Destroy(); Destroy();
return; return;
} }
let b = Spawn("Chancebox",pos); let b = Spawn('Chancebox',pos);
// copy all our stuff // copy all our stuff
SWWMUtility.TransferItemProp(self,b); SWWMUtility.TransferItemProp(self,b);
ClearCounters(); ClearCounters();
@ -742,7 +742,7 @@ Class CBoxLight : SpotLightAttenuated
override void Tick() override void Tick()
{ {
Super.Tick(); Super.Tick();
if ( !target || target.InStateSequence(target.CurState,target.FindState("BlowUp")) ) if ( !target || target.InStateSequence(target.CurState,target.FindState('BlowUp')) )
{ {
Destroy(); Destroy();
return; return;
@ -799,14 +799,14 @@ Class RewardVIPItems : ChanceboxReward
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
Class<Inventory> vipammodrop = null; Class<Inventory> vipammodrop = null;
if ( SWWMUtility.ItemExists("Ynykron",ownedonly:true) && SWWMUtility.CheckNeedsItem("YnykronAmmo",true) && Random[Chancebox](0,1) ) vipammodrop = "YnykronAmmo"; if ( SWWMUtility.ItemExists('Ynykron',ownedonly:true) && SWWMUtility.CheckNeedsItem('YnykronAmmo',true) && Random[Chancebox](0,1) ) vipammodrop = 'YnykronAmmo';
//if ( SWWMUtility.ItemExists("RafanKos",ownedonly:true) && SWWMUtility.CheckNeedsItem("UltimateAmmo",true) && Random[Chancebox](0,1) && !vipammodrop ) vipammodrop = "UltimateAmmo"; //if ( SWWMUtility.ItemExists("RafanKos',ownedonly:true) && SWWMUtility.CheckNeedsItem('UltimateAmmo',true) && Random[Chancebox](0,1) && !vipammodrop ) vipammodrop = 'UltimateAmmo';
if ( SWWMUtility.ItemExists("Spreadgun",ownedonly:true) && SWWMUtility.CheckNeedsItem("GoldShell",true) && !vipammodrop ) vipammodrop = "GoldShell"; if ( SWWMUtility.ItemExists('Spreadgun',ownedonly:true) && SWWMUtility.CheckNeedsItem('GoldShell',true) && !vipammodrop ) vipammodrop = 'GoldShell';
Class<Inventory> vipitemdrop = null; Class<Inventory> vipitemdrop = null;
if ( SWWMUtility.CheckNeedsItem("Mykradvo",true) && !SWWMUtility.ItemExists("Mykradvo",worldonly:true) && Random[Chancebox](0,1) ) vipitemdrop = "Mykradvo"; if ( SWWMUtility.CheckNeedsItem('Mykradvo',true) && !SWWMUtility.ItemExists('Mykradvo',worldonly:true) && Random[Chancebox](0,1) ) vipitemdrop = 'Mykradvo';
if ( SWWMUtility.CheckNeedsItem("AngerySigil",true) && !SWWMUtility.ItemExists("AngerySigil",worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = "AngerySigil"; if ( SWWMUtility.CheckNeedsItem('AngerySigil',true) && !SWWMUtility.ItemExists('AngerySigil',worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = 'AngerySigil';
if ( SWWMUtility.CheckNeedsItem("DivineSprite",true) && !SWWMUtility.ItemExists("DivineSprite",worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = "DivineSprite"; if ( SWWMUtility.CheckNeedsItem('DivineSprite',true) && !SWWMUtility.ItemExists('DivineSprite',worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = 'DivineSprite';
if ( !vipitemdrop ) vipitemdrop = "GrilledCheeseSandwich"; if ( !vipitemdrop ) vipitemdrop = 'GrilledCheeseSandwich';
SpawnCenter(pos,(!Random[Chancebox](0,2)&&vipammodrop)?vipammodrop:vipitemdrop); SpawnCenter(pos,(!Random[Chancebox](0,2)&&vipammodrop)?vipammodrop:vipitemdrop);
} }
} }
@ -816,12 +816,12 @@ Class RewardHammer : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.CheckNeedsItem("ItamexHammer"); return SWWMUtility.CheckNeedsItem('ItamexHammer');
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"ItamexHammer"); SpawnCenter(pos,'ItamexHammer');
} }
} }
// mortal rifle ammo treats // mortal rifle ammo treats
@ -829,14 +829,14 @@ Class RewardMisterRifle : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("MisterRifle",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("MisterGAmmo",true)||SWWMUtility.CheckNeedsItem("MisterAmmo",true)||SWWMUtility.CheckNeedsItem("MisterRound",true)); return SWWMUtility.ItemExists('MisterRifle',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('MisterGAmmo',true)||SWWMUtility.CheckNeedsItem('MisterAmmo',true)||SWWMUtility.CheckNeedsItem('MisterRound',true));
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"MisterGAmmo"); SpawnCenter(pos,'MisterGAmmo');
SpawnCircle(pos,4,"MisterRound"); SpawnCircle(pos,4,'MisterRound');
SpawnCircle(pos,8,"MisterRound",3.); SpawnCircle(pos,8,'MisterRound',3.);
} }
} }
// a spare candy gun and some bullets // a spare candy gun and some bullets
@ -844,13 +844,13 @@ Class RewardCandyGun : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("CandyGun",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("CandyGunAmmo",true)||SWWMUtility.CheckNeedsItem("CandyGunBullets",true)||SWWMUtility.CheckNeedsItem("CandyGunSpares",true)); return SWWMUtility.ItemExists('CandyGun',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('CandyGunAmmo',true)||SWWMUtility.CheckNeedsItem('CandyGunBullets',true)||SWWMUtility.CheckNeedsItem('CandyGunSpares',true));
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"CandyGun"); SpawnCenter(pos,'CandyGun');
SpawnCircle(pos,7,"CandyGunBullets"); SpawnCircle(pos,7,'CandyGunBullets');
} }
} }
// them big bolts // them big bolts
@ -858,14 +858,14 @@ Class RewardCandyGun : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("RayKhom",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("RayAmmo",true)||SWWMUtility.CheckNeedsItem("RayBolt",true)); return SWWMUtility.ItemExists('RayKhom',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('RayAmmo',true)||SWWMUtility.CheckNeedsItem('RayBolt',true));
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"RayAmmo",true); SpawnCenter(pos,'RayAmmo',true);
SpawnCircle(pos,4,"RayBolt"); SpawnCircle(pos,4,'RayBolt');
SpawnCircle(pos,6,"RayBolt",3.); SpawnCircle(pos,6,'RayBolt',3.);
} }
}*/ }*/
// them silver bullets // them silver bullets
@ -873,13 +873,13 @@ Class RewardSilverBullets : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("SilverBullet",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("SilverBulletAmmo",true)||SWWMUtility.CheckNeedsItem("SilverBullets",true)); return SWWMUtility.ItemExists('SilverBullet',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('SilverBulletAmmo',true)||SWWMUtility.CheckNeedsItem('SilverBullets',true));
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCircle(pos,4,"SilverBullets"); SpawnCircle(pos,4,'SilverBullets');
SpawnCircle(pos,6,"SilverBullets",3.); SpawnCircle(pos,6,'SilverBullets',3.);
} }
} }
// blues 'n reds // blues 'n reds
@ -887,12 +887,12 @@ Class RewardSilverBullets : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("ModernSparkster",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("SparksterBAmmo",true)||SWWMUtility.CheckNeedsItem("SparksterRAmmo",true)); return SWWMUtility.ItemExists('ModernSparkster',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('SparksterBAmmo',true)||SWWMUtility.CheckNeedsItem('SparksterRAmmo',true));
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCircle(pos,6,"SparksterBAmmo",item2:"SparksterRAmmo"); SpawnCircle(pos,6,'SparksterBAmmo',item2:'SparksterRAmmo');
} }
}*/ }*/
// buncha spark units // buncha spark units
@ -900,13 +900,13 @@ Class RewardSparkUnits : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("Sparkster",ownedonly:true)&&SWWMUtility.CheckNeedsItem("SparkUnit",true); return SWWMUtility.ItemExists('Sparkster',ownedonly:true)&&SWWMUtility.CheckNeedsItem('SparkUnit',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"SparkUnit2",true); SpawnCenter(pos,'SparkUnit2',true);
SpawnCircle(pos,3,"SparkUnit"); SpawnCircle(pos,3,'SparkUnit');
} }
} }
// assortment of Quadravol cells // assortment of Quadravol cells
@ -914,14 +914,14 @@ Class RewardQuadCells : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("Quadravol",ownedonly:true)&&SWWMUtility.CheckNeedsItem("QuadravolAmmo",true); return SWWMUtility.ItemExists('Quadravol',ownedonly:true)&&SWWMUtility.CheckNeedsItem('QuadravolAmmo',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"QuadravolAmmo3",true); SpawnCenter(pos,'QuadravolAmmo3',true);
SpawnCircle(pos,3,"QuadravolAmmo"); SpawnCircle(pos,3,'QuadravolAmmo');
SpawnCircle(pos,6,"QuadravolAmmo",3.); SpawnCircle(pos,6,'QuadravolAmmo',3.);
} }
} }
// lotta hellblazers // lotta hellblazers
@ -929,14 +929,14 @@ Class RewardHellblazers : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("Hellblazer",ownedonly:true)&&SWWMUtility.CheckNeedsItem("HellblazerMissiles",true); return SWWMUtility.ItemExists('Hellblazer',ownedonly:true)&&SWWMUtility.CheckNeedsItem('HellblazerMissiles',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"HellblazerMissiles3",true); SpawnCenter(pos,'HellblazerMissiles3',true);
SpawnCircle(pos,3,"HellblazerMissiles"); SpawnCircle(pos,3,'HellblazerMissiles');
SpawnCircle(pos,6,"HellblazerMissiles",3.); SpawnCircle(pos,6,'HellblazerMissiles',3.);
} }
} }
// BOOLETS // BOOLETS
@ -944,14 +944,14 @@ Class RewardSheenAmmo : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("HeavyMahSheenGun",ownedonly:true)&&SWWMUtility.CheckNeedsItem("SheenAmmo",true); return SWWMUtility.ItemExists('HeavyMahSheenGun',ownedonly:true)&&SWWMUtility.CheckNeedsItem('SheenAmmo',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"SheenBigAmmo",true); SpawnCenter(pos,'SheenBigAmmo',true);
SpawnCircle(pos,5,"SheenSmallAmmo",3.); SpawnCircle(pos,5,'SheenSmallAmmo',3.);
SpawnCircle(pos,8,"SheenAmmo3",5.,item2:"SheenAmmo2"); SpawnCircle(pos,8,'SheenAmmo3',5.,item2:'SheenAmmo2');
} }
} }
// Flak'em // Flak'em
@ -959,13 +959,13 @@ Class RewardFlakShells : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return SWWMUtility.ItemExists("Eviscerator",ownedonly:true)&&SWWMUtility.CheckNeedsItem("EvisceratorShell",true); return SWWMUtility.ItemExists('Eviscerator',ownedonly:true)&&SWWMUtility.CheckNeedsItem('EvisceratorShell',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"EvisceratorSixPack",true); SpawnCenter(pos,'EvisceratorSixPack',true);
SpawnCircle(pos,6,"EvisceratorShell",3.); SpawnCircle(pos,6,'EvisceratorShell',3.);
} }
} }
// screwbullet droppage // screwbullet droppage
@ -973,14 +973,14 @@ Class RewardFlakShells : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return (SWWMUtility.ItemExists("PuntzerBeta",ownedonly:true)||SWWMUtility.ItemExists("PuntzerGamma",ownedonly:true))&&SWWMUtility.CheckNeedsItem("SMW05Ammo",true); return (SWWMUtility.ItemExists('PuntzerBeta',ownedonly:true)||SWWMUtility.ItemExists('PuntzerGamma',ownedonly:true))&&SWWMUtility.CheckNeedsItem('SMW05Ammo',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"SMW05SmallAmmo",true); SpawnCenter(pos,'SMW05SmallAmmo',true);
SpawnCircle(pos,6,"SMW05Ammo2",2.); SpawnCircle(pos,6,'SMW05Ammo2',2.);
SpawnCircle(pos,12,"SMW05Ammo",4.); SpawnCircle(pos,12,'SMW05Ammo',4.);
} }
}*/ }*/
// Lotta shells // Lotta shells
@ -988,14 +988,14 @@ Class RewardShells : ChanceboxReward
{ {
override bool CheckRequirements() override bool CheckRequirements()
{ {
return (SWWMUtility.ItemExists("Spreadgun",ownedonly:true)||SWWMUtility.ItemExists("Wallbuster",ownedonly:true))&&SWWMUtility.CheckNeedsItem("RedShell",true); return (SWWMUtility.ItemExists('Spreadgun',ownedonly:true)||SWWMUtility.ItemExists('Wallbuster',ownedonly:true))&&SWWMUtility.CheckNeedsItem('RedShell',true);
} }
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"RedShell4",true); SpawnCenter(pos,'RedShell4',true);
SpawnCircle(pos,4,"RedShell2",2.); SpawnCircle(pos,4,'RedShell2',2.);
SpawnCircle(pos,8,"RedShell",4.); SpawnCircle(pos,8,'RedShell',4.);
} }
} }
// Buncha nuggets // Buncha nuggets
@ -1003,7 +1003,7 @@ Class RewardNuggets : ChanceboxReward
{ {
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCircle(pos,20,Random[ChanceBox](0,1)?"HealthNuggetItem":"ArmorNuggetItem",1.,7.); SpawnCircle(pos,20,Random[ChanceBox](0,1)?'HealthNuggetItem':'ArmorNuggetItem',1.,7.);
} }
} }
// Healing surprise // Healing surprise
@ -1011,8 +1011,8 @@ Class RewardSuperHealth : ChanceboxReward
{ {
override void SpawnReward( Vector3 pos ) override void SpawnReward( Vector3 pos )
{ {
SpawnCenter(pos,"RefresherItem"); SpawnCenter(pos,'RefresherItem');
SpawnCircle(pos,15,"HealthNuggetItem",3.); SpawnCircle(pos,15,'HealthNuggetItem',3.);
} }
} }
@ -1103,7 +1103,7 @@ Class Chancebox : Actor
break; break;
} }
if ( blockedff ) continue; if ( blockedff ) continue;
let sp = new("BoxSpawnSpot"); let sp = new('BoxSpawnSpot');
sp.pos = (testpos.x,testpos.y,fz); sp.pos = (testpos.x,testpos.y,fz);
sp.angle = k+180; sp.angle = k+180;
spots.Push(sp); spots.Push(sp);
@ -1121,7 +1121,7 @@ Class Chancebox : Actor
break; break;
} }
if ( blocked ) continue; if ( blocked ) continue;
let sp = new("BoxSpawnSpot"); let sp = new('BoxSpawnSpot');
sp.pos = testpos; sp.pos = testpos;
sp.angle = k+180; sp.angle = k+180;
spots.Push(sp); spots.Push(sp);
@ -1130,7 +1130,7 @@ Class Chancebox : Actor
} }
if ( spots.Size() < 10 ) continue; if ( spots.Size() < 10 ) continue;
int ws = Random[Chancebox](0,spots.Size()-1); int ws = Random[Chancebox](0,spots.Size()-1);
let c = Spawn("ChanceboxSpawner",spots[ws].pos); let c = Spawn('ChanceboxSpawner',spots[ws].pos);
c.angle = spots[ws].angle; c.angle = spots[ws].angle;
tboxes++; tboxes++;
if ( tboxes >= 3 ) break; // already spawned 3 boxes in one map (which is a lot) if ( tboxes >= 3 ) break; // already spawned 3 boxes in one map (which is a lot)
@ -1150,7 +1150,7 @@ Class Chancebox : Actor
if ( !def.ValidGame() ) continue; if ( !def.ValidGame() ) continue;
candidates.Push(c); candidates.Push(c);
} }
let ti = ThinkerIterator.Create("SWWMCollectible"); let ti = ThinkerIterator.Create('SWWMCollectible');
SWWMCollectible c; SWWMCollectible c;
while ( c = SWWMCollectible(ti.Next()) ) while ( c = SWWMCollectible(ti.Next()) )
{ {
@ -1165,7 +1165,7 @@ Class Chancebox : Actor
{ {
// spawn another smaller chancebox // spawn another smaller chancebox
// (chance increases for the inner box, up until a scale factor of 50% is reached) // (chance increases for the inner box, up until a scale factor of 50% is reached)
let a = Spawn("Chancebox",pos+(0,0,3*scale.y)); let a = Spawn('Chancebox',pos+(0,0,3*scale.y));
a.vel.z = FRandom[Chancebox](2,4); a.vel.z = FRandom[Chancebox](2,4);
a.angle = angle; a.angle = angle;
a.scale *= scale.x-.125; a.scale *= scale.x-.125;
@ -1197,7 +1197,7 @@ Class Chancebox : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",Vec3Offset(0,0,16)); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',Vec3Offset(0,0,16));
s.vel = pvel; s.vel = pvel;
s.scolor = Color(2,1,3)*Random[ExploS](64,85); s.scolor = Color(2,1,3)*Random[ExploS](64,85);
s.framestep = Random[ExploS](2,5); s.framestep = Random[ExploS](2,5);
@ -1234,7 +1234,7 @@ Class Chancebox : Actor
{ {
ang = FRandom[ExploS](0,360); ang = FRandom[ExploS](0,360);
pt = FRandom[ExploS](-90,30); pt = FRandom[ExploS](-90,30);
let c = Spawn("FancyConfetti",Vec3Offset(0,0,16*scale.y)); let c = Spawn('FancyConfetti',Vec3Offset(0,0,16*scale.y));
c.vel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](2,8); c.vel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](2,8);
} }
} }
@ -1248,7 +1248,7 @@ Class Chancebox : Actor
if ( !chanceinit ) if ( !chanceinit )
{ {
int col = 0; int col = 0;
let ti = ThinkerIterator.Create("SWWMCollectible"); let ti = ThinkerIterator.Create('SWWMCollectible');
SWWMCollectible c; SWWMCollectible c;
while ( c = SWWMCollectible(ti.Next()) ) col++; while ( c = SWWMCollectible(ti.Next()) ) col++;
int tcol = 0; int tcol = 0;
@ -1265,7 +1265,7 @@ Class Chancebox : Actor
if ( (col > 0) && !Random[Chancebox](0,alldudchance) ) if ( (col > 0) && !Random[Chancebox](0,alldudchance) )
{ {
// all boxes are duds // all boxes are duds
let ti = ThinkerIterator.Create("Chancebox"); let ti = ThinkerIterator.Create('Chancebox');
Chancebox c; Chancebox c;
while ( c = Chancebox(ti.Next()) ) while ( c = Chancebox(ti.Next()) )
{ {
@ -1277,7 +1277,7 @@ Class Chancebox : Actor
{ {
int nbox = 0, ndud = 0; int nbox = 0, ndud = 0;
// this one's a dud (unless all the others are) // this one's a dud (unless all the others are)
let ti = ThinkerIterator.Create("Chancebox"); let ti = ThinkerIterator.Create('Chancebox');
Chancebox c; Chancebox c;
while ( c = Chancebox(ti.Next()) ) while ( c = Chancebox(ti.Next()) )
{ {
@ -1290,7 +1290,7 @@ Class Chancebox : Actor
else else
{ {
// the others are duds // the others are duds
let ti = ThinkerIterator.Create("Chancebox"); let ti = ThinkerIterator.Create('Chancebox');
Chancebox c; Chancebox c;
bool onemore = !Random[Chancebox](0,2); // unless... bool onemore = !Random[Chancebox](0,2); // unless...
while ( c = Chancebox(ti.Next()) ) while ( c = Chancebox(ti.Next()) )
@ -1310,7 +1310,7 @@ Class Chancebox : Actor
} }
SWWMLoreLibrary.Add(user.player,"Chancebox"); SWWMLoreLibrary.Add(user.player,"Chancebox");
specialf2 = AngleTo(user); specialf2 = AngleTo(user);
SetStateLabel("PreActive"); SetStateLabel('PreActive');
target = user; target = user;
return true; return true;
} }
@ -1319,15 +1319,15 @@ Class Chancebox : Actor
Super.PostBeginPlay(); Super.PostBeginPlay();
for ( int i=0; i<4; i++ ) for ( int i=0; i<4; i++ )
{ {
let l = Spawn("CBoxLight",pos); let l = Spawn('CBoxLight',pos);
l.special1 = i; l.special1 = i;
l.target = self; l.target = self;
} }
let ti = ThinkerIterator.Create("Chancebox"); let ti = ThinkerIterator.Create('Chancebox');
Chancebox c; Chancebox c;
while ( c = Chancebox(ti.Next()) ) while ( c = Chancebox(ti.Next()) )
{ {
if ( c.dud || (c.CurState == c.FindState("Spawn")) ) if ( c.dud || (c.CurState == c.FindState('Spawn')) )
continue; continue;
// automatically become a dud if collectible has been found // automatically become a dud if collectible has been found
dud = true; dud = true;
@ -1360,7 +1360,7 @@ Class Chancebox : Actor
int sign = (delta>=0.)?1:-1; int sign = (delta>=0.)?1:-1;
delta = clamp(abs(delta)*.15,.1,10.)*sign; delta = clamp(abs(delta)*.15,.1,10.)*sign;
angle += delta; angle += delta;
return A_JumpIf(abs(deltaangle(angle,specialf2))<1.,"Active"); return A_JumpIf(abs(deltaangle(angle,specialf2))<1.,'Active');
} }
Wait; Wait;
Active: Active:
@ -1377,7 +1377,7 @@ Class Chancebox : Actor
pitch = FRandom[Chancebox](-5,5); pitch = FRandom[Chancebox](-5,5);
roll = FRandom[Chancebox](-5,5); roll = FRandom[Chancebox](-5,5);
special1++; special1++;
return A_JumpIf(special1>int(40*scale.x),"BlowUp"); return A_JumpIf(special1>int(40*scale.x),'BlowUp');
} }
Wait; Wait;
BlowUp: BlowUp:
@ -1388,13 +1388,13 @@ Class Chancebox : Actor
A_StartSound("chancebox/explode",CHAN_VOICE,pitch:1./scale.x); A_StartSound("chancebox/explode",CHAN_VOICE,pitch:1./scale.x);
angle = specialf1; angle = specialf1;
pitch = roll = 0; pitch = roll = 0;
let t = Spawn("ChanceboxTop",Vec3Offset(0,0,20*scale.y)); let t = Spawn('ChanceboxTop',Vec3Offset(0,0,20*scale.y));
t.angle = angle; t.angle = angle;
t.scale = scale; t.scale = scale;
let s1 = Spawn("ChanceboxSide",level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle+90),0))); let s1 = Spawn('ChanceboxSide',level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle+90),0)));
s1.angle = angle+90; s1.angle = angle+90;
s1.scale = scale; s1.scale = scale;
let s2 = Spawn("ChanceboxSide",level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle-90),0))); let s2 = Spawn('ChanceboxSide',level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle-90),0)));
s2.angle = angle-90; s2.angle = angle-90;
s2.scale = scale; s2.scale = scale;
A_DropSomething(); A_DropSomething();
@ -1437,7 +1437,7 @@ Class ChanceboxTop : Actor
} }
Wait; Wait;
Death: Death:
TNT1 A 1 A_SpawnItemEx("ExplodiumBulletImpact"); TNT1 A 1 A_SpawnItemEx('ExplodiumBulletImpact');
Stop; Stop;
} }
} }
@ -1474,7 +1474,7 @@ Class ChanceboxSide : Actor
} }
Wait; Wait;
Death: Death:
TNT1 A 1 A_SpawnItemEx("ExplodiumBulletImpact"); TNT1 A 1 A_SpawnItemEx('ExplodiumBulletImpact');
Stop; Stop;
} }
} }

View file

@ -97,7 +97,7 @@ Class HealthNuggetItem : SWWMHealth
Inventory.PickupMessage "$T_NUGGETH"; Inventory.PickupMessage "$T_NUGGETH";
Inventory.MaxAmount 0; Inventory.MaxAmount 0;
Inventory.InterHubAmount 0; Inventory.InterHubAmount 0;
SWWMHealth.GiveHealth "HealthNugget"; SWWMHealth.GiveHealth 'HealthNugget';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
-INVENTORY.INVBAR; -INVENTORY.INVBAR;
} }
@ -131,7 +131,7 @@ Class TetraHealthItem : SWWMHealth
Inventory.PickupMessage "$T_TETRAHEALTH"; Inventory.PickupMessage "$T_TETRAHEALTH";
Inventory.MaxAmount 15; Inventory.MaxAmount 15;
Inventory.InterHubAmount 15; Inventory.InterHubAmount 15;
SWWMHealth.GiveHealth "TetraHealth"; SWWMHealth.GiveHealth 'TetraHealth';
} }
States States
{ {
@ -156,7 +156,7 @@ Class CubeHealthItem : SWWMHealth
Inventory.PickupMessage "$T_CUBEHEALTH"; Inventory.PickupMessage "$T_CUBEHEALTH";
Inventory.MaxAmount 10; Inventory.MaxAmount 10;
Inventory.InterHubAmount 10; Inventory.InterHubAmount 10;
SWWMHealth.GiveHealth "CubeHealth"; SWWMHealth.GiveHealth 'CubeHealth';
} }
States States
{ {
@ -178,9 +178,9 @@ Class RefresherItem : SWWMHealth
SWWMUtility.AchievementProgressInc("refresh",1,Owner.player); SWWMUtility.AchievementProgressInc("refresh",1,Owner.player);
// regen effect doesn't stack if we autoactivated recursively // regen effect doesn't stack if we autoactivated recursively
if ( recursive ) return; if ( recursive ) return;
let p = Powerup(Owner.FindInventory("RefresherRegen")); let p = Powerup(Owner.FindInventory('RefresherRegen'));
if ( p ) p.EffectTics += p.default.EffectTics; if ( p ) p.EffectTics += p.default.EffectTics;
else Owner.GiveInventory("RefresherRegen",1); else Owner.GiveInventory('RefresherRegen',1);
SWWMHandler.DoFlash(Owner,Color(80,224,128,255),20); SWWMHandler.DoFlash(Owner,Color(80,224,128,255),20);
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= 0.95; Demolitionist(Owner).lastbump *= 0.95;
@ -199,7 +199,7 @@ Class RefresherItem : SWWMHealth
Inventory.PickupMessage "$T_REFRESHER"; Inventory.PickupMessage "$T_REFRESHER";
Inventory.PickupSound "misc/p_pkup"; Inventory.PickupSound "misc/p_pkup";
Inventory.UseSound "powerup/refresheruse"; Inventory.UseSound "powerup/refresheruse";
SWWMHealth.GiveHealth "RefresherHealth"; SWWMHealth.GiveHealth 'RefresherHealth';
+COUNTITEM; +COUNTITEM;
+INVENTORY.BIGPOWERUP; +INVENTORY.BIGPOWERUP;
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;

View file

@ -38,7 +38,7 @@ Class SWWMRedCard : SWWMKey
Tag "$T_REDCARD"; Tag "$T_REDCARD";
Species "RedCard"; Species "RedCard";
Inventory.PickupMessage "$T_REDCARD"; Inventory.PickupMessage "$T_REDCARD";
Inventory.PickupFlash "SWWMRedPickupFlash"; Inventory.PickupFlash 'SWWMRedPickupFlash';
} }
States States
{ {
@ -54,7 +54,7 @@ Class SWWMYellowCard : SWWMKey
Tag "$T_YELLOWCARD"; Tag "$T_YELLOWCARD";
Species "YellowCard"; Species "YellowCard";
Inventory.PickupMessage "$T_YELLOWCARD"; Inventory.PickupMessage "$T_YELLOWCARD";
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
} }
States States
{ {
@ -70,7 +70,7 @@ Class SWWMBlueCard : SWWMKey
Tag "$T_BLUECARD"; Tag "$T_BLUECARD";
Species "BlueCard"; Species "BlueCard";
Inventory.PickupMessage "$T_BLUECARD"; Inventory.PickupMessage "$T_BLUECARD";
Inventory.PickupFlash "SWWMBluePickupFlash"; Inventory.PickupFlash 'SWWMBluePickupFlash';
} }
States States
{ {
@ -86,7 +86,7 @@ Class SWWMSilverCardKDiZD : SWWMKey
Tag "$T_SILVERCARD"; Tag "$T_SILVERCARD";
Species "BlueSkull"; Species "BlueSkull";
Inventory.PickupMessage "$T_SILVERCARD"; Inventory.PickupMessage "$T_SILVERCARD";
Inventory.PickupFlash "SWWMWhitePickupFlash"; Inventory.PickupFlash 'SWWMWhitePickupFlash';
} }
States States
{ {
@ -102,7 +102,7 @@ Class SWWMGreenCardKDiZD : SWWMKey
Tag "$T_GREENCARD"; Tag "$T_GREENCARD";
Species "YellowSkull"; Species "YellowSkull";
Inventory.PickupMessage "$T_GREENCARD"; Inventory.PickupMessage "$T_GREENCARD";
Inventory.PickupFlash "SWWMGreenPickupFlash"; Inventory.PickupFlash 'SWWMGreenPickupFlash';
} }
States States
{ {
@ -118,7 +118,7 @@ Class SWWMOrangeCardKDiZD : SWWMKey
Tag "$T_ORANGECARD"; Tag "$T_ORANGECARD";
Species "RedSkull"; Species "RedSkull";
Inventory.PickupMessage "$T_ORANGECARD"; Inventory.PickupMessage "$T_ORANGECARD";
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
} }
States States
{ {
@ -134,7 +134,7 @@ Class SWWMGreenCard : SWWMKey
Tag "$T_GREENCARD"; Tag "$T_GREENCARD";
Species "GreenCard"; Species "GreenCard";
Inventory.PickupMessage "$T_GREENCARD"; Inventory.PickupMessage "$T_GREENCARD";
Inventory.PickupFlash "SWWMGreenPickupFlash"; Inventory.PickupFlash 'SWWMGreenPickupFlash';
} }
States States
{ {
@ -152,7 +152,7 @@ Class SWWMRedSkull : SWWMKey
Tag "$T_REDSKULL"; Tag "$T_REDSKULL";
Species "RedSkull"; Species "RedSkull";
Inventory.PickupMessage "$T_REDSKULL"; Inventory.PickupMessage "$T_REDSKULL";
Inventory.PickupFlash "SWWMRedPickupFlash"; Inventory.PickupFlash 'SWWMRedPickupFlash';
} }
States States
{ {
@ -168,7 +168,7 @@ Class SWWMBlueSkull : SWWMKey
Tag "$T_BLUESKULL"; Tag "$T_BLUESKULL";
Species "BlueSkull"; Species "BlueSkull";
Inventory.PickupMessage "$T_BLUESKULL"; Inventory.PickupMessage "$T_BLUESKULL";
Inventory.PickupFlash "SWWMBluePickupFlash"; Inventory.PickupFlash 'SWWMBluePickupFlash';
} }
States States
{ {
@ -184,7 +184,7 @@ Class SWWMYellowSkull : SWWMKey
Tag "$T_YELLOWSKULL"; Tag "$T_YELLOWSKULL";
Species "YellowSkull"; Species "YellowSkull";
Inventory.PickupMessage "$T_YELLOWSKULL"; Inventory.PickupMessage "$T_YELLOWSKULL";
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
} }
States States
{ {
@ -200,7 +200,7 @@ Class SWWMPurpleSkull : SWWMKey
Tag "$T_PURPLESKULL"; Tag "$T_PURPLESKULL";
Species "PurpleSkull"; Species "PurpleSkull";
Inventory.PickupMessage "$T_PURPLESKULL"; Inventory.PickupMessage "$T_PURPLESKULL";
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
} }
States States
{ {
@ -283,7 +283,7 @@ Class SWWMKeyGreen : SWWMKey
Tag "$T_KEYGREEN"; Tag "$T_KEYGREEN";
Species "KeyGreen"; Species "KeyGreen";
Inventory.PickupMessage "$T_KEYGREEN"; Inventory.PickupMessage "$T_KEYGREEN";
Inventory.PickupFlash "SWWMGreenPickupFlash"; Inventory.PickupFlash 'SWWMGreenPickupFlash';
} }
States States
{ {
@ -299,7 +299,7 @@ Class SWWMKeyBlue : SWWMKey
Tag "$T_KEYBLUE"; Tag "$T_KEYBLUE";
Species "KeyBlue"; Species "KeyBlue";
Inventory.PickupMessage "$T_KEYBLUE"; Inventory.PickupMessage "$T_KEYBLUE";
Inventory.PickupFlash "SWWMBluePickupFlash"; Inventory.PickupFlash 'SWWMBluePickupFlash';
} }
States States
{ {
@ -315,7 +315,7 @@ Class SWWMKeyYellow : SWWMKey
Tag "$T_KEYYELLOW"; Tag "$T_KEYYELLOW";
Species "KeyYellow"; Species "KeyYellow";
Inventory.PickupMessage "$T_KEYYELLOW"; Inventory.PickupMessage "$T_KEYYELLOW";
Inventory.PickupFlash "SWWMPickupFlash"; Inventory.PickupFlash 'SWWMPickupFlash';
} }
States States
{ {
@ -331,7 +331,7 @@ Class SWWMKeyRed : SWWMKey
Tag "$T_KEYRED"; Tag "$T_KEYRED";
Species "KeyRed"; Species "KeyRed";
Inventory.PickupMessage "$T_KEYRED"; Inventory.PickupMessage "$T_KEYRED";
Inventory.PickupFlash "SWWMRedPickupFlash"; Inventory.PickupFlash 'SWWMRedPickupFlash';
} }
States States
{ {

View file

@ -60,7 +60,7 @@ Class LampMoth : Actor
{ {
// look for nearby lamps // look for nearby lamps
double mindist = 62500.; double mindist = 62500.;
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
foreach ( s:level.Sectors ) foreach ( s:level.Sectors )
{ {
// don't check sectors that aren't within bounds, saves some time // don't check sectors that aren't within bounds, saves some time
@ -111,12 +111,12 @@ Class LampMoth : Actor
if ( !target || (target.Health <= 0) || target.IsFriend(self) ) if ( !target || (target.Health <= 0) || target.IsFriend(self) )
{ {
A_ClearTarget(); A_ClearTarget();
SetStateLabel("Spawn"); SetStateLabel('Spawn');
return; return;
} }
if ( CheckMeleeRange() ) if ( CheckMeleeRange() )
{ {
SetStateLabel("Melee"); SetStateLabel('Melee');
return; return;
} }
Vector3 dest = target.Vec3Offset(0,0,target.height*.75); Vector3 dest = target.Vec3Offset(0,0,target.height*.75);
@ -145,7 +145,7 @@ Class LampMoth : Actor
{ {
if ( !lamp ) if ( !lamp )
{ {
SetStateLabel("Spawn"); SetStateLabel('Spawn');
return; return;
} }
double dst = level.Vec3Diff(pos,trail).length(); double dst = level.Vec3Diff(pos,trail).length();
@ -219,7 +219,7 @@ Class LampMoth : Actor
lifespan--; lifespan--;
if ( lifespan <= 0 ) if ( lifespan <= 0 )
{ {
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.alpha *= .3; s.alpha *= .3;
Destroy(); Destroy();
} }
@ -227,7 +227,7 @@ Class LampMoth : Actor
States States
{ {
Spawn: Spawn:
XZW1 B 0 A_JumpIf(isEntranced(),"See.Entranced"); XZW1 B 0 A_JumpIf(isEntranced(),'See.Entranced');
XZW1 BC 1 XZW1 BC 1
{ {
A_SmoothWander(); A_SmoothWander();
@ -235,11 +235,11 @@ Class LampMoth : Actor
} }
Loop; Loop;
See: // go for enemies See: // go for enemies
XZW1 B 0 A_JumpIf(isEntranced(),"See.Entranced"); XZW1 B 0 A_JumpIf(isEntranced(),'See.Entranced');
XZW1 BC 1 A_SmoothChase(); XZW1 BC 1 A_SmoothChase();
Loop; Loop;
See.Entranced: // follow the lamp See.Entranced: // follow the lamp
XZW1 B 0 A_JumpIf(!isEntranced(),"Spawn"); XZW1 B 0 A_JumpIf(!isEntranced(),'Spawn');
XZW1 BC 1 XZW1 BC 1
{ {
A_FollowLamp(); A_FollowLamp();
@ -255,7 +255,7 @@ Class LampMoth : Actor
TNT1 A 1 TNT1 A 1
{ {
A_StartSound("moth/die",CHAN_VOICE,CHANF_OVERLAP,.6,2.5); A_StartSound("moth/die",CHAN_VOICE,CHANF_OVERLAP,.6,2.5);
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.alpha *= .3; s.alpha *= .3;
} }
Stop; Stop;
@ -314,14 +314,14 @@ Class CompanionLamp : Actor
Vector3 spawnpos = level.Vec3Offset(Vec3Offset(0,0,height/2),ofs); Vector3 spawnpos = level.Vec3Offset(Vec3Offset(0,0,height/2),ofs);
if ( !level.IsPointInLevel(spawnpos) ) return; if ( !level.IsPointInLevel(spawnpos) ) return;
// higher chance of white moths if carrying the plush // higher chance of white moths if carrying the plush
int mchance = parent.FindInventory("MothPlushy")?3:9; int mchance = parent.FindInventory('MothPlushy')?3:9;
let m = LampMoth(Spawn(Random[Moth](0,mchance)?"LampMoth":"LampMoth2",spawnpos)); let m = LampMoth(Spawn(Random[Moth](0,mchance)?'LampMoth':'LampMoth2',spawnpos));
if ( !m.TestMobjLocation() ) if ( !m.TestMobjLocation() )
{ {
m.Destroy(); m.Destroy();
return; return;
} }
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",m.pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',m.pos);
s.alpha *= .3; s.alpha *= .3;
m.master = parent; m.master = parent;
m.lamp = self; m.lamp = self;
@ -337,7 +337,7 @@ Class CompanionLamp : Actor
Destroy(); Destroy();
return; return;
} }
Spawn("SWWMItemFog",pos); Spawn('SWWMItemFog',pos);
Trail = pos; Trail = pos;
} }
@ -392,7 +392,7 @@ Class CompanionLamp : Actor
{ {
Vector3 rel = level.Vec3Diff(pos,trail); Vector3 rel = level.Vec3Diff(pos,trail);
justteleport = false; justteleport = false;
Actor f = Spawn("SWWMItemFog",pos); Actor f = Spawn('SWWMItemFog',pos);
f.A_StartSound("lamp/disappear",CHAN_VOICE); f.A_StartSound("lamp/disappear",CHAN_VOICE);
// carry over the moths // carry over the moths
foreach ( m:moff ) foreach ( m:moff )
@ -409,7 +409,7 @@ Class CompanionLamp : Actor
SetOrigin(trail,false); SetOrigin(trail,false);
angle = AngleTo(parent); angle = AngleTo(parent);
vel *= 0.; vel *= 0.;
f = Spawn("SWWMItemFog",pos); f = Spawn('SWWMItemFog',pos);
f.A_StartSound("lamp/appear",CHAN_VOICE); f.A_StartSound("lamp/appear",CHAN_VOICE);
return; return;
} }
@ -477,7 +477,7 @@ Class CompanionLamp : Actor
if ( SWWMLamp(master) && SWWMLamp(master).bActive ) if ( SWWMLamp(master) && SWWMLamp(master).bActive )
{ {
A_StartSound("lamp/on",CHAN_ITEMEXTRA,CHANF_OVERLAP); A_StartSound("lamp/on",CHAN_ITEMEXTRA,CHANF_OVERLAP);
return ResolveState("Active"); return ResolveState('Active');
} }
return ResolveState(null); return ResolveState(null);
} }
@ -489,7 +489,7 @@ Class CompanionLamp : Actor
if ( !SWWMLamp(master) || !SWWMLamp(master).bActive ) if ( !SWWMLamp(master) || !SWWMLamp(master).bActive )
{ {
A_StartSound("lamp/off",CHAN_ITEMEXTRA,CHANF_OVERLAP); A_StartSound("lamp/off",CHAN_ITEMEXTRA,CHANF_OVERLAP);
return ResolveState("Spawn"); return ResolveState('Spawn');
} }
return ResolveState(null); return ResolveState(null);
} }
@ -591,10 +591,10 @@ Class SWWMLamp : Inventory
Super.DoEffect(); Super.DoEffect();
if ( !thelamp && bActivated ) if ( !thelamp && bActivated )
{ {
thelamp = Spawn("CompanionLamp",level.Vec3Offset(Owner.pos,SWWMUtility.RotateVector3((20,0,24),Owner.angle))); thelamp = Spawn('CompanionLamp',level.Vec3Offset(Owner.pos,SWWMUtility.RotateVector3((20,0,24),Owner.angle)));
CompanionLamp(thelamp).parent = Owner; CompanionLamp(thelamp).parent = Owner;
thelamp.master = self; thelamp.master = self;
let f = Spawn("SWWMItemFog",thelamp.pos); let f = Spawn('SWWMItemFog',thelamp.pos);
f.A_StartSound("lamp/appear",CHAN_VOICE); f.A_StartSound("lamp/appear",CHAN_VOICE);
} }
if ( bActive && !(level.maptime%35) && !isFrozen() ) Charge--; if ( bActive && !(level.maptime%35) && !isFrozen() ) Charge--;
@ -604,7 +604,7 @@ Class SWWMLamp : Inventory
inactivetime++; inactivetime++;
if ( inactivetime > 350 ) // hide the lamp after 10 seconds of inactivity, so it doesn't get in your way if ( inactivetime > 350 ) // hide the lamp after 10 seconds of inactivity, so it doesn't get in your way
{ {
let f = Spawn("SWWMItemFog",thelamp.pos); let f = Spawn('SWWMItemFog',thelamp.pos);
f.A_StartSound("lamp/disappear",CHAN_VOICE); f.A_StartSound("lamp/disappear",CHAN_VOICE);
thelamp.Destroy(); thelamp.Destroy();
bActivated = false; bActivated = false;
@ -622,7 +622,7 @@ Class SWWMLamp : Inventory
Super.DetachFromOwner(); Super.DetachFromOwner();
if ( thelamp ) if ( thelamp )
{ {
let f = Spawn("SWWMItemFog",thelamp.pos); let f = Spawn('SWWMItemFog',thelamp.pos);
f.A_StartSound("lamp/disappear",CHAN_VOICE); f.A_StartSound("lamp/disappear",CHAN_VOICE);
thelamp.Destroy(); thelamp.Destroy();
} }
@ -643,7 +643,7 @@ Class SWWMLamp : Inventory
Inventory.Amount 1; Inventory.Amount 1;
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;

View file

@ -20,7 +20,7 @@ Class Omnisight : Inventory
Demolitionist(rt).lastbump *= 1.1; Demolitionist(rt).lastbump *= 1.1;
level.allmap = true; level.allmap = true;
// activate all interest markers // activate all interest markers
let ti = ThinkerIterator.Create("SWWMInterestMarker",STAT_MAPMARKER); let ti = ThinkerIterator.Create('SWWMInterestMarker',STAT_MAPMARKER);
Actor a; Actor a;
while ( a = Actor(ti.Next()) ) a.bDORMANT = false; while ( a = Actor(ti.Next()) ) a.bDORMANT = false;
// "spread" to all players // "spread" to all players
@ -44,8 +44,8 @@ Class Omnisight : Inventory
Tag "$T_OMNISIGHT"; Tag "$T_OMNISIGHT";
Inventory.PickupSound "misc/p_pkup"; Inventory.PickupSound "misc/p_pkup";
Inventory.PickupMessage "$I_OMNISIGHT"; Inventory.PickupMessage "$I_OMNISIGHT";
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
Inventory.PickupFlash "SWWMCyanPickupFlash"; Inventory.PickupFlash 'SWWMCyanPickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+COUNTITEM; +COUNTITEM;
+INVENTORY.BIGPOWERUP; +INVENTORY.BIGPOWERUP;
@ -91,7 +91,7 @@ Class SafetyTether : Inventory
{ {
let p = Spawn(PickupFlash,pos); let p = Spawn(PickupFlash,pos);
p.target = self; p.target = self;
p.SetStateLabel("Pickup"); p.SetStateLabel('Pickup');
} }
return ret; return ret;
} }
@ -122,11 +122,11 @@ Class SafetyTether : Inventory
if ( Owner.player == players[consoleplayer] ) Console.Printf(StringTable.Localize("$D_TETHERFAIL")); if ( Owner.player == players[consoleplayer] ) Console.Printf(StringTable.Localize("$D_TETHERFAIL"));
return; return;
} }
let s = Spawn("DemolitionistShockwave",oldpos); let s = Spawn('DemolitionistShockwave',oldpos);
s.target = Owner; s.target = Owner;
s.special1 = 120; s.special1 = 120;
s.A_AlertMonsters(0,AMF_EMITFROMTARGET); s.A_AlertMonsters(0,AMF_EMITFROMTARGET);
s = Spawn("DemolitionistShockwave",Owner.pos); s = Spawn('DemolitionistShockwave',Owner.pos);
s.target = Owner; s.target = Owner;
s.special1 = 120; s.special1 = 120;
s.A_AlertMonsters(0,AMF_EMITFROMTARGET); s.A_AlertMonsters(0,AMF_EMITFROMTARGET);
@ -178,7 +178,7 @@ Class SafetyTether : Inventory
Inventory.PickupMessage "$T_SAFETY"; Inventory.PickupMessage "$T_SAFETY";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMCyanPickupFlash"; Inventory.PickupFlash 'SWWMCyanPickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -212,7 +212,7 @@ Class BallImpact : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = (x+SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*.8).unit()*FRandom[Spreadgun](.1,1.2); Vector3 pvel = (x+SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*.8).unit()*FRandom[Spreadgun](.1,1.2);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(1,1,1)*Random[Spreadgun](128,192)); s.SetShade(Color(1,1,1)*Random[Spreadgun](128,192));
} }
@ -220,14 +220,14 @@ Class BallImpact : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](2,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](2,8);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[Spreadgun](4,8); numpt = Random[Spreadgun](4,8);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](2,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](2,8);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
Destroy(); Destroy();
@ -256,6 +256,7 @@ Class TheBall : Actor
+NODAMAGETHRUST; +NODAMAGETHRUST;
+ALLOWBOUNCEONACTORS; +ALLOWBOUNCEONACTORS;
+DONTBOUNCEONSHOOTABLES; +DONTBOUNCEONSHOOTABLES;
+KEEPBOUNCEANGLE;
+HITOWNER; +HITOWNER;
-NOGRAVITY; -NOGRAVITY;
Speed 80; Speed 80;
@ -279,7 +280,7 @@ Class TheBall : Actor
bool crit = false; bool crit = false;
if ( is_schutt && !Random[Spreadgun](0,9) ) if ( is_schutt && !Random[Spreadgun](0,9) )
{ {
Spawn("SWWMItemFog",pos); Spawn('SWWMItemFog',pos);
int whichclonk = Random[Spreadgun](1,11); int whichclonk = Random[Spreadgun](1,11);
String snd = String.Format("misc/clonk%d",whichclonk); String snd = String.Format("misc/clonk%d",whichclonk);
A_AlertMonsters(swwm_uncapalert?0:2500,AMF_EMITFROMTARGET); A_AlertMonsters(swwm_uncapalert?0:2500,AMF_EMITFROMTARGET);
@ -294,7 +295,7 @@ Class TheBall : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](1,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](1,8);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.scale *= 3.; s.scale *= 3.;
s.alpha *= .2; s.alpha *= .2;
s.vel = pvel; s.vel = pvel;
@ -323,7 +324,7 @@ Class TheBall : Actor
if ( victim ) victim.A_StartSound("leadball/hit",CHAN_DAMAGE,CHANF_OVERLAP,(vel.length()/30.)**.5); if ( victim ) victim.A_StartSound("leadball/hit",CHAN_DAMAGE,CHANF_OVERLAP,(vel.length()/30.)**.5);
if ( vel.length() > 15. ) if ( vel.length() > 15. )
{ {
let s = Spawn("BallImpact",pos); let s = Spawn('BallImpact',pos);
s.angle = atan2(dir.y,dir.x); s.angle = atan2(dir.y,dir.x);
s.pitch = asin(-dir.z); s.pitch = asin(-dir.z);
} }
@ -331,7 +332,7 @@ Class TheBall : Actor
// make it so the crit does not propagate to friendlies unless we bonked a friend (you monster!) // make it so the crit does not propagate to friendlies unless we bonked a friend (you monster!)
if ( crit ) if ( crit )
SWWMUtility.DoExplosion(self,dmg/2,25000,150,80,((victim.isFriend(target))?0:DE_NOHURTFRIEND)|DE_NONEXPLOSIVE,crit?'CriticalConcussion':'Concussion',target,DMG_FOILINVUL); SWWMUtility.DoExplosion(self,dmg/2,25000,150,80,((victim.isFriend(target))?0:DE_NOHURTFRIEND)|DE_NONEXPLOSIVE,crit?'CriticalConcussion':'Concussion',target,DMG_FOILINVUL);
if ( crit && victim && (victim.Health <= 0) && (victim.bBOSS || victim.FindInventory("BossMarker")) && target ) if ( crit && victim && (victim.Health <= 0) && (victim.bBOSS || victim.FindInventory('BossMarker')) && target )
SWWMUtility.MarkAchievement("clonk",target.player); SWWMUtility.MarkAchievement("clonk",target.player);
// only rip shootables // only rip shootables
if ( (slamforce > girth) && is_schutt ) if ( (slamforce > girth) && is_schutt )
@ -357,7 +358,7 @@ Class TheBall : Actor
oldvel = vel; oldvel = vel;
Super.Tick(); Super.Tick();
if ( isFrozen() || (freezetics > 0) ) return; if ( isFrozen() || (freezetics > 0) ) return;
if ( InStateSequence(CurState,ResolveState("Death")) ) if ( InStateSequence(CurState,ResolveState('Death')) )
{ {
deadtimer++; deadtimer++;
if ( deadtimer > 300 ) if ( deadtimer > 300 )
@ -366,7 +367,7 @@ Class TheBall : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](1,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Spreadgun](0,360),FRandom[Spreadgun](-90,90))*FRandom[Spreadgun](1,8);
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.scale *= 3.; s.scale *= 3.;
s.alpha *= .2; s.alpha *= .2;
s.vel = pvel; s.vel = pvel;
@ -378,7 +379,7 @@ Class TheBall : Actor
heat -= 0.004+0.0004*vel.length(); heat -= 0.004+0.0004*vel.length();
A_SoundVolume(CHAN_WEAPON,vel.length()/75.); A_SoundVolume(CHAN_WEAPON,vel.length()/75.);
if ( heat <= 0 ) return; if ( heat <= 0 ) return;
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.alpha *= heat; s.alpha *= heat;
} }
void A_HandleBounce() void A_HandleBounce()
@ -410,7 +411,7 @@ Class TheBall : Actor
A_StartSound("leadball/hit",CHAN_VOICE,CHANF_OVERLAP,max(0.,(vel.length()/30.-.2))**.5); A_StartSound("leadball/hit",CHAN_VOICE,CHANF_OVERLAP,max(0.,(vel.length()/30.-.2))**.5);
if ( vel.length() > 15 ) if ( vel.length() > 15 )
{ {
let s = Spawn("BallImpact",pos); let s = Spawn('BallImpact',pos);
s.angle = atan2(HitNormal.y,HitNormal.x); s.angle = atan2(HitNormal.y,HitNormal.x);
s.pitch = asin(-HitNormal.z); s.pitch = asin(-HitNormal.z);
} }
@ -452,13 +453,13 @@ Class SaltTracer : LineTracer
// liquid splashes // liquid splashes
if ( Results.CrossedWater ) if ( Results.CrossedWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.CrossedWaterPos; hl.hitpos = Results.CrossedWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
else if ( Results.Crossed3DWater ) else if ( Results.Crossed3DWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.Crossed3DWaterPos; hl.hitpos = Results.Crossed3DWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
@ -503,7 +504,7 @@ Class SaltImpact : SWWMNonInteractiveActor
{ {
Obituary "$O_SALTSHOT"; Obituary "$O_SALTSHOT";
DamageType 'Salt'; DamageType 'Salt';
RenderStyle "Add"; RenderStyle 'Add';
Scale 1.8; Scale 1.8;
+NODAMAGETHRUST; +NODAMAGETHRUST;
+FORCERADIUSDMG; +FORCERADIUSDMG;
@ -524,7 +525,7 @@ Class SaltImpact : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,6); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,6);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(1,3,4)*Random[ExploS](48,63)); s.SetShade(Color(1,3,4)*Random[ExploS](48,63));
s.special1 = Random[ExploS](1,2); s.special1 = Random[ExploS](1,2);
@ -535,22 +536,22 @@ Class SaltImpact : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,6); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,6);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](3,6)-special1; numpt = Random[ExploS](3,6)-special1;
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
Spawn("SaltLight2",pos); Spawn('SaltLight2',pos);
} }
States States
{ {
Spawn: Spawn:
TNT1 A 0 NoDelay A_Jump(256,"Expl1","Expl2","Expl3"); TNT1 A 0 NoDelay A_Jump(256,'Expl1','Expl2','Expl3');
Expl1: Expl1:
KSX1 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] 1 Bright; KSX1 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] 1 Bright;
Stop; Stop;
@ -569,7 +570,7 @@ Class SaltBeam : SWWMNonInteractiveActor
{ {
Obituary "$O_SALTSHOT"; Obituary "$O_SALTSHOT";
DamageType 'Salt'; DamageType 'Salt';
RenderStyle "Add"; RenderStyle 'Add';
Stamina 9; Stamina 9;
Speed 32; Speed 32;
+ROLLSPRITE; +ROLLSPRITE;
@ -583,7 +584,7 @@ Class SaltBeam : SWWMNonInteractiveActor
{ {
special1 = 1; special1 = 1;
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll); let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
let t = new("SaltTracer"); let t = new('SaltTracer');
t.Trace(pos,cursector,x,speed,0,ignore:target); t.Trace(pos,cursector,x,speed,0,ignore:target);
foreach ( l:t.ShootThroughList ) foreach ( l:t.ShootThroughList )
{ {
@ -592,14 +593,14 @@ Class SaltBeam : SWWMNonInteractiveActor
} }
foreach ( w:t.WaterHitList ) foreach ( w:t.WaterHitList )
{ {
let b = Actor.Spawn("InvisibleSplasher",w.hitpos); let b = Actor.Spawn('InvisibleSplasher',w.hitpos);
b.target = target; b.target = target;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
for ( int i=4; i<t.Results.Distance; i+=8 ) for ( int i=4; i<t.Results.Distance; i+=8 )
{ {
if ( Random[Spreadgun](0,Stamina) ) continue; if ( Random[Spreadgun](0,Stamina) ) continue;
let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",level.Vec3Offset(pos,x*i)); let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',level.Vec3Offset(pos,x*i));
b.scale *= FRandom[Spreadgun](.6,.8); b.scale *= FRandom[Spreadgun](.6,.8);
b.framestep =Random[Spreadgun](2,3); b.framestep =Random[Spreadgun](2,3);
b.alpha = .3; b.alpha = .3;
@ -620,7 +621,7 @@ Class SaltBeam : SWWMNonInteractiveActor
} }
Vector3 norm = SWWMUtility.GetLineTracerHitNormal(t.Results); Vector3 norm = SWWMUtility.GetLineTracerHitNormal(t.Results);
if ( t.Results.HitType == TRACE_HitWall ) t.Results.HitLine.RemoteActivate(tracer,t.Results.Side,SPAC_Impact,t.Results.HitPos); if ( t.Results.HitType == TRACE_HitWall ) t.Results.HitLine.RemoteActivate(tracer,t.Results.Side,SPAC_Impact,t.Results.HitPos);
let i = Spawn("SaltImpact",level.Vec3Offset(t.Results.HitPos,norm*4)); let i = Spawn('SaltImpact',level.Vec3Offset(t.Results.HitPos,norm*4));
i.angle = atan2(norm.y,norm.x); i.angle = atan2(norm.y,norm.x);
i.pitch = asin(-norm.z); i.pitch = asin(-norm.z);
i.target = target; i.target = target;
@ -632,7 +633,7 @@ Class SaltBeam : SWWMNonInteractiveActor
} }
else if ( (args[0] > 20) && !Random[Spreadgun](0,800/args[0]) ) else if ( (args[0] > 20) && !Random[Spreadgun](0,800/args[0]) )
{ {
let i = Spawn("SaltImpact",level.Vec3Offset(pos,x*speed)); let i = Spawn('SaltImpact',level.Vec3Offset(pos,x*speed));
i.angle = atan2(x.y,x.x); i.angle = atan2(x.y,x.x);
i.pitch = asin(-x.z); i.pitch = asin(-x.z);
i.target = target; i.target = target;
@ -643,8 +644,8 @@ Class SaltBeam : SWWMNonInteractiveActor
} }
// next beam // next beam
if ( !(special2%4) && !Random[Spreadgun](0,Stamina) ) if ( !(special2%4) && !Random[Spreadgun](0,Stamina) )
Spawn("SaltLight",level.Vec3Offset(pos,x*speed/2)); Spawn('SaltLight',level.Vec3Offset(pos,x*speed/2));
let next = Spawn("SaltBeam",level.Vec3Offset(pos,x*speed)); let next = Spawn('SaltBeam',level.Vec3Offset(pos,x*speed));
double a = FRandom[Spreadgun](0,360), s = FRandom[Spreadgun](0,.06); double a = FRandom[Spreadgun](0,360), s = FRandom[Spreadgun](0,.06);
Vector3 dir = SWWMUtility.ConeSpread(x,y,z,a,s); Vector3 dir = SWWMUtility.ConeSpread(x,y,z,a,s);
next.angle = atan2(dir.y,dir.x); next.angle = atan2(dir.y,dir.x);
@ -653,7 +654,7 @@ Class SaltBeam : SWWMNonInteractiveActor
next.special2 = (special2+1)%10; next.special2 = (special2+1)%10;
next.args[0] = args[0]+1; next.args[0] = args[0]+1;
next.args[1] = args[1]; next.args[1] = args[1];
next.SetStateLabel("TrailSpawn"); next.SetStateLabel('TrailSpawn');
} }
override void PostBeginPlay() override void PostBeginPlay()
@ -690,13 +691,13 @@ Class SaltBeam : SWWMNonInteractiveActor
Spawn: Spawn:
XZW1 A -1 Bright NoDelay XZW1 A -1 Bright NoDelay
{ {
return FindState("StarterDev")+Random[Spreadgun](0,11)*2; return FindState('StarterDev')+Random[Spreadgun](0,11)*2;
} }
Stop; Stop;
TrailSpawn: TrailSpawn:
XZW2 A -1 Bright XZW2 A -1 Bright
{ {
return FindState("TrailerDev")+Random[Spreadgun](0,11)*2; return FindState('TrailerDev')+Random[Spreadgun](0,11)*2;
} }
Stop; Stop;
StarterDev: StarterDev:

View file

@ -47,24 +47,24 @@ Class GrilledCheeseSandwich : Inventory
SWWMScoreObj.SpawnAtActorBunch(1000,Owner,Font.CR_BLUE); SWWMScoreObj.SpawnAtActorBunch(1000,Owner,Font.CR_BLUE);
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
{ {
let n = Owner.FindInventory("ArmorNugget"); let n = Owner.FindInventory('ArmorNugget');
if ( !n ) Owner.GiveInventory("ArmorNugget",GetDefaultByType("ArmorNugget").MaxAmount); if ( !n ) Owner.GiveInventory('ArmorNugget',GetDefaultByType('ArmorNugget').MaxAmount);
else else
{ {
n.Amount = n.MaxAmount; n.Amount = n.MaxAmount;
if ( Owner.player == players[consoleplayer] ) if ( Owner.player == players[consoleplayer] )
SWWMScoreObj.SpawnAtActorBunch(n.MaxAmount,Owner,Font.CR_GREEN); SWWMScoreObj.SpawnAtActorBunch(n.MaxAmount,Owner,Font.CR_GREEN);
} }
let b = Owner.FindInventory("BlastSuit"); let b = Owner.FindInventory('BlastSuit');
if ( !b ) Owner.GiveInventory("BlastSuit",GetDefaultByType("BlastSuit").MaxAmount); if ( !b ) Owner.GiveInventory('BlastSuit',GetDefaultByType('BlastSuit').MaxAmount);
else else
{ {
b.Amount = b.MaxAmount; b.Amount = b.MaxAmount;
if ( Owner.player == players[consoleplayer] ) if ( Owner.player == players[consoleplayer] )
SWWMScoreObj.SpawnAtActorBunch(b.MaxAmount,Owner,Font.CR_GREEN); SWWMScoreObj.SpawnAtActorBunch(b.MaxAmount,Owner,Font.CR_GREEN);
} }
let w = Owner.FindInventory("WarArmor"); let w = Owner.FindInventory('WarArmor');
if ( !w ) Owner.GiveInventory("WarArmor",GetDefaultByType("WarArmor").MaxAmount); if ( !w ) Owner.GiveInventory('WarArmor',GetDefaultByType('WarArmor').MaxAmount);
else else
{ {
w.Amount = w.MaxAmount; w.Amount = w.MaxAmount;
@ -76,11 +76,11 @@ Class GrilledCheeseSandwich : Inventory
SWWMLoreLibrary.Add(Owner.player,"WarArmor"); SWWMLoreLibrary.Add(Owner.player,"WarArmor");
Demolitionist(Owner).lastbump *= 1.2; Demolitionist(Owner).lastbump *= 1.2;
} }
let f = Spawn("SWWMItemFog",Owner.Vec3Offset(0,0,Owner.Height/2)); let f = Spawn('SWWMItemFog',Owner.Vec3Offset(0,0,Owner.Height/2));
f.bAMBUSH = true; f.bAMBUSH = true;
if ( !extrasafe ) return; if ( !extrasafe ) return;
let s = Owner.FindInventory("GrilledCheeseSafeguard"); let s = Owner.FindInventory('GrilledCheeseSafeguard');
if ( !s ) Owner.GiveInventory("GrilledCheeseSafeguard",1); if ( !s ) Owner.GiveInventory('GrilledCheeseSafeguard',1);
else Powerup(s).EffectTics = Powerup(s).default.EffectTics; else Powerup(s).EffectTics = Powerup(s).default.EffectTics;
} }
override bool Use( bool pickup ) override bool Use( bool pickup )
@ -98,7 +98,7 @@ Class GrilledCheeseSandwich : Inventory
} }
override void AbsorbDamage( int damage, Name damageType, int &newdamage, Actor inflictor, Actor source, int flags ) override void AbsorbDamage( int damage, Name damageType, int &newdamage, Actor inflictor, Actor source, int flags )
{ {
if ( Owner.FindInventory("GrilledCheeseSafeguard") ) if ( Owner.FindInventory('GrilledCheeseSafeguard') )
return; // the safeguard absorbs all return; // the safeguard absorbs all
if ( Owner.ApplyDamageFactor(damageType,damage) <= 0 ) if ( Owner.ApplyDamageFactor(damageType,damage) <= 0 )
return; // this damage type is ignored by the player, so it does not affect us return; // this damage type is ignored by the player, so it does not affect us
@ -115,7 +115,7 @@ Class GrilledCheeseSandwich : Inventory
{ {
if ( (swwm_strictuntouchable == 1) && Owner.player ) if ( (swwm_strictuntouchable == 1) && Owner.player )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true; if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true;
} }
if ( damageType == 'InstantDeath' ) if ( damageType == 'InstantDeath' )
@ -128,7 +128,7 @@ Class GrilledCheeseSandwich : Inventory
} }
void SafeTeleport( bool tostart = false ) void SafeTeleport( bool tostart = false )
{ {
Spawn("SWWMItemFog",Owner.Vec3Offset(0,0,Owner.Height/2)); Spawn('SWWMItemFog',Owner.Vec3Offset(0,0,Owner.Height/2));
Vector3 safepos; Vector3 safepos;
double safeangle; double safeangle;
if ( tostart || !lastsafevalid ) if ( tostart || !lastsafevalid )
@ -236,7 +236,7 @@ Class GrilledCheeseSandwich : Inventory
Inventory.PickupMessage "$T_SANDWICH"; Inventory.PickupMessage "$T_SANDWICH";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -340,7 +340,7 @@ Class GhostTarget : Actor
} }
bt.Destroy(); bt.Destroy();
// player made noise or is visible again // player made noise or is visible again
if ( !master || (LastHeard == master) || !master.FindInventory("GhostPower") ) if ( !master || (LastHeard == master) || !master.FindInventory('GhostPower') )
{ {
// note: this is faster than using a thinkeriterator // note: this is faster than using a thinkeriterator
foreach ( s:level.Sectors ) for ( Actor a=s.thinglist; a; a=a.snext ) foreach ( s:level.Sectors ) for ( Actor a=s.thinglist; a; a=a.snext )
@ -419,14 +419,14 @@ Class GhostPower : Powerup
if ( a.target != Owner ) continue; if ( a.target != Owner ) continue;
if ( !gt ) if ( !gt )
{ {
gt = Spawn("GhostTarget",Owner.pos); gt = Spawn('GhostTarget',Owner.pos);
if ( Owner.bFRIENDLY || Owner.player ) gt.bFRIENDLY = true; if ( Owner.bFRIENDLY || Owner.player ) gt.bFRIENDLY = true;
} }
a.target = gt; a.target = gt;
a.LastHeard = gt; a.LastHeard = gt;
gt.master = Owner; gt.master = Owner;
} }
if ( !snd ) snd = Spawn("GhostSnd",Owner.pos); if ( !snd ) snd = Spawn('GhostSnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
} }
@ -454,7 +454,7 @@ Class GhostArtifact : Inventory
Inventory.PickupMessage "$T_GHOSTARTI"; Inventory.PickupMessage "$T_GHOSTARTI";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -469,14 +469,14 @@ Class GhostArtifact : Inventory
{ {
if ( pickup && !deathmatch ) return false; if ( pickup && !deathmatch ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
let g = GhostPower(Owner.FindInventory("GhostPower")); let g = GhostPower(Owner.FindInventory('GhostPower'));
if ( g ) if ( g )
{ {
g.EffectTics += g.default.EffectTics; g.EffectTics += g.default.EffectTics;
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= 1.04; Demolitionist(Owner).lastbump *= 1.04;
} }
else Owner.GiveInventory("GhostPower",1); else Owner.GiveInventory('GhostPower',1);
SWWMUtility.AchievementProgressInc("ghost",1,Owner.player); SWWMUtility.AchievementProgressInc("ghost",1,Owner.player);
return true; return true;
} }
@ -488,7 +488,7 @@ Class GhostArtifact : Inventory
override void Travelled() override void Travelled()
{ {
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("GhostArtifactX",pos); tracer = Spawn('GhostArtifactX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -497,7 +497,7 @@ Class GhostArtifact : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("GhostArtifactX",pos); tracer = Spawn('GhostArtifactX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -591,7 +591,7 @@ Class GravityPower : Powerup
if ( !Owner ) return; if ( !Owner ) return;
Owner.bFLY = true; Owner.bFLY = true;
Owner.bNOGRAVITY = true; Owner.bNOGRAVITY = true;
if ( !snd ) snd = Spawn("GravSnd",Owner.pos); if ( !snd ) snd = Spawn('GravSnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
} }
@ -602,7 +602,7 @@ Class GravityX : SWWMItemOverlay
{ {
Default Default
{ {
RenderStyle "Normal"; RenderStyle 'Normal';
} }
} }
@ -620,14 +620,14 @@ Class GravitySuppressor : Inventory
{ {
if ( pickup && !deathmatch ) return false; if ( pickup && !deathmatch ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
let g = GravityPower(Owner.FindInventory("GravityPower")); let g = GravityPower(Owner.FindInventory('GravityPower'));
if ( g ) if ( g )
{ {
g.EffectTics += g.default.EffectTics; g.EffectTics += g.default.EffectTics;
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= 1.04; Demolitionist(Owner).lastbump *= 1.04;
} }
else Owner.GiveInventory("GravityPower",1); else Owner.GiveInventory('GravityPower',1);
SWWMUtility.AchievementProgressInc("gravity",1,Owner.player); SWWMUtility.AchievementProgressInc("gravity",1,Owner.player);
return true; return true;
} }
@ -638,7 +638,7 @@ Class GravitySuppressor : Inventory
override void Travelled() override void Travelled()
{ {
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("GravityX",pos); tracer = Spawn('GravityX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -646,7 +646,7 @@ Class GravitySuppressor : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("GravityX",pos); tracer = Spawn('GravityX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -662,7 +662,7 @@ Class GravitySuppressor : Inventory
Inventory.PickupMessage "$T_GRAVITYS"; Inventory.PickupMessage "$T_GRAVITYS";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -780,7 +780,7 @@ Class InvinciballPower : Powerup
Super.InitEffect(); Super.InitEffect();
if ( !Owner ) return; if ( !Owner ) return;
lasteffect = int.min; lasteffect = int.min;
l = Spawn("InvinciballLight",Owner.pos); l = Spawn('InvinciballLight',Owner.pos);
l.target = Owner; l.target = Owner;
l.master = self; l.master = self;
lastpulse = max(lastpulse,gametic+35); lastpulse = max(lastpulse,gametic+35);
@ -793,14 +793,14 @@ Class InvinciballPower : Powerup
{ {
Super.DoEffect(); Super.DoEffect();
if ( !Owner ) return; if ( !Owner ) return;
if ( !snd ) snd = Spawn("InvinciSnd",Owner.pos); if ( !snd ) snd = Spawn('InvinciSnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
if ( am ) return; if ( am ) return;
am = Owner.FindInventory("InvinciballArmor"); am = Owner.FindInventory('InvinciballArmor');
if ( !am ) if ( !am )
{ {
am = Inventory(Spawn("InvinciballArmor")); am = Inventory(Spawn('InvinciballArmor'));
am.AttachToOwner(Owner); am.AttachToOwner(Owner);
} }
am.master = self; am.master = self;
@ -835,7 +835,7 @@ Class InvinciballX : SWWMItemOverlay
{ {
Default Default
{ {
RenderStyle "Normal"; RenderStyle 'Normal';
} }
} }
@ -859,7 +859,7 @@ Class FuckingInvinciball : Inventory
{ {
if ( pickup && !deathmatch ) return false; if ( pickup && !deathmatch ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
let i = InvinciballPower(Owner.FindInventory("InvinciballPower")); let i = InvinciballPower(Owner.FindInventory('InvinciballPower'));
if ( i ) if ( i )
{ {
i.EffectTics += i.default.EffectTics; i.EffectTics += i.default.EffectTics;
@ -870,7 +870,7 @@ Class FuckingInvinciball : Inventory
} }
else else
{ {
Owner.GiveInventory("InvinciballPower",1); Owner.GiveInventory('InvinciballPower',1);
SWWMHandler.AddOneliner("invinciball",2,40); SWWMHandler.AddOneliner("invinciball",2,40);
} }
SWWMUtility.AchievementProgressInc("sunny",1,Owner.player); SWWMUtility.AchievementProgressInc("sunny",1,Owner.player);
@ -883,7 +883,7 @@ Class FuckingInvinciball : Inventory
override void Travelled() override void Travelled()
{ {
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("InvinciballX",pos); tracer = Spawn('InvinciballX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -891,7 +891,7 @@ Class FuckingInvinciball : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("InvinciballX",pos); tracer = Spawn('InvinciballX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -907,7 +907,7 @@ Class FuckingInvinciball : Inventory
Inventory.PickupMessage "$T_INVINCIBALL"; Inventory.PickupMessage "$T_INVINCIBALL";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -1043,7 +1043,7 @@ Class RagekitPower : Powerup
lasteffect = int.min; lasteffect = int.min;
lastpulse = max(lastpulse,gametic+35); lastpulse = max(lastpulse,gametic+35);
Demolitionist(Owner).lastbump *= .95; Demolitionist(Owner).lastbump *= .95;
l = Spawn("RagekitLight",Owner.pos); l = Spawn('RagekitLight',Owner.pos);
l.target = Owner; l.target = Owner;
l.master = self; l.master = self;
} }
@ -1052,7 +1052,7 @@ Class RagekitPower : Powerup
{ {
Super.DoEffect(); Super.DoEffect();
if ( !Owner ) return; if ( !Owner ) return;
if ( !snd ) snd = Spawn("RageSnd",Owner.pos); if ( !snd ) snd = Spawn('RageSnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
if ( !(level.maptime%30) ) if ( !(level.maptime%30) )
@ -1071,10 +1071,10 @@ Class RagekitPower : Powerup
Demolitionist(Owner).lastbump *= .995; Demolitionist(Owner).lastbump *= .995;
} }
if ( am ) return; if ( am ) return;
am = Owner.FindInventory("RagekitArmor"); am = Owner.FindInventory('RagekitArmor');
if ( !am ) if ( !am )
{ {
am = Inventory(Spawn("RagekitArmor")); am = Inventory(Spawn('RagekitArmor'));
am.AttachToOwner(Owner); am.AttachToOwner(Owner);
} }
} }
@ -1125,7 +1125,7 @@ Class RagekitX : SWWMItemOverlay
{ {
Default Default
{ {
RenderStyle "Normal"; RenderStyle 'Normal';
} }
} }
@ -1153,7 +1153,7 @@ Class Ragekit : Inventory
Owner.A_QuakeEx(8.,8.,8.,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:1.); Owner.A_QuakeEx(8.,8.,8.,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:1.);
return true; return true;
} }
let r = RagekitPower(Owner.FindInventory("RagekitPower")); let r = RagekitPower(Owner.FindInventory('RagekitPower'));
if ( r ) if ( r )
{ {
r.EffectTics += r.default.EffectTics; r.EffectTics += r.default.EffectTics;
@ -1162,7 +1162,7 @@ Class Ragekit : Inventory
r.lastpulse = max(r.lastpulse,gametic+35); r.lastpulse = max(r.lastpulse,gametic+35);
Demolitionist(Owner).lastbump *= .95; Demolitionist(Owner).lastbump *= .95;
} }
else Owner.GiveInventory("RagekitPower",1); else Owner.GiveInventory('RagekitPower',1);
return true; return true;
} }
override void PreTravelled() override void PreTravelled()
@ -1172,7 +1172,7 @@ Class Ragekit : Inventory
override void Travelled() override void Travelled()
{ {
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("RagekitX",pos); tracer = Spawn('RagekitX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -1180,7 +1180,7 @@ Class Ragekit : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("RagekitX",pos); tracer = Spawn('RagekitX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -1196,7 +1196,7 @@ Class Ragekit : Inventory
Inventory.PickupMessage "$T_RAGEKIT"; Inventory.PickupMessage "$T_RAGEKIT";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -1303,7 +1303,7 @@ Class BarrierPower : PowerIronFeet
Inventory.Icon "graphics/HUD/Icons/I_Barrier.png"; Inventory.Icon "graphics/HUD/Icons/I_Barrier.png";
Powerup.Duration -60; Powerup.Duration -60;
Powerup.Color "20 FF 00", 0.1; Powerup.Color "20 FF 00", 0.1;
Powerup.Mode "Full"; // no leaky damage Powerup.Mode 'Full'; // no leaky damage
+INVENTORY.ADDITIVETIME; +INVENTORY.ADDITIVETIME;
} }
@ -1311,7 +1311,7 @@ Class BarrierPower : PowerIronFeet
{ {
Super.InitEffect(); Super.InitEffect();
if ( !Owner ) return; if ( !Owner ) return;
l = Spawn("BarrierLight",Owner.pos); l = Spawn('BarrierLight',Owner.pos);
l.target = Owner; l.target = Owner;
l.master = self; l.master = self;
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
@ -1332,15 +1332,15 @@ Class BarrierPower : PowerIronFeet
// don't reset air supply like PowerIronFeet, call parent instead // don't reset air supply like PowerIronFeet, call parent instead
Powerup.DoEffect(); Powerup.DoEffect();
if ( !Owner ) return; if ( !Owner ) return;
if ( !snd ) snd = Spawn("BarrierSnd",Owner.pos); if ( !snd ) snd = Spawn('BarrierSnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
if ( !am ) if ( !am )
{ {
am = Owner.FindInventory("BarrierArmor"); am = Owner.FindInventory('BarrierArmor');
if ( !am ) if ( !am )
{ {
am = Inventory(Spawn("BarrierArmor")); am = Inventory(Spawn('BarrierArmor'));
am.AttachToOwner(Owner); am.AttachToOwner(Owner);
} }
} }
@ -1390,14 +1390,14 @@ Class EBarrier : Inventory
{ {
if ( pickup && !deathmatch ) return false; if ( pickup && !deathmatch ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
let b = BarrierPower(Owner.FindInventory("BarrierPower")); let b = BarrierPower(Owner.FindInventory('BarrierPower'));
if ( b ) if ( b )
{ {
b.EffectTics += b.default.EffectTics; b.EffectTics += b.default.EffectTics;
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= 0.95; Demolitionist(Owner).lastbump *= 0.95;
} }
else Owner.GiveInventory("BarrierPower",1); else Owner.GiveInventory('BarrierPower',1);
SWWMUtility.AchievementProgressInc("barrier",1,Owner.player); SWWMUtility.AchievementProgressInc("barrier",1,Owner.player);
return true; return true;
} }
@ -1409,7 +1409,7 @@ Class EBarrier : Inventory
{ {
Super.Travelled(); Super.Travelled();
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("EBarrierX",pos); tracer = Spawn('EBarrierX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -1417,7 +1417,7 @@ Class EBarrier : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("EBarrierX",pos); tracer = Spawn('EBarrierX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -1427,10 +1427,10 @@ Class EBarrier : Inventory
Super.DoEffect(); Super.DoEffect();
if ( !Owner || (Owner.Health <= 0) ) return; if ( !Owner || (Owner.Health <= 0) ) return;
// do not auto-use if we're invincible, that'd be a waste // do not auto-use if we're invincible, that'd be a waste
if ( Owner.bINVULNERABLE || (Owner.player && (Owner.player.cheats&(CF_GODMODE|CF_GODMODE2))) || Owner.FindInventory("InvinciballPower") ) if ( Owner.bINVULNERABLE || (Owner.player && (Owner.player.cheats&(CF_GODMODE|CF_GODMODE2))) || Owner.FindInventory('InvinciballPower') )
return; return;
// check terrain for auto-use // check terrain for auto-use
let b = Powerup(Owner.FindInventory("BarrierPower")); let b = Powerup(Owner.FindInventory('BarrierPower'));
if ( b && (b.EffectTics > 5) ) if ( b && (b.EffectTics > 5) )
{ {
terrainwait = 20; terrainwait = 20;
@ -1483,7 +1483,7 @@ Class EBarrier : Inventory
Inventory.PickupMessage "$T_BARRIER"; Inventory.PickupMessage "$T_BARRIER";
Inventory.MaxAmount 5; Inventory.MaxAmount 5;
Inventory.InterHubAmount 5; Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMCyanPickupFlash"; Inventory.PickupFlash 'SWWMCyanPickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;

View file

@ -11,7 +11,7 @@ Class TendrilTracer : LineTracer
{ {
if ( Results.HitActor.bSHOOTABLE ) if ( Results.HitActor.bSHOOTABLE )
{ {
let ent = new("HitListEntry"); let ent = new('HitListEntry');
ent.hitactor = Results.HitActor; ent.hitactor = Results.HitActor;
ent.hitlocation = Results.HitPos; ent.hitlocation = Results.HitPos;
ent.x = Results.HitVector; ent.x = Results.HitVector;
@ -46,7 +46,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll); let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
if ( !bSTANDSTILL ) if ( !bSTANDSTILL )
{ {
let t = new("TendrilTracer"); let t = new('TendrilTracer');
t.hitlist.Clear(); t.hitlist.Clear();
t.ShootThroughList.Clear(); t.ShootThroughList.Clear();
t.Trace(pos,CurSector,x,speed,0,ignore:target); t.Trace(pos,CurSector,x,speed,0,ignore:target);
@ -59,7 +59,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
{ {
if ( hit.hitactor.IsFriend(target) ) continue; if ( hit.hitactor.IsFriend(target) ) continue;
if ( (hit.hitactor == tracer) && IsBig() ) bDoSplit = true; // we split if ( (hit.hitactor == tracer) && IsBig() ) bDoSplit = true; // we split
int dmg = (hit.hitactor.bBOSS||hit.hitactor.FindInventory("BossMarker"))?(GetMissileDamage(0,0)*4):max(hit.hitactor.Health,GetMissileDamage(0,0)); int dmg = (hit.hitactor.bBOSS||hit.hitactor.FindInventory('BossMarker'))?(GetMissileDamage(0,0)*4):max(hit.hitactor.Health,GetMissileDamage(0,0));
SWWMUtility.DoKnockback(hit.hitactor,-hit.x+(0,0,.5),((hit.hitactor.Health-dmg)<=0)?60000:8000); SWWMUtility.DoKnockback(hit.hitactor,-hit.x+(0,0,.5),((hit.hitactor.Health-dmg)<=0)?60000:8000);
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor); let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
hit.hitactor.DamageMobj(p,target,dmg,'Plasma',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF); hit.hitactor.DamageMobj(p,target,dmg,'Plasma',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
@ -68,7 +68,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
} }
} }
nextpos = level.Vec3Offset(pos,x*speed); nextpos = level.Vec3Offset(pos,x*speed);
if ( !bSTANDSTILL && (!tracer || !tracer.bSHOOTABLE || (tracer.Health <= 0) || ((tracer.bBOSS || tracer.FindInventory("BossMarker")) && !IsBig())) ) if ( !bSTANDSTILL && (!tracer || !tracer.bSHOOTABLE || (tracer.Health <= 0) || ((tracer.bBOSS || tracer.FindInventory('BossMarker')) && !IsBig())) )
{ {
ReactionTime--; ReactionTime--;
if ( ReactionTime <= 0 ) if ( ReactionTime <= 0 )
@ -103,14 +103,14 @@ Class MykradvoTendril : SWWMNonInteractiveActor
int ntendies = tracer?clamp(tracer.GetSpawnHealth()/400,2,10):2; int ntendies = tracer?clamp(tracer.GetSpawnHealth()/400,2,10):2;
for ( int i=0; i<ntendies; i++ ) for ( int i=0; i<ntendies; i++ )
{ {
let r = Spawn("MykradvoSmallTendril",nextpos); let r = Spawn('MykradvoSmallTendril',nextpos);
double a = FRandom[Mykradvo](0,360), s = FRandom[Mykradvo](0.,1.); double a = FRandom[Mykradvo](0,360), s = FRandom[Mykradvo](0.,1.);
Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s); Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s);
r.angle = atan2(sdir.y,sdir.x); r.angle = atan2(sdir.y,sdir.x);
r.pitch = asin(-sdir.z); r.pitch = asin(-sdir.z);
r.target = target; r.target = target;
r.tracer = tracer; r.tracer = tracer;
if ( tracer && (tracer.bBOSS || tracer.FindInventory("BossMarker")) ) r.ReactionTime -= Random[ExploS](5,15); if ( tracer && (tracer.bBOSS || tracer.FindInventory('BossMarker')) ) r.ReactionTime -= Random[ExploS](5,15);
else r.ReactionTime += Random[ExploS](0,20); else r.ReactionTime += Random[ExploS](0,20);
} }
return; return;
@ -125,7 +125,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
{ {
double a = FRandom[ExploS](0,360), s = FRandom[ExploS](0,1.); double a = FRandom[ExploS](0,360), s = FRandom[ExploS](0,1.);
Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s); Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s);
let r = Spawn("MykradvoSmallNullTendril",nextpos); let r = Spawn('MykradvoSmallNullTendril',nextpos);
r.angle = atan2(sdir.y,sdir.x); r.angle = atan2(sdir.y,sdir.x);
r.pitch = asin(-sdir.z); r.pitch = asin(-sdir.z);
r.target = target; r.target = target;
@ -171,7 +171,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
Default Default
{ {
Obituary "$O_MYKRADVO"; Obituary "$O_MYKRADVO";
RenderStyle "Add"; RenderStyle 'Add';
DamageFunction 100; DamageFunction 100;
ReactionTime 8; ReactionTime 8;
Speed 64; Speed 64;
@ -186,7 +186,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
XZW1 A 1 Bright XZW1 A 1 Bright
{ {
A_Spread(); A_Spread();
return FindState("Fade")+Random[Mykradvo](0,11)*2; return FindState('Fade')+Random[Mykradvo](0,11)*2;
} }
Stop; Stop;
Fade: Fade:
@ -353,7 +353,7 @@ Class MykradvoBurst : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
Scale 1.4; Scale 1.4;
} }
@ -378,7 +378,7 @@ Class MykradvoBurst : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.25,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.25,8);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.scolor = Color(1,1,1)*Random[ExploS](128,160)+Color(28,0,31); s.scolor = Color(1,1,1)*Random[ExploS](128,160)+Color(28,0,31);
s.alpha = .4; s.alpha = .4;
@ -391,13 +391,13 @@ Class MykradvoBurst : SWWMNonInteractiveActor
{ {
double ang = FRandom[ExploS](0,360); double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90); double pt = FRandom[ExploS](-90,90);
let s = Spawn("MykradvoSmallNullTendril",pos); let s = Spawn('MykradvoSmallNullTendril',pos);
s.angle = ang; s.angle = ang;
s.pitch = pt; s.pitch = pt;
s.target = target; s.target = target;
s.ReactionTime += Random[ExploS](0,8); s.ReactionTime += Random[ExploS](0,8);
} }
Spawn("MykradvoBurstLight",pos); Spawn('MykradvoBurstLight',pos);
} }
override void Tick() override void Tick()
{ {
@ -415,7 +415,7 @@ Class MykradvoBurst : SWWMNonInteractiveActor
for ( int j=0; j<numpt; j++ ) for ( int j=0; j<numpt; j++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.25,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.25,8);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.scolor = Color(1,1,1)*Random[ExploS](128,160)+Color(28,0,31); s.scolor = Color(1,1,1)*Random[ExploS](128,160)+Color(28,0,31);
s.alpha = .4; s.alpha = .4;
@ -428,7 +428,7 @@ Class MykradvoBurst : SWWMNonInteractiveActor
{ {
double ang = FRandom[ExploS](0,360); double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90); double pt = FRandom[ExploS](-90,90);
let s = Spawn("MykradvoSmallNullTendril",pos); let s = Spawn('MykradvoSmallNullTendril',pos);
s.angle = ang; s.angle = ang;
s.pitch = pt; s.pitch = pt;
s.target = target; s.target = target;
@ -441,7 +441,7 @@ Class MykradvoBurst : SWWMNonInteractiveActor
let targ = targets[0]; let targ = targets[0];
if ( targ && targ.bSHOOTABLE && (targ.Health > 0) ) if ( targ && targ.bSHOOTABLE && (targ.Health > 0) )
{ {
let t = Spawn("MykradvoTendril",pos); let t = Spawn('MykradvoTendril',pos);
t.angle = t.AngleTo(targ); t.angle = t.AngleTo(targ);
t.pitch = t.PitchTo(targ,0,targ.Height/2); t.pitch = t.PitchTo(targ,0,targ.Height/2);
t.target = target; t.target = target;
@ -555,13 +555,13 @@ Class Mykradvo : Inventory
if ( !FindTargets(Owner) ) if ( !FindTargets(Owner) )
{ {
int numpt = Random[ExploS](8,12); int numpt = Random[ExploS](8,12);
let f = Spawn("SWWMPurplePickupFlash",spawnpos-(0,0,16)); let f = Spawn('SWWMPurplePickupFlash',spawnpos-(0,0,16));
f.Scale *= .5; f.Scale *= .5;
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
double ang = FRandom[ExploS](0,360); double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90); double pt = FRandom[ExploS](-90,90);
let s = Spawn("MykradvoSmallNullTendril",spawnpos+SWWMUtility.Vec3Fromangles(ang,pt)*FRandom[Mykradvo](2,4)); let s = Spawn('MykradvoSmallNullTendril',spawnpos+SWWMUtility.Vec3Fromangles(ang,pt)*FRandom[Mykradvo](2,4));
s.angle = ang; s.angle = ang;
s.pitch = pt; s.pitch = pt;
s.ReactionTime += Random[ExploS](0,8); s.ReactionTime += Random[ExploS](0,8);
@ -573,9 +573,9 @@ Class Mykradvo : Inventory
Amount++; Amount++;
return true; return true;
} }
if ( (targets.Size() == 1) && targets[0] && !targets[0].bBOSS && !targets[0].FindInventory("BossMarker") ) if ( (targets.Size() == 1) && targets[0] && !targets[0].bBOSS && !targets[0].FindInventory('BossMarker') )
SWWMUtility.MarkAchievement("anone",Owner.player); SWWMUtility.MarkAchievement("anone",Owner.player);
let p = Spawn("MykradvoBurst",spawnpos); let p = Spawn('MykradvoBurst',spawnpos);
p.target = Owner; p.target = Owner;
MykradvoBurst(p).targets.Move(targets); MykradvoBurst(p).targets.Move(targets);
targets.Clear(); targets.Clear();
@ -592,7 +592,7 @@ Class Mykradvo : Inventory
{ {
double ang = FRandom[ExploS](0,360); double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90); double pt = FRandom[ExploS](-90,90);
let s = Spawn("MykradvoSmallNullTendril",pos+(0,0,16+GetBobOffset())+SWWMUtility.Vec3Fromangles(ang,pt)*FRandom[Mykradvo](4,8)); let s = Spawn('MykradvoSmallNullTendril',pos+(0,0,16+GetBobOffset())+SWWMUtility.Vec3Fromangles(ang,pt)*FRandom[Mykradvo](4,8));
s.angle = ang; s.angle = ang;
s.pitch = pt; s.pitch = pt;
s.ReactionTime += Random[ExploS](-2,2); s.ReactionTime += Random[ExploS](-2,2);
@ -623,7 +623,7 @@ Class Mykradvo : Inventory
Super.Travelled(); Super.Travelled();
if ( !tracer ) if ( !tracer )
{ {
tracer = Spawn("MykradvoX",pos); tracer = Spawn('MykradvoX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -631,7 +631,7 @@ Class Mykradvo : Inventory
for ( int i=0; i<2; i++ ) for ( int i=0; i<2; i++ )
{ {
if ( ringa[i] ) continue; if ( ringa[i] ) continue;
ringa[i] = Spawn("MykradvoX2",pos); ringa[i] = Spawn('MykradvoX2',pos);
ringa[i].angle = angle; ringa[i].angle = angle;
ringa[i].target = self; ringa[i].target = self;
ringa[i].FloatBobPhase = FloatBobPhase; ringa[i].FloatBobPhase = FloatBobPhase;
@ -643,13 +643,13 @@ Class Mykradvo : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("MykradvoX",pos); tracer = Spawn('MykradvoX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
for ( int i=0; i<2; i++ ) for ( int i=0; i<2; i++ )
{ {
ringa[i] = Spawn("MykradvoX2",pos); ringa[i] = Spawn('MykradvoX2',pos);
ringa[i].angle = angle; ringa[i].angle = angle;
ringa[i].target = self; ringa[i].target = self;
ringa[i].FloatBobPhase = FloatBobPhase; ringa[i].FloatBobPhase = FloatBobPhase;
@ -669,7 +669,7 @@ Class Mykradvo : Inventory
Inventory.PickupMessage "$T_MYKRADVO"; Inventory.PickupMessage "$T_MYKRADVO";
Inventory.MaxAmount 3; Inventory.MaxAmount 3;
Inventory.InterHubAmount 3; Inventory.InterHubAmount 3;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -851,7 +851,7 @@ Class AngeryPower : Powerup
lastpulse = max(lastpulse,gametic+35); lastpulse = max(lastpulse,gametic+35);
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= .95; Demolitionist(Owner).lastbump *= .95;
l = Spawn("AngeryLight",Owner.pos); l = Spawn('AngeryLight',Owner.pos);
l.target = Owner; l.target = Owner;
l.master = self; l.master = self;
} }
@ -859,7 +859,7 @@ Class AngeryPower : Powerup
{ {
Super.DoEffect(); Super.DoEffect();
if ( !Owner ) return; if ( !Owner ) return;
if ( !snd ) snd = Spawn("AngerySnd",Owner.pos); if ( !snd ) snd = Spawn('AngerySnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
} }
@ -924,7 +924,7 @@ Class AngerySigil : Inventory
if ( pickup && !deathmatch ) return false; if ( pickup && !deathmatch ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
SWWMUtility.AchievementProgressInc("deva",1,Owner.player); SWWMUtility.AchievementProgressInc("deva",1,Owner.player);
let r = AngeryPower(Owner.FindInventory("AngeryPower")); let r = AngeryPower(Owner.FindInventory('AngeryPower'));
if ( r ) if ( r )
{ {
r.EffectTics += r.default.EffectTics; r.EffectTics += r.default.EffectTics;
@ -933,7 +933,7 @@ Class AngerySigil : Inventory
if ( Owner is 'Demolitionist' ) if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= .95; Demolitionist(Owner).lastbump *= .95;
} }
else Owner.GiveInventory("AngeryPower",1); else Owner.GiveInventory('AngeryPower',1);
return true; return true;
} }
override void PreTravelled() override void PreTravelled()
@ -944,7 +944,7 @@ Class AngerySigil : Inventory
{ {
Super.Travelled(); Super.Travelled();
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("AngerySigilX",pos); tracer = Spawn('AngerySigilX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -952,7 +952,7 @@ Class AngerySigil : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("AngerySigilX",pos); tracer = Spawn('AngerySigilX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -967,7 +967,7 @@ Class AngerySigil : Inventory
Inventory.PickupMessage "$T_DEVASTATION"; Inventory.PickupMessage "$T_DEVASTATION";
Inventory.MaxAmount 3; Inventory.MaxAmount 3;
Inventory.InterHubAmount 3; Inventory.InterHubAmount 3;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;
@ -990,7 +990,7 @@ Class AngerySigilX : SWWMItemOverlay
{ {
Scale .5; Scale .5;
Alpha .35; Alpha .35;
RenderStyle "Subtract"; RenderStyle 'Subtract';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
override void PostBeginPlay() override void PostBeginPlay()
@ -1127,10 +1127,10 @@ Class DivineSpriteEffect : Inventory
override void DoEffect() override void DoEffect()
{ {
Super.DoEffect(); Super.DoEffect();
if ( !l ) l = Spawn("DivineSpriteLight",Owner.pos); if ( !l ) l = Spawn('DivineSpriteLight',Owner.pos);
l.target = Owner; l.target = Owner;
l.master = self; l.master = self;
if ( !snd ) snd = Spawn("DivineSpriteSnd",Owner.pos); if ( !snd ) snd = Spawn('DivineSpriteSnd',Owner.pos);
snd.target = Owner; snd.target = Owner;
snd.master = self; snd.master = self;
int numpt = Random[ExploS](5,10); int numpt = Random[ExploS](5,10);
@ -1140,7 +1140,7 @@ Class DivineSpriteEffect : Inventory
double scl = clamp((AlphInter.GetValue()-1000.)/6000.,2.,4.); double scl = clamp((AlphInter.GetValue()-1000.)/6000.,2.,4.);
if ( !flare.texture ) if ( !flare.texture )
{ {
flare.color1 = "White"; flare.color1 = 0xFFFFFFFF;
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png"); flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded; flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT; flare.flags = SPF_FULLBRIGHT;
@ -1212,10 +1212,10 @@ Class DivineSprite : Inventory
{ {
// never get auto-used on pickup unless we're in deathmatch // never get auto-used on pickup unless we're in deathmatch
if ( pickup && !deathmatch ) return false; if ( pickup && !deathmatch ) return false;
let p = Owner.FindInventory("DivineSpriteEffect"); let p = Owner.FindInventory('DivineSpriteEffect');
if ( p ) return false; if ( p ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
Owner.GiveInventory("DivineSpriteEffect",1); Owner.GiveInventory('DivineSpriteEffect',1);
SWWMUtility.AchievementProgressInc("divine",1,Owner.player); SWWMUtility.AchievementProgressInc("divine",1,Owner.player);
return true; return true;
} }
@ -1226,7 +1226,7 @@ Class DivineSprite : Inventory
override void Travelled() override void Travelled()
{ {
if ( tracer ) return; if ( tracer ) return;
tracer = Spawn("DivineSpriteX",pos); tracer = Spawn('DivineSpriteX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -1234,7 +1234,7 @@ Class DivineSprite : Inventory
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
tracer = Spawn("DivineSpriteX",pos); tracer = Spawn('DivineSpriteX',pos);
tracer.angle = angle; tracer.angle = angle;
tracer.target = self; tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase; tracer.FloatBobPhase = FloatBobPhase;
@ -1250,7 +1250,7 @@ Class DivineSprite : Inventory
Inventory.PickupMessage "$T_DIVINE"; Inventory.PickupMessage "$T_DIVINE";
Inventory.MaxAmount 3; Inventory.MaxAmount 3;
Inventory.InterHubAmount 3; Inventory.InterHubAmount 3;
Inventory.PickupFlash "SWWMPurplePickupFlash"; Inventory.PickupFlash 'SWWMPurplePickupFlash';
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR; +INVENTORY.INVBAR;

View file

@ -158,8 +158,8 @@ Class DemolitionistMenu : GenericMenu
tmsg = StringTable.Localize("$SWWM_MAINCONTROLS"); tmsg = StringTable.Localize("$SWWM_MAINCONTROLS");
tmsgtic = MenuTime()+50; tmsgtic = MenuTime()+50;
lasttuid = Random[TUID](); lasttuid = Random[TUID]();
hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
SetClock(c_year,c_month,c_day,c_hour,c_minute,c_tz); SetClock(c_year,c_month,c_day,c_hour,c_minute,c_tz);
clockstr = CrimeTime(c_year,c_month,c_day,c_hour,c_minute,c_tz); clockstr = CrimeTime(c_year,c_month,c_day,c_hour,c_minute,c_tz);
static const class<DemolitionistMenuTab> deftabs[] = static const class<DemolitionistMenuTab> deftabs[] =
@ -195,16 +195,12 @@ Class DemolitionistMenu : GenericMenu
t.Ticker(); t.Ticker();
tabs.Push(t); tabs.Push(t);
} }
if ( shnd.menustate ) curtab = -1;
if ( shnd.menustate.CheckKey("LastTab") )
{ {
Class<DemolitionistMenuTab> saved = shnd.menustate.At("LastTab"); Class<DemolitionistMenuTab> saved = shnd.menustate.Get("LastTab");
if ( saved ) curtab = FindTabType(saved,true); if ( saved ) curtab = FindTabType(saved,true);
} }
else
{
shnd.menustate = Dictionary.Create();
curtab = -1;
}
if ( curtab == -1 ) curtab = GetFirstTab(); if ( curtab == -1 ) curtab = GetFirstTab();
tabs[curtab].OnSelect(); tabs[curtab].OnSelect();
} }
@ -546,7 +542,7 @@ Class DemolitionistMenu : GenericMenu
double rox = int(ss.x-rwsx)/2; double rox = int(ss.x-rwsx)/2;
double roy = int(ss.y-rwsy)/2; double roy = int(ss.y-rwsy)/2;
// copy the menu dim below the window during animations, so the transition looks smoother // copy the menu dim below the window during animations, so the transition looks smoother
Screen.Dim((dimamount<0)?Color("Black"):dimcolor,(dimamount<0)?.5:dimamount,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs)); Screen.Dim((dimamount<0)?0xFF000000:dimcolor,(dimamount<0)?.5:dimamount,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs));
// draw the background and main frame // draw the background and main frame
if ( swwm_fuzz ) if ( swwm_fuzz )
{ {
@ -557,7 +553,7 @@ Class DemolitionistMenu : GenericMenu
Screen.DrawTexture(FancyBg,false,origin.x,origin.y+400.*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5); Screen.DrawTexture(FancyBg,false,origin.x,origin.y+400.*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5);
Screen.ClearClipRect(); Screen.ClearClipRect();
} }
Screen.Dim("Black",.8,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs)); Screen.Dim(0xFF000000,.8,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs));
DrawFrame(rox-origin.x,roy-origin.y,rwsx,rwsy,true); DrawFrame(rox-origin.x,roy-origin.y,rwsx,rwsy,true);
return; return;
} }
@ -571,7 +567,7 @@ Class DemolitionistMenu : GenericMenu
Screen.DrawTexture(FancyBg,false,origin.x,origin.y+400.*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5); Screen.DrawTexture(FancyBg,false,origin.x,origin.y+400.*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5);
Screen.ClearClipRect(); Screen.ClearClipRect();
} }
Screen.Dim("Black",.8,int(origin.x*hs),int(origin.y*hs),int(ws.x*hs),int(ws.y*hs)); Screen.Dim(0xFF000000,.8,int(origin.x*hs),int(origin.y*hs),int(ws.x*hs),int(ws.y*hs));
DrawFrame(0,0,ws.x,ws.y,true); DrawFrame(0,0,ws.x,ws.y,true);
// draw top and bottom separators // draw top and bottom separators
DrawHSeparator(0,14,ws.x); DrawHSeparator(0,14,ws.x);

View file

@ -9,7 +9,7 @@ Class DemolitionistHelpTab : DemolitionistMenuTab
{ {
title = StringTable.Localize("$SWWM_HELPTAB"); title = StringTable.Localize("$SWWM_HELPTAB");
bHidden = true; bHidden = true;
mtext = new("DemolitionistMenuTextBox").Init(master,StringTable.Localize("$SWWM_HELPTXT")); mtext = new('DemolitionistMenuTextBox').Init(master,StringTable.Localize("$SWWM_HELPTXT"));
return Super.Init(master); return Super.Init(master);
} }
override void OnDestroy() override void OnDestroy()

View file

@ -231,7 +231,7 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
mustsort = true; mustsort = true;
skipsel = true; skipsel = true;
// initialize // initialize
invlist = new("DemolitionistMenuList"); invlist = new('DemolitionistMenuList');
invlist.master = master; invlist.master = master;
invlist.selected = 0; invlist.selected = 0;
for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv ) for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv )
@ -245,11 +245,11 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag(); String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag();
if ( tag > tag2 ) continue; if ( tag > tag2 ) continue;
greater = true; greater = true;
invlist.items.Insert(j,new("DemolitionistMenuInvItem").Init(master,i)); invlist.items.Insert(j,new('DemolitionistMenuInvItem').Init(master,i));
break; break;
} }
if ( greater ) continue; if ( greater ) continue;
invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i)); invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,i));
} }
} }
else else
@ -284,12 +284,12 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag(); String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag();
if ( tag > tag2 ) continue; if ( tag > tag2 ) continue;
greater = true; greater = true;
invlist.items.Insert(j,new("DemolitionistMenuInvItem").Init(master,inv)); invlist.items.Insert(j,new('DemolitionistMenuInvItem').Init(master,inv));
mustsort = true; mustsort = true;
break; break;
} }
if ( greater ) continue; if ( greater ) continue;
invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,inv)); invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,inv));
mustsort = true; mustsort = true;
} }
} }
@ -641,7 +641,7 @@ Class DemolitionistMenuInvItem : DemolitionistMenuListItem
master.tmsgtic = Menu.MenuTime()+70; master.tmsgtic = Menu.MenuTime()+70;
return; return;
} }
let t = new("MenuTransaction"); let t = new('MenuTransaction');
t.uid = master.GenTUID(); t.uid = master.GenTUID();
t.type = MenuTransaction.TT_ITEMUSE; t.type = MenuTransaction.TT_ITEMUSE;
t.used = inv.GetClass(); t.used = inv.GetClass();
@ -654,7 +654,7 @@ Class DemolitionistMenuInvItem : DemolitionistMenuListItem
void DropItem() void DropItem()
{ {
if ( !inv || (inv is 'Key') || (inv is 'SWWMCollectible') ) return; if ( !inv || (inv is 'Key') || (inv is 'SWWMCollectible') ) return;
let t = new("MenuTransaction"); let t = new('MenuTransaction');
t.uid = master.GenTUID(); t.uid = master.GenTUID();
t.type = MenuTransaction.TT_ITEMDROP; t.type = MenuTransaction.TT_ITEMDROP;
t.skipresult = false; t.skipresult = false;

View file

@ -105,14 +105,14 @@ Class DemolitionistKeychainTab : DemolitionistMenuTab
mustsort = true; mustsort = true;
skipsel = true; skipsel = true;
// initialize // initialize
invlist = new("DemolitionistMenuList"); invlist = new('DemolitionistMenuList');
invlist.master = master; invlist.master = master;
invlist.selected = 0; invlist.selected = 0;
int j = 0; int j = 0;
for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv ) for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv )
{ {
if ( FilterInventory(i) ) continue; if ( FilterInventory(i) ) continue;
invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i)); invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,i));
} }
} }
else else
@ -139,7 +139,7 @@ Class DemolitionistKeychainTab : DemolitionistMenuTab
break; break;
} }
if ( skipme ) continue; if ( skipme ) continue;
invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i)); invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,i));
mustsort = true; mustsort = true;
} }
} }

View file

@ -53,13 +53,13 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab
{ {
sname[i] = StringTable.Localize("$SWWM_LORETAB"..i); sname[i] = StringTable.Localize("$SWWM_LORETAB"..i);
lwidth = max(lwidth,master.mSmallFont.StringWidth("<‼ "..sname[i].." ‼>")+6); lwidth = max(lwidth,master.mSmallFont.StringWidth("<‼ "..sname[i].." ‼>")+6);
lists[i] = new("DemolitionistMenuList"); lists[i] = new('DemolitionistMenuList');
lists[i].master = master; lists[i].master = master;
} }
loresz = lore.ent.Size(); loresz = lore.ent.Size();
foreach ( e:lore.ent ) foreach ( e:lore.ent )
{ {
let le = new("DemolitionistMenuLoreItem").Init(master,e); let le = new('DemolitionistMenuLoreItem').Init(master,e);
lists[e.tab].items.Push(le); lists[e.tab].items.Push(le);
lwidth = max(lwidth,master.mSmallFont.StringWidth("‼"..le.label)+6); lwidth = max(lwidth,master.mSmallFont.StringWidth("‼"..le.label)+6);
} }
@ -83,7 +83,7 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab
} }
override void OnSelect() override void OnSelect()
{ {
section = master.shnd.menustate.At("LastLoreSection").ToInt(); section = master.shnd.menustate.Get("LastLoreSection").ToInt();
smofs[section] = ofs[section]; smofs[section] = ofs[section];
} }
override void OnDeselect() override void OnDeselect()
@ -102,7 +102,7 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab
for ( int i=loresz; i<lore.ent.Size(); i++ ) for ( int i=loresz; i<lore.ent.Size(); i++ )
{ {
let ent = lore.ent[i]; let ent = lore.ent[i];
let le = new("DemolitionistMenuLoreItem").Init(master,ent); let le = new('DemolitionistMenuLoreItem').Init(master,ent);
lists[ent.tab].items.Push(le); lists[ent.tab].items.Push(le);
lwidth = max(lwidth,master.mSmallFont.StringWidth("‼"..le.label)+6); lwidth = max(lwidth,master.mSmallFont.StringWidth("‼"..le.label)+6);
} }
@ -235,7 +235,7 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab
active = DemolitionistMenuLoreItem(lists[section].items[sel[section]]); active = DemolitionistMenuLoreItem(lists[section].items[sel[section]]);
active.bActive = true; active.bActive = true;
clore = active.ent; clore = active.ent;
if ( !ltext ) ltext = new("DemolitionistMenuTextBox").Init(master,StringTable.Localize(clore.text),lwidth+((maxofs[section]>0)?8:0)); if ( !ltext ) ltext = new('DemolitionistMenuTextBox').Init(master,StringTable.Localize(clore.text),lwidth+((maxofs[section]>0)?8:0));
else ltext.Reinit(StringTable.Localize(clore.text),lwidth+((maxofs[section]>0)?8:0)); else ltext.Reinit(StringTable.Localize(clore.text),lwidth+((maxofs[section]>0)?8:0));
ltext.img = clore.img; ltext.img = clore.img;
master.MenuSound("menu/demosel"); master.MenuSound("menu/demosel");

View file

@ -18,7 +18,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
if ( mlog ) if ( mlog )
{ {
for ( int i=(mlog.entries.Size()-1); i>=0; i-- ) for ( int i=(mlog.entries.Size()-1); i>=0; i-- )
mtext.Push(new("DemolitionistMenuTextBox").Init(master,mlog.entries[i])); mtext.Push(new('DemolitionistMenuTextBox').Init(master,mlog.entries[i]));
return Super.Init(master); return Super.Init(master);
} }
// saves time // saves time
@ -85,7 +85,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
missionstr = "$SWWM_MISSION_DOOM5_FROMDOOM1"; missionstr = "$SWWM_MISSION_DOOM5_FROMDOOM1";
if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) ) if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) )
missionstr = "$SWWM_MISSION_NONE"; missionstr = "$SWWM_MISSION_NONE";
mtext.Push(new("DemolitionistMenuTextBox").Init(master,missionstr)); mtext.Push(new('DemolitionistMenuTextBox').Init(master,missionstr));
bool firstskip = false; bool firstskip = false;
for ( int i=csiz-1; i>=0; i-- ) for ( int i=csiz-1; i>=0; i-- )
{ {
@ -103,7 +103,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
} }
if ( StringTable.Localize(xstr) ~== xstr.Mid(1) ) if ( StringTable.Localize(xstr) ~== xstr.Mid(1) )
continue; continue;
mtext.Push(new("DemolitionistMenuTextBox").Init(master,xstr)); mtext.Push(new('DemolitionistMenuTextBox').Init(master,xstr));
} }
} }
else if ( (gameinfo.gametype&GAME_Heretic) && SWWMUtility.IsKnownMap() ) else if ( (gameinfo.gametype&GAME_Heretic) && SWWMUtility.IsKnownMap() )
@ -111,7 +111,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
missionstr = String.Format("$SWWM_MISSION_HERETIC%d",level.cluster); missionstr = String.Format("$SWWM_MISSION_HERETIC%d",level.cluster);
if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) ) if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) )
missionstr = "$SWWM_MISSION_NONE"; missionstr = "$SWWM_MISSION_NONE";
mtext.Push(new("DemolitionistMenuTextBox").Init(master,missionstr)); mtext.Push(new('DemolitionistMenuTextBox').Init(master,missionstr));
int csiz = stats.clustervisit.Size(); int csiz = stats.clustervisit.Size();
bool firstskip = false; bool firstskip = false;
for ( int i=csiz-1; i>=0; i-- ) for ( int i=csiz-1; i>=0; i-- )
@ -122,7 +122,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
String xstr = String.Format("$SWWM_MISSION_HERETIC%d",stats.clustervisit[i]); String xstr = String.Format("$SWWM_MISSION_HERETIC%d",stats.clustervisit[i]);
if ( StringTable.Localize(xstr) ~== xstr.Mid(1) ) if ( StringTable.Localize(xstr) ~== xstr.Mid(1) )
continue; continue;
mtext.Push(new("DemolitionistMenuTextBox").Init(master,xstr)); mtext.Push(new('DemolitionistMenuTextBox').Init(master,xstr));
} }
} }
else if ( (gameinfo.gametype&GAME_Hexen) && SWWMUtility.IsKnownMap() ) else if ( (gameinfo.gametype&GAME_Hexen) && SWWMUtility.IsKnownMap() )
@ -133,7 +133,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
missionstr = String.Format("$SWWM_MISSION_%s%d",gstr,level.cluster); missionstr = String.Format("$SWWM_MISSION_%s%d",gstr,level.cluster);
if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) ) if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) )
missionstr = "$SWWM_MISSION_NONE"; missionstr = "$SWWM_MISSION_NONE";
mtext.Push(new("DemolitionistMenuTextBox").Init(master,missionstr)); mtext.Push(new('DemolitionistMenuTextBox').Init(master,missionstr));
int csiz = stats.clustervisit.Size(); int csiz = stats.clustervisit.Size();
bool firstskip = false; bool firstskip = false;
for ( int i=csiz-1; i>=0; i-- ) for ( int i=csiz-1; i>=0; i-- )
@ -144,7 +144,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
String xstr = String.Format("$SWWM_MISSION_%s%d",gstr,stats.clustervisit[i]); String xstr = String.Format("$SWWM_MISSION_%s%d",gstr,stats.clustervisit[i]);
if ( StringTable.Localize(xstr) ~== xstr.Mid(1) ) if ( StringTable.Localize(xstr) ~== xstr.Mid(1) )
continue; continue;
mtext.Push(new("DemolitionistMenuTextBox").Init(master,xstr)); mtext.Push(new('DemolitionistMenuTextBox').Init(master,xstr));
} }
} }
return Super.Init(master); return Super.Init(master);
@ -265,13 +265,13 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
if ( mtext.Size() == 0 ) if ( mtext.Size() == 0 )
{ {
for ( int i=(mlog.entries.Size()-1); i>=0; i-- ) for ( int i=(mlog.entries.Size()-1); i>=0; i-- )
mtext.Push(new("DemolitionistMenuTextBox").Init(master,mlog.entries[i])); mtext.Push(new('DemolitionistMenuTextBox').Init(master,mlog.entries[i]));
sel = 0; sel = 0;
newent = true; newent = true;
} }
else for ( int i=(mlog.entries.Size()-1); i>=mtext.Size(); i-- ) else for ( int i=(mlog.entries.Size()-1); i>=mtext.Size(); i-- )
{ {
mtext.Insert(0,new("DemolitionistMenuTextBox").Init(master,mlog.entries[i])); mtext.Insert(0,new('DemolitionistMenuTextBox').Init(master,mlog.entries[i]));
sel++; sel++;
newent = true; newent = true;
} }

View file

@ -20,7 +20,7 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
{ {
sname[i] = StringTable.Localize("$SWWM_STATTAB"..i); sname[i] = StringTable.Localize("$SWWM_STATTAB"..i);
lwidth = max(lwidth,master.mSmallFont.StringWidth(sname[i])); lwidth = max(lwidth,master.mSmallFont.StringWidth(sname[i]));
lists[i] = new("DemolitionistMenuList"); lists[i] = new('DemolitionistMenuList');
lists[i].master = master; lists[i].master = master;
lists[i].selected = -1; lists[i].selected = -1;
} }
@ -28,42 +28,42 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
stats = Demolitionist(players[consoleplayer].mo)?Demolitionist(players[consoleplayer].mo).mystats:null; stats = Demolitionist(players[consoleplayer].mo)?Demolitionist(players[consoleplayer].mo).mystats:null;
if ( !stats ) return Super.Init(master); if ( !stats ) return Super.Init(master);
// the general stats are always the same in the same order, so init them all here in one go // the general stats are always the same in the same order, so init them all here in one go
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATUPTIME",stats,stat_uptime)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATUPTIME",stats,stat_uptime));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATONFOOT",stats,stat_onfoot)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATONFOOT",stats,stat_onfoot));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFLIGHT",stats,stat_flight)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFLIGHT",stats,stat_flight));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSWIM",stats,stat_swim)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSWIM",stats,stat_swim));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATTELE",stats,stat_tele)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATTELE",stats,stat_tele));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATBOOST",stats,stat_boost)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATBOOST",stats,stat_boost));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDASH",stats,stat_dash)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDASH",stats,stat_dash));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSTOMP",stats,stat_stomp)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSTOMP",stats,stat_stomp));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFUEL",stats,stat_fuel)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFUEL",stats,stat_fuel));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSPEED",stats,stat_speed)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSPEED",stats,stat_speed));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATAIRTIME",stats,stat_airtime)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATAIRTIME",stats,stat_airtime));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATPARRY",stats,stat_parry)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATPARRY",stats,stat_parry));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATPPARRY",stats,stat_pparry)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATPPARRY",stats,stat_pparry));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATWPONCH",stats,stat_wponch)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATWPONCH",stats,stat_wponch));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATBUSTS",stats,stat_busts)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATBUSTS",stats,stat_busts));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATBUTTS",stats,stat_butts)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATBUTTS",stats,stat_butts));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATPATS",stats,stat_pats)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATPATS",stats,stat_pats));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATKISS",stats,stat_kiss)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATKISS",stats,stat_kiss));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFRIENDS",stats,stat_friends)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFRIENDS",stats,stat_friends));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATITEMS",stats,stat_items)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATITEMS",stats,stat_items));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSECRETS",stats,stat_secrets)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSECRETS",stats,stat_secrets));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATKILLS",stats,stat_kills)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATKILLS",stats,stat_kills));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDEATHS",stats,stat_deaths)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDEATHS",stats,stat_deaths));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDDEALT",stats,stat_ddealt)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDDEALT",stats,stat_ddealt));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDTAKEN",stats,stat_dtaken)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDTAKEN",stats,stat_dtaken));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATTDEALT",stats,stat_tdealt)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATTDEALT",stats,stat_tdealt));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATTTAKEN",stats,stat_ttaken)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATTTAKEN",stats,stat_ttaken));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATMKILL",stats,stat_mkill)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATMKILL",stats,stat_mkill));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSKILL",stats,stat_skill)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSKILL",stats,stat_skill));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFAVWEAP",stats,stat_favweap)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFAVWEAP",stats,stat_favweap));
lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATHISCORE",stats,stat_hiscore)); lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATHISCORE",stats,stat_hiscore));
for ( int i=0; i<lists[0].items.Size(); i++ ) for ( int i=0; i<lists[0].items.Size(); i++ )
lists[0].items[i].ypos = i*16; lists[0].items[i].ypos = i*16;
// because these types of stats don't actually change while the menu is open, we can initialize their lists ONLY ONCE here // because these types of stats don't actually change while the menu is open, we can initialize their lists ONLY ONCE here
foreach ( s:stats.lstats ) foreach ( s:stats.lstats )
lists[2].items.Push(new("DemolitionistMenuMapStatItem").Init(master,s)); lists[2].items.Push(new('DemolitionistMenuMapStatItem').Init(master,s));
// find the current level // find the current level
for ( int i=0; i<lists[2].items.Size(); i++ ) for ( int i=0; i<lists[2].items.Size(); i++ )
{ {
@ -74,7 +74,7 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
for ( int i=0; i<lists[2].items.Size(); i++ ) for ( int i=0; i<lists[2].items.Size(); i++ )
lists[2].items[i].ypos = i*16; lists[2].items[i].ypos = i*16;
foreach ( inf:master.shnd.achievementinfo ) foreach ( inf:master.shnd.achievementinfo )
lists[3].items.Push(new("DemolitionistMenuAchievementItem").Init(master,inf)); lists[3].items.Push(new('DemolitionistMenuAchievementItem').Init(master,inf));
return Super.Init(master); return Super.Init(master);
} }
override void OnDestroy() override void OnDestroy()
@ -87,7 +87,7 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
} }
override void OnSelect() override void OnSelect()
{ {
section = master.shnd.menustate.At("LastStatSection").ToInt(); section = master.shnd.menustate.Get("LastStatSection").ToInt();
smofs[section] = ofs[section]; smofs[section] = ofs[section];
} }
override void OnDeselect() override void OnDeselect()
@ -389,7 +389,7 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
int oldindex = lists[1].items.Size(); int oldindex = lists[1].items.Size();
lists[1].items.Resize(stats.mstats.Size()); lists[1].items.Resize(stats.mstats.Size());
for ( int i=oldindex; i<lists[1].items.Size(); i++ ) for ( int i=oldindex; i<lists[1].items.Size(); i++ )
lists[1].items[i] = new("DemolitionistMenuKillItem").Init(master,stats.mstats[i]); lists[1].items[i] = new('DemolitionistMenuKillItem').Init(master,stats.mstats[i]);
} }
maxofs[1] = int(16*lists[1].items.Size()-(master.ws.y-46)); maxofs[1] = int(16*lists[1].items.Size()-(master.ws.y-46));
// update widths // update widths

View file

@ -85,7 +85,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
override void OnSelect() override void OnSelect()
{ {
bSell = master.shnd.menustate.At("WasSelling").ToInt(); bSell = master.shnd.menustate.Get("WasSelling").ToInt();
smofs = ofs; smofs = ofs;
} }
override void OnDeselect() override void OnDeselect()
@ -103,7 +103,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
// no gravity/tether outside raven // no gravity/tether outside raven
if ( !(gameinfo.gametype&GAME_RAVEN) && ((type is 'GravitySuppressor') || (type is 'SafetyTether')) ) return true; if ( !(gameinfo.gametype&GAME_RAVEN) && ((type is 'GravitySuppressor') || (type is 'SafetyTether')) ) return true;
// can't sell candygun spares if we already own a Candy Gun // can't sell candygun spares if we already own a Candy Gun
if ( bSell && (type is 'CandyGunSpares') && players[consoleplayer].mo.FindInventory("CandyGun") ) return true; if ( bSell && (type is 'CandyGunSpares') && players[consoleplayer].mo.FindInventory('CandyGun') ) return true;
// can't sell deep impact // can't sell deep impact
if ( bSell && (type is 'DeepImpact') ) return true; if ( bSell && (type is 'DeepImpact') ) return true;
// skip items we don't own or are depleted if selling // skip items we don't own or are depleted if selling
@ -138,7 +138,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
// skip unimplemented weapons // skip unimplemented weapons
if ( type is 'Weapon' ) if ( type is 'Weapon' )
{ {
let ready = inv.FindState("Ready"); let ready = inv.FindState('Ready');
if ( !ready || !ready.ValidateSpriteFrame() ) return true; if ( !ready || !ready.ValidateSpriteFrame() ) return true;
} }
// ignore child ammos // ignore child ammos
@ -162,7 +162,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
mustsort = true; mustsort = true;
skipsel = true; skipsel = true;
// initialize // initialize
invlist[bSell] = new("DemolitionistMenuList"); invlist[bSell] = new('DemolitionistMenuList');
invlist[bSell].master = master; invlist[bSell].master = master;
invlist[bSell].selected = 0; invlist[bSell].selected = 0;
} }
@ -201,12 +201,12 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
let inv2 = GetDefaultByType(DemolitionistMenuStoreItem(invlist[bSell].items[j]).inv); let inv2 = GetDefaultByType(DemolitionistMenuStoreItem(invlist[bSell].items[j]).inv);
if ( abs(inv.Stamina) > abs(inv2.Stamina) ) continue; if ( abs(inv.Stamina) > abs(inv2.Stamina) ) continue;
greater = true; greater = true;
invlist[bSell].items.Insert(j,new("DemolitionistMenuStoreItem").Init(master,type,bSell)); invlist[bSell].items.Insert(j,new('DemolitionistMenuStoreItem').Init(master,type,bSell));
mustsort = true; mustsort = true;
break; break;
} }
if ( greater ) continue; if ( greater ) continue;
invlist[bSell].items.Push(new("DemolitionistMenuStoreItem").Init(master,type,bSell)); invlist[bSell].items.Push(new('DemolitionistMenuStoreItem').Init(master,type,bSell));
mustsort = true; mustsort = true;
} }
// don't do anything if empty // don't do anything if empty
@ -542,7 +542,7 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem
if ( bSell ) if ( bSell )
{ {
pricelabel = String.Format("\cd¥%d\c-",price); pricelabel = String.Format("\cd¥%d\c-",price);
int cur = (inv is 'CandyGun')?(players[consoleplayer].mo.CountInv("CandyGunSpares")+1):players[consoleplayer].mo.CountInv(inv); int cur = (inv is 'CandyGun')?(players[consoleplayer].mo.CountInv('CandyGunSpares')+1):players[consoleplayer].mo.CountInv(inv);
if ( (cur > 1) || (inv is 'Ammo') || (inv is 'MagAmmo') ) label = String.Format("%s (%d/%d)",def.GetTag(),amt,cur); if ( (cur > 1) || (inv is 'Ammo') || (inv is 'MagAmmo') ) label = String.Format("%s (%d/%d)",def.GetTag(),amt,cur);
else label = def.GetTag(); else label = def.GetTag();
} }

View file

@ -20,7 +20,7 @@ Class SWWMAchievementMenu : GenericMenu
Super.Init(parent); Super.Init(parent);
mTitle = StringTable.Localize("$SWWM_ATITLE"); mTitle = StringTable.Localize("$SWWM_ATITLE");
mSelected = 0; mSelected = 0;
hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) ThrowAbortException("SWWMStaticHandler not found???"); if ( !hnd ) ThrowAbortException("SWWMStaticHandler not found???");
mItems.Copy(hnd.achievementinfo); mItems.Copy(hnd.achievementinfo);
total = mItems.Size(); total = mItems.Size();

View file

@ -146,42 +146,42 @@ Class SWWMCreditsMenu : GenericMenu
slocal = StringTable.Localize("$SWWM_CLOCAL"); slocal = StringTable.Localize("$SWWM_CLOCAL");
spatrons = StringTable.Localize("$SWWM_CPATRON"); spatrons = StringTable.Localize("$SWWM_CPATRON");
sthanks = StringTable.Localize("$SWWM_CTHANK"); sthanks = StringTable.Localize("$SWWM_CTHANK");
cdev.Push(new("SWWMCreditsEntry").Init("Marisa the Magician","$SWWM_CDEV2",s:"graphics/Credits/MariSprite.png")); cdev.Push(new('SWWMCreditsEntry').Init("Marisa the Magician","$SWWM_CDEV2",s:"graphics/Credits/MariSprite.png"));
cassets.Push(new("SWWMCreditsEntry").Init("Bethesda Game Studios","Fallout: New Vegas\nFallout 4")); cassets.Push(new('SWWMCreditsEntry').Init("Bethesda Game Studios","Fallout: New Vegas\nFallout 4"));
cassets.Push(new("SWWMCreditsEntry").Init("Epic Games","Unreal\nUnreal Tournament\nUnreal Tournament 2004\nUnreal Tournament 3")); cassets.Push(new('SWWMCreditsEntry').Init("Epic Games","Unreal\nUnreal Tournament\nUnreal Tournament 2004\nUnreal Tournament 3"));
cassets.Push(new("SWWMCreditsEntry").Init("Ion Storm","Deus Ex")); cassets.Push(new('SWWMCreditsEntry').Init("Ion Storm","Deus Ex"));
cassets.Push(new("SWWMCreditsEntry").Init("Looking Glass Studios","Thief\nSystem Shock 2")); cassets.Push(new('SWWMCreditsEntry').Init("Looking Glass Studios","Thief\nSystem Shock 2"));
cassets.Push(new("SWWMCreditsEntry").Init("People Can Fly","Painkiller")); cassets.Push(new('SWWMCreditsEntry').Init("People Can Fly","Painkiller"));
cassets.Push(new("SWWMCreditsEntry").Init("Tripwire Interactive","Killing Floor")); cassets.Push(new('SWWMCreditsEntry').Init("Tripwire Interactive","Killing Floor"));
cassets.Push(new("SWWMCreditsEntry").Init("From Software","Dark Souls\nDark Souls II\nDark Souls III")); cassets.Push(new('SWWMCreditsEntry').Init("From Software","Dark Souls\nDark Souls II\nDark Souls III"));
cassets.Push(new("SWWMCreditsEntry").Init("SiFi270","$SWWM_ASSKEEN")); cassets.Push(new('SWWMCreditsEntry').Init("SiFi270","$SWWM_ASSKEEN"));
cassets.Push(new("SWWMCreditsEntry").Init("Nash","WidePix")); cassets.Push(new('SWWMCreditsEntry').Init("Nash","WidePix"));
cmusic.Push(new("SWWMCreditsEntry").Init("Teque","Traumatic State\nDragony\nHidden Tune #242\nHypercardish 1.1")); cmusic.Push(new('SWWMCreditsEntry').Init("Teque","Traumatic State\nDragony\nHidden Tune #242\nHypercardish 1.1"));
cmusic.Push(new("SWWMCreditsEntry").Init("BouncyTEM","Solitary Apprehension")); cmusic.Push(new('SWWMCreditsEntry').Init("BouncyTEM","Solitary Apprehension"));
cvoice.Push(new("SWWMCreditsEntry").Init("Vyolette","$T_DEMOLITIONIST")); cvoice.Push(new('SWWMCreditsEntry').Init("Vyolette","$T_DEMOLITIONIST"));
clocal.Push(new("SWWMCreditsEntry").Init("Marisa the Magician","$SWWM_LOCES")); clocal.Push(new('SWWMCreditsEntry').Init("Marisa the Magician","$SWWM_LOCES"));
cpatrons.Push(new("SWWMCreditsEntry").Init("Bean")); cpatrons.Push(new('SWWMCreditsEntry').Init("Bean"));
cpatrons.Push(new("SWWMCreditsEntry").Init("Snacks")); cpatrons.Push(new('SWWMCreditsEntry').Init("Snacks"));
cpatrons.Push(new("SWWMCreditsEntry").Init("john")); cpatrons.Push(new('SWWMCreditsEntry').Init("john"));
cpatrons.Push(new("SWWMCreditsEntry").Init("bouncytem")); cpatrons.Push(new('SWWMCreditsEntry').Init("bouncytem"));
cpatrons.Push(new("SWWMCreditsEntry").Init("Pietro Gagliardi")); cpatrons.Push(new('SWWMCreditsEntry').Init("Pietro Gagliardi"));
cpatrons.Push(new("SWWMCreditsEntry").Init("Pope King Joe")); cpatrons.Push(new('SWWMCreditsEntry').Init("Pope King Joe"));
cpatrons.Push(new("SWWMCreditsEntry").Init("Zardoz")); cpatrons.Push(new('SWWMCreditsEntry').Init("Zardoz"));
cpatrons.Push(new("SWWMCreditsEntry").Init("NekoMithos")); cpatrons.Push(new('SWWMCreditsEntry').Init("NekoMithos"));
cpatrons.Push(new("SWWMCreditsEntry").Init("Antlason Widowz")); cpatrons.Push(new('SWWMCreditsEntry').Init("Antlason Widowz"));
cpatrons.Push(new("SWWMCreditsEntry").Init("YaGirlJuniper")); cpatrons.Push(new('SWWMCreditsEntry').Init("YaGirlJuniper"));
cthanks.Push(new("SWWMCreditsEntry").Init("KynikossDragonn","$SWWM_CDRAGON2")); cthanks.Push(new('SWWMCreditsEntry').Init("KynikossDragonn","$SWWM_CDRAGON2"));
cthanks.Push(new("SWWMCreditsEntry").Init("Vyolette","$SWWM_CVYOLETTE2")); cthanks.Push(new('SWWMCreditsEntry').Init("Vyolette","$SWWM_CVYOLETTE2"));
cthanks.Push(new("SWWMCreditsEntry").Init("Lucy","$SWWM_CLUCY2")); cthanks.Push(new('SWWMCreditsEntry').Init("Lucy","$SWWM_CLUCY2"));
cthanks.Push(new("SWWMCreditsEntry").Init("Gutawer","$SWWM_CGUTA2")); cthanks.Push(new('SWWMCreditsEntry').Init("Gutawer","$SWWM_CGUTA2"));
cthanks.Push(new("SWWMCreditsEntry").Init("Mikolah","$SWWM_CMIKO2")); cthanks.Push(new('SWWMCreditsEntry').Init("Mikolah","$SWWM_CMIKO2"));
cthanks.Push(new("SWWMCreditsEntry").Init("KeksDose","$SWWM_CKEKS2")); cthanks.Push(new('SWWMCreditsEntry').Init("KeksDose","$SWWM_CKEKS2"));
cthanks.Push(new("SWWMCreditsEntry").Init("ZZYZX & Nash","$SWWM_CZN2")); cthanks.Push(new('SWWMCreditsEntry').Init("ZZYZX & Nash","$SWWM_CZN2"));
cthanks.Push(new("SWWMCreditsEntry").Init("BouncyTEM","$SWWM_CBOUNCY2")); cthanks.Push(new('SWWMCreditsEntry').Init("BouncyTEM","$SWWM_CBOUNCY2"));
cthanks.Push(new("SWWMCreditsEntry").Init("\ctCptSledge\c- & \cdBunray\c-","$SWWM_CSLEDGE2")); cthanks.Push(new('SWWMCreditsEntry').Init("\ctCptSledge\c- & \cdBunray\c-","$SWWM_CSLEDGE2"));
cthanks.Push(new("SWWMCreditsEntry").Init("$SWWM_CINSP1","$SWWM_CINSP2")); cthanks.Push(new('SWWMCreditsEntry').Init("$SWWM_CINSP1","$SWWM_CINSP2"));
cthanks.Push(new("SWWMCreditsEntry").Init("$SWWM_CCOMMUNITY1","$SWWM_CCOMMUNITY2")); cthanks.Push(new('SWWMCreditsEntry').Init("$SWWM_CCOMMUNITY1","$SWWM_CCOMMUNITY2"));
cthanks.Push(new("SWWMCreditsEntry").Init("$SWWM_CYOU1","$SWWM_CYOU2")); cthanks.Push(new('SWWMCreditsEntry').Init("$SWWM_CYOU1","$SWWM_CYOU2"));
speed = 16.; speed = 16.;
spos = ss.y-logosz.y; spos = ss.y-logosz.y;
// calc total height // calc total height
@ -260,7 +260,7 @@ Class SWWMCreditsMenu : GenericMenu
Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.8); Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.8);
} }
else Screen.Dim("Black",.8,0,0,Screen.GetWidth(),Screen.GetHeight()); else Screen.Dim(0xFF000000,.8,0,0,Screen.GetWidth(),Screen.GetHeight());
Super.Drawer(); Super.Drawer();
UpdateSize(); UpdateSize();
// logo // logo

View file

@ -198,7 +198,7 @@ Class SWWMHelpMenu : GenericMenu
Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.8); Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.8);
} }
else Screen.Dim("Black",.8,0,0,Screen.GetWidth(),Screen.GetHeight()); else Screen.Dim(0xFF000000,.8,0,0,Screen.GetWidth(),Screen.GetHeight());
double alph = clamp(((MenuTime()+System.GetTimeFrac())-fadetic)*(5./GameTicRate),0.,1.); double alph = clamp(((MenuTime()+System.GetTimeFrac())-fadetic)*(5./GameTicRate),0.,1.);
if ( (prevpage == -1) || (alph >= 1.) ) DrawPage(curpage); if ( (prevpage == -1) || (alph >= 1.) ) DrawPage(curpage);
else else

View file

@ -132,7 +132,7 @@ Class SWWMStatScreen : StatusScreen
ry -= 2*hs; ry -= 2*hs;
rw += 8*hs; rw += 8*hs;
rh += 4*hs; rh += 4*hs;
Screen.Dim("Black",.8,rx,ry,rw,rh); Screen.Dim(0xFF000000,.8,rx,ry,rw,rh);
// border outside // border outside
rx -= hs; rx -= hs;
ry -= hs; ry -= hs;
@ -280,7 +280,7 @@ Class SWWMStatScreen : StatusScreen
private void drawSWWMBg() private void drawSWWMBg()
{ {
if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !whichart ) if ( !whichart )
{ {
int no = StringTable.Localize("$SWWM_NRENDER").ToInt(); int no = StringTable.Localize("$SWWM_NRENDER").ToInt();
@ -314,7 +314,7 @@ Class SWWMStatScreen : StatusScreen
} }
double ar = Screen.GetAspectRatio(), sar; double ar = Screen.GetAspectRatio(), sar;
Vector2 tsize, vsize; Vector2 tsize, vsize;
Screen.Clear(0,0,Screen.GetWidth(),Screen.GetHeight(),"Black"); Screen.Clear(0,0,Screen.GetWidth(),Screen.GetHeight(),0xFF000000);
// background pics // background pics
if ( whichart ) if ( whichart )
{ {
@ -330,7 +330,7 @@ Class SWWMStatScreen : StatusScreen
} }
private void drawSWWMFg() private void drawSWWMFg()
{ {
if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
// intermission tips at the bottom // intermission tips at the bottom
if ( !whichtip ) if ( !whichtip )
{ {

View file

@ -232,7 +232,7 @@ Class SWWMOptionMenu : OptionMenu
// draw at the bottom unless the selected option could be covered by the tooltip // draw at the bottom unless the selected option could be covered by the tooltip
int ypos = Screen.GetHeight()-height; int ypos = Screen.GetHeight()-height;
if ( cy > ypos ) ypos = 0; if ( cy > ypos ) ypos = 0;
Screen.Dim("Black",.75,0,ypos,Screen.GetWidth(),height); Screen.Dim(0xFF000000,.75,0,ypos,Screen.GetWidth(),height);
ypos += 2*CleanYFac_1; ypos += 2*CleanYFac_1;
for ( int i=0; i<ttlines.Count(); i++ ) for ( int i=0; i<ttlines.Count(); i++ )
{ {
@ -352,7 +352,7 @@ Class SWWMMainMenu : SWWMCleanMenu
int height = mSmallFont.GetHeight()+4; int height = mSmallFont.GetHeight()+4;
xx = CleanWidth_1-width; xx = CleanWidth_1-width;
yy = CleanHeight_1-height; yy = CleanHeight_1-height;
Screen.Dim("Black",.75,int(xx*CleanXFac_1),int(yy*CleanYFac_1),int(width*CleanXFac_1),int(height*CleanYFac_1)); Screen.Dim(0xFF000000,.75,int(xx*CleanXFac_1),int(yy*CleanYFac_1),int(width*CleanXFac_1),int(height*CleanYFac_1));
Screen.DrawText(mSmallFont,Font.CR_GOLD,(xx+4)*CleanXFac_1,(yy+2)*CleanYFac_1,str,DTA_CleanNoMove_1,true); Screen.DrawText(mSmallFont,Font.CR_GOLD,(xx+4)*CleanXFac_1,(yy+2)*CleanYFac_1,str,DTA_CleanNoMove_1,true);
} }
@ -391,7 +391,7 @@ Class SWWMScrollMenu : SWWMCleanMenu
if ( itm.GetClass() == 'ListMenuItemTextItem' ) if ( itm.GetClass() == 'ListMenuItemTextItem' )
{ {
let ti = ListMenuItemTextItem(itm); let ti = ListMenuItemTextItem(itm);
let rep = new("ListMenuItemSWWMTextItemM"); let rep = new('ListMenuItemSWWMTextItemM');
let [c, p] = ti.GetAction(); let [c, p] = ti.GetAction();
rep.InitDirect(ti.GetX(),ti.GetY(),mDesc.mLineSpacing,ti.mHotkey,ti.mText,ti.mFont,ti.mColor,ti.mColorSelected,c,p); rep.InitDirect(ti.GetX(),ti.GetY(),mDesc.mLineSpacing,ti.mHotkey,ti.mText,ti.mFont,ti.mColor,ti.mColorSelected,c,p);
if ( (ti.mText == "$M_EPITNT") || (tntfix && (tntfix < 5)) ) if ( (ti.mText == "$M_EPITNT") || (tntfix && (tntfix < 5)) )
@ -402,7 +402,7 @@ Class SWWMScrollMenu : SWWMCleanMenu
else if ( itm.GetClass() == 'ListMenuItemPatchItem' ) else if ( itm.GetClass() == 'ListMenuItemPatchItem' )
{ {
let pi = ListMenuItemPatchItem(itm); let pi = ListMenuItemPatchItem(itm);
let rep = new("ListMenuItemSWWMPatchItemM"); let rep = new('ListMenuItemSWWMPatchItemM');
let [c, p] = pi.GetAction(); let [c, p] = pi.GetAction();
rep.InitDirect(pi.GetX(),pi.GetY(),mDesc.mLineSpacing,pi.mHotkey,pi.mTexture,c,p); rep.InitDirect(pi.GetX(),pi.GetY(),mDesc.mLineSpacing,pi.mHotkey,pi.mTexture,c,p);
mDesc.mItems[i] = rep; mDesc.mItems[i] = rep;

View file

@ -80,7 +80,7 @@ Class SWWMTitleStuff : EventHandler
// birthday event // birthday event
if ( SystemTime.Format("%d%m",SystemTime.Now()) == "2001" ) if ( SystemTime.Format("%d%m",SystemTime.Now()) == "2001" )
titletimer = -500; titletimer = -500;
let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( shnd ) if ( shnd )
{ {
if ( shnd.titlefirst ) if ( shnd.titlefirst )
@ -143,7 +143,7 @@ Class SWWMTitleStuff : EventHandler
Vector2 tsize, vsize; Vector2 tsize, vsize;
if ( titletimer < -300 ) if ( titletimer < -300 )
{ {
Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFF000000,1.,0,0,Screen.GetWidth(),Screen.GetHeight());
double alf; double alf;
if ( titletimer < -420 ) alf = clamp((titletimer+450)/30.,0.,1.); if ( titletimer < -420 ) alf = clamp((titletimer+450)/30.,0.,1.);
else if ( titletimer > -330 ) alf = clamp(1.-(titletimer+330)/30.,0.,1.); else if ( titletimer > -330 ) alf = clamp(1.-(titletimer+330)/30.,0.,1.);
@ -163,7 +163,7 @@ Class SWWMTitleStuff : EventHandler
if ( !tex[3] ) tex[3] = TexMan.CheckForTexture((gameinfo.gametype&GAME_Raven)?"TITLE":"TITLEPIC",TexMan.Type_MiscPatch); if ( !tex[3] ) tex[3] = TexMan.CheckForTexture((gameinfo.gametype&GAME_Raven)?"TITLE":"TITLEPIC",TexMan.Type_MiscPatch);
if ( titletimer < 0 ) if ( titletimer < 0 )
{ {
Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFF000000,1.,0,0,Screen.GetWidth(),Screen.GetHeight());
if ( titletimer < -20 ) if ( titletimer < -20 )
{ {
rss = int(MSTime()*(GameTicRate/1000.)); rss = int(MSTime()*(GameTicRate/1000.));
@ -173,9 +173,9 @@ Class SWWMTitleStuff : EventHandler
Screen.DrawTexture(tex[3],true,ofs.x,ofs.y,DTA_VirtualWidthF,tsize.x,DTA_VirtualHeightF,tsize.y,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_TopLeft,true); Screen.DrawTexture(tex[3],true,ofs.x,ofs.y,DTA_VirtualWidthF,tsize.x,DTA_VirtualHeightF,tsize.y,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_TopLeft,true);
RenderExplosions(); RenderExplosions();
} }
if ( titletimer > -20 ) Screen.Dim("White",1.-clamp((20+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); if ( titletimer > -20 ) Screen.Dim(0xFFFFFFFF,1.-clamp((20+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
else if ( titletimer > -80 ) Screen.Dim("White",clamp((80+titletimer+e.FracTic)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); else if ( titletimer > -80 ) Screen.Dim(0xFFFFFFFF,clamp((80+titletimer+e.FracTic)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
if ( titletimer <= -250 ) Screen.Dim("Black",1.-clamp((270+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); if ( titletimer <= -250 ) Screen.Dim(0xFF000000,1.-clamp((270+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
return; return;
} }
double GameSecs = (titletimer+e.FracTic)/GameTicRate; double GameSecs = (titletimer+e.FracTic)/GameTicRate;
@ -185,9 +185,9 @@ Class SWWMTitleStuff : EventHandler
double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y)); double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y));
vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0)); Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0));
Screen.Dim("Black",clamp(1.-GameSecs*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFF000000,clamp(1.-GameSecs*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
} }
else Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight()); else Screen.Dim(0xFF000000,1.,0,0,Screen.GetWidth(),Screen.GetHeight());
double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.); double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.);
Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs; Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs;
Render_NewTitle(e,GameSecs); Render_NewTitle(e,GameSecs);
@ -277,7 +277,7 @@ Class SWWMTitleStuff : EventHandler
double alf1 = clamp((GameSecs-26.5)*.5,0.,1.); double alf1 = clamp((GameSecs-26.5)*.5,0.,1.);
double alf2 = (GameSecs>28)?clamp((GameSecs-3)%5,0.,1.):0.; double alf2 = (GameSecs>28)?clamp((GameSecs-3)%5,0.,1.):0.;
lfade.Clear(0,0,4,4,Color(int(255*alf1),int(255*alf2),0)); lfade.Clear(0,0,4,4,Color(int(255*alf1),int(255*alf2),0));
if ( bFadeIn ) Screen.Dim("Black",1.-clamp(GameSecs-22,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); if ( bFadeIn ) Screen.Dim(0xFF000000,1.-clamp(GameSecs-22,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
if ( GameSecs < 27 ) if ( GameSecs < 27 )
{ {
static const int lofs[] = static const int lofs[] =
@ -346,7 +346,7 @@ Class SWWMTitleStuff : EventHandler
if ( (GameSecs >= 23.) && (GameSecs < 25.6) ) if ( (GameSecs >= 23.) && (GameSecs < 25.6) )
{ {
double alf = 1.-SWWMUtility.fract(GameSecs*5.); double alf = 1.-SWWMUtility.fract(GameSecs*5.);
Screen.Dim("White",.05*alf,0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.Dim(0xFFFFFFFF,.05*alf,0,0,Screen.GetWidth(),Screen.GetHeight());
} }
} }
} }

View file

@ -142,10 +142,10 @@ Class Demolitionist : PlayerPawn
Player.DisplayName "$T_DEMOLITIONIST"; Player.DisplayName "$T_DEMOLITIONIST";
// StartItem array is defined but not used directly // StartItem array is defined but not used directly
// just declared here for mod compat // just declared here for mod compat
Player.StartItem "ExplodiumGun"; Player.StartItem 'ExplodiumGun';
Player.StartItem "DeepImpact"; Player.StartItem 'DeepImpact';
Player.StartItem "AlmasteelPlating"; Player.StartItem 'AlmasteelPlating';
Player.StartItem "SayaCollar"; Player.StartItem 'SayaCollar';
Player.ViewHeight 52; Player.ViewHeight 52;
Player.AirCapacity 0; Player.AirCapacity 0;
Player.GruntSpeed 20; Player.GruntSpeed 20;
@ -196,7 +196,7 @@ Class Demolitionist : PlayerPawn
// swap ourselves for a voodoo doll // swap ourselves for a voodoo doll
if ( !player || (player.mo != self) ) if ( !player || (player.mo != self) )
{ {
let v = Spawn("SWWMVoodooDoll",pos); let v = Spawn('SWWMVoodooDoll',pos);
v.angle = angle; v.angle = angle;
v.player = player; v.player = player;
// give it a face if it belongs to a player // give it a face if it belongs to a player
@ -211,7 +211,7 @@ Class Demolitionist : PlayerPawn
oldsinglefirst = swwm_singlefirst; // super already sets up the slots, so save the cvar value now oldsinglefirst = swwm_singlefirst; // super already sets up the slots, so save the cvar value now
mystats = SWWMStats.Find(player); mystats = SWWMStats.Find(player);
// sanity checks // sanity checks
if ( !EventHandler.Find("SWWMHandler") || !StaticEventHandler.Find("SWWMStaticHandler") ) if ( !EventHandler.Find('SWWMHandler') || !StaticEventHandler.Find('SWWMStaticHandler') )
ThrowAbortException("Panic! SWWM event handlers not detected!"); ThrowAbortException("Panic! SWWM event handlers not detected!");
} }
@ -258,7 +258,7 @@ Class Demolitionist : PlayerPawn
} }
// adjust fov from dashing // adjust fov from dashing
double spd = vel.length(); double spd = vel.length();
if ( InStateSequence(CurState,FindState("Dash")) && (spd > 10.) ) if ( InStateSequence(CurState,FindState('Dash')) && (spd > 10.) )
{ {
Vector3 facedir = SWWMUtility.Vec3FromAngles(angle,pitch); Vector3 facedir = SWWMUtility.Vec3FromAngles(angle,pitch);
if ( spd > 0. ) if ( spd > 0. )
@ -298,23 +298,23 @@ Class Demolitionist : PlayerPawn
if ( ceilse && florse ) if ( ceilse && florse )
{ {
// snap both planes // snap both planes
let q = Spawn("BustedQuake",(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot))); let q = Spawn('BustedQuake',(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot)));
q.specialf1 = 6.; q.specialf1 = 6.;
q = Spawn("BustedQuake",(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot))); q = Spawn('BustedQuake',(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot)));
q.specialf1 = 6.; q.specialf1 = 6.;
SWWMCrusherBroken.Create(flor,ceil,diffh/2.); SWWMCrusherBroken.Create(flor,ceil,diffh/2.);
} }
else if ( ceilse ) else if ( ceilse )
{ {
// snap ceiling // snap ceiling
let q = Spawn("BustedQuake",(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot))); let q = Spawn('BustedQuake',(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot)));
q.specialf1 = 10.; q.specialf1 = 10.;
SWWMCrusherBroken.Create(null,ceil,diffh); SWWMCrusherBroken.Create(null,ceil,diffh);
} }
else if ( florse ) else if ( florse )
{ {
// snap floor // snap floor
let q = Spawn("BustedQuake",(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot))); let q = Spawn('BustedQuake',(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot)));
q.specialf1 = 10.; q.specialf1 = 10.;
SWWMCrusherBroken.Create(flor,null,diffh); SWWMCrusherBroken.Create(flor,null,diffh);
} }
@ -369,7 +369,7 @@ Class Demolitionist : PlayerPawn
damage = 0; damage = 0;
if ( (swwm_strictuntouchable >= 2) && (damage > 0) && player ) if ( (swwm_strictuntouchable >= 2) && (damage > 0) && player )
{ {
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) hnd.tookdamage[PlayerNumber()] = true; if ( hnd ) hnd.tookdamage[PlayerNumber()] = true;
} }
if ( (mod == 'Crush') && player && (player.mo == self) ) if ( (mod == 'Crush') && player && (player.mo == self) )
@ -384,12 +384,12 @@ Class Demolitionist : PlayerPawn
// break a spike trap // break a spike trap
else if ( source is 'ThrustFloor' ) else if ( source is 'ThrustFloor' )
{ {
let q = Spawn("BustedQuake",source.pos); let q = Spawn('BustedQuake',source.pos);
q.specialf1 = 4.; q.specialf1 = 4.;
int numpt = Random[ExploS](30,40); int numpt = Random[ExploS](30,40);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("SWWMChip",source.Vec3Angle(source.radius,FRandom[ExploS](0,360),1.+FRandom[ExploS](0,max(0.,source.height-source.floorclip)))); let s = Spawn('SWWMChip',source.Vec3Angle(source.radius,FRandom[ExploS](0,360),1.+FRandom[ExploS](0,max(0.,source.height-source.floorclip))));
s.vel = ((0,0,1)+SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*.6).unit()*FRandom[ExploS](2.,16.); s.vel = ((0,0,1)+SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*.6).unit()*FRandom[ExploS](2.,16.);
s.scale *= FRandom[ExploS](1.5,3.); s.scale *= FRandom[ExploS](1.5,3.);
s.A_SetTranslation('StoneSpike'); s.A_SetTranslation('StoneSpike');
@ -397,13 +397,13 @@ Class Demolitionist : PlayerPawn
numpt = Random[ExploS](12,16); numpt = Random[ExploS](12,16);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",source.Vec3Offset(0,0,1.+FRandom[ExploS](0,max(0.,source.height-source.floorclip)))); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',source.Vec3Offset(0,0,1.+FRandom[ExploS](0,max(0.,source.height-source.floorclip))));
s.vel = ((0,0,1)+SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))).unit()*FRandom[ExploS](-2,8.); s.vel = ((0,0,1)+SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))).unit()*FRandom[ExploS](-2,8.);
s.scale *= 2.5; s.scale *= 2.5;
s.framestep = Random[ExploS](4,9); s.framestep = Random[ExploS](4,9);
s.scolor = Color(5,4,3)*Random[ExploS](20,40); s.scolor = Color(5,4,3)*Random[ExploS](20,40);
} }
Spawn("SWWMCrushedSpike",source.pos); Spawn('SWWMCrushedSpike',source.pos);
if ( source.master ) source.master.Destroy(); if ( source.master ) source.master.Destroy();
source.Destroy(); source.Destroy();
damage = 20; // reduce so it's not instant kill damage = 20; // reduce so it's not instant kill
@ -575,7 +575,7 @@ Class Demolitionist : PlayerPawn
if ( !player ) return false; if ( !player ) return false;
int score = 100; int score = 100;
// last secret (this is called before counting it up, so have to subtract) // last secret (this is called before counting it up, so have to subtract)
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !deathmatch && !(gameinfo.gametype&GAME_Hexen) && (level.found_secrets == level.total_secrets-1) && (!hnd || !hnd.allsecrets) ) if ( !deathmatch && !(gameinfo.gametype&GAME_Hexen) && (level.found_secrets == level.total_secrets-1) && (!hnd || !hnd.allsecrets) )
{ {
if ( hnd ) hnd.allsecrets = true; if ( hnd ) hnd.allsecrets = true;
@ -730,7 +730,7 @@ Class Demolitionist : PlayerPawn
if ( player.ReadyWeapon is 'SWWMGesture' ) if ( player.ReadyWeapon is 'SWWMGesture' )
{ {
player.PendingWeapon = SWWMGesture(player.ReadyWeapon).formerweapon; player.PendingWeapon = SWWMGesture(player.ReadyWeapon).formerweapon;
player.SetPSprite(PSP_WEAPON,player.ReadyWeapon.ResolveState("Deselect")); player.SetPSprite(PSP_WEAPON,player.ReadyWeapon.ResolveState('Deselect'));
} }
} }
} }
@ -760,7 +760,7 @@ Class Demolitionist : PlayerPawn
bumpvelz = 0.; bumpvelz = 0.;
} }
// notify carried lamp that we just moved // notify carried lamp that we just moved
let l = SWWMLamp(FindInventory("SWWMLamp")); let l = SWWMLamp(FindInventory('SWWMLamp'));
if ( l && l.thelamp ) if ( l && l.thelamp )
CompanionLamp(l.thelamp).justteleport = true; CompanionLamp(l.thelamp).justteleport = true;
} }

View file

@ -5,8 +5,8 @@ extend Class Demolitionist
{ {
if ( !player ) if ( !player )
{ {
if ( !InStateSequence(CurState,FindState("Spawn")) ) if ( !InStateSequence(CurState,FindState('Spawn')) )
SetStateLabel("Spawn"); SetStateLabel('Spawn');
return; return;
} }
if ( player.health <= 0 ) return; if ( player.health <= 0 ) return;
@ -16,46 +16,46 @@ extend Class Demolitionist
if ( player.crouchdir == -1 ) if ( player.crouchdir == -1 )
{ {
// Crouching // Crouching
if ( InStateSequence(CurState,FindState("CrouchMove")) if ( InStateSequence(CurState,FindState('CrouchMove'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("Crouch"); SetStateLabel('Crouch');
else if ( InStateSequence(CurState,FindState("Spawn")) else if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState('Float'))
|| InStateSequence(CurState,FindState("Swim")) || InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("StartCrouch"); SetStateLabel('StartCrouch');
} }
else else
{ {
if ( InStateSequence(CurState,FindState("Crouch")) if ( InStateSequence(CurState,FindState('Crouch'))
|| InStateSequence(CurState,FindState("CrouchMove")) || InStateSequence(CurState,FindState('CrouchMove'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("EndCrouch"); SetStateLabel('EndCrouch');
else if ( InStateSequence(CurState,FindState("See")) else if ( InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("Float")) ) || InStateSequence(CurState,FindState('Float')) )
{ {
SetStateLabel("Spawn"); SetStateLabel('Spawn');
A_StartSound("demolitionist/runstop",CHAN_FOOTSTEP,CHANF_OVERLAP,.2); A_StartSound("demolitionist/runstop",CHAN_FOOTSTEP,CHANF_OVERLAP,.2);
} }
else if ( InStateSequence(CurState,FindState("SeeFast")) else if ( InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) ) || InStateSequence(CurState,FindState('SeeFastLoop')) )
SetStateLabel("SeeFastEnd"); SetStateLabel('SeeFastEnd');
else if ( InStateSequence(CurState,FindState("Swim")) else if ( InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("SwimEnd"); SetStateLabel('SwimEnd');
} }
} }
else if ( !bNoGravity ) else if ( !bNoGravity )
@ -63,45 +63,45 @@ extend Class Demolitionist
// Falling // Falling
if ( player.crouchdir == -1 ) if ( player.crouchdir == -1 )
{ {
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState('Jump'))
|| InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState('Float'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) || InStateSequence(CurState,FindState('FallLoop'))
|| InStateSequence(CurState,FindState("Swim")) || InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("StartCrouch"); SetStateLabel('StartCrouch');
} }
else else
{ {
if ( (InStateSequence(CurState,FindState("Spawn")) if ( (InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Float"))) || InStateSequence(CurState,FindState('Float')))
&& (abs(pos.z-floorz) > maxstepheight) ) && (abs(pos.z-floorz) > maxstepheight) )
SetStateLabel("Fall"); SetStateLabel('Fall');
else if ( InStateSequence(CurState,FindState("Crouch")) else if ( InStateSequence(CurState,FindState('Crouch'))
|| InStateSequence(CurState,FindState("CrouchMove")) || InStateSequence(CurState,FindState('CrouchMove'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("EndCrouch"); SetStateLabel('EndCrouch');
else if ( InStateSequence(CurState,FindState("Swim")) else if ( InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("SwimEnd"); SetStateLabel('SwimEnd');
} }
} }
else else
@ -110,46 +110,46 @@ extend Class Demolitionist
if ( player.crouchdir == -1 ) if ( player.crouchdir == -1 )
{ {
// Crouching // Crouching
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState('Jump'))
|| InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState('Float'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) || InStateSequence(CurState,FindState('FallLoop'))
|| InStateSequence(CurState,FindState("Swim")) || InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("StartCrouch"); SetStateLabel('StartCrouch');
} }
else else
{ {
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState('Jump'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) ) || InStateSequence(CurState,FindState('FallLoop')) )
SetStateLabel("Float"); SetStateLabel('Float');
else if ( InStateSequence(CurState,FindState("Swim")) else if ( InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("SwimEnd"); SetStateLabel('SwimEnd');
else if ( InStateSequence(CurState,FindState("Crouch")) else if ( InStateSequence(CurState,FindState('Crouch'))
|| InStateSequence(CurState,FindState("CrouchMove")) || InStateSequence(CurState,FindState('CrouchMove'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("EndCrouch"); SetStateLabel('EndCrouch');
} }
} }
} }
@ -158,8 +158,8 @@ extend Class Demolitionist
{ {
if ( !player ) if ( !player )
{ {
if ( !InStateSequence(CurState,FindState("SeeRun")) ) if ( !InStateSequence(CurState,FindState('SeeRun')) )
SetStateLabel("SeeRun"); SetStateLabel('SeeRun');
return; return;
} }
if ( player.health <= 0 ) return; if ( player.health <= 0 ) return;
@ -169,61 +169,61 @@ extend Class Demolitionist
if ( player.crouchdir == -1 ) if ( player.crouchdir == -1 )
{ {
// Crouching // Crouching
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) || InStateSequence(CurState,FindState('FallLoop'))
|| InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState('Float'))
|| InStateSequence(CurState,FindState("Swim")) || InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("StartCrouch"); SetStateLabel('StartCrouch');
else if ( InStateSequence(CurState,FindState("Crouch")) ) else if ( InStateSequence(CurState,FindState('Crouch')) )
{ {
switch( FastCheck() ) switch( FastCheck() )
{ {
case 2: case 2:
SetStateLabel("CrouchMoveFast"); SetStateLabel('CrouchMoveFast');
break; break;
case 1: case 1:
SetStateLabel("CrouchMoveRun"); SetStateLabel('CrouchMoveRun');
break; break;
default: default:
SetStateLabel("CrouchMove"); SetStateLabel('CrouchMove');
break; break;
} }
} }
} }
else else
{ {
if ( InStateSequence(CurState,FindState("Crouch")) if ( InStateSequence(CurState,FindState('Crouch'))
|| InStateSequence(CurState,FindState("CrouchMove")) || InStateSequence(CurState,FindState('CrouchMove'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("EndCrouch"); SetStateLabel('EndCrouch');
else if ( InStateSequence(CurState,FindState("Swim")) else if ( InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("SwimEnd"); SetStateLabel('SwimEnd');
else if ( (FastCheck() == 2) else if ( (FastCheck() == 2)
&& (InStateSequence(CurState,FindState("Spawn")) && (InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun"))) ) || InStateSequence(CurState,FindState('SeeRun'))) )
SetStateLabel("SeeFast"); SetStateLabel('SeeFast');
else if ( InStateSequence(CurState,FindState("Spawn")) else if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState('Float'))
|| InStateSequence(CurState,FindState("Turn")) ) || InStateSequence(CurState,FindState('Turn')) )
{ {
if ( FastCheck() == 1 ) SetStateLabel("SeeRun"); if ( FastCheck() == 1 ) SetStateLabel('SeeRun');
else SetStateLabel("See"); else SetStateLabel('See');
A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP,.2); A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP,.2);
} }
} }
@ -239,34 +239,34 @@ extend Class Demolitionist
if ( player.crouchdir == -1 ) if ( player.crouchdir == -1 )
{ {
// Crouching // Crouching
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState('Jump'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) || InStateSequence(CurState,FindState('FallLoop'))
|| InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState('Float'))
|| InStateSequence(CurState,FindState("Swim")) || InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("StartCrouch"); SetStateLabel('StartCrouch');
else if ( InStateSequence(CurState,FindState("Crouch")) ) else if ( InStateSequence(CurState,FindState('Crouch')) )
{ {
switch( FastCheck() ) switch( FastCheck() )
{ {
case 2: case 2:
SetStateLabel("CrouchMoveFast"); SetStateLabel('CrouchMoveFast');
break; break;
case 1: case 1:
SetStateLabel("CrouchMoveRun"); SetStateLabel('CrouchMoveRun');
break; break;
default: default:
SetStateLabel("CrouchMove"); SetStateLabel('CrouchMove');
break; break;
} }
} }
@ -274,46 +274,46 @@ extend Class Demolitionist
else if ( bFlyCheat || (player.cheats&CF_NOCLIP2) ) else if ( bFlyCheat || (player.cheats&CF_NOCLIP2) )
{ {
// Special case, fly cheats don't play a swim animation, only float // Special case, fly cheats don't play a swim animation, only float
// (this fixes Demo "swimming" on the library ladder in Spooktober, for example) // (this fixes Demo 'swimming' on the library ladder in Spooktober, for example)
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState('Jump'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) || InStateSequence(CurState,FindState('FallLoop'))
|| InStateSequence(CurState,FindState("Swim")) || InStateSequence(CurState,FindState('Swim'))
|| InStateSequence(CurState,FindState("SwimLoop")) || InStateSequence(CurState,FindState('SwimLoop'))
|| InStateSequence(CurState,FindState("SwimLoopRun")) || InStateSequence(CurState,FindState('SwimLoopRun'))
|| InStateSequence(CurState,FindState("SwimLoopFast")) ) || InStateSequence(CurState,FindState('SwimLoopFast')) )
SetStateLabel("Float"); SetStateLabel('Float');
else if ( InStateSequence(CurState,FindState("Crouch")) else if ( InStateSequence(CurState,FindState('Crouch'))
|| InStateSequence(CurState,FindState("CrouchMove")) || InStateSequence(CurState,FindState('CrouchMove'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("EndCrouch"); SetStateLabel('EndCrouch');
} }
else else
{ {
if ( InStateSequence(CurState,FindState("Spawn")) if ( InStateSequence(CurState,FindState('Spawn'))
|| InStateSequence(CurState,FindState("Turn")) || InStateSequence(CurState,FindState('Turn'))
|| InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState('See'))
|| InStateSequence(CurState,FindState("SeeRun")) || InStateSequence(CurState,FindState('SeeRun'))
|| InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState('SeeFast'))
|| InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState('SeeFastLoop'))
|| InStateSequence(CurState,FindState("SeeFastEnd")) || InStateSequence(CurState,FindState('SeeFastEnd'))
|| InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState('Jump'))
|| InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState('Fall'))
|| InStateSequence(CurState,FindState("FallLoop")) || InStateSequence(CurState,FindState('FallLoop'))
|| InStateSequence(CurState,FindState("Float")) ) || InStateSequence(CurState,FindState('Float')) )
SetStateLabel("Swim"); SetStateLabel('Swim');
else if ( InStateSequence(CurState,FindState("Crouch")) else if ( InStateSequence(CurState,FindState('Crouch'))
|| InStateSequence(CurState,FindState("CrouchMoveRun")) || InStateSequence(CurState,FindState('CrouchMoveRun'))
|| InStateSequence(CurState,FindState("CrouchMoveFast")) ) || InStateSequence(CurState,FindState('CrouchMoveFast')) )
SetStateLabel("EndCrouch"); SetStateLabel('EndCrouch');
} }
} }
} }
@ -323,11 +323,11 @@ extend Class Demolitionist
// Do nothing if it's a SWWM weapon, since those do things themselves // Do nothing if it's a SWWM weapon, since those do things themselves
if ( player && (player.ReadyWeapon is 'SWWMWeapon') ) if ( player && (player.ReadyWeapon is 'SWWMWeapon') )
return; return;
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMissile"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchMissile');
else SetStateLabel("Missile"); else SetStateLabel('Missile');
} }
override void PlayAttacking2() override void PlayAttacking2()
@ -337,62 +337,62 @@ extend Class Demolitionist
void PlayFire() void PlayFire()
{ {
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMissile"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchMissile');
else SetStateLabel("Missile"); else SetStateLabel('Missile');
} }
void PlayMelee() void PlayMelee()
{ {
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMelee"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchMelee');
else SetStateLabel("Melee"); else SetStateLabel('Melee');
} }
void PlayFastMelee() void PlayFastMelee()
{ {
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchFastMelee"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchFastMelee');
else SetStateLabel("FastMelee"); else SetStateLabel('FastMelee');
} }
void PlayReload() void PlayReload()
{ {
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchReload"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchReload');
else SetStateLabel("Reload"); else SetStateLabel('Reload');
} }
void PlayFastReload() void PlayFastReload()
{ {
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchFastReload"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchFastReload');
else SetStateLabel("FastReload"); else SetStateLabel('FastReload');
} }
void PlayCheckGun() void PlayCheckGun()
{ {
if ( InStateSequence(CurState,FindState("Dash")) if ( InStateSequence(CurState,FindState('Dash'))
|| InStateSequence(CurState,FindState("Boost")) ) || InStateSequence(CurState,FindState('Boost')) )
return; // don't cancel dash/boost return; // don't cancel dash/boost
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchCheckGun"); if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchCheckGun');
else SetStateLabel("CheckGun"); else SetStateLabel('CheckGun');
} }
void A_DMFade() void A_DMFade()
{ {
if ( player ) return; if ( player ) return;
Spawn("TeleportFog",pos,ALLOW_REPLACE); Spawn('TeleportFog',pos,ALLOW_REPLACE);
Destroy(); Destroy();
} }
@ -492,7 +492,7 @@ extend Class Demolitionist
if ( (dashfuel <= 0.) && fullfuel ) if ( (dashfuel <= 0.) && fullfuel )
SWWMUtility.AchievementProgressInc("brake",1,player); SWWMUtility.AchievementProgressInc("brake",1,player);
if ( (dashfuel <= 0.) || (dashboost <= 0.) ) if ( (dashfuel <= 0.) || (dashboost <= 0.) )
SetStateLabel("DashEnd"); SetStateLabel('DashEnd');
} }
void A_BoostUp( bool initial = false ) void A_BoostUp( bool initial = false )
@ -514,7 +514,7 @@ extend Class Demolitionist
{ {
if ( !initial ) if ( !initial )
{ {
if ( player.onground ) SetStateLabel("JumpEnd"); if ( player.onground ) SetStateLabel('JumpEnd');
else SetStateLabel("Fall"); else SetStateLabel("Fall");
} }
return; return;
@ -563,16 +563,16 @@ extend Class Demolitionist
Spawn: Spawn:
// normal idle // normal idle
#### # 2; #### # 2;
XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(abs(player.cmd.yaw|player.cmd.pitch)>128),"Turn"); XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(abs(player.cmd.yaw|player.cmd.pitch)>128),'Turn');
Wait; Wait;
See: See:
// normal walking // normal walking
#### # 2; #### # 2;
XZW1 BCD 2 A_FastJump(null,"SeeRun","SeeFast"); XZW1 BCD 2 A_FastJump(null,'SeeRun','SeeFast');
XZW1 E 0 A_Footstep(1); XZW1 E 0 A_Footstep(1);
XZW1 EFGHIJKL 2 A_FastJump(null,"SeeRun","SeeFast"); XZW1 EFGHIJKL 2 A_FastJump(null,'SeeRun','SeeFast');
XZW1 M 0 A_Footstep(-1); XZW1 M 0 A_Footstep(-1);
XZW1 MNOPA 2 A_FastJump(null,"SeeRun","SeeFast"); XZW1 MNOPA 2 A_FastJump(null,'SeeRun','SeeFast');
Goto See+1; Goto See+1;
Turn: Turn:
#### # 8 A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP,.1); #### # 8 A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP,.1);
@ -582,12 +582,12 @@ extend Class Demolitionist
Goto Spawn+1; Goto Spawn+1;
SeeRun: SeeRun:
#### # 2; #### # 2;
XZWI PQR 2 A_FastJump("See",null,"SeeFast"); XZWI PQR 2 A_FastJump('See',null,'SeeFast');
XZWI S 0 A_Footstep(1,1); XZWI S 0 A_Footstep(1,1);
XZWI STUVWX 2 A_FastJump("See",null,"SeeFast"); XZWI STUVWX 2 A_FastJump('See',null,'SeeFast');
XZWI Y 0 A_Footstep(-1,1); XZWI Y 0 A_Footstep(-1,1);
XZWI YZ 2 A_FastJump("See",null,"SeeFast"); XZWI YZ 2 A_FastJump('See',null,'SeeFast');
XZW1 A 2 A_FastJump("See",null,"SeeFast"); XZW1 A 2 A_FastJump('See',null,'SeeFast');
Goto SeeRun+1; Goto SeeRun+1;
SeeFast: SeeFast:
// sprinting // sprinting
@ -596,22 +596,22 @@ extend Class Demolitionist
Goto SeeFastLoop; Goto SeeFastLoop;
SeeFastLoop: SeeFastLoop:
// keep sprinting // keep sprinting
XZW1 T 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 T 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW1 U 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 U 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW1 V 0 A_Footstep(1,2); XZW1 V 0 A_Footstep(1,2);
XZW1 V 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 V 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW1 W 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 W 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW1 X 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 X 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW1 Y 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 Y 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW1 Z 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW1 Z 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 A 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 A 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 B 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 B 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 C 0 A_Footstep(-1,2); XZW2 C 0 A_Footstep(-1,2);
XZW2 C 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 C 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 D 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 D 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 E 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 E 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 F 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 F 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
XZW2 G 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); XZW2 G 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd');
Goto SeeFastLoop; Goto SeeFastLoop;
SeeFastEnd: SeeFastEnd:
// brake // brake
@ -620,14 +620,14 @@ extend Class Demolitionist
Goto Spawn+1; Goto Spawn+1;
Pain: Pain:
// ouchy // ouchy
XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),"CrouchPain"); XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),'CrouchPain');
XZW2 M 1 A_DemoPain(); XZW2 M 1 A_DemoPain();
XZW2 NOPQ 1; XZW2 NOPQ 1;
Goto Spawn+1; Goto Spawn+1;
Death: Death:
XDeath: XDeath:
// ded // ded
XZW1 A 0 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),"CrouchDeath"); XZW1 A 0 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),'CrouchDeath');
XZW1 A 2 XZW1 A 2
{ {
A_DemoScream(); A_DemoScream();
@ -643,7 +643,7 @@ extend Class Demolitionist
XZW3 IJKLMNO 2 XZW3 IJKLMNO 2
{ {
if ( player.onground||bNoGravity ) if ( player.onground||bNoGravity )
return ResolveState("BoostEnd"); return ResolveState('BoostEnd');
A_BoostUp(true); A_BoostUp(true);
return ResolveState(null); return ResolveState(null);
} }
@ -651,11 +651,11 @@ extend Class Demolitionist
XZW3 P 1 XZW3 P 1
{ {
if ( player.onground||bNoGravity ) if ( player.onground||bNoGravity )
return ResolveState("BoostEnd"); return ResolveState('BoostEnd');
A_BoostUp(false); A_BoostUp(false);
return ResolveState(null); return ResolveState(null);
} }
XZW3 P 1 A_JumpIf((vel.z<-10)&&(pos.z>(floorz+80)),"Fall"); XZW3 P 1 A_JumpIf((vel.z<-10)&&(pos.z>(floorz+80)),'Fall');
Goto Boost+8; Goto Boost+8;
BoostEnd: BoostEnd:
// stop boost // stop boost
@ -664,17 +664,17 @@ extend Class Demolitionist
Goto Spawn+1; Goto Spawn+1;
Jump: Jump:
#### # 2; #### # 2;
XZWJ ABCDEF 2 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); XZWJ ABCDEF 2 A_JumpIf(player.onground&&!bNoGravity,'FallEnd');
Goto FallLoop; Goto FallLoop;
Fall: Fall:
// start fall // start fall
#### # 4; #### # 4;
XZW3 XYZ 2 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); XZW3 XYZ 2 A_JumpIf(player.onground&&!bNoGravity,'FallEnd');
XZW4 AB 2 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); XZW4 AB 2 A_JumpIf(player.onground&&!bNoGravity,'FallEnd');
Goto FallLoop; Goto FallLoop;
FallLoop: FallLoop:
// falling // falling
XZW4 CDEFGH 3 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); XZW4 CDEFGH 3 A_JumpIf(player.onground&&!bNoGravity,'FallEnd');
Goto FallLoop; Goto FallLoop;
FallEnd: FallEnd:
// landing // landing
@ -806,27 +806,27 @@ extend Class Demolitionist
Stop; Stop;
CrouchMove: CrouchMove:
#### # 4; #### # 4;
XZW7 MN 4 A_FastJump(null,"CrouchMoveRun","CrouchMoveFast"); XZW7 MN 4 A_FastJump(null,'CrouchMoveRun','CrouchMoveFast');
XZW7 O 0 A_Crawl(.1,false); XZW7 O 0 A_Crawl(.1,false);
XZW7 OPQRS 4 A_FastJump(null,"CrouchMoveRun","CrouchMoveFast"); XZW7 OPQRS 4 A_FastJump(null,'CrouchMoveRun','CrouchMoveFast');
XZW7 T 0 A_Crawl(.1,true); XZW7 T 0 A_Crawl(.1,true);
XZW7 TUV 4 A_FastJump(null,"CrouchMoveRun","CrouchMoveFast"); XZW7 TUV 4 A_FastJump(null,'CrouchMoveRun','CrouchMoveFast');
Goto CrouchMove+1; Goto CrouchMove+1;
CrouchMoveRun: CrouchMoveRun:
#### # 3; #### # 3;
XZW7 MN 3 A_FastJump("CrouchMove",null,"CrouchMoveFast"); XZW7 MN 3 A_FastJump('CrouchMove',null,'CrouchMoveFast');
XZW7 O 0 A_Crawl(.2,false); XZW7 O 0 A_Crawl(.2,false);
XZW7 OPQRS 3 A_FastJump("CrouchMove",null,"CrouchMoveFast"); XZW7 OPQRS 3 A_FastJump('CrouchMove',null,'CrouchMoveFast');
XZW7 T 0 A_Crawl(.2,true); XZW7 T 0 A_Crawl(.2,true);
XZW7 TUV 3 A_FastJump("CrouchMove",null,"CrouchMoveFast"); XZW7 TUV 3 A_FastJump('CrouchMove',null,'CrouchMoveFast');
Goto CrouchMoveRun+1; Goto CrouchMoveRun+1;
CrouchMoveFast: CrouchMoveFast:
#### # 2; #### # 2;
XZW7 MN 2 A_FastJump("CrouchMove","CrouchMoveRun",null); XZW7 MN 2 A_FastJump('CrouchMove','CrouchMoveRun',null);
XZW7 O 0 A_Crawl(.4,false); XZW7 O 0 A_Crawl(.4,false);
XZW7 OPQRS 2 A_FastJump("CrouchMove","CrouchMoveRun",null); XZW7 OPQRS 2 A_FastJump('CrouchMove','CrouchMoveRun',null);
XZW7 T 0 A_Crawl(.4,true); XZW7 T 0 A_Crawl(.4,true);
XZW7 TUV 2 A_FastJump("CrouchMove","CrouchMoveRun",null); XZW7 TUV 2 A_FastJump('CrouchMove','CrouchMoveRun',null);
Goto CrouchMoveFast+2; Goto CrouchMoveFast+2;
CrouchWave: CrouchWave:
#### # 3; #### # 3;
@ -914,27 +914,27 @@ extend Class Demolitionist
Goto SwimLoop; Goto SwimLoop;
SwimLoop: SwimLoop:
#### # 5; #### # 5;
XZWE MNO 5 A_FastJump(null,"SwimLoopRun","SwimLoopFast"); XZWE MNO 5 A_FastJump(null,'SwimLoopRun','SwimLoopFast');
XZWE P 0 A_Crawl(.1,false); XZWE P 0 A_Crawl(.1,false);
XZWE PQRSTU 5 A_FastJump(null,"SwimLoopRun","SwimLoopFast"); XZWE PQRSTU 5 A_FastJump(null,'SwimLoopRun','SwimLoopFast');
XZWE V 0 A_Crawl(.1,true); XZWE V 0 A_Crawl(.1,true);
XZWE VWX 5 A_FastJump(null,"SwimLoopRun","SwimLoopFast"); XZWE VWX 5 A_FastJump(null,'SwimLoopRun','SwimLoopFast');
Goto SwimLoop+1; Goto SwimLoop+1;
SwimLoopRun: SwimLoopRun:
#### # 3; #### # 3;
XZWE MNO 3 A_FastJump("SwimLoop",null,"SwimLoopFast"); XZWE MNO 3 A_FastJump('SwimLoop',null,'SwimLoopFast');
XZWE P 0 A_Crawl(.2,false); XZWE P 0 A_Crawl(.2,false);
XZWE PQRSTU 3 A_FastJump("SwimLoop",null,"SwimLoopFast"); XZWE PQRSTU 3 A_FastJump('SwimLoop',null,'SwimLoopFast');
XZWE V 0 A_Crawl(.2,true); XZWE V 0 A_Crawl(.2,true);
XZWE VWX 3 A_FastJump("SwimLoop",null,"SwimLoopFast"); XZWE VWX 3 A_FastJump('SwimLoop',null,'SwimLoopFast');
Goto SwimLoopRun+1; Goto SwimLoopRun+1;
SwimLoopFast: SwimLoopFast:
#### # 2; #### # 2;
XZWE MNO 2 A_FastJump("SwimLoop","SwimLoopRun",null); XZWE MNO 2 A_FastJump('SwimLoop','SwimLoopRun',null);
XZWE P 0 A_Crawl(.4,false); XZWE P 0 A_Crawl(.4,false);
XZWE PQRSTU 2 A_FastJump("SwimLoop","SwimLoopRun",null); XZWE PQRSTU 2 A_FastJump('SwimLoop','SwimLoopRun',null);
XZWE V 0 A_Crawl(.4,true); XZWE V 0 A_Crawl(.4,true);
XZWE VWX 2 A_FastJump("SwimLoop","SwimLoopRun",null); XZWE VWX 2 A_FastJump('SwimLoop','SwimLoopRun',null);
Goto SwimLoopFast+1; Goto SwimLoopFast+1;
SwimEnd: SwimEnd:
#### # 2; #### # 2;

View file

@ -92,13 +92,13 @@ extend Class Demolitionist
foreach ( cls:AllActorClasses ) foreach ( cls:AllActorClasses )
{ {
let type = (class<Weapon>)(cls); let type = (class<Weapon>)(cls);
if ( !type || (type == "Weapon") ) continue; if ( !type || (type == 'Weapon') ) continue;
// Don't give already owned weapons // Don't give already owned weapons
let owned = FindInventory(type); let owned = FindInventory(type);
if ( owned && (owned.Amount >= owned.MaxAmount) ) continue; if ( owned && (owned.Amount >= owned.MaxAmount) ) continue;
// Don't give replaced weapons unless the replacement was done by Dehacked. // Don't give replaced weapons unless the replacement was done by Dehacked.
let rep = GetReplacement(type); let rep = GetReplacement(type);
if ( (rep == type) || (rep is "DehackedPickup") ) if ( (rep == type) || (rep is 'DehackedPickup') )
{ {
// Give the weapon only if it is set in a weapon slot. // Give the weapon only if it is set in a weapon slot.
if ( !player.weapons.LocateWeapon(type) ) continue; if ( !player.weapons.LocateWeapon(type) ) continue;

View file

@ -92,7 +92,7 @@ extend Class Demolitionist
facetimer = 50; facetimer = 50;
} }
facesad = false; facesad = false;
if ( FindInventory("RagekitPower") && (facestate < FS_PAIN) ) if ( FindInventory('RagekitPower') && (facestate < FS_PAIN) )
{ {
facestate = FS_EVIL; facestate = FS_EVIL;
facetimer = 10; facetimer = 10;
@ -137,7 +137,7 @@ extend Class Demolitionist
private int GetFaceTex() private int GetFaceTex()
{ {
if ( player.Health <= 0 ) return 3; if ( player.Health <= 0 ) return 3;
if ( (bInvulnerable || (player.cheats&(CF_GODMODE|CF_GODMODE2)) || FindInventory("InvinciballPower")) && (facestate >= FS_PAIN) ) return 14; if ( (bInvulnerable || (player.cheats&(CF_GODMODE|CF_GODMODE2)) || FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 14;
if ( facestate == FS_OUCH ) return 12; if ( facestate == FS_OUCH ) return 12;
if ( facestate == FS_PAIN ) return (paindir==1)?10:(paindir==-1)?9:8; if ( facestate == FS_PAIN ) return (paindir==1)?10:(paindir==-1)?9:8;
if ( facestate == FS_GRIN ) return 7; if ( facestate == FS_GRIN ) return 7;

View file

@ -94,7 +94,7 @@ Class DashTrail : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale .3; Scale .3;
+MASTERNOSEE; +MASTERNOSEE;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
@ -102,12 +102,12 @@ Class DashTrail : SWWMNonInteractiveActor
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
SetState(FindState("Spawn")+Random[ExploS](0,7)); SetState(FindState('Spawn')+Random[ExploS](0,7));
if ( waterlevel > 0 ) return; if ( waterlevel > 0 ) return;
let t = Spawn("DashTrail2",level.Vec3Offset(pos,vel*.3)); let t = Spawn('DashTrail2',level.Vec3Offset(pos,vel*.3));
t.master = master; t.master = master;
t.vel = vel*1.2; t.vel = vel*1.2;
let s = Spawn("SWWMSmoke",level.Vec3Offset(pos,vel*1.6)); let s = Spawn('SWWMSmoke',level.Vec3Offset(pos,vel*1.6));
s.vel = vel*.8; s.vel = vel*.8;
s.SetShade(Color(1,1,1)*Random[ExploS](64,128)); s.SetShade(Color(1,1,1)*Random[ExploS](64,128));
s.special1 = Random[ExploS](2,4); s.special1 = Random[ExploS](2,4);
@ -132,7 +132,7 @@ Class DashTrail2 : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale .2; Scale .2;
Alpha .4; Alpha .4;
+MASTERNOSEE; +MASTERNOSEE;
@ -141,7 +141,7 @@ Class DashTrail2 : SWWMNonInteractiveActor
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
SetState(FindState("Spawn")+Random[ExploS](0,7)); SetState(FindState('Spawn')+Random[ExploS](0,7));
} }
States States
{ {
@ -152,7 +152,7 @@ Class DashTrail2 : SWWMNonInteractiveActor
A_SetScale(scale.x*1.04); A_SetScale(scale.x*1.04);
if ( waterlevel > 0 ) if ( waterlevel > 0 )
{ {
let b = Spawn("SWWMBubble",pos); let b = Spawn('SWWMBubble',pos);
b.vel = vel; b.vel = vel;
b.scale *= scale.x; b.scale *= scale.x;
Destroy(); Destroy();
@ -168,7 +168,7 @@ Class DemolitionistRadiusShockwaveTail : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
} }
States States
{ {
@ -190,7 +190,7 @@ Class DemolitionistRadiusShockwave : Actor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Speed 15; Speed 15;
DamageFunction int(200*alpha); DamageFunction int(200*alpha);
DamageType 'GroundPound'; DamageType 'GroundPound';
@ -233,10 +233,10 @@ Class DemolitionistRadiusShockwave : Actor
pitch = min(85,(pitch+2)*1.05); pitch = min(85,(pitch+2)*1.05);
if ( !Random[ExploS](0,3) ) if ( !Random[ExploS](0,3) )
{ {
let p = Spawn("InvisibleSplasher",Vec3Offset(0,0,2)); let p = Spawn('InvisibleSplasher',Vec3Offset(0,0,2));
p.target = target; p.target = target;
} }
let s = Spawn("DemolitionistRadiusShockwaveTail",pos); let s = Spawn('DemolitionistRadiusShockwaveTail',pos);
s.vel = vel*.35; s.vel = vel*.35;
s.scale = scale; s.scale = scale;
s.alpha = alpha*.4; s.alpha = alpha*.4;
@ -281,7 +281,7 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor
for ( int i=0; i<360; i+=5 ) for ( int i=0; i<360; i+=5 )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,3); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,3);
let s = Spawn("SWWMSmoke",Vec3Angle(4,i,8)); let s = Spawn('SWWMSmoke',Vec3Angle(4,i,8));
s.vel = pvel+SWWMUtility.AngleToVector3(i,7.); s.vel = pvel+SWWMUtility.AngleToVector3(i,7.);
s.SetShade(Color(1,1,1)*Random[ExploS](64,224)); s.SetShade(Color(1,1,1)*Random[ExploS](64,224));
s.special1 = Random[ExploS](1,4); s.special1 = Random[ExploS](1,4);
@ -291,7 +291,7 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor
if ( pos.z > floorz+16 ) return; if ( pos.z > floorz+16 ) return;
for ( int i=0; i<360; i+=5 ) for ( int i=0; i<360; i+=5 )
{ {
let r = Spawn("DemolitionistRadiusShockwave",Vec3Angle(5,i)); let r = Spawn('DemolitionistRadiusShockwave',Vec3Angle(5,i));
r.target = target; r.target = target;
r.angle = i; r.angle = i;
r.vel.xy = AngleToVector(i,r.speed+min(special1*.15,30)); r.vel.xy = AngleToVector(i,r.speed+min(special1*.15,30));
@ -301,14 +301,14 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
let raging = RagekitPower(target.FindInventory("RagekitPower")); let raging = RagekitPower(target.FindInventory('RagekitPower'));
if ( raging || swwm_omnibust ) if ( raging || swwm_omnibust )
{ {
// bust the floor if we can // bust the floor if we can
let tempme = new("LineTracer"); // gross hack to pass needed data let tempme = new('LineTracer'); // gross hack to pass needed data
int dmg = 40+min(special1,120); int dmg = 40+min(special1,120);
if ( raging ) dmg *= 8; if ( raging ) dmg *= 8;
F3DFloor ff; F3DFloor ff;
@ -324,7 +324,7 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor
BusterWall.Bust(tempme.Results,dmg,target,(0,0,-1),pos.z); BusterWall.Bust(tempme.Results,dmg,target,(0,0,-1),pos.z);
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",pos); let ps = Spawn('BigPunchSplash',pos);
ps.damagetype = 'GroundPound'; ps.damagetype = 'GroundPound';
ps.target = target; ps.target = target;
ps.special1 = dmg; ps.special1 = dmg;

View file

@ -50,7 +50,7 @@ Class AlmasteelPlating : SWWMArmor
Inventory.Amount 1; Inventory.Amount 1;
Inventory.MaxAmount 1; Inventory.MaxAmount 1;
Inventory.InterHubAmount 1; Inventory.InterHubAmount 1;
Inventory.RestrictedTo "Demolitionist"; Inventory.RestrictedTo 'Demolitionist';
SWWMArmor.ArmorPriority 2; SWWMArmor.ArmorPriority 2;
+INVENTORY.UNCLEARABLE; +INVENTORY.UNCLEARABLE;
+SWWMARMOR.NOHITFLASH; +SWWMARMOR.NOHITFLASH;

View file

@ -70,7 +70,7 @@ extend Class Demolitionist
} }
if ( abs(floorz-zatstep) <= 8. ) if ( abs(floorz-zatstep) <= 8. )
{ {
let bs = Spawn("mkBloodStep",(checkpos.xy,zatstep)); let bs = Spawn('mkBloodStep',(checkpos.xy,zatstep));
bs.angle = angle; bs.angle = angle;
bs.frame = foot; bs.frame = foot;
bs.A_ChangeModel("",0,"","",0,"models/extra",String.Format("BloodFoot%d.png",Random[Blood](1,4))); bs.A_ChangeModel("",0,"","",0,"models/extra",String.Format("BloodFoot%d.png",Random[Blood](1,4)));
@ -80,7 +80,7 @@ extend Class Demolitionist
footblood[foot] = max(0.,footblood[foot]*.95-.05); footblood[foot] = max(0.,footblood[foot]*.95-.05);
} }
// part 2: check for stepping on a blood pool, make feet bloody // part 2: check for stepping on a blood pool, make feet bloody
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
for ( mkBloodPool p=hnd.bloodpools; p; p=p.nextpool ) for ( mkBloodPool p=hnd.bloodpools; p; p=p.nextpool )
{ {
// vertical distance fast check // vertical distance fast check
@ -104,7 +104,7 @@ extend Class Demolitionist
A_StartSound("demolitionist/run",CHAN_FOOTSTEP,CHANF_OVERLAP,vol); A_StartSound("demolitionist/run",CHAN_FOOTSTEP,CHANF_OVERLAP,vol);
if ( !nosplash ) if ( !nosplash )
{ {
let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0))); let b = Spawn('InvisibleSplasher',level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
b.target = self; b.target = self;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
@ -114,7 +114,7 @@ extend Class Demolitionist
A_StartSound("demolitionist/walk",CHAN_FOOTSTEP,CHANF_OVERLAP,vol*.5); A_StartSound("demolitionist/walk",CHAN_FOOTSTEP,CHANF_OVERLAP,vol*.5);
if ( !nosplash ) if ( !nosplash )
{ {
let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0))); let b = Spawn('InvisibleSplasher',level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
b.target = self; b.target = self;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
@ -124,7 +124,7 @@ extend Class Demolitionist
A_StartSound("demolitionist/walk",CHAN_FOOTSTEP,CHANF_OVERLAP,vol*.2); A_StartSound("demolitionist/walk",CHAN_FOOTSTEP,CHANF_OVERLAP,vol*.2);
if ( !nosplash ) if ( !nosplash )
{ {
let b = Spawn("SmolInvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0))); let b = Spawn('SmolInvisibleSplasher',level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
b.target = self; b.target = self;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
@ -220,7 +220,7 @@ extend Class Demolitionist
override void CheckMoveUpDown() override void CheckMoveUpDown()
{ {
if ( InStateSequence(CurState,FindState("Dash")) ) if ( InStateSequence(CurState,FindState('Dash')) )
player.cmd.upmove = 0; player.cmd.upmove = 0;
if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) ) if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) )
{ {
@ -286,7 +286,7 @@ extend Class Demolitionist
Super.MovePlayer(); Super.MovePlayer();
return; return;
} }
bool isdashing = InStateSequence(CurState,FindState("Dash")); bool isdashing = InStateSequence(CurState,FindState('Dash'));
if ( isdashing ) player.cmd.forwardmove = player.cmd.sidemove = 0; if ( isdashing ) player.cmd.forwardmove = player.cmd.sidemove = 0;
if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) ) if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) )
{ {
@ -452,7 +452,7 @@ extend Class Demolitionist
guidepitch *= .9; guidepitch *= .9;
guideroll *= .9; guideroll *= .9;
// anchor to ground when going down steps // anchor to ground when going down steps
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( lastground && !player.onground && !bFly && !bFlyCheat && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) && (vel.z <= 0) && !isdashing && !hnd.nogroundanchor ) if ( lastground && !player.onground && !bFly && !bFlyCheat && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) && (vel.z <= 0) && !isdashing && !hnd.nogroundanchor )
{ {
// test for gap crossing (i.e: climbing up platforms with holes between them) // test for gap crossing (i.e: climbing up platforms with holes between them)
@ -517,7 +517,7 @@ extend Class Demolitionist
vel += dashdir*dashboost; vel += dashdir*dashboost;
vel.z += clamp(-vel.z*.4,0.,30.); vel.z += clamp(-vel.z*.4,0.,30.);
player.jumptics = -1; player.jumptics = -1;
SetStateLabel("Dash"); SetStateLabel('Dash');
A_StartSound("demolitionist/jet",CHAN_JETPACK,CHANF_LOOP); A_StartSound("demolitionist/jet",CHAN_JETPACK,CHANF_LOOP);
lastbump *= .95; lastbump *= .95;
mystats.dashcount++; mystats.dashcount++;
@ -526,7 +526,7 @@ extend Class Demolitionist
override void CheckJump() override void CheckJump()
{ {
if ( InStateSequence(CurState,FindState("Dash")) ) return; // do not if ( InStateSequence(CurState,FindState('Dash')) ) return; // do not
if ( !(player.cmd.buttons&BT_JUMP) || (gamestate != GS_LEVEL) ) return; if ( !(player.cmd.buttons&BT_JUMP) || (gamestate != GS_LEVEL) ) return;
Vector2 walldir = AngleToVector(angle); Vector2 walldir = AngleToVector(angle);
bool walljump = false, wallclimb = false; bool walljump = false, wallclimb = false;
@ -632,7 +632,7 @@ extend Class Demolitionist
} }
} }
if ( jumpfac > 0 ) jumpvelz *= jumpfac; if ( jumpfac > 0 ) jumpvelz *= jumpfac;
bool raging = FindInventory("RagekitPower"); bool raging = FindInventory('RagekitPower');
if ( raging ) jumpvelz *= 2.; if ( raging ) jumpvelz *= 2.;
double pvelz = vel.z; double pvelz = vel.z;
if ( !player.onground && !(player.cheats&CF_PREDICTING) ) if ( !player.onground && !(player.cheats&CF_PREDICTING) )
@ -658,7 +658,7 @@ extend Class Demolitionist
int dmg = jumpactor.DamageMobj(self,self,10,'Jump'); int dmg = jumpactor.DamageMobj(self,self,10,'Jump');
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",pos); let ps = Spawn('BigPunchSplash',pos);
ps.damagetype = 'Jump'; ps.damagetype = 'Jump';
ps.target = self; ps.target = self;
ps.special1 = dmg; ps.special1 = dmg;
@ -683,7 +683,7 @@ extend Class Demolitionist
mystats.boostcount++; mystats.boostcount++;
last_boost = level.maptime+1; last_boost = level.maptime+1;
BumpView(3.,vel); BumpView(3.,vel);
SetStateLabel("Boost"); SetStateLabel('Boost');
} }
else else
{ {
@ -731,7 +731,7 @@ extend Class Demolitionist
if ( loudlv > 2 ) A_StartSound(String.Format("voice/%s/jump%d",myvoice,idx),CHAN_DEMOVOICEAUX2,CHANF_OVERLAP); if ( loudlv > 2 ) A_StartSound(String.Format("voice/%s/jump%d",myvoice,idx),CHAN_DEMOVOICEAUX2,CHANF_OVERLAP);
if ( loudlv > 3 ) A_StartSound(String.Format("voice/%s/jump%d",myvoice,idx),CHAN_DEMOVOICEAUX3,CHANF_OVERLAP); if ( loudlv > 3 ) A_StartSound(String.Format("voice/%s/jump%d",myvoice,idx),CHAN_DEMOVOICEAUX3,CHANF_OVERLAP);
} }
SetStateLabel("Jump"); SetStateLabel('Jump');
} }
} }
last_jump_held = level.maptime+1; last_jump_held = level.maptime+1;
@ -740,7 +740,7 @@ extend Class Demolitionist
bool AllowCrouch() bool AllowCrouch()
{ {
if ( player.cmd.buttons&BT_JUMP ) return false; if ( player.cmd.buttons&BT_JUMP ) return false;
if ( InStateSequence(CurState,FindState("Dash")) ) return false; // no crouch during dash if ( InStateSequence(CurState,FindState('Dash')) ) return false; // no crouch during dash
return true; return true;
} }
@ -821,7 +821,7 @@ extend Class Demolitionist
grav *= .35; grav *= .35;
} }
// reduce gravity while we're boosting // reduce gravity while we're boosting
else if ( InStateSequence(CurState,FindState("Dash")) || InStateSequence(CurState,FindState("Boost")) ) else if ( InStateSequence(CurState,FindState('Dash')) || InStateSequence(CurState,FindState('Boost')) )
grav *= .25; grav *= .25;
vel.z -= grav; vel.z -= grav;
} }

View file

@ -157,7 +157,7 @@ extend Class Demolitionist
{ {
if ( player.usedown ) if ( player.usedown )
return; return;
if ( !itrace ) itrace = new("SWWMItemTracer"); if ( !itrace ) itrace = new('SWWMItemTracer');
Vector3 dir; Vector3 dir;
let [x, y, z] = SWWMUtility.GetPlayerAxes(self); let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
Vector3 origin = SWWMUtility.GetPlayerEye(self); Vector3 origin = SWWMUtility.GetPlayerEye(self);
@ -183,7 +183,7 @@ extend Class Demolitionist
bool CheckMirrorUse() bool CheckMirrorUse()
{ {
if ( !mtrace ) mtrace = new("SWWMMirrorTracer"); if ( !mtrace ) mtrace = new('SWWMMirrorTracer');
Vector3 dir = SWWMUtility.GetPlayerAimDir(self); Vector3 dir = SWWMUtility.GetPlayerAimDir(self);
Vector3 origin = SWWMUtility.GetPlayerEye(self); Vector3 origin = SWWMUtility.GetPlayerEye(self);
mtrace.Trace(origin,level.PointInSector(origin.xy),dir,UseRange,0,ignoreallactors:true); mtrace.Trace(origin,level.PointInSector(origin.xy),dir,UseRange,0,ignoreallactors:true);
@ -289,7 +289,7 @@ extend Class Demolitionist
deadtimer++; deadtimer++;
if ( (deadtimer == 60) && (player == players[consoleplayer]) ) if ( (deadtimer == 60) && (player == players[consoleplayer]) )
A_StartSound("demolitionist/youdied",CHAN_DEMOVOICE,CHANF_OVERLAP|CHANF_UI); A_StartSound("demolitionist/youdied",CHAN_DEMOVOICE,CHANF_OVERLAP|CHANF_UI);
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( multiplayer || level.AllowRespawn || sv_singleplayerrespawn || G_SkillPropertyInt(SKILLP_PlayerRespawn) ) if ( multiplayer || level.AllowRespawn || sv_singleplayerrespawn || G_SkillPropertyInt(SKILLP_PlayerRespawn) )
{ {
// standard behaviour, respawn normally // standard behaviour, respawn normally
@ -311,7 +311,7 @@ extend Class Demolitionist
else if ( (player.cmd.buttons&BT_ATTACK) && (deadtimer > 120) && (!hnd || !hnd.gdat.disablerevive) && swwm_revive ) else if ( (player.cmd.buttons&BT_ATTACK) && (deadtimer > 120) && (!hnd || !hnd.gdat.disablerevive) && swwm_revive )
{ {
// reboot (if possible) // reboot (if possible)
if ( !FindInventory("ReviveCooldown") && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 6) ) if ( !FindInventory('ReviveCooldown') && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 6) )
{ {
if ( hasrevived ) SWWMUtility.MarkAchievement("sekiro",player); if ( hasrevived ) SWWMUtility.MarkAchievement("sekiro",player);
hasrevived = true; hasrevived = true;
@ -322,9 +322,9 @@ extend Class Demolitionist
player.bonuscount = 0; player.bonuscount = 0;
player.poisoncount = 0; player.poisoncount = 0;
blinktime = 30; blinktime = 30;
SetState(FindState("Spawn")+1); // skip tweening SetState(FindState('Spawn')+1); // skip tweening
roll = 0; roll = 0;
let s = Spawn("DemolitionistShockwave",pos); let s = Spawn('DemolitionistShockwave',pos);
s.target = self; s.target = self;
s.special1 = 30; s.special1 = 30;
ReactionTime = 17; ReactionTime = 17;
@ -341,7 +341,7 @@ extend Class Demolitionist
SWWMHandler.DoFlash(self,Color(255,128,192,255),30); SWWMHandler.DoFlash(self,Color(255,128,192,255),30);
if ( special1 > 2 ) special1 = 0; if ( special1 > 2 ) special1 = 0;
if ( (swwm_revivecooldown > 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4) ) if ( (swwm_revivecooldown > 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4) )
GiveInventory("ReviveCooldown",1); GiveInventory('ReviveCooldown',1);
} }
else if ( level.maptime > revivefail ) else if ( level.maptime > revivefail )
{ {

View file

@ -75,7 +75,7 @@ extend Class Demolitionist
break; break;
} }
if ( !addme ) continue; if ( !addme ) continue;
let nmi = new("SWWMMagItem"); let nmi = new('SWWMMagItem');
nmi.target = self; nmi.target = self;
nmi.item = i; nmi.item = i;
nmi.next = magitem; nmi.next = magitem;
@ -207,7 +207,7 @@ extend Class Demolitionist
isAnalogMoving = CVar.GetCVar('swwm_analogmove',player).GetBool(); isAnalogMoving = CVar.GetCVar('swwm_analogmove',player).GetBool();
UpdateFace(); UpdateFace();
UpdateTags(); UpdateTags();
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) if ( hnd )
{ {
if ( hasteleported ) hnd.SendInterfaceEvent(PlayerNumber(),"swwmsendplayertele"); if ( hasteleported ) hnd.SendInterfaceEvent(PlayerNumber(),"swwmsendplayertele");
@ -221,21 +221,21 @@ extend Class Demolitionist
} }
if ( !selflight ) if ( !selflight )
{ {
selflight = new("DemolitionistSelfLight"); selflight = new('DemolitionistSelfLight');
selflight.ChangeStatNum(STAT_USER); selflight.ChangeStatNum(STAT_USER);
selflight.target = self; selflight.target = self;
selflight.Tick(); selflight.Tick();
} }
if ( !myshadow ) myshadow = SWWMShadow.Track(self); if ( !myshadow ) myshadow = SWWMShadow.Track(self);
// double-check that we have these // double-check that we have these
if ( !FindInventory("AlmasteelPlating") ) if ( !FindInventory('AlmasteelPlating') )
{ {
let ap = Inventory(Spawn("AlmasteelPlating")); let ap = Inventory(Spawn('AlmasteelPlating'));
if ( !ap.CallTryPickup(self) ) ap.Destroy(); if ( !ap.CallTryPickup(self) ) ap.Destroy();
} }
if ( !FindInventory("SayaCollar") ) if ( !FindInventory('SayaCollar') )
{ {
let sc = Inventory(Spawn("SayaCollar")); let sc = Inventory(Spawn('SayaCollar'));
if ( !sc.CallTryPickup(self) ) sc.Destroy(); if ( !sc.CallTryPickup(self) ) sc.Destroy();
} }
// this is why we need mod cvar callbacks // this is why we need mod cvar callbacks
@ -257,20 +257,20 @@ extend Class Demolitionist
{ {
if ( health > 1000 ) if ( health > 1000 )
{ {
let spr = DivineSpriteEffect(FindInventory("DivineSpriteEffect")); let spr = DivineSpriteEffect(FindInventory('DivineSpriteEffect'));
if ( !spr || spr.bHealDone ) if ( !spr || spr.bHealDone )
A_SetHealth(max(1000,health-10)); A_SetHealth(max(1000,health-10));
if ( health <= 1000 ) healcooldown = 40; if ( health <= 1000 ) healcooldown = 40;
} }
else if ( health > 500 ) else if ( health > 500 )
{ {
if ( !FindInventory("GrilledCheeseSafeguard") && !(healtimer%3) ) if ( !FindInventory('GrilledCheeseSafeguard') && !(healtimer%3) )
A_SetHealth(health-1); A_SetHealth(health-1);
if ( health <= 500 ) healcooldown = 20; if ( health <= 500 ) healcooldown = 20;
} }
else if ( health > 200 ) else if ( health > 200 )
{ {
if ( !FindInventory("RefresherRegen") && !(healtimer%12) ) if ( !FindInventory('RefresherRegen') && !(healtimer%12) )
A_SetHealth(health-1); A_SetHealth(health-1);
} }
healtimer++; healtimer++;
@ -317,7 +317,7 @@ extend Class Demolitionist
int numpt = Random[ExploS](-2,2); int numpt = Random[ExploS](-2,2);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let p = Spawn("SWWMBubble",Vec3Offset(FRandom[ExploS](-radius,radius)*.8,FRandom[ExploS](-radius,radius)*.8,FRandom[ExploS](height*.1,height*.9))); let p = Spawn('SWWMBubble',Vec3Offset(FRandom[ExploS](-radius,radius)*.8,FRandom[ExploS](-radius,radius)*.8,FRandom[ExploS](height*.1,height*.9)));
p.scale *= FRandom[ExploS](.02,.2); p.scale *= FRandom[ExploS](.02,.2);
p.vel += vel*.2; p.vel += vel*.2;
} }
@ -335,7 +335,7 @@ extend Class Demolitionist
if ( spd > mystats.topspeed ) mystats.topspeed = spd; if ( spd > mystats.topspeed ) mystats.topspeed = spd;
if ( spd > ((3600*GameTicRate)/32000.) ) if ( spd > ((3600*GameTicRate)/32000.) )
SWWMUtility.AchievementProgress("sanic",int((spd*3600*GameTicRate)/32000.),player); SWWMUtility.AchievementProgress("sanic",int((spd*3600*GameTicRate)/32000.),player);
bool isdashing = InStateSequence(CurState,FindState("Dash")); bool isdashing = InStateSequence(CurState,FindState('Dash'));
if ( player.onground && !bNoGravity && !lastground ) if ( player.onground && !bNoGravity && !lastground )
{ {
// bump down weapon // bump down weapon
@ -343,13 +343,13 @@ extend Class Demolitionist
BumpView(min(-lastvelz/10.,20)); BumpView(min(-lastvelz/10.,20));
if ( lastvelz < -25 ) if ( lastvelz < -25 )
{ {
let s = Spawn("DemolitionistShockwave",pos); let s = Spawn('DemolitionistShockwave',pos);
s.target = self; s.target = self;
s.special1 = int(-lastvelz); s.special1 = int(-lastvelz);
A_AlertMonsters(swwm_uncapalert?0:2500); A_AlertMonsters(swwm_uncapalert?0:2500);
BumpView(15.); BumpView(15.);
lastbump *= 1.1; lastbump *= 1.1;
if ( FindInventory("RagekitPower") ) if ( FindInventory('RagekitPower') )
{ {
// stop for just a split second UNLESS bunnyhopping // stop for just a split second UNLESS bunnyhopping
if ( !IsRunning() || (level.maptime >= (lastairtic+10)) ) if ( !IsRunning() || (level.maptime >= (lastairtic+10)) )
@ -444,9 +444,9 @@ extend Class Demolitionist
if ( (lastvelz < -5) || !(level.maptime%5) ) if ( (lastvelz < -5) || !(level.maptime%5) )
{ {
int realdmg = encroached.DamageMobj(self,self,int((2+max(0,-lastvelz*3))*max(1.,mass/encroached.mass)),'Jump',DMG_THRUSTLESS); int realdmg = encroached.DamageMobj(self,self,int((2+max(0,-lastvelz*3))*max(1.,mass/encroached.mass)),'Jump',DMG_THRUSTLESS);
if ( FindInventory("RagekitPower") ) if ( FindInventory('RagekitPower') )
{ {
let ps = Spawn("BigPunchSplash",pos); let ps = Spawn('BigPunchSplash',pos);
ps.damagetype = 'Jump'; ps.damagetype = 'Jump';
ps.target = self; ps.target = self;
ps.special1 = realdmg; ps.special1 = realdmg;
@ -506,7 +506,7 @@ extend Class Demolitionist
lastground = player.onground; lastground = player.onground;
lastvelz = prevvelz; lastvelz = prevvelz;
prevvelz = vel.z; prevvelz = vel.z;
bool isboosting = InStateSequence(CurState,FindState("Boost")); bool isboosting = InStateSequence(CurState,FindState('Boost'));
bNOFRICTION = ((bFly&&!bFlyCheat&&!(player.cheats&CF_NOCLIP2))||isdashing); bNOFRICTION = ((bFly&&!bFlyCheat&&!(player.cheats&CF_NOCLIP2))||isdashing);
if ( fuelcooldown == 1 ) A_StartSound("demolitionist/fuelregen",CHAN_FUELREGEN,CHANF_LOOP,.35,4.,.5); if ( fuelcooldown == 1 ) A_StartSound("demolitionist/fuelregen",CHAN_FUELREGEN,CHANF_LOOP,.35,4.,.5);
else if ( fuelcooldown > 1 ) A_StopSound(CHAN_FUELREGEN); else if ( fuelcooldown > 1 ) A_StopSound(CHAN_FUELREGEN);
@ -562,7 +562,7 @@ extend Class Demolitionist
{ {
for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ ) for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ )
{ {
a = Spawn("DashTrail",Vec3Angle(15,angle+i*140,35)); a = Spawn('DashTrail',Vec3Angle(15,angle+i*140,35));
a.master = self; a.master = self;
a.vel = (RotateVector((j,0),angle+i*160),0)-(0,0,1)*j; a.vel = (RotateVector((j,0),angle+i*160),0)-(0,0,1)*j;
a.vel -= vel*.5; a.vel -= vel*.5;
@ -574,7 +574,7 @@ extend Class Demolitionist
Vector3 viewdir = SWWMUtility.Vec3FromAngles(angle,pitch); Vector3 viewdir = SWWMUtility.Vec3FromAngles(angle,pitch);
// look for things we could potentially bump into // look for things we could potentially bump into
bool bumped = false; bool bumped = false;
let raging = RagekitPower(FindInventory("RagekitPower")); let raging = RagekitPower(FindInventory('RagekitPower'));
double maxmass = max(mass*spd/40.,200); double maxmass = max(mass*spd/40.,200);
if ( raging ) maxmass *= 2; if ( raging ) maxmass *= 2;
let bt = BlockThingsIterator.Create(self,spd+radius+1024); let bt = BlockThingsIterator.Create(self,spd+radius+1024);
@ -651,7 +651,7 @@ extend Class Demolitionist
{ {
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4); A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4);
if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2); if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
Spawn("SWWMItemFog",level.Vec3Offset(pos,diff/2)); Spawn('SWWMItemFog',level.Vec3Offset(pos,diff/2));
A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.); A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.);
mystats.buttslams++; mystats.buttslams++;
lastbump *= .8; lastbump *= .8;
@ -659,7 +659,7 @@ extend Class Demolitionist
} }
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",level.Vec3Offset(pos,diff/2)); let ps = Spawn('BigPunchSplash',level.Vec3Offset(pos,diff/2));
ps.damagetype = buttslam?'Buttslam':'Dash'; ps.damagetype = buttslam?'Buttslam':'Dash';
ps.target = self; ps.target = self;
ps.special1 = dmg; ps.special1 = dmg;
@ -687,7 +687,7 @@ extend Class Demolitionist
if ( raging || swwm_omnibust ) if ( raging || swwm_omnibust )
{ {
// see if we can bust it // see if we can bust it
let tempme = new("LineTracer"); // gross hack to pass needed data let tempme = new('LineTracer'); // gross hack to pass needed data
int dmg = int(10+spd*3.); int dmg = int(10+spd*3.);
if ( raging ) dmg *= 8; if ( raging ) dmg *= 8;
bool buttslam = false; bool buttslam = false;
@ -705,7 +705,7 @@ extend Class Demolitionist
// busted through // busted through
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height)); let ps = Spawn('BigPunchSplash',Vec3Offset(0,0,Height));
ps.damagetype = buttslam?'Buttslam':'Dash'; ps.damagetype = buttslam?'Buttslam':'Dash';
ps.target = self; ps.target = self;
ps.special1 = int(10+spd*3.); ps.special1 = int(10+spd*3.);
@ -717,7 +717,7 @@ extend Class Demolitionist
{ {
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4); A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4);
if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2); if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
Spawn("SWWMItemFog",Vec3Offset(0,0,Height)); Spawn('SWWMItemFog',Vec3Offset(0,0,Height));
A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.); A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.);
mystats.buttslams++; mystats.buttslams++;
lastbump *= .8; lastbump *= .8;
@ -741,7 +741,7 @@ extend Class Demolitionist
dashboost *= 0.; dashboost *= 0.;
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height)); let ps = Spawn('BigPunchSplash',Vec3Offset(0,0,Height));
ps.damagetype = (dir dot viewdir < -3.)?'Buttslam':'Dash'; ps.damagetype = (dir dot viewdir < -3.)?'Buttslam':'Dash';
ps.target = self; ps.target = self;
ps.special1 = int(10+spd*3.); ps.special1 = int(10+spd*3.);
@ -783,7 +783,7 @@ extend Class Demolitionist
if ( raging || swwm_omnibust ) if ( raging || swwm_omnibust )
{ {
// see if we can bust it // see if we can bust it
let tempme = new("LineTracer"); // gross hack to pass needed data let tempme = new('LineTracer'); // gross hack to pass needed data
int dmg = int(10+spd*3.); int dmg = int(10+spd*3.);
if ( raging ) dmg *= 8; if ( raging ) dmg *= 8;
if ( buttslam ) dmg *= 3; if ( buttslam ) dmg *= 3;
@ -805,7 +805,7 @@ extend Class Demolitionist
// busted through // busted through
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2))); let ps = Spawn('BigPunchSplash',Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2)));
ps.damagetype = buttslam?'Buttslam':'Dash'; ps.damagetype = buttslam?'Buttslam':'Dash';
ps.target = self; ps.target = self;
ps.special1 = int(10+spd*3.); ps.special1 = int(10+spd*3.);
@ -816,7 +816,7 @@ extend Class Demolitionist
{ {
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4); A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4);
if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2); if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
Spawn("SWWMItemFog",Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2))); Spawn('SWWMItemFog',Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2)));
A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.); A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.);
mystats.buttslams++; mystats.buttslams++;
lastbump *= .8; lastbump *= .8;
@ -839,7 +839,7 @@ extend Class Demolitionist
dashboost *= 0.; dashboost *= 0.;
if ( raging ) if ( raging )
{ {
let ps = Spawn("BigPunchSplash",Vec3Offset(dir.x*radius,dir.y*radius,Height/2.)); let ps = Spawn('BigPunchSplash',Vec3Offset(dir.x*radius,dir.y*radius,Height/2.));
ps.damagetype = (dir dot viewdir < -3.)?'Buttslam':'Dash'; ps.damagetype = (dir dot viewdir < -3.)?'Buttslam':'Dash';
ps.target = self; ps.target = self;
ps.special1 = int(10+spd*3.); ps.special1 = int(10+spd*3.);
@ -887,7 +887,7 @@ extend Class Demolitionist
Actor a; Actor a;
for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ ) for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ )
{ {
a = Spawn("DashTrail",Vec3Angle(10,angle+i*140,40)); a = Spawn('DashTrail',Vec3Angle(10,angle+i*140,40));
a.master = self; a.master = self;
a.vel = .5*(RotateVector((j,0),angle+i*160),0)-(0,0,1)*j; a.vel = .5*(RotateVector((j,0),angle+i*160),0)-(0,0,1)*j;
a.vel -= vel*.5; a.vel -= vel*.5;

View file

@ -10,7 +10,7 @@ Class mkBlood : SWWMNonInteractiveActor
void A_Bleed( int str = 1 ) void A_Bleed( int str = 1 )
{ {
if ( !target ) return; if ( !target ) return;
let b = Spawn("mkBloodSpray",pos); let b = Spawn('mkBloodSpray',pos);
Vector2 dirto = target.Vec2To(self).unit(); Vector2 dirto = target.Vec2To(self).unit();
b.angle = atan2(dirto.y,dirto.x); b.angle = atan2(dirto.y,dirto.x);
b.pitch = FRandom[Blood](-60,30); b.pitch = FRandom[Blood](-60,30);
@ -45,7 +45,7 @@ Class mkBlood : SWWMNonInteractiveActor
level.SpawnParticle(puff); level.SpawnParticle(puff);
} }
} }
let s = mkBloodSmoke(SWWMStaticSprite.SpawnAt("mkBloodSmoke",pos)); let s = mkBloodSmoke(SWWMStaticSprite.SpawnAt('mkBloodSmoke',pos));
s.scolor = b.fillcolor; s.scolor = b.fillcolor;
s.scale *= .4*str; s.scale *= .4*str;
s.thickness = str-1; s.thickness = str-1;
@ -111,7 +111,7 @@ Class mkBloodSpray : SWWMNonInteractiveActor
int cnt = sz-Random[Blood](0,4); int cnt = sz-Random[Blood](0,4);
for ( int i=0; i<cnt; i++ ) for ( int i=0; i<cnt; i++ )
{ {
let d = Spawn("mkBloodDrop",pos); let d = Spawn('mkBloodDrop',pos);
d.SetShade(fillcolor); d.SetShade(fillcolor);
d.CopyBloodColor(self); d.CopyBloodColor(self);
ang = baseang+target.angle+FRandom[Blood](-15.,15.)*str; ang = baseang+target.angle+FRandom[Blood](-15.,15.)*str;
@ -147,7 +147,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
+ROLLCENTER; +ROLLCENTER;
Scale .35; Scale .35;
Mass 1; Mass 1;
RenderStyle "Translucent"; RenderStyle 'Translucent';
} }
// try to reduce overhead as much as possible with this // try to reduce overhead as much as possible with this
override void Tick() override void Tick()
@ -184,7 +184,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
if ( special1-- ) return; if ( special1-- ) return;
special2 += 10; special2 += 10;
special1 = Random[Blood](20,30)+special2; special1 = Random[Blood](20,30)+special2;
let d = Spawn("mkBloodDrop",Vec3Offset(0,0,-2)); let d = Spawn('mkBloodDrop',Vec3Offset(0,0,-2));
d.master = self; d.master = self;
d.SetShade(fillcolor); d.SetShade(fillcolor);
d.CopyBloodColor(self); d.CopyBloodColor(self);
@ -433,7 +433,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
Super.PostBeginPlay(); Super.PostBeginPlay();
SWWMHandler.QueueBlod(self); SWWMHandler.QueueBlod(self);
int jumps = Random[Blood](0,3); int jumps = Random[Blood](0,3);
state dest = ResolveState("Spawn"); state dest = ResolveState('Spawn');
SetState(dest+jumps); SetState(dest+jumps);
} }
override void OnDestroy() override void OnDestroy()
@ -532,7 +532,7 @@ Class mkFlyingGib : Actor
Super.Tick(); Super.Tick();
if ( isFrozen() || (freezetics > 0) ) return; if ( isFrozen() || (freezetics > 0) ) return;
if ( killme ) A_FadeOut(.01); if ( killme ) A_FadeOut(.01);
if ( CurState == ResolveState("Death2") ) if ( CurState == ResolveState('Death2') )
{ {
if ( vel.length() < .1 ) if ( vel.length() < .1 )
bleeding = false; bleeding = false;
@ -594,7 +594,7 @@ Class mkFlyingGib : Actor
Mass 10; Mass 10;
Scale .75; Scale .75;
Gravity .5; Gravity .5;
BounceType "Doom"; BounceType 'Doom';
BounceFactor .2; BounceFactor .2;
+MISSILE; +MISSILE;
+DROPOFF; +DROPOFF;
@ -625,7 +625,7 @@ Class mkFlyingGib : Actor
} }
Goto Spawn; Goto Spawn;
Death: Death:
XZW1 # 1 A_JumpIf(pos.z<=floorz,"Death2"); XZW1 # 1 A_JumpIf(pos.z<=floorz,'Death2');
Wait; Wait;
Death2: Death2:
XZW1 # -1 XZW1 # -1
@ -636,7 +636,7 @@ Class mkFlyingGib : Actor
else roll = Random[Gibs](175,185); else roll = Random[Gibs](175,185);
A_Stop(); A_Stop();
// floor drop // floor drop
let b = Spawn("mkBloodDrop",pos); let b = Spawn('mkBloodDrop',pos);
b.scale *= 2.0; b.scale *= 2.0;
b.SetShade(shadecol); b.SetShade(shadecol);
} }
@ -662,7 +662,7 @@ Class mkGibber : SWWMNonInteractiveActor
double ang, pt; double ang, pt;
Vector3 dir; Vector3 dir;
int bloodthrottle = 0, gibthrottle = 0; int bloodthrottle = 0, gibthrottle = 0;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( hnd ) if ( hnd )
{ {
if ( hnd.oldmaxblood != 0 ) if ( hnd.oldmaxblood != 0 )
@ -673,7 +673,7 @@ Class mkGibber : SWWMNonInteractiveActor
for ( int i=0; i<gibsize; i++ ) for ( int i=0; i<gibsize; i++ )
{ {
if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue; if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue;
let a = mkBloodSmoke(SWWMStaticSprite.SpawnAt("mkBloodSmoke",pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height))); let a = mkBloodSmoke(SWWMStaticSprite.SpawnAt('mkBloodSmoke',pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height)));
a.scale = (.5,.5); a.scale = (.5,.5);
a.alpha = 1.; a.alpha = 1.;
ang = FRandom[Gibs](0,360); ang = FRandom[Gibs](0,360);
@ -706,7 +706,7 @@ Class mkGibber : SWWMNonInteractiveActor
for ( int i=0; i<gibsize; i++ ) for ( int i=0; i<gibsize; i++ )
{ {
if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue; if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue;
let [b, a] = A_SpawnItemEx("mkBloodDrop",FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR); let [b, a] = A_SpawnItemEx('mkBloodDrop',FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
if ( !b ) continue; if ( !b ) continue;
ang = FRandom[Gibs](0,360); ang = FRandom[Gibs](0,360);
pt = FRandom[Gibs](-90,90); pt = FRandom[Gibs](-90,90);
@ -757,7 +757,7 @@ Class mkGibber : SWWMNonInteractiveActor
} }
if ( mksplat ) if ( mksplat )
{ {
let s = Spawn("mkBloodBlast",pos); let s = Spawn('mkBloodBlast',pos);
s.SetShade(shadecol); s.SetShade(shadecol);
s.master = gibbed; s.master = gibbed;
mksplat = false; mksplat = false;
@ -771,7 +771,7 @@ Class mkGibber : SWWMNonInteractiveActor
{ {
Radius 32; Radius 32;
Height 16; Height 16;
mkGibber.GibType "mkFlyingGib"; mkGibber.GibType 'mkFlyingGib';
} }
} }
@ -802,8 +802,8 @@ Class mkBloodBlast : SWWMNonInteractiveActor
} }
default default
{ {
RenderStyle "Shaded"; RenderStyle 'Shaded';
StencilColor "Red"; StencilColor "FF 00 00";
} }
States States
{ {
@ -818,21 +818,21 @@ Class GreenBloodReference : Actor
{ {
Default Default
{ {
BloodColor "Green"; BloodColor "00 FF 00";
} }
} }
Class BlueBloodReference : Actor Class BlueBloodReference : Actor
{ {
Default Default
{ {
BloodColor "Blue"; BloodColor "00 00 FF";
} }
} }
Class PurpleBloodReference : Actor Class PurpleBloodReference : Actor
{ {
Default Default
{ {
BloodColor "Purple"; BloodColor "80 00 FF";
} }
} }
@ -846,7 +846,7 @@ Class CorpseFallTracker : Thinker
static void TrackBody( Actor b ) static void TrackBody( Actor b )
{ {
if ( !b ) return; if ( !b ) return;
let cft = new("CorpseFallTracker"); let cft = new('CorpseFallTracker');
cft.ChangeStatNum(STAT_USER); cft.ChangeStatNum(STAT_USER);
cft.mybody = b; cft.mybody = b;
cft.lastvelz = b.vel.z; cft.lastvelz = b.vel.z;
@ -868,7 +868,7 @@ Class CorpseFallTracker : Thinker
// wait until body is dead on floor and at the last state of animation // wait until body is dead on floor and at the last state of animation
if ( (mybody.Health > 0) || isflying || (mybody.tics != -1) || (mybody.vel.length() > 0) ) if ( (mybody.Health > 0) || isflying || (mybody.tics != -1) || (mybody.vel.length() > 0) )
return; return;
let b = mybody.Spawn("mkBloodPool",mybody.pos); let b = mybody.Spawn('mkBloodPool',mybody.pos);
Color shadecol; Color shadecol;
if ( mybody.bloodcolor ) shadecol = Color(mybody.bloodcolor.r/2,mybody.bloodcolor.g/2,mybody.bloodcolor.b/2); if ( mybody.bloodcolor ) shadecol = Color(mybody.bloodcolor.r/2,mybody.bloodcolor.g/2,mybody.bloodcolor.b/2);
else shadecol = Color(80,0,0); else shadecol = Color(80,0,0);
@ -905,7 +905,7 @@ Class mkBloodPool : SWWMNonInteractiveActor
prevpool.nextpool = nextpool; prevpool.nextpool = nextpool;
if ( nextpool ) nextpool.prevpool = prevpool; if ( nextpool ) nextpool.prevpool = prevpool;
} }
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
hnd.bloodpools = nextpool; hnd.bloodpools = nextpool;
} }
@ -920,7 +920,7 @@ Class mkBloodPool : SWWMNonInteractiveActor
A_SetScale(sz); A_SetScale(sz);
A_QueueCorpse(); A_QueueCorpse();
SWWMUtility.SetToSlope(self,FRandom[Blood](0,360)); SWWMUtility.SetToSlope(self,FRandom[Blood](0,360));
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return; if ( !hnd ) return;
nextpool = hnd.bloodpools; nextpool = hnd.bloodpools;
hnd.bloodpools = self; hnd.bloodpools = self;
@ -957,7 +957,7 @@ Class mkBloodPool : SWWMNonInteractiveActor
{ {
Radius 1; Radius 1;
Height 1; Height 1;
StencilColor "Red"; StencilColor "FF 00 00";
mkBloodPool.BaseAccel .0006; mkBloodPool.BaseAccel .0006;
} }
States States
@ -998,8 +998,8 @@ Class mkBloodStep : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Shaded"; RenderStyle 'Shaded';
StencilColor "Red"; StencilColor "FF 00 00";
} }
States States

View file

@ -177,10 +177,10 @@ Class SWWMDamageAccumulator : Inventory
static void Accumulate( Actor victim, int amount, Actor inflictor, Actor source, Name type, bool dontgib = false, int flags = 0 ) static void Accumulate( Actor victim, int amount, Actor inflictor, Actor source, Name type, bool dontgib = false, int flags = 0 )
{ {
if ( !victim ) return; if ( !victim ) return;
SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory("SWWMDamageAccumulator")); SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory('SWWMDamageAccumulator'));
if ( !match ) if ( !match )
{ {
match = SWWMDamageAccumulator(Spawn("SWWMDamageAccumulator")); match = SWWMDamageAccumulator(Spawn('SWWMDamageAccumulator'));
match.AttachToOwner(victim); match.AttachToOwner(victim);
} }
match.amounts.Push(amount); match.amounts.Push(amount);
@ -194,11 +194,11 @@ Class SWWMDamageAccumulator : Inventory
static clearscope int GetAmount( Actor victim ) static clearscope int GetAmount( Actor victim )
{ {
let ti = ThinkerIterator.Create("SWWMDamageAccumulator",STAT_USER); let ti = ThinkerIterator.Create('SWWMDamageAccumulator',STAT_USER);
SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory("SWWMDamageAccumulator")); SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory('SWWMDamageAccumulator'));
if ( match ) if ( match )
{ {
if ( match.source && match.source.FindInventory("AngeryPower") ) if ( match.source && match.source.FindInventory('AngeryPower') )
return (match.total>85899345)?int.max:(match.total*25); return (match.total>85899345)?int.max:(match.total*25);
return match.total; return match.total;
} }
@ -222,14 +222,14 @@ Class SWWMWhoPushedMe : Inventory
static void SetInstigator( Actor b, Actor whomst ) static void SetInstigator( Actor b, Actor whomst )
{ {
if ( !b || !whomst ) return; if ( !b || !whomst ) return;
SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory("SWWMWhoPushedMe")); SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory('SWWMWhoPushedMe'));
if ( ffd ) if ( ffd )
{ {
ffd.instigator = whomst; ffd.instigator = whomst;
ffd.killtimer = 0; // cancel kill timer ffd.killtimer = 0; // cancel kill timer
return; return;
} }
ffd = SWWMWhoPushedMe(Spawn("SWWMWhoPushedMe")); ffd = SWWMWhoPushedMe(Spawn('SWWMWhoPushedMe'));
ffd.AttachToOwner(b); ffd.AttachToOwner(b);
ffd.instigator = whomst; ffd.instigator = whomst;
} }
@ -237,7 +237,7 @@ Class SWWMWhoPushedMe : Inventory
static Actor RecallInstigator( Actor b ) static Actor RecallInstigator( Actor b )
{ {
if ( !b ) return null; if ( !b ) return null;
SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory("SWWMWhoPushedMe")); SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory('SWWMWhoPushedMe'));
if ( ffd ) if ( ffd )
{ {
Actor whomst = ffd.instigator; Actor whomst = ffd.instigator;
@ -287,13 +287,13 @@ Class SWWMFlyTracker : Inventory
static void Track( Actor b, Actor whomst ) static void Track( Actor b, Actor whomst )
{ {
if ( !b || !whomst ) return; if ( !b || !whomst ) return;
SWWMFlyTracker ffd = SWWMFlyTracker(b.FindInventory("SWWMFlyTracker")); SWWMFlyTracker ffd = SWWMFlyTracker(b.FindInventory('SWWMFlyTracker'));
if ( ffd ) if ( ffd )
{ {
ffd.instigator = whomst; ffd.instigator = whomst;
return; return;
} }
ffd = SWWMFlyTracker(Spawn("SWWMFlyTracker")); ffd = SWWMFlyTracker(Spawn('SWWMFlyTracker'));
ffd.AttachToOwner(b); ffd.AttachToOwner(b);
ffd.instigator = whomst; ffd.instigator = whomst;
ffd.curpos = ffd.startpos = b.pos; ffd.curpos = ffd.startpos = b.pos;
@ -373,7 +373,7 @@ Class SWWMQuickCombatTracker : Inventory
// force update tag if Grace of Lilith has glitched our owner // force update tag if Grace of Lilith has glitched our owner
if ( item.GetClassName() == 'CCards_Token_Glitched' ) if ( item.GetClassName() == 'CCards_Token_Glitched' )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
UpdateTag(hnd); UpdateTag(hnd);
} }
return Super.HandlePickup(item); return Super.HandlePickup(item);
@ -412,7 +412,7 @@ Class SWWMQuickCombatTracker : Inventory
} }
return t; return t;
} }
t = SWWMQuickCombatTracker(Spawn("SWWMQuickCombatTracker")); t = SWWMQuickCombatTracker(Spawn('SWWMQuickCombatTracker'));
t.myplayer = p; t.myplayer = p;
t.AttachToOwner(target); t.AttachToOwner(target);
// players always use SpawnHealth // players always use SpawnHealth
@ -457,7 +457,7 @@ Class SWWMQuickCombatTracker : Inventory
} }
if ( PMHack && !Owner.isFrozen() ) if ( PMHack && !Owner.isFrozen() )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
UpdateTag(hnd); UpdateTag(hnd);
} }
// cap lifespan if owner is dead // cap lifespan if owner is dead
@ -510,7 +510,7 @@ Class SmoothLinearValueInterpolator
static SmoothLinearValueInterpolator Create( double val, double diff ) static SmoothLinearValueInterpolator Create( double val, double diff )
{ {
let v = new("SmoothLinearValueInterpolator"); let v = new('SmoothLinearValueInterpolator');
v.oldval = v.val = val; v.oldval = v.val = val;
v.diff = diff; v.diff = diff;
return v; return v;
@ -537,7 +537,7 @@ Class SmoothDynamicValueInterpolator
static SmoothDynamicValueInterpolator Create( double val, double factor, double mindiff = 1., double maxdiff = 0. ) static SmoothDynamicValueInterpolator Create( double val, double factor, double mindiff = 1., double maxdiff = 0. )
{ {
let v = new("SmoothDynamicValueInterpolator"); let v = new('SmoothDynamicValueInterpolator');
v.oldval = v.val = val; v.oldval = v.val = val;
v.factor = factor; v.factor = factor;
v.mindiff = mindiff; v.mindiff = mindiff;

View file

@ -245,8 +245,8 @@ Class SWWMSmoke : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Shaded"; RenderStyle 'Shaded';
StencilColor "FFFFFF"; StencilColor "FF FF FF";
Speed 1; Speed 1;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+ROLLSPRITE; +ROLLSPRITE;
@ -318,7 +318,7 @@ Class SWWMSmoke : SWWMNonInteractiveActor
UpdateWaterLevel(); UpdateWaterLevel();
if ( (waterlevel > 0) && !bAMBUSH ) if ( (waterlevel > 0) && !bAMBUSH )
{ {
let b = Spawn("SWWMBubble",pos); let b = Spawn('SWWMBubble',pos);
b.scale *= abs(scale.x); b.scale *= abs(scale.x);
b.vel = vel; b.vel = vel;
Destroy(); Destroy();
@ -364,7 +364,7 @@ Class SWWMHalfSmoke : SWWMAnimSprite
override void EnteredWater() override void EnteredWater()
{ {
let b = SWWMAnimSprite.SpawnAt("SWWMHalfBubble",pos); let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',pos);
b.scale *= abs(scale.x); b.scale *= abs(scale.x);
b.vel = vel; b.vel = vel;
Destroy(); Destroy();
@ -412,7 +412,7 @@ Class SWWMBubble : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
Scale 0.5; Scale 0.5;
} }
@ -424,7 +424,7 @@ Class SWWMBubble : SWWMNonInteractiveActor
pt = FRandom[Puff](-90,90); pt = FRandom[Puff](-90,90);
vel += SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[Puff](0.2,0.8); vel += SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[Puff](0.2,0.8);
if ( (waterlevel <= 0) || (waterdepth < (scale.y*9.)) ) Destroy(); if ( (waterlevel <= 0) || (waterdepth < (scale.y*9.)) ) Destroy();
SetState(ResolveState("Spawn")+Random[Puff](0,19)); SetState(ResolveState('Spawn')+Random[Puff](0,19));
} }
override void Tick() override void Tick()
{ {
@ -536,7 +536,7 @@ Class SWWMSparkTrail : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
override void Tick() override void Tick()
@ -566,7 +566,7 @@ Class SWWMSpark : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
Gravity .2; Gravity .2;
Scale .05; Scale .05;
@ -652,7 +652,7 @@ Class SWWMSpark : SWWMNonInteractiveActor
pitch = 0; pitch = 0;
roll = 0; roll = 0;
dead = true; dead = true;
SetStateLabel("Death"); SetStateLabel('Death');
break; break;
} }
nstep++; nstep++;
@ -663,7 +663,7 @@ Class SWWMSpark : SWWMNonInteractiveActor
if ( (taillen > 0.) && (alpha > .3) && (waterlevel <= 0) ) if ( (taillen > 0.) && (alpha > .3) && (waterlevel <= 0) )
{ {
taildir /= taillen; taildir /= taillen;
let t = Spawn("SWWMSparkTrail",newpos); let t = Spawn('SWWMSparkTrail',newpos);
t.alpha = alpha*.3; t.alpha = alpha*.3;
t.speed = taillen; t.speed = taillen;
[t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(taildir,taillen); [t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(taildir,taillen);
@ -678,7 +678,7 @@ Class SWWMSpark : SWWMNonInteractiveActor
UpdateWaterLevel(); UpdateWaterLevel();
if ( waterlevel > 0 ) if ( waterlevel > 0 )
{ {
let b = Spawn("SWWMBubble",pos); let b = Spawn('SWWMBubble',pos);
b.vel = vel; b.vel = vel;
b.scale *= 0.3; b.scale *= 0.3;
Destroy(); Destroy();
@ -792,7 +792,7 @@ Class SWWMChip : SWWMNonInteractiveActor
dist *= .3; dist *= .3;
vel = dir*spd; vel = dir*spd;
newpos = d.HitLocation+dir; newpos = d.HitLocation+dir;
SetStateLabel("Bounce"); SetStateLabel('Bounce');
} }
else else
{ {
@ -819,7 +819,7 @@ Class SWWMChip : SWWMNonInteractiveActor
} }
vel = (0,0,0); vel = (0,0,0);
dead = true; dead = true;
SetStateLabel("Death"); SetStateLabel('Death');
break; break;
} }
nstep++; nstep++;
@ -896,7 +896,7 @@ Class SWWMItemFog : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+ROLLSPRITE; +ROLLSPRITE;
+ROLLCENTER; +ROLLCENTER;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
@ -919,7 +919,7 @@ Class SWWMItemFog : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.scolor = Color(3,2,1)*Random[ExploS](64,85); s.scolor = Color(3,2,1)*Random[ExploS](64,85);
s.SetRenderStyle(STYLE_AddShaded); s.SetRenderStyle(STYLE_AddShaded);
@ -930,14 +930,14 @@ Class SWWMItemFog : SWWMNonInteractiveActor
else for ( int i=0; i<numpt; i++ ) else for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8);
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.scolor = Color(3,2,1)*Random[ExploS](64,85); s.scolor = Color(3,2,1)*Random[ExploS](64,85);
s.SetRenderStyle(STYLE_AddShaded); s.SetRenderStyle(STYLE_AddShaded);
s.scale *= 3.; s.scale *= 3.;
s.alpha *= .2; s.alpha *= .2;
} }
Spawn(bAMBUSH?"PoofLight2":"PoofLight",pos); Spawn(bAMBUSH?'PoofLight2':'PoofLight',pos);
} }
BLPF A 1 Bright A_FadeOut(.3); BLPF A 1 Bright A_FadeOut(.3);
Wait; Wait;
@ -998,7 +998,7 @@ Class SWWMTeleportDest : SWWMNonInteractiveActor
if ( (level.maptime+special1)%10 ) return; if ( (level.maptime+special1)%10 ) return;
if ( !flare.texture ) if ( !flare.texture )
{ {
flare.color1 = "88 AA FF"; flare.color1 = 0xFF88AAFF;
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png"); flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded; flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT; flare.flags = SPF_FULLBRIGHT;
@ -1057,7 +1057,7 @@ Class SWWMTeleportLine : SWWMNonInteractiveActor
numpt *= int(clamp((apos-bpos).length()/32,1,8)); numpt *= int(clamp((apos-bpos).length()/32,1,8));
if ( !flare.texture ) if ( !flare.texture )
{ {
flare.color1 = "88 AA FF"; flare.color1 = 0xFF88AAFF;
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png"); flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded; flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT; flare.flags = SPF_FULLBRIGHT;
@ -1090,14 +1090,14 @@ Class SWWMTeleportFog : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
A_StartSound("misc/teleport",CHAN_VOICE); A_StartSound("misc/teleport",CHAN_VOICE);
Spawn("TeleLight",pos); Spawn('TeleLight',pos);
} }
States States
{ {
@ -1108,7 +1108,7 @@ Class SWWMTeleportFog : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8)*alpha; Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8)*alpha;
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.scolor = Color(1,2,3)*int(Random[ExploS](64,85)*alpha); s.scolor = Color(1,2,3)*int(Random[ExploS](64,85)*alpha);
s.SetRenderStyle(STYLE_AddShaded); s.SetRenderStyle(STYLE_AddShaded);
@ -1124,7 +1124,7 @@ Class SWWMTeleportFog : SWWMNonInteractiveActor
if ( LineTrace(ang,dist,pt,TRF_THRUACTORS|TRF_THRUHITSCAN) ) continue; if ( LineTrace(ang,dist,pt,TRF_THRUACTORS|TRF_THRUHITSCAN) ) continue;
Vector3 ofs = SWWMUtility.Vec3FromAngles(ang,pt)*dist; Vector3 ofs = SWWMUtility.Vec3FromAngles(ang,pt)*dist;
Vector3 spos = level.Vec3Offset(pos,ofs); Vector3 spos = level.Vec3Offset(pos,ofs);
let s = SWWMTeleportSparkle(SWWMStaticSprite.SpawnAt("SWWMTeleportSparkle",spos)); let s = SWWMTeleportSparkle(SWWMStaticSprite.SpawnAt('SWWMTeleportSparkle',spos));
s.scale *= FRandom[ExploS](.8,1.2); s.scale *= FRandom[ExploS](.8,1.2);
s.scalestep = FRandom[ExploS](.93,.97); s.scalestep = FRandom[ExploS](.93,.97);
s.alphastep = FRandom[ExploS](.02,.04); s.alphastep = FRandom[ExploS](.02,.04);
@ -1143,7 +1143,7 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Args 0,3,2,1; Args 0,3,2,1;
+ROLLSPRITE; +ROLLSPRITE;
+ROLLCENTER; +ROLLCENTER;
@ -1153,7 +1153,7 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
frame = Args[0]; frame = Args[0];
if ( CurState != ResolveState("Pickup") ) return; if ( CurState != ResolveState('Pickup') ) return;
WorldOffset = (0,0,16); WorldOffset = (0,0,16);
} }
void A_Sparkle() void A_Sparkle()
@ -1168,7 +1168,7 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.3,8);
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.scolor = Color(Args[1],Args[2],Args[3])*Random[ExploS](64,85); s.scolor = Color(Args[1],Args[2],Args[3])*Random[ExploS](64,85);
s.SetRenderStyle(STYLE_AddShaded); s.SetRenderStyle(STYLE_AddShaded);
@ -1384,7 +1384,7 @@ Class SWWMBulletTrail : LineTracer
static play void DoTrail( Actor target, Vector3 pos, Vector3 dir, double dist, int bubblesparse, bool smoky = false ) static play void DoTrail( Actor target, Vector3 pos, Vector3 dir, double dist, int bubblesparse, bool smoky = false )
{ {
let t = new("SWWMBulletTrail"); let t = new('SWWMBulletTrail');
t.WaterHitList.Clear(); t.WaterHitList.Clear();
t.ShootThroughList.Clear(); t.ShootThroughList.Clear();
t.Trace(pos,level.PointInSector(pos.xy),dir,dist,0,ignore:target); t.Trace(pos,level.PointInSector(pos.xy),dir,dist,0,ignore:target);
@ -1396,7 +1396,7 @@ Class SWWMBulletTrail : LineTracer
} }
foreach ( w:t.WaterHitList ) foreach ( w:t.WaterHitList )
{ {
let b = Actor.Spawn("InvisibleSplasher",w.hitpos); let b = Actor.Spawn('InvisibleSplasher',w.hitpos);
b.target = target; b.target = target;
b.A_CheckTerrain(); b.A_CheckTerrain();
} }
@ -1404,7 +1404,7 @@ Class SWWMBulletTrail : LineTracer
{ {
if ( Random[Boolet](0,bubblesparse) ) continue; if ( Random[Boolet](0,bubblesparse) ) continue;
if ( !Random[Boolet](0,i/100) ) continue; // fall off w/ distance if ( !Random[Boolet](0,i/100) ) continue; // fall off w/ distance
let b = SWWMAnimSprite.SpawnAt(smoky?"SWWMHalfSmoke":"SWWMHalfBubble",level.Vec3Offset(pos,dir*i)); let b = SWWMAnimSprite.SpawnAt(smoky?'SWWMHalfSmoke':'SWWMHalfBubble',level.Vec3Offset(pos,dir*i));
b.Scale *= FRandom[Boolet](.4,.6); b.Scale *= FRandom[Boolet](.4,.6);
} }
t.Destroy(); t.Destroy();
@ -1415,13 +1415,13 @@ Class SWWMBulletTrail : LineTracer
// liquid splashes // liquid splashes
if ( Results.CrossedWater ) if ( Results.CrossedWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.CrossedWaterPos; hl.hitpos = Results.CrossedWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
else if ( Results.Crossed3DWater ) else if ( Results.Crossed3DWater )
{ {
let hl = new("WaterHit"); let hl = new('WaterHit');
hl.hitpos = Results.Crossed3DWaterPos; hl.hitpos = Results.Crossed3DWaterPos;
WaterHitList.Push(hl); WaterHitList.Push(hl);
} }
@ -1447,7 +1447,7 @@ Class SWWMPuff : SWWMNonInteractiveActor
{ {
static Actor Setup( Vector3 pos, Vector3 dir, Actor inflictor = null, Actor source = null, Actor victim = null ) static Actor Setup( Vector3 pos, Vector3 dir, Actor inflictor = null, Actor source = null, Actor victim = null )
{ {
let p = Spawn("SWWMPuff",pos); let p = Spawn('SWWMPuff',pos);
p.angle = atan2(dir.y,dir.x); p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z); p.pitch = asin(-dir.z);
p.master = inflictor; // so certain scripts can fetch the weapon that spawned this puff p.master = inflictor; // so certain scripts can fetch the weapon that spawned this puff
@ -1486,7 +1486,7 @@ Class SWWMShadow : SWWMNonInteractiveActor
static SWWMShadow Track( Actor other ) static SWWMShadow Track( Actor other )
{ {
// this is necessary due to multiplayer respawn nonsense // this is necessary due to multiplayer respawn nonsense
let ti = ThinkerIterator.Create("SWWMShadow"); let ti = ThinkerIterator.Create('SWWMShadow');
SWWMShadow s; SWWMShadow s;
while ( s = SWWMShadow(ti.Next()) ) while ( s = SWWMShadow(ti.Next()) )
{ {
@ -1494,7 +1494,7 @@ Class SWWMShadow : SWWMNonInteractiveActor
s.Update(true); s.Update(true);
return s; return s;
} }
s = SWWMShadow(Spawn("SWWMShadow",other.pos)); s = SWWMShadow(Spawn('SWWMShadow',other.pos));
s.target = other; s.target = other;
s.Update(true); s.Update(true);
return s; return s;
@ -1551,8 +1551,8 @@ Class SWWMShadow : SWWMNonInteractiveActor
} }
default default
{ {
RenderStyle "Shaded"; RenderStyle 'Shaded';
StencilColor "000000"; StencilColor "00 00 00";
} }
States States
{ {
@ -1603,7 +1603,7 @@ Class SWWMWaterSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,12.); str = FRandom[ExploS](2.,12.);
dir *= str*.25; dir *= str*.25;
dir.z += 1.; dir.z += 1.;
puff.color1 = SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF4060FF,0xFFA0C0FF,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str; puff.size = str;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1630,7 +1630,7 @@ Class SWWMWaterSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,6.); str = FRandom[ExploS](1.,6.);
dir *= str*.25; dir *= str*.25;
dir.z += .35; dir.z += .35;
puff.color1 = SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF4060FF,0xFFA0C0FF,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str; puff.size = str;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1657,7 +1657,7 @@ Class SWWMBloodSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,12.); str = FRandom[ExploS](2.,12.);
dir *= str*.25; dir *= str*.25;
dir.z += 1.; dir.z += 1.;
puff.color1 = SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF800000,0xFF600000,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+.5; puff.size = str+.5;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1684,7 +1684,7 @@ Class SWWMBloodSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,6.); str = FRandom[ExploS](1.,6.);
dir *= str*.25; dir *= str*.25;
dir.z += .35; dir.z += .35;
puff.color1 = SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF800000,0xFF600000,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+.5; puff.size = str+.5;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1711,7 +1711,7 @@ Class SWWMSludgeSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,8.); str = FRandom[ExploS](2.,8.);
dir *= str*.25; dir *= str*.25;
dir.z += .4; dir.z += .4;
puff.color1 = SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF405040,0xFF303030,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.; puff.size = str+2.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1738,7 +1738,7 @@ Class SWWMSludgeSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,4.); str = FRandom[ExploS](1.,4.);
dir *= str*.25; dir *= str*.25;
dir.z += .15; dir.z += .15;
puff.color1 = SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF405040,0xFF303030,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.; puff.size = str+2.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1765,7 +1765,7 @@ Class SWWMMudSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,8.); str = FRandom[ExploS](2.,8.);
dir *= str*.25; dir *= str*.25;
dir.z += .4; dir.z += .4;
puff.color1 = SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF504020,0xFF302010,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.; puff.size = str+2.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1792,7 +1792,7 @@ Class SWWMMudSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,4.); str = FRandom[ExploS](1.,4.);
dir *= str*.25; dir *= str*.25;
dir.z += .15; dir.z += .15;
puff.color1 = SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF504020,0xFF302010,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.; puff.size = str+2.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1821,7 +1821,7 @@ Class SWWMSlimeSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,8.); str = FRandom[ExploS](2.,8.);
dir *= str*.25; dir *= str*.25;
dir.z += .4; dir.z += .4;
puff.color1 = SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF00FF00,0xFF008000,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.; puff.size = str+2.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1850,7 +1850,7 @@ Class SWWMSlimeSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,4.); str = FRandom[ExploS](1.,4.);
dir *= str*.25; dir *= str*.25;
dir.z += .15; dir.z += .15;
puff.color1 = SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFF00FF00,0xFF008000,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.; puff.size = str+2.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1879,7 +1879,7 @@ Class SWWMLavaSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,12.); str = FRandom[ExploS](2.,12.);
dir *= str*.35; dir *= str*.35;
dir.z += .6; dir.z += .6;
puff.color1 = SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFFFFC040,0xFFFF4020,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+1.; puff.size = str+1.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1887,7 +1887,7 @@ Class SWWMLavaSplash : SWWMBaseSplash
puff.accel = (0,0,-.03*str); puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff); level.SpawnParticle(puff);
} }
let s = Spawn("SWWMSizzleSmoke",pos); let s = Spawn('SWWMSizzleSmoke',pos);
s.target = target; s.target = target;
} }
} }
@ -1909,7 +1909,7 @@ Class SWWMLavaSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,6.); str = FRandom[ExploS](1.,6.);
dir *= str*.35; dir *= str*.35;
dir.z += .2; dir.z += .2;
puff.color1 = SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.)); puff.color1 = SWWMUtility.LerpColor(0xFFFFC040,0xFFFF4020,FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)]; puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+1.; puff.size = str+1.;
puff.sizestep = -.02*str; puff.sizestep = -.02*str;
@ -1917,7 +1917,7 @@ Class SWWMLavaSplash2 : SWWMBaseSplash
puff.accel = (0,0,-.03*str); puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff); level.SpawnParticle(puff);
} }
let s = Spawn("SWWMSizzleSmoke2",pos); let s = Spawn('SWWMSizzleSmoke2',pos);
s.target = target; s.target = target;
} }
} }
@ -1933,7 +1933,7 @@ Class SWWMSizzleSmoke : SWWMBaseSplash
pt = FRandom[ExploS](-90,-30); pt = FRandom[ExploS](-90,-30);
dir = SWWMUtility.Vec3FromAngles(ang,pt); dir = SWWMUtility.Vec3FromAngles(ang,pt);
str = FRandom[ExploS](.5,2.); str = FRandom[ExploS](.5,2.);
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.vel = dir*str+(0,0,.4); s.vel = dir*str+(0,0,.4);
s.scolor = Color(1,1,1)*Random[ExploS](192,224); s.scolor = Color(1,1,1)*Random[ExploS](192,224);
s.scale *= 8.; s.scale *= 8.;
@ -1956,7 +1956,7 @@ Class SWWMSizzleSmoke2 : SWWMBaseSplash
pt = FRandom[ExploS](-90,-30); pt = FRandom[ExploS](-90,-30);
dir = SWWMUtility.Vec3FromAngles(ang,pt); dir = SWWMUtility.Vec3FromAngles(ang,pt);
str = FRandom[ExploS](.25,1.); str = FRandom[ExploS](.25,1.);
let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos);
s.vel = dir*str+(0,0,.15); s.vel = dir*str+(0,0,.15);
s.scolor = Color(1,1,1)*Random[ExploS](192,224); s.scolor = Color(1,1,1)*Random[ExploS](192,224);
s.scale *= 4.; s.scale *= 4.;

View file

@ -67,8 +67,8 @@ Class SWWMGesture : SWWMWeapon
return; return;
let psp = Owner.player.FindPSprite(PSP_WEAPON); let psp = Owner.player.FindPSprite(PSP_WEAPON);
if ( !psp ) return; if ( !psp ) return;
if ( (Owner.Health <= 0) && (psp.CurState != ResolveState("Deselect")) ) if ( (Owner.Health <= 0) && (psp.CurState != ResolveState('Deselect')) )
Owner.player.SetPSprite(PSP_WEAPON,ResolveState("Deselect")); Owner.player.SetPSprite(PSP_WEAPON,ResolveState('Deselect'));
// check if we're waving at a dying enemy // check if we're waving at a dying enemy
if ( (psp.frame >= 3) && (psp.frame <= 12) && (psp.sprite == GetSpriteIndex('XZW1')) ) if ( (psp.frame >= 3) && (psp.frame <= 12) && (psp.sprite == GetSpriteIndex('XZW1')) )
CheckWave(); CheckWave();
@ -98,7 +98,7 @@ Class SWWMGesture : SWWMWeapon
if ( !mo || !(mo is 'Demolitionist') ) return null; // only Demo if ( !mo || !(mo is 'Demolitionist') ) return null; // only Demo
if ( mo.Health <= 0 ) return null; // dead if ( mo.Health <= 0 ) return null; // dead
if ( !force && (mo.player.cheats&CF_TOTALLYFROZEN) ) return null; // frozen today (unless forced) if ( !force && (mo.player.cheats&CF_TOTALLYFROZEN) ) return null; // frozen today (unless forced)
SWWMGesture w = SWWMGesture(mo.FindInventory("SWWMGesture")); SWWMGesture w = SWWMGesture(mo.FindInventory('SWWMGesture'));
if ( w && ((mo.player.PendingWeapon is 'SWWMGesture') || (mo.player.ReadyWeapon is 'SWWMGesture') if ( w && ((mo.player.PendingWeapon is 'SWWMGesture') || (mo.player.ReadyWeapon is 'SWWMGesture')
|| (mo.player.PendingWeapon is 'SWWMItemGesture') || (mo.player.ReadyWeapon is 'SWWMItemGesture')) ) || (mo.player.PendingWeapon is 'SWWMItemGesture') || (mo.player.ReadyWeapon is 'SWWMItemGesture')) )
{ {
@ -114,7 +114,7 @@ Class SWWMGesture : SWWMWeapon
} }
if ( !w ) if ( !w )
{ {
w = SWWMGesture(Spawn("SWWMGesture")); w = SWWMGesture(Spawn('SWWMGesture'));
w.AttachToOwner(mo); w.AttachToOwner(mo);
} }
if ( mo.player.PendingWeapon != WP_NOCHANGE ) w.formerweapon = mo.player.PendingWeapon; if ( mo.player.PendingWeapon != WP_NOCHANGE ) w.formerweapon = mo.player.PendingWeapon;
@ -133,7 +133,7 @@ Class SWWMGesture : SWWMWeapon
if ( mo.Health <= 0 ) return null; // dead if ( mo.Health <= 0 ) return null; // dead
if ( !forced && (mo.player.cheats&CF_TOTALLYFROZEN) ) return null; // frozen today (unless forced) if ( !forced && (mo.player.cheats&CF_TOTALLYFROZEN) ) return null; // frozen today (unless forced)
if ( !a ) return null; if ( !a ) return null;
SWWMGesture w = SWWMGesture(mo.FindInventory("SWWMGesture")); SWWMGesture w = SWWMGesture(mo.FindInventory('SWWMGesture'));
if ( w && ((mo.player.PendingWeapon is 'SWWMGesture') || (mo.player.ReadyWeapon is 'SWWMGesture') if ( w && ((mo.player.PendingWeapon is 'SWWMGesture') || (mo.player.ReadyWeapon is 'SWWMGesture')
|| (mo.player.PendingWeapon is 'SWWMItemGesture') || (mo.player.ReadyWeapon is 'SWWMItemGesture')) ) || (mo.player.PendingWeapon is 'SWWMItemGesture') || (mo.player.ReadyWeapon is 'SWWMItemGesture')) )
{ {
@ -149,7 +149,7 @@ Class SWWMGesture : SWWMWeapon
} }
if ( !w ) if ( !w )
{ {
w = SWWMGesture(Spawn("SWWMGesture")); w = SWWMGesture(Spawn('SWWMGesture'));
w.AttachToOwner(mo); w.AttachToOwner(mo);
} }
if ( mo.player.PendingWeapon != WP_NOCHANGE ) w.formerweapon = mo.player.PendingWeapon; if ( mo.player.PendingWeapon != WP_NOCHANGE ) w.formerweapon = mo.player.PendingWeapon;
@ -178,7 +178,7 @@ Class SWWMGesture : SWWMWeapon
invoker.whichweapon = invoker.sweapon[0]; invoker.whichweapon = invoker.sweapon[0];
// push back // push back
invoker.sweapon.Delete(0); invoker.sweapon.Delete(0);
player.SetPSprite(PSP_WEAPON,ResolveState("Ready")); player.SetPSprite(PSP_WEAPON,ResolveState('Ready'));
return; return;
} }
if ( invoker.queued ) if ( invoker.queued )
@ -186,7 +186,7 @@ Class SWWMGesture : SWWMWeapon
invoker.whichweapon = null; invoker.whichweapon = null;
invoker.whichgesture = invoker.nextgesture; invoker.whichgesture = invoker.nextgesture;
invoker.queued = false; invoker.queued = false;
player.SetPSprite(PSP_WEAPON,ResolveState("Ready")); player.SetPSprite(PSP_WEAPON,ResolveState('Ready'));
return; return;
} }
if ( invoker.formerweapon ) player.PendingWeapon = invoker.formerweapon; if ( invoker.formerweapon ) player.PendingWeapon = invoker.formerweapon;
@ -196,7 +196,7 @@ Class SWWMGesture : SWWMWeapon
if ( (player.PendingWeapon is 'SWWMGesture') || (player.PendingWeapon is 'SWWMItemGesture') ) if ( (player.PendingWeapon is 'SWWMGesture') || (player.PendingWeapon is 'SWWMItemGesture') )
player.PendingWeapon = null; player.PendingWeapon = null;
} }
player.SetPSprite(PSP_WEAPON,ResolveState("Deselect")); player.SetPSprite(PSP_WEAPON,ResolveState('Deselect'));
} }
action void A_Headpat() action void A_Headpat()
@ -209,14 +209,14 @@ Class SWWMGesture : SWWMWeapon
Vector3 patpos = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz-4),dir*30.); Vector3 patpos = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz-4),dir*30.);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("LoveHeartSparkle",patpos); let s = Spawn('LoveHeartSparkle',patpos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
} }
if ( pt.target && pt.target.bSHOOTABLE ) if ( pt.target && pt.target.bSHOOTABLE )
{ {
int healamt = 10; int healamt = 10;
let raging = RagekitPower(FindInventory("RagekitPower")); let raging = RagekitPower(FindInventory('RagekitPower'));
if ( raging ) if ( raging )
{ {
healamt *= 8; healamt *= 8;
@ -276,9 +276,9 @@ Class SWWMGesture : SWWMWeapon
if ( deathmatch ) if ( deathmatch )
t.SetFriendPlayer(player); t.SetFriendPlayer(player);
// cancel any attacks // cancel any attacks
if ( t.InStateSequence(t.CurState,t.FindState("Missile")) if ( t.InStateSequence(t.CurState,t.FindState('Missile'))
|| t.InStateSequence(t.CurState,t.FindState("Melee")) ) || t.InStateSequence(t.CurState,t.FindState('Melee')) )
t.SetState(t.FindState("See")); t.SetState(t.FindState('See'));
} }
} }
} }
@ -291,13 +291,13 @@ Class SWWMGesture : SWWMWeapon
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005); double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self); let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s); Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
let p = Spawn("ExplodiumMagProj",origin); let p = Spawn('ExplodiumMagProj',origin);
p.special1 = 7; p.special1 = 7;
p.target = self; p.target = self;
p.angle = atan2(dir.y,dir.x); p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z); p.pitch = asin(-dir.z);
p.vel = dir*p.speed*1.5; p.vel = dir*p.speed*1.5;
if ( FindInventory("RagekitPower") ) p.vel *= 4.; if ( FindInventory('RagekitPower') ) p.vel *= 4.;
p.ClearBounce(); p.ClearBounce();
p.bEXPLODEONWATER = true; p.bEXPLODEONWATER = true;
p.bSKYEXPLODE = true; p.bSKYEXPLODE = true;
@ -321,7 +321,7 @@ Class SWWMGesture : SWWMWeapon
if ( !weap ) return; if ( !weap ) return;
Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 x = SWWMUtility.GetPlayerViewDir(self);
Vector3 origin = SWWMUtility.GetFireOffset(self,10,0,0); Vector3 origin = SWWMUtility.GetFireOffset(self,10,0,0);
let p = Spawn("ExplodiumMagAttach",origin); let p = Spawn('ExplodiumMagAttach',origin);
p.special1 = 7; p.special1 = 7;
p.target = self; p.target = self;
p.angle = angle; p.angle = angle;
@ -351,7 +351,7 @@ Class SWWMGesture : SWWMWeapon
Vector3 dir; Vector3 dir;
Vector3 origin = SWWMUtility.GetFireOffset(self,10,0,-1); Vector3 origin = SWWMUtility.GetFireOffset(self,10,0,-1);
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self); let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
let p = Spawn("LoveHeart",origin); let p = Spawn('LoveHeart',origin);
p.target = self; p.target = self;
p.angle = atan2(x2.y,x2.x); p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z); p.pitch = asin(-x2.z);
@ -378,7 +378,7 @@ Class SWWMGesture : SWWMWeapon
break; break;
} }
if ( !addme ) continue; if ( !addme ) continue;
let nhit = new("HHitList"); let nhit = new('HHitList');
nhit.a = d.HitActor; nhit.a = d.HitActor;
nhit.dir = dir; nhit.dir = dir;
hits.Push(nhit); hits.Push(nhit);
@ -434,35 +434,35 @@ Class SWWMGesture : SWWMWeapon
} }
g.gest = invoker; g.gest = invoker;
player.ReadyWeapon = g; player.ReadyWeapon = g;
player.SetPSPrite(PSP_WEAPON,g.FindState("Fire")); player.SetPSPrite(PSP_WEAPON,g.FindState('Fire'));
return ResolveState(null); return ResolveState(null);
} }
switch ( invoker.whichgesture ) switch ( invoker.whichgesture )
{ {
case GS_Headpat: case GS_Headpat:
return ResolveState("Headpat"); return ResolveState('Headpat');
case GS_Grenade: case GS_Grenade:
return ResolveState("QuickGrenade"); return ResolveState('QuickGrenade');
case GS_EmptyMelee: case GS_EmptyMelee:
return ResolveState("EmptyMelee"); return ResolveState('EmptyMelee');
case GS_Wave: case GS_Wave:
return ResolveState("Wave"); return ResolveState('Wave');
case GS_ThumbsUp: case GS_ThumbsUp:
return ResolveState("Approve"); return ResolveState('Approve');
case GS_Victory: case GS_Victory:
return ResolveState("Victory"); return ResolveState('Victory');
case GS_BlowKiss: case GS_BlowKiss:
return ResolveState("BlowKiss"); return ResolveState('BlowKiss');
} }
return ResolveState("NoGesture"); return ResolveState('NoGesture');
} }
Wait; Wait;
Fire: Fire:
XZW1 A 1; XZW1 A 1;
Goto Ready; Goto Ready;
Headpat: Headpat:
XZW1 A 0 A_JumpIf(CountInv("RagekitPower"),"Ragepat"); XZW1 A 0 A_JumpIf(CountInv('RagekitPower'),'Ragepat');
XZW1 A 3 A_CallPlayerGesture("Headpat","Headpat"); XZW1 A 3 A_CallPlayerGesture('Headpat','Headpat');
XZW3 TU 3; XZW3 TU 3;
XZW3 V 2 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); XZW3 V 2 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
XZW3 WX 2; XZW3 WX 2;
@ -484,15 +484,15 @@ Class SWWMGesture : SWWMWeapon
{ {
if ( player.cmd.buttons&BT_USE ) if ( player.cmd.buttons&BT_USE )
{ {
if ( FindInventory("RagekitPower") ) if ( FindInventory('RagekitPower') )
{ {
A_CallPlayerGesture("RagepatLoop","RagepatLoop"); A_CallPlayerGesture('RagepatLoop','RagepatLoop');
return ResolveState("RagepatLoop"); return ResolveState('RagepatLoop');
} }
else else
{ {
A_CallPlayerGesture("HeadpatLoop","HeadpatLoop"); A_CallPlayerGesture('HeadpatLoop','HeadpatLoop');
return ResolveState("HeadpatLoop"); return ResolveState('HeadpatLoop');
} }
} }
return ResolveState(null); return ResolveState(null);
@ -504,7 +504,7 @@ Class SWWMGesture : SWWMWeapon
XZW1 A -1 A_FinishGesture(); XZW1 A -1 A_FinishGesture();
Stop; Stop;
Ragepat: Ragepat:
XZW1 A 3 A_CallPlayerGesture("Ragepat","Ragepat"); XZW1 A 3 A_CallPlayerGesture('Ragepat','Ragepat');
XZW3 TU 2; XZW3 TU 2;
XZW3 V 1 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); XZW3 V 1 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
XZW3 WX 1; XZW3 WX 1;
@ -534,15 +534,15 @@ Class SWWMGesture : SWWMWeapon
{ {
if ( player.cmd.buttons&BT_USE ) if ( player.cmd.buttons&BT_USE )
{ {
if ( FindInventory("RagekitPower") ) if ( FindInventory('RagekitPower') )
{ {
A_CallPlayerGesture("RagepatLoop","RagepatLoop"); A_CallPlayerGesture('RagepatLoop','RagepatLoop');
return ResolveState("RagepatLoop"); return ResolveState('RagepatLoop');
} }
else else
{ {
A_CallPlayerGesture("HeadpatLoop","HeadpatLoop"); A_CallPlayerGesture('HeadpatLoop','HeadpatLoop');
return ResolveState("HeadpatLoop"); return ResolveState('HeadpatLoop');
} }
} }
return ResolveState(null); return ResolveState(null);
@ -560,7 +560,7 @@ Class SWWMGesture : SWWMWeapon
XZW4 U 3 A_PlayerReload(); XZW4 U 3 A_PlayerReload();
XZW4 V 2 A_StartSound("explodium/magpin",CHAN_WEAPON,CHANF_OVERLAP); XZW4 V 2 A_StartSound("explodium/magpin",CHAN_WEAPON,CHANF_OVERLAP);
XZW4 WX 2; XZW4 WX 2;
XZW4 Y 3 A_JumpIf(CanPlantGrenade(),"QuickGrenadePlant"); XZW4 Y 3 A_JumpIf(CanPlantGrenade(),'QuickGrenadePlant');
XZW4 Z 2 XZW4 Z 2
{ {
A_StartSound("explodium/throwmag",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("explodium/throwmag",CHAN_WEAPON,CHANF_OVERLAP);
@ -571,7 +571,7 @@ Class SWWMGesture : SWWMWeapon
XZW5 G 2 A_ThrowMag(); XZW5 G 2 A_ThrowMag();
XZW5 HIJ 3; XZW5 HIJ 3;
XZW5 KL 4; XZW5 KL 4;
XZW4 Q 0 A_JumpIf(player.cmd.buttons&BT_USER4,"QuickGrenade"); XZW4 Q 0 A_JumpIf(player.cmd.buttons&BT_USER4,'QuickGrenade');
XZW4 Q -1 A_FinishGesture(); XZW4 Q -1 A_FinishGesture();
Stop; Stop;
QuickGrenadePlant: QuickGrenadePlant:
@ -581,7 +581,7 @@ Class SWWMGesture : SWWMWeapon
XZW5 V 2 A_PlantMag(); XZW5 V 2 A_PlantMag();
XZW5 W 4 A_StartSound("demolitionist/handsdown",CHAN_WEAPON,CHANF_OVERLAP); XZW5 W 4 A_StartSound("demolitionist/handsdown",CHAN_WEAPON,CHANF_OVERLAP);
XZW5 XY 4; XZW5 XY 4;
XZW4 Q 0 A_JumpIf(player.cmd.buttons&BT_USER4,"QuickGrenade"); XZW4 Q 0 A_JumpIf(player.cmd.buttons&BT_USER4,'QuickGrenade');
XZW4 Q -1 A_FinishGesture(); XZW4 Q -1 A_FinishGesture();
Stop; Stop;
EmptyMelee: EmptyMelee:
@ -598,13 +598,13 @@ Class SWWMGesture : SWWMWeapon
XZW0 A -1 XZW0 A -1
{ {
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK|BT_USER1) ) if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK|BT_USER1) )
return ResolveState("EmptyMelee")+3; return ResolveState('EmptyMelee')+3;
A_FinishGesture(); A_FinishGesture();
return ResolveState(null); return ResolveState(null);
} }
Stop; Stop;
Wave: Wave:
XZW1 A 3 A_CallPlayerGesture("Wave","CrouchWave"); XZW1 A 3 A_CallPlayerGesture('Wave','CrouchWave');
XZW1 B 3; XZW1 B 3;
XZW1 C 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); XZW1 C 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
XZW1 DEFGHIJ 3; XZW1 DEFGHIJ 3;
@ -613,7 +613,7 @@ Class SWWMGesture : SWWMWeapon
XZW1 A -1 A_FinishGesture(); XZW1 A -1 A_FinishGesture();
Stop; Stop;
Approve: Approve:
XZW1 A 3 A_CallPlayerGesture("Approve","CrouchApprove"); XZW1 A 3 A_CallPlayerGesture('Approve','CrouchApprove');
XZW1 QR 3; XZW1 QR 3;
XZW1 S 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); XZW1 S 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
XZW1 TUVWXY 3; XZW1 TUVWXY 3;
@ -623,7 +623,7 @@ Class SWWMGesture : SWWMWeapon
XZW1 A -1 A_FinishGesture(); XZW1 A -1 A_FinishGesture();
Stop; Stop;
Victory: Victory:
XZW1 A 3 A_CallPlayerGesture("Victory","CrouchVictory"); XZW1 A 3 A_CallPlayerGesture('Victory','CrouchVictory');
XZW2 HI 3; XZW2 HI 3;
XZW2 J 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); XZW2 J 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
XZW2 KLMNOPQR 3; XZW2 KLMNOPQR 3;
@ -632,7 +632,7 @@ Class SWWMGesture : SWWMWeapon
XZW1 A -1 A_FinishGesture(); XZW1 A -1 A_FinishGesture();
Stop; Stop;
BlowKiss: BlowKiss:
XZW1 A 3 A_CallPlayerGesture("BlowKiss","CrouchBlowKiss"); XZW1 A 3 A_CallPlayerGesture('BlowKiss','CrouchBlowKiss');
XZW3 A 3; XZW3 A 3;
XZW3 B 3; XZW3 B 3;
XZW3 C 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); XZW3 C 3 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
@ -695,8 +695,8 @@ Class SWWMItemGesture : SWWMWeapon abstract
return; return;
let psp = Owner.player.FindPSprite(PSP_WEAPON); let psp = Owner.player.FindPSprite(PSP_WEAPON);
if ( !psp ) return; if ( !psp ) return;
if ( (Owner.Health <= 0) && (psp.CurState != ResolveState("Deselect")) ) if ( (Owner.Health <= 0) && (psp.CurState != ResolveState('Deselect')) )
Owner.player.SetPSprite(PSP_WEAPON,ResolveState("Deselect")); Owner.player.SetPSprite(PSP_WEAPON,ResolveState('Deselect'));
} }
action void A_FinishGesture() action void A_FinishGesture()
@ -716,7 +716,7 @@ Class SWWMItemGesture : SWWMWeapon abstract
gest.sweapon.Delete(0); gest.sweapon.Delete(0);
// go back to the main gesture // go back to the main gesture
player.ReadyWeapon = gest; player.ReadyWeapon = gest;
player.SetPSPrite(PSP_WEAPON,gest.ResolveState("Ready")); player.SetPSPrite(PSP_WEAPON,gest.ResolveState('Ready'));
invoker.gotused = true; invoker.gotused = true;
return; return;
} }
@ -727,7 +727,7 @@ Class SWWMItemGesture : SWWMWeapon abstract
gest.queued = false; gest.queued = false;
// go back to the main gesture // go back to the main gesture
player.ReadyWeapon = gest; player.ReadyWeapon = gest;
player.SetPSPrite(PSP_WEAPON,gest.ResolveState("Ready")); player.SetPSPrite(PSP_WEAPON,gest.ResolveState('Ready'));
invoker.gotused = true; invoker.gotused = true;
return; return;
} }
@ -740,7 +740,7 @@ Class SWWMItemGesture : SWWMWeapon abstract
if ( (player.PendingWeapon is 'SWWMGesture') || (player.PendingWeapon is 'SWWMItemGesture') ) if ( (player.PendingWeapon is 'SWWMGesture') || (player.PendingWeapon is 'SWWMItemGesture') )
player.PendingWeapon = null; player.PendingWeapon = null;
} }
player.SetPSPrite(PSP_WEAPON,gest.ResolveState("SoftDeselect")); player.SetPSPrite(PSP_WEAPON,gest.ResolveState('SoftDeselect'));
invoker.gotused = true; invoker.gotused = true;
} }

View file

@ -4,7 +4,7 @@ Class LoveHeartTrail : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Alpha .1; Alpha .1;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -119,7 +119,7 @@ Class LoveHeart : Actor
} }
} }
if ( s ) s.smooch++; if ( s ) s.smooch++;
let raging = RagekitPower(self.target.FindInventory("RagekitPower")); let raging = RagekitPower(self.target.FindInventory('RagekitPower'));
if ( (target is 'WolfensteinSS') || (target.Species == 'WolfensteinSS') ) target.bFRIENDLY = false; if ( (target is 'WolfensteinSS') || (target.Species == 'WolfensteinSS') ) target.bFRIENDLY = false;
if ( target.IsFriend(self.target) || SWWMUtility.IdentifyingDog(target) ) if ( target.IsFriend(self.target) || SWWMUtility.IdentifyingDog(target) )
{ {
@ -149,7 +149,7 @@ Class LoveHeart : Actor
} }
Vector3 dirto = level.Vec3Diff(pos,target.Vec3Offset(0,0,target.Height/2)).unit(); Vector3 dirto = level.Vec3Diff(pos,target.Vec3Offset(0,0,target.Height/2)).unit();
SWWMUtility.DoKnockback(target,dirto,1500.*damage); SWWMUtility.DoKnockback(target,dirto,1500.*damage);
let bread = target.FindState("Pain"); let bread = target.FindState('Pain');
if ( bread ) target.SetState(bread); if ( bread ) target.SetState(bread);
if ( raging ) if ( raging )
{ {
@ -188,13 +188,13 @@ Class LoveHeart : Actor
for ( int i=2; i<6; i++ ) for ( int i=2; i<6; i++ )
{ {
Vector3 dir2 = vel.unit(); Vector3 dir2 = vel.unit();
let t = Spawn("LoveHeartTrail",level.Vec3Offset(pos,-dir2*steppy*i)); let t = Spawn('LoveHeartTrail',level.Vec3Offset(pos,-dir2*steppy*i));
t.scale = scale; t.scale = scale;
} }
int numpt = Random[ExploS](1,3); int numpt = Random[ExploS](1,3);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("LoveHeartSparkle",pos); let s = Spawn('LoveHeartSparkle',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
} }
@ -444,7 +444,7 @@ Class LoveHeart : Actor
if ( swwm_omnibust ) if ( swwm_omnibust )
{ {
int dmg = GetMissileDamage(0,0); int dmg = GetMissileDamage(0,0);
let raging = RagekitPower(self.target.FindInventory("RagekitPower")); let raging = RagekitPower(self.target.FindInventory('RagekitPower'));
if ( raging ) dmg *= 8; if ( raging ) dmg *= 8;
if ( BusterWall.ProjectileBust(self,dmg,SWWMUtility.Vec3FromAngles(angle,pitch)) ) if ( BusterWall.ProjectileBust(self,dmg,SWWMUtility.Vec3FromAngles(angle,pitch)) )
raging.DoHitFX(); raging.DoHitFX();
@ -457,12 +457,12 @@ Class LoveHeart : Actor
A_QuakeEx(1.5,1.5,1.5,8,0,300,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D); A_QuakeEx(1.5,1.5,1.5,8,0,300,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D);
A_SprayDecal("HeartyGlow",64); A_SprayDecal("HeartyGlow",64);
A_StartSound("bestsound",CHAN_VOICE); A_StartSound("bestsound",CHAN_VOICE);
Spawn("LoveHeartBurstLight",pos); Spawn('LoveHeartBurstLight',pos);
int numpt = Random[ExploS](10,15); int numpt = Random[ExploS](10,15);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.5,4); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.5,4);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(10,8,9)*Random[ExploS](20,25)); s.SetShade(Color(10,8,9)*Random[ExploS](20,25));
s.special1 = Random[ExploS](1,3); s.special1 = Random[ExploS](1,3);
@ -472,7 +472,7 @@ Class LoveHeart : Actor
numpt = Random[ExploS](40,50); numpt = Random[ExploS](40,50);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("LoveHeartSparkle",pos); let s = Spawn('LoveHeartSparkle',pos);
s.angle = FRandom[ExploS](0,360); s.angle = FRandom[ExploS](0,360);
s.pitch = FRandom[ExploS](-90,90); s.pitch = FRandom[ExploS](-90,90);
s.scale *= RandomPick[ExploS](1,3); s.scale *= RandomPick[ExploS](1,3);

View file

@ -5,7 +5,7 @@ Class SWWMHangingKeen : Actor
{ {
action void A_DropKeen() action void A_DropKeen()
{ {
Spawn("SWWMDroppedKeen",Vec3Offset(0,0,8)); Spawn('SWWMDroppedKeen',Vec3Offset(0,0,8));
if ( target ) SWWMUtility.MarkAchievement("keen",target.player); if ( target ) SWWMUtility.MarkAchievement("keen",target.player);
} }
override bool Used( Actor user ) override bool Used( Actor user )
@ -91,7 +91,7 @@ Class SWWMDroppedKeen : Actor
KEE3 B 1 A_JumpIf(pos.z<=floorz,1); KEE3 B 1 A_JumpIf(pos.z<=floorz,1);
Wait; Wait;
KEE3 B 12 A_StartSound("newkeen/bounce",volume:.6); KEE3 B 12 A_StartSound("newkeen/bounce",volume:.6);
TNT1 A 1 { Spawn("TeleportFog",pos,ALLOW_REPLACE); } TNT1 A 1 { Spawn('TeleportFog',pos,ALLOW_REPLACE); }
Stop; Stop;
} }
} }
@ -109,7 +109,7 @@ Class SWWMBossBrainExpl : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,6); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,6);
let s = Spawn("SWWMSmoke",pos); let s = Spawn('SWWMSmoke',pos);
s.vel = pvel; s.vel = pvel;
s.SetShade(Color(1,1,1)*Random[ExploS](64,224)); s.SetShade(Color(1,1,1)*Random[ExploS](64,224));
s.special1 = Random[ExploS](1,4); s.special1 = Random[ExploS](1,4);
@ -120,26 +120,26 @@ Class SWWMBossBrainExpl : SWWMNonInteractiveActor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,12);
let s = Spawn("SWWMSpark",pos); let s = Spawn('SWWMSpark',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = Random[ExploS](10,15); numpt = Random[ExploS](10,15);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,24); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,24);
let s = Spawn("SWWMChip",pos); let s = Spawn('SWWMChip',pos);
s.vel = pvel; s.vel = pvel;
} }
numpt = int(Random[ExploS](-1,2)+special1); numpt = int(Random[ExploS](-1,2)+special1);
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
let s = Spawn("SWWMBossBrainExplArm",pos); let s = Spawn('SWWMBossBrainExplArm',pos);
s.target = target; s.target = target;
} }
} }
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
Scale 2.5; Scale 2.5;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
} }
@ -183,9 +183,9 @@ Class SWWMBossBrainExplArm : Actor
TNT1 A 1 TNT1 A 1
{ {
A_CountDown(); A_CountDown();
Spawn("ExplodiumMagTrail",pos); Spawn('ExplodiumMagTrail',pos);
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5);
let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos);
s.vel = pvel+vel*.2; s.vel = pvel+vel*.2;
s.scolor = Color(1,1,1)*Random[ExploS](64,224); s.scolor = Color(1,1,1)*Random[ExploS](64,224);
s.framestep = Random[ExploS](2,4); s.framestep = Random[ExploS](2,4);
@ -199,7 +199,7 @@ Class SWWMBossBrainPain : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "Add"; RenderStyle 'Add';
} }
States States
{ {
@ -217,7 +217,7 @@ Class SWWMBossBrain : BossBrain
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
let ti = ThinkerIterator.Create("BossEye"); let ti = ThinkerIterator.Create('BossEye');
Actor eye; Actor eye;
if ( eye = Actor(ti.Next()) ) eyeless = false; if ( eye = Actor(ti.Next()) ) eyeless = false;
else eyeless = true; else eyeless = true;
@ -238,7 +238,7 @@ Class SWWMBossBrain : BossBrain
// big explosions throughout // big explosions throughout
for ( int x=-350; x<=350; x+=10 ) for ( int x=-350; x<=350; x+=10 )
{ {
let s = Spawn("SWWMBossBrainExpl",Vec2OffsetZ(x,tntdir?280:-280,Random[BrainExplode](120,500))); let s = Spawn('SWWMBossBrainExpl',Vec2OffsetZ(x,tntdir?280:-280,Random[BrainExplode](120,500)));
s.tics = Random[BrainExplode](5,120); s.tics = Random[BrainExplode](5,120);
s.special1 = Random[BrainExplode](0,3); s.special1 = Random[BrainExplode](0,3);
} }
@ -249,7 +249,7 @@ Class SWWMBossBrain : BossBrain
// small explosion on brain hole // small explosion on brain hole
for ( int x=-40; x<=40; x+=20 ) for ( int x=-40; x<=40; x+=20 )
{ {
let s = Spawn("SWWMBossBrainExpl",Vec2OffsetZ(x,tntdir?280:-280,Random[BrainExplode](380,420))); let s = Spawn('SWWMBossBrainExpl',Vec2OffsetZ(x,tntdir?280:-280,Random[BrainExplode](380,420)));
s.tics = Random[BrainExplode](1,10); s.tics = Random[BrainExplode](1,10);
s.scale *= .5; s.scale *= .5;
} }
@ -259,15 +259,15 @@ Class SWWMBossBrain : BossBrain
// just let players have their 100% kills in peace // just let players have their 100% kills in peace
void EverythingDies() void EverythingDies()
{ {
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
{ {
if ( a is 'BossEye' ) a.SetStateLabel("Null"); if ( a is 'BossEye' ) a.SetStateLabel('Null');
else if ( a is 'SpawnShot' ) else if ( a is 'SpawnShot' )
{ {
a.Spawn("SpawnFire",a.pos,ALLOW_REPLACE); a.Spawn('SpawnFire',a.pos,ALLOW_REPLACE);
a.SetStateLabel("Null"); a.SetStateLabel('Null');
} }
else if ( (a.Health > 0) && (a.bBossSpawned || a.bCOUNTKILL) ) else if ( (a.Health > 0) && (a.bBossSpawned || a.bCOUNTKILL) )
a.DamageMobj(self,self,a.Health,'EndMii',DMG_FORCED|DMG_THRUSTLESS); a.DamageMobj(self,self,a.Health,'EndMii',DMG_FORCED|DMG_THRUSTLESS);
@ -293,7 +293,7 @@ Class SWWMBossBrain : BossBrain
A_StartSound("brain/pain",CHAN_VOICE,attenuation:ATTN_NONE); A_StartSound("brain/pain",CHAN_VOICE,attenuation:ATTN_NONE);
A_QuakeEx(3.,3.,3.,15,0,65535,"",QF_RELATIVE|QF_SCALEDOWN,falloff:65535,rollIntensity:.3); A_QuakeEx(3.,3.,3.,15,0,65535,"",QF_RELATIVE|QF_SCALEDOWN,falloff:65535,rollIntensity:.3);
if ( !eyeless ) SpawnBrainExpl(false); if ( !eyeless ) SpawnBrainExpl(false);
Spawn("SWWMBossBrainPain",pos); Spawn('SWWMBossBrainPain',pos);
} }
Goto Spawn; Goto Spawn;
Death: Death:
@ -307,7 +307,7 @@ Class SWWMBossBrain : BossBrain
SpawnBrainExpl(true); SpawnBrainExpl(true);
EverythingDies(); EverythingDies();
} }
Spawn("SWWMBossBrainPain",pos); Spawn('SWWMBossBrainPain',pos);
} }
MBRN A 1 MBRN A 1
{ {
@ -340,7 +340,7 @@ Class SWWMGuard : Actor
Obituary "$OB_WOLFGUARD"; Obituary "$OB_WOLFGUARD";
Tag "$FN_WOLFGUARD"; Tag "$FN_WOLFGUARD";
Species "WolfensteinSS"; Species "WolfensteinSS";
DropItem "Clip"; DropItem 'Clip';
} }
States States
{ {
@ -388,7 +388,7 @@ Class SWWMSS : Actor
Obituary "$OB_WOLFSS_ORIG"; Obituary "$OB_WOLFSS_ORIG";
Tag "$FN_WOLFSS_ORIG"; Tag "$FN_WOLFSS_ORIG";
Species "WolfensteinSS"; Species "WolfensteinSS";
DropItem "Clip"; DropItem 'Clip';
} }
States States
{ {

View file

@ -14,7 +14,7 @@ Class KoraxYeeted : Thinker
int sidx = level.CreateSectorTagIterator(145).Next(); int sidx = level.CreateSectorTagIterator(145).Next();
if ( sidx == -1 ) return; if ( sidx == -1 ) return;
Sector door = level.Sectors[sidx]; Sector door = level.Sectors[sidx];
let ti = ThinkerIterator.Create("SectorEffect"); let ti = ThinkerIterator.Create('SectorEffect');
SectorEffect se; SectorEffect se;
while ( se = SectorEffect(ti.Next()) ) while ( se = SectorEffect(ti.Next()) )
{ {
@ -58,7 +58,7 @@ Class SWWMCrusherBroken : Thinker
static void Create( Sector f, Sector c, double diffh ) static void Create( Sector f, Sector c, double diffh )
{ {
if ( !f && !c ) return; if ( !f && !c ) return;
let ti = ThinkerIterator.Create("SWWMCrusherBroken",STAT_USER); let ti = ThinkerIterator.Create('SWWMCrusherBroken',STAT_USER);
SWWMCrusherBroken cb; SWWMCrusherBroken cb;
while ( cb = SWWMCrusherBroken(ti.Next()) ) while ( cb = SWWMCrusherBroken(ti.Next()) )
{ {
@ -75,7 +75,7 @@ Class SWWMCrusherBroken : Thinker
continue; continue;
} }
} }
cb = new("SWWMCrusherBroken"); cb = new('SWWMCrusherBroken');
cb.fsec = f; cb.fsec = f;
cb.csec = c; cb.csec = c;
cb.ChangeStatNum(STAT_USER); cb.ChangeStatNum(STAT_USER);
@ -87,7 +87,7 @@ Class SWWMCrusherBroken : Thinker
static void Remove( Sector f, Sector c ) static void Remove( Sector f, Sector c )
{ {
if ( !f && !c ) return; if ( !f && !c ) return;
let ti = ThinkerIterator.Create("SWWMCrusherBroken",STAT_USER); let ti = ThinkerIterator.Create('SWWMCrusherBroken',STAT_USER);
SWWMCrusherBroken cb; SWWMCrusherBroken cb;
while ( cb = SWWMCrusherBroken(ti.Next()) ) while ( cb = SWWMCrusherBroken(ti.Next()) )
{ {
@ -212,7 +212,7 @@ Class SWWMCorpseCleaner : Thinker
void Init( Actor activator ) void Init( Actor activator )
{ {
toclean.Clear(); toclean.Clear();
let ti = ThinkerIterator.Create("Actor"); let ti = ThinkerIterator.Create('Actor');
Actor a; Actor a;
while ( a = Actor(ti.Next()) ) while ( a = Actor(ti.Next()) )
{ {
@ -243,7 +243,7 @@ Class SWWMCorpseCleaner : Thinker
} }
Actor a = toclean[i++]; Actor a = toclean[i++];
if ( !a || !a.bKILLED || (a.tics != -1) ) continue; if ( !a || !a.bKILLED || (a.tics != -1) ) continue;
let f = a.Spawn("SWWMItemFog",a.pos); let f = a.Spawn('SWWMItemFog',a.pos);
f.A_StartSound("bestsound",CHAN_ITEM); f.A_StartSound("bestsound",CHAN_ITEM);
a.Destroy(); a.Destroy();
} }
@ -269,11 +269,11 @@ Class SWWMGlobals : SWWMStaticThinker
static play SWWMGlobals Get() static play SWWMGlobals Get()
{ {
let ti = ThinkerIterator.Create("SWWMGlobals",STAT_STATIC); let ti = ThinkerIterator.Create('SWWMGlobals',STAT_STATIC);
SWWMGlobals g = SWWMGlobals(ti.Next()); SWWMGlobals g = SWWMGlobals(ti.Next());
if ( !g ) if ( !g )
{ {
g = new("SWWMGlobals"); g = new('SWWMGlobals');
g.ChangeStatNum(STAT_STATIC); g.ChangeStatNum(STAT_STATIC);
} }
return g; return g;

View file

@ -17,16 +17,16 @@ Class SWWMMissionLog : SWWMStaticThinker
static clearscope SWWMMissionLog Get() static clearscope SWWMMissionLog Get()
{ {
let ml = SWWMMissionLog(ThinkerIterator.Create("SWWMMissionLog",STAT_STATIC).Next()); let ml = SWWMMissionLog(ThinkerIterator.Create('SWWMMissionLog',STAT_STATIC).Next());
return ml; return ml;
} }
static play void AddLog( String str ) static play void AddLog( String str )
{ {
let ml = SWWMMissionLog(ThinkerIterator.Create("SWWMMissionLog",STAT_STATIC).Next()); let ml = SWWMMissionLog(ThinkerIterator.Create('SWWMMissionLog',STAT_STATIC).Next());
if ( !ml ) if ( !ml )
{ {
ml = new("SWWMMissionLog"); ml = new('SWWMMissionLog');
ml.ChangeStatNum(STAT_STATIC); ml.ChangeStatNum(STAT_STATIC);
} }
if ( ml.entries.Find(str) < ml.entries.Size() ) return; if ( ml.entries.Find(str) < ml.entries.Size() ) return;
@ -36,10 +36,10 @@ Class SWWMMissionLog : SWWMStaticThinker
static play void SetClock( int year, int month, int day, int hour, int minute, String tz = "JST" ) static play void SetClock( int year, int month, int day, int hour, int minute, String tz = "JST" )
{ {
let ml = SWWMMissionLog(ThinkerIterator.Create("SWWMMissionLog",STAT_STATIC).Next()); let ml = SWWMMissionLog(ThinkerIterator.Create('SWWMMissionLog',STAT_STATIC).Next());
if ( !ml ) if ( !ml )
{ {
ml = new("SWWMMissionLog"); ml = new('SWWMMissionLog');
ml.ChangeStatNum(STAT_STATIC); ml.ChangeStatNum(STAT_STATIC);
} }
ml.clockset = true; ml.clockset = true;
@ -147,7 +147,7 @@ Class SWWMStats : SWWMStaticThinker
if ( inflictor is 'SWWMPuff' ) inflictor = inflictor.master; // special puffs transfer real inflictor through master pointer if ( inflictor is 'SWWMPuff' ) inflictor = inflictor.master; // special puffs transfer real inflictor through master pointer
if ( inflictor is 'Weapon' ) which = Weapon(inflictor).GetClass(); if ( inflictor is 'Weapon' ) which = Weapon(inflictor).GetClass();
if ( which is 'DualExplodiumGun' ) which = 'ExplodiumGun'; // don't credit sister weapon if ( which is 'DualExplodiumGun' ) which = 'ExplodiumGun'; // don't credit sister weapon
if ( inflictor && inflictor.FindInventory("ParriedBuff") ) which = 'DoomWeapon'; // gross hack if ( inflictor && inflictor.FindInventory('ParriedBuff') ) which = 'DoomWeapon'; // gross hack
// properly credit some projectiles to their respective gun // properly credit some projectiles to their respective gun
else if ( inflictor is 'AirBullet' ) which = 'DeepImpact'; else if ( inflictor is 'AirBullet' ) which = 'DeepImpact';
else if ( (inflictor is 'HammerShockwave') || (inflictor is 'HammerRadiusShockwave') ) which = 'ItamexHammer'; else if ( (inflictor is 'HammerShockwave') || (inflictor is 'HammerRadiusShockwave') ) which = 'ItamexHammer';
@ -238,7 +238,7 @@ Class SWWMStats : SWWMStaticThinker
bool wf_hack = false; bool wf_hack = false;
if ( (li.mapname == "E1M4") && LevelInfo.MapExists("E1M4B") ) if ( (li.mapname == "E1M4") && LevelInfo.MapExists("E1M4B") )
{ {
let cv = CVar.GetCVar("wf_blackroomswap_e1m4b"); let cv = CVar.GetCVar('wf_blackroomswap_e1m4b');
if ( cv && cv.GetBool() ) if ( cv && cv.GetBool() )
{ {
wf_hack = true; wf_hack = true;
@ -247,14 +247,14 @@ Class SWWMStats : SWWMStaticThinker
} }
else if ( (li.mapname == "E1M8") && LevelInfo.MapExists("E1M8B") ) else if ( (li.mapname == "E1M8") && LevelInfo.MapExists("E1M8B") )
{ {
let cv = CVar.GetCVar("wf_blackroomswap_e1m8b"); let cv = CVar.GetCVar('wf_blackroomswap_e1m8b');
if ( cv && cv.GetBool() ) if ( cv && cv.GetBool() )
{ {
wf_hack = true; wf_hack = true;
li = LevelInfo.FindLevelInfo("E1M8B"); li = LevelInfo.FindLevelInfo("E1M8B");
} }
} }
let ls = new("LevelStat"); let ls = new('LevelStat');
// we can automatically assume that all levels from the same cluster will have this flag as well // we can automatically assume that all levels from the same cluster will have this flag as well
ls.hub = !!(level.clusterflags&level.CLUSTER_HUB); ls.hub = !!(level.clusterflags&level.CLUSTER_HUB);
ls.visited = false; ls.visited = false;
@ -301,7 +301,7 @@ Class SWWMStats : SWWMStaticThinker
ls.suck = level.sucktime; ls.suck = level.sucktime;
return; return;
} }
ls = new("LevelStat"); ls = new('LevelStat');
ls.hub = !!(level.clusterflags&level.CLUSTER_HUB); ls.hub = !!(level.clusterflags&level.CLUSTER_HUB);
ls.visited = true; ls.visited = true;
ls.cluster = level.cluster; ls.cluster = level.cluster;
@ -341,7 +341,7 @@ Class SWWMStats : SWWMStaticThinker
{ {
if ( victim ) if ( victim )
{ {
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
Class<Actor> mvictim = SWWMUtility.MergeMonster(hnd,victim.GetClass()); Class<Actor> mvictim = SWWMUtility.MergeMonster(hnd,victim.GetClass());
bool found = false; bool found = false;
foreach ( ms:mstats ) foreach ( ms:mstats )
@ -353,7 +353,7 @@ Class SWWMStats : SWWMStaticThinker
} }
if ( !found ) if ( !found )
{ {
let ms = new("MonsterKill"); let ms = new('MonsterKill');
ms.m = mvictim; ms.m = mvictim;
ms.kills = 1; ms.kills = 1;
mstats.Push(ms); mstats.Push(ms);
@ -368,7 +368,7 @@ Class SWWMStats : SWWMStaticThinker
if ( (favweapon == -1) || (wstats[favweapon].kills < wstats[i].kills) ) favweapon = i; if ( (favweapon == -1) || (wstats[favweapon].kills < wstats[i].kills) ) favweapon = i;
return; return;
} }
let ws = new("WeaponUsage"); let ws = new('WeaponUsage');
ws.w = which; ws.w = which;
ws.kills = 1; ws.kills = 1;
wstats.Push(ws); wstats.Push(ws);
@ -378,7 +378,7 @@ Class SWWMStats : SWWMStaticThinker
static clearscope SWWMStats Find( PlayerInfo p ) static clearscope SWWMStats Find( PlayerInfo p )
{ {
let ti = ThinkerIterator.Create("SWWMStats",STAT_STATIC); let ti = ThinkerIterator.Create('SWWMStats',STAT_STATIC);
SWWMStats t; SWWMStats t;
while ( t = SWWMStats(ti.Next()) ) while ( t = SWWMStats(ti.Next()) )
{ {
@ -454,7 +454,7 @@ Class SWWMCredits : SWWMStaticThinker
static clearscope SWWMCredits Find( PlayerInfo p ) static clearscope SWWMCredits Find( PlayerInfo p )
{ {
let ti = ThinkerIterator.Create("SWWMCredits",STAT_STATIC); let ti = ThinkerIterator.Create('SWWMCredits',STAT_STATIC);
SWWMCredits t; SWWMCredits t;
while ( t = SWWMCredits(ti.Next()) ) while ( t = SWWMCredits(ti.Next()) )
{ {
@ -655,7 +655,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker
if ( e.tag != "$"..tag ) continue; if ( e.tag != "$"..tag ) continue;
return true; return true;
} }
SWWMLore e = new("SWWMLore"); SWWMLore e = new('SWWMLore');
e.tag = "$"..tag; e.tag = "$"..tag;
if ( StringTable.Localize(e.tag) == "" ) if ( StringTable.Localize(e.tag) == "" )
{ {
@ -696,7 +696,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker
SWWMLoreLibrary ll = Find(p); SWWMLoreLibrary ll = Find(p);
if ( !ll ) if ( !ll )
{ {
ll = new("SWWMLoreLibrary"); ll = new('SWWMLoreLibrary');
ll.ChangeStatNum(STAT_STATIC); ll.ChangeStatNum(STAT_STATIC);
ll.myplayer = p; ll.myplayer = p;
} }
@ -736,7 +736,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker
static clearscope SWWMLoreLibrary Find( PlayerInfo p ) static clearscope SWWMLoreLibrary Find( PlayerInfo p )
{ {
let ti = ThinkerIterator.Create("SWWMLoreLibrary",STAT_STATIC); let ti = ThinkerIterator.Create('SWWMLoreLibrary',STAT_STATIC);
SWWMLoreLibrary ll; SWWMLoreLibrary ll;
while ( ll = SWWMLoreLibrary(ti.Next()) ) while ( ll = SWWMLoreLibrary(ti.Next()) )
{ {

View file

@ -80,7 +80,7 @@ Class EnvmapDebugSphere : Actor
override void Tick() {} override void Tick() {}
Default Default
{ {
RenderStyle "Normal"; RenderStyle 'Normal';
Radius 16; Radius 16;
Height 48; Height 48;
} }

View file

@ -5,7 +5,7 @@ extend class SWWMUtility
static void MarkAchievement( String mvar, PlayerInfo p = null ) static void MarkAchievement( String mvar, PlayerInfo p = null )
{ {
if ( !p || (p != players[consoleplayer]) ) return; if ( !p || (p != players[consoleplayer]) ) return;
let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) return; if ( !hnd ) return;
String val = hnd.achievementstate.At(mvar); String val = hnd.achievementstate.At(mvar);
if ( val == "" ) if ( val == "" )
@ -19,7 +19,7 @@ extend class SWWMUtility
static int GetAchievementProgress( String pvar, PlayerInfo p = null ) static int GetAchievementProgress( String pvar, PlayerInfo p = null )
{ {
if ( !p || (p != players[consoleplayer]) ) return 0; if ( !p || (p != players[consoleplayer]) ) return 0;
let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) return 0; if ( !hnd ) return 0;
String pval = hnd.achievementprogress.At(pvar); String pval = hnd.achievementprogress.At(pvar);
if ( pval == "" ) if ( pval == "" )
@ -32,7 +32,7 @@ extend class SWWMUtility
static void AchievementProgress( String pvar, int val, PlayerInfo p = null ) static void AchievementProgress( String pvar, int val, PlayerInfo p = null )
{ {
if ( !p || (p != players[consoleplayer]) ) return; if ( !p || (p != players[consoleplayer]) ) return;
let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) return; if ( !hnd ) return;
String pval = hnd.achievementprogress.At(pvar); String pval = hnd.achievementprogress.At(pvar);
if ( pval == "" ) if ( pval == "" )
@ -46,7 +46,7 @@ extend class SWWMUtility
static void AchievementProgressInc( String pvar, int inc, PlayerInfo p = null ) static void AchievementProgressInc( String pvar, int inc, PlayerInfo p = null )
{ {
if ( !p || (p != players[consoleplayer]) ) return; if ( !p || (p != players[consoleplayer]) ) return;
let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) return; if ( !hnd ) return;
String pval = hnd.achievementprogress.At(pvar); String pval = hnd.achievementprogress.At(pvar);
if ( pval == "" ) if ( pval == "" )
@ -59,7 +59,7 @@ extend class SWWMUtility
static void AchievementProgressIncDouble( String pvar, double inc, PlayerInfo p = null ) static void AchievementProgressIncDouble( String pvar, double inc, PlayerInfo p = null )
{ {
if ( !p || (p != players[consoleplayer]) ) return; if ( !p || (p != players[consoleplayer]) ) return;
let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) return; if ( !hnd ) return;
String pval = hnd.achievementprogress.At(pvar); String pval = hnd.achievementprogress.At(pvar);
if ( pval == "" ) if ( pval == "" )
@ -75,7 +75,7 @@ extend class SWWMUtility
static void AchievementProgressOr( String pvar, int val, PlayerInfo p = null ) static void AchievementProgressOr( String pvar, int val, PlayerInfo p = null )
{ {
if ( !p || (p != players[consoleplayer]) ) return; if ( !p || (p != players[consoleplayer]) ) return;
let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler'));
if ( !hnd ) return; if ( !hnd ) return;
String pval = hnd.achievementprogress.At(pvar); String pval = hnd.achievementprogress.At(pvar);
if ( pval == "" ) if ( pval == "" )

View file

@ -49,14 +49,14 @@ extend Class SWWMUtility
// debug, display radius sphere // debug, display radius sphere
if ( swwm_debugblast ) if ( swwm_debugblast )
{ {
let s = Actor.Spawn("RadiusDebugSphere",(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos); let s = Actor.Spawn('RadiusDebugSphere',(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos);
s.Scale *= ExplosionRadius; s.Scale *= ExplosionRadius;
s.SetShade((Damage>0)?"Green":"Blue"); s.SetShade((Damage>0)?0xFF00FF00:0xFF0000FF);
if ( FullDamageRadius > 0. ) if ( FullDamageRadius > 0. )
{ {
let s = Actor.Spawn("RadiusDebugSphere",(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos); let s = Actor.Spawn('RadiusDebugSphere',(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos);
s.Scale *= FullDamageRadius; s.Scale *= FullDamageRadius;
s.SetShade("Red"); s.SetShade(0xFFFF0000);
} }
} }
if ( !(flags&DE_NOSPLASH) ) Source.CheckSplash(ExplosionRadius); if ( !(flags&DE_NOSPLASH) ) Source.CheckSplash(ExplosionRadius);
@ -164,7 +164,7 @@ extend Class SWWMUtility
} }
if ( (Instigator is 'Demolitionist') && haskilled && !(flags&DE_NONEXPLOSIVE) ) if ( (Instigator is 'Demolitionist') && haskilled && !(flags&DE_NONEXPLOSIVE) )
{ {
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
let demo = Demolitionist(Instigator); let demo = Demolitionist(Instigator);
if ( hnd && (gametic > demo.lastbang+30) && (gametic > hnd.lastcombat+10) && !Random[DemoLines](0,3) ) if ( hnd && (gametic > demo.lastbang+30) && (gametic > hnd.lastcombat+10) && !Random[DemoLines](0,3) )
demo.lastbang = SWWMHandler.AddOneLiner("blast",2,10); demo.lastbang = SWWMHandler.AddOneLiner("blast",2,10);
@ -177,8 +177,8 @@ Class RadiusDebugSphere : SWWMNonInteractiveActor
{ {
Default Default
{ {
RenderStyle "AddStencil"; RenderStyle 'AddStencil';
StencilColor "White"; StencilColor "FF FF FF";
} }
States States
{ {

Some files were not shown because too many files have changed in this diff Show more