Bump zscript ver to 4.14.1, plus a whole lot of stuff.
- Try to get rid of all implicit casts from string to name, color or class. - Use FindClass where needed. - Used a map in a case where a dictionary was unneeded. - Use new bounce flags where needed. - Replace Legacy of Rust weapons/ammo.
This commit is contained in:
parent
ceae806b68
commit
80db58b0d0
128 changed files with 3074 additions and 3088 deletions
|
|
@ -142,10 +142,10 @@ Class Demolitionist : PlayerPawn
|
|||
Player.DisplayName "$T_DEMOLITIONIST";
|
||||
// StartItem array is defined but not used directly
|
||||
// just declared here for mod compat
|
||||
Player.StartItem "ExplodiumGun";
|
||||
Player.StartItem "DeepImpact";
|
||||
Player.StartItem "AlmasteelPlating";
|
||||
Player.StartItem "SayaCollar";
|
||||
Player.StartItem 'ExplodiumGun';
|
||||
Player.StartItem 'DeepImpact';
|
||||
Player.StartItem 'AlmasteelPlating';
|
||||
Player.StartItem 'SayaCollar';
|
||||
Player.ViewHeight 52;
|
||||
Player.AirCapacity 0;
|
||||
Player.GruntSpeed 20;
|
||||
|
|
@ -196,7 +196,7 @@ Class Demolitionist : PlayerPawn
|
|||
// swap ourselves for a voodoo doll
|
||||
if ( !player || (player.mo != self) )
|
||||
{
|
||||
let v = Spawn("SWWMVoodooDoll",pos);
|
||||
let v = Spawn('SWWMVoodooDoll',pos);
|
||||
v.angle = angle;
|
||||
v.player = 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
|
||||
mystats = SWWMStats.Find(player);
|
||||
// sanity checks
|
||||
if ( !EventHandler.Find("SWWMHandler") || !StaticEventHandler.Find("SWWMStaticHandler") )
|
||||
if ( !EventHandler.Find('SWWMHandler') || !StaticEventHandler.Find('SWWMStaticHandler') )
|
||||
ThrowAbortException("Panic! SWWM event handlers not detected!");
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
// adjust fov from dashing
|
||||
double spd = vel.length();
|
||||
if ( InStateSequence(CurState,FindState("Dash")) && (spd > 10.) )
|
||||
if ( InStateSequence(CurState,FindState('Dash')) && (spd > 10.) )
|
||||
{
|
||||
Vector3 facedir = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
if ( spd > 0. )
|
||||
|
|
@ -298,23 +298,23 @@ Class Demolitionist : PlayerPawn
|
|||
if ( ceilse && florse )
|
||||
{
|
||||
// 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 = 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.;
|
||||
SWWMCrusherBroken.Create(flor,ceil,diffh/2.);
|
||||
}
|
||||
else if ( ceilse )
|
||||
{
|
||||
// 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.;
|
||||
SWWMCrusherBroken.Create(null,ceil,diffh);
|
||||
}
|
||||
else if ( florse )
|
||||
{
|
||||
// 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.;
|
||||
SWWMCrusherBroken.Create(flor,null,diffh);
|
||||
}
|
||||
|
|
@ -369,7 +369,7 @@ Class Demolitionist : PlayerPawn
|
|||
damage = 0;
|
||||
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 ( (mod == 'Crush') && player && (player.mo == self) )
|
||||
|
|
@ -384,12 +384,12 @@ Class Demolitionist : PlayerPawn
|
|||
// break a spike trap
|
||||
else if ( source is 'ThrustFloor' )
|
||||
{
|
||||
let q = Spawn("BustedQuake",source.pos);
|
||||
let q = Spawn('BustedQuake',source.pos);
|
||||
q.specialf1 = 4.;
|
||||
int numpt = Random[ExploS](30,40);
|
||||
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.scale *= FRandom[ExploS](1.5,3.);
|
||||
s.A_SetTranslation('StoneSpike');
|
||||
|
|
@ -397,13 +397,13 @@ Class Demolitionist : PlayerPawn
|
|||
numpt = Random[ExploS](12,16);
|
||||
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.scale *= 2.5;
|
||||
s.framestep = Random[ExploS](4,9);
|
||||
s.scolor = Color(5,4,3)*Random[ExploS](20,40);
|
||||
}
|
||||
Spawn("SWWMCrushedSpike",source.pos);
|
||||
Spawn('SWWMCrushedSpike',source.pos);
|
||||
if ( source.master ) source.master.Destroy();
|
||||
source.Destroy();
|
||||
damage = 20; // reduce so it's not instant kill
|
||||
|
|
@ -575,7 +575,7 @@ Class Demolitionist : PlayerPawn
|
|||
if ( !player ) return false;
|
||||
int score = 100;
|
||||
// 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 ( hnd ) hnd.allsecrets = true;
|
||||
|
|
@ -730,7 +730,7 @@ Class Demolitionist : PlayerPawn
|
|||
if ( player.ReadyWeapon is 'SWWMGesture' )
|
||||
{
|
||||
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.;
|
||||
}
|
||||
// notify carried lamp that we just moved
|
||||
let l = SWWMLamp(FindInventory("SWWMLamp"));
|
||||
let l = SWWMLamp(FindInventory('SWWMLamp'));
|
||||
if ( l && l.thelamp )
|
||||
CompanionLamp(l.thelamp).justteleport = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue