4.10 support update (unfinished and untested).
This commit is contained in:
parent
eb624f15e3
commit
8e952f412f
80 changed files with 2343 additions and 2356 deletions
|
|
@ -161,7 +161,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor
|
|||
SetThingArgument(nt,0,tiddy);
|
||||
nt = AddThing(4206930,(0,0,0));
|
||||
SetThingID(nt,tiddy);
|
||||
SetThingArgument(nt,0,0);
|
||||
SetThingArgument(nt,0,SWWMDLG_GOTCHAEND);
|
||||
break;
|
||||
// EQUINOX: various boss brain setups that could be cheesed with the Ynykron or silver bullet
|
||||
// Equinox MAP04
|
||||
|
|
@ -348,24 +348,23 @@ Class SWWMLevelCompatibility : LevelPostProcessor
|
|||
case 'AA4CA3FC891D13821ACCABD836E29EB5':
|
||||
case '9AA7780B46EC4471F630572798943D71':
|
||||
// sound sequence handling
|
||||
for ( int i=0; i<level.Lines.Size(); i++ )
|
||||
foreach ( l:level.Lines )
|
||||
{
|
||||
Line l = level.Lines[i];
|
||||
if ( !l.backsector ) continue;
|
||||
TextureID t;
|
||||
bool wolfdoor = false;
|
||||
for ( int k=0; k<3; k++ )
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
t = l.sidedef[0].GetTexture(k);
|
||||
t = l.sidedef[0].GetTexture(i);
|
||||
if ( t.IsValid() && ((TexMan.GetName(t) == "ZDOORF1") || (TexMan.GetName(t) == "ZDOORB1") || (TexMan.GetName(t) == "ZELDOOR")) )
|
||||
{
|
||||
wolfdoor = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !wolfdoor && l.sidedef[1] ) for ( int k=0; k<3; k++ )
|
||||
if ( !wolfdoor && l.sidedef[1] ) for ( int i=0; i<3; i++ )
|
||||
{
|
||||
t = l.sidedef[1].GetTexture(k);
|
||||
t = l.sidedef[1].GetTexture(i);
|
||||
if ( t.IsValid() && ((TexMan.GetName(t) == "ZDOORF1") || (TexMan.GetName(t) == "ZDOORB1") || (TexMan.GetName(t) == "ZELDOOR")) )
|
||||
{
|
||||
wolfdoor = true;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ Class SWWMHDoomHandler : StaticEventHandler
|
|||
|
||||
override void OnRegister()
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() != "HDoomPlayer" ) continue;
|
||||
if ( cls.GetClassName() != "HDoomPlayer" ) continue;
|
||||
detected = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@ Class SWWMBrutalHandler : StaticEventHandler
|
|||
{
|
||||
if ( swwm_iseriouslywanttoplaythiswithbd )
|
||||
return;
|
||||
for ( int i=0; i<AllActorClasses.size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() == "BDoomer" )
|
||||
if ( cls.GetClassName() == "BDoomer" )
|
||||
{
|
||||
detected = true;
|
||||
which = "Brutal Doom";
|
||||
whichshort = "BD";
|
||||
}
|
||||
else if ( AllActorClasses[i].GetClassName() == "BrutalDoomer" )
|
||||
else if ( cls.GetClassName() == "BrutalDoomer" )
|
||||
{
|
||||
detected = true;
|
||||
which = "Project Brutality";
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ Class ItamexHammer : SWWMWeapon
|
|||
|
||||
action State A_HammerHit( bool nojump = false )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SWWMUtility.DoKnockback(self,x,120000.);
|
||||
if ( A_Melee(100,"itamex/hit",1.6,1.1,1.,MELEE_Rip|MELEE_FleshSound|MELEE_HammerHit) )
|
||||
{
|
||||
|
|
@ -32,8 +31,7 @@ Class ItamexHammer : SWWMWeapon
|
|||
}
|
||||
action void A_HammerAltHit()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SWWMUtility.DoKnockback(self,x,3000.*invoker.charge);
|
||||
if ( A_Melee(int(100+invoker.charge*2.),"itamex/hit",2.,1.1,1.2,MELEE_Rip|MELEE_FleshSound|MELEE_HammerHit|MELEE_Vertical|MELEE_ExtraWide|MELEE_ForceBust) )
|
||||
{
|
||||
|
|
@ -66,8 +64,7 @@ Class ItamexHammer : SWWMWeapon
|
|||
A_StartSound("itamex/spin",CHAN_WEAPONEXTRA,CHANF_LOOP,.2);
|
||||
A_SoundVolume(CHAN_WEAPONEXTRA,(invoker.charge/100.)**.5);
|
||||
A_BumpFOV(1.+invoker.charge*.001);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SWWMUtility.DoKnockback(self,x,500.*invoker.charge);
|
||||
invoker.hitcnt = 0;
|
||||
invoker.spintime = 0;
|
||||
|
|
@ -89,8 +86,7 @@ Class ItamexHammer : SWWMWeapon
|
|||
invoker.charge = min(100.,invoker.charge+20.);
|
||||
A_SoundVolume(CHAN_WEAPONEXTRA,(invoker.charge/100.)**.5);
|
||||
A_BumpFOV(1.+invoker.charge*.001);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SWWMUtility.DoKnockback(self,(x.x,x.y,x.z*.1),1500.*invoker.charge);
|
||||
if ( vel.z < 0 ) vel.z *= 1.-invoker.charge*.008;
|
||||
A_QuakeEx(1,1,1,15,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.1);
|
||||
|
|
@ -122,8 +118,7 @@ Class ItamexHammer : SWWMWeapon
|
|||
invoker.charge = max(0.,invoker.charge-6.);
|
||||
A_WeaponOffset(-16,0,WOF_ADD|WOF_INTERPOLATE);
|
||||
A_BumpFOV(1.+invoker.charge*.001);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SWWMUtility.DoKnockback(self,x,4000.*invoker.charge);
|
||||
if ( invoker.charge <= 0 ) A_StopSound(CHAN_WEAPONEXTRA);
|
||||
}
|
||||
|
|
@ -150,8 +145,7 @@ Class ItamexHammer : SWWMWeapon
|
|||
|
||||
action void A_AltRelease()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SWWMUtility.DoKnockback(self,x-(0,0,3.),120000.);
|
||||
A_BumpFOV(.9);
|
||||
A_StartSound("itamex/drop",CHAN_WEAPONEXTRA2);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),4*x+8*y-12*z);
|
||||
let c = Spawn("SheenCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -116,7 +116,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
invoker.barrelheat = invoker.barrelheat*(1.025-invoker.firespeed*.008)+3.-(invoker.firespeed**.8)*1.35;
|
||||
invoker.aimerror = min(1.,invoker.aimerror*1.01+.01+invoker.firespeed*.01);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-4*z);
|
||||
SWWMHandler.DoFlash(self,Color(32,255,224,64),3);
|
||||
A_SWWMFlash();
|
||||
|
|
@ -160,7 +160,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
invoker.fired = gametic;
|
||||
// dakka dakka dakka
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
double a = FRandom[Sheen](0,360), s = FRandom[Sheen](.002,.02)*spreadfct;
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
if ( !invoker.st ) invoker.st = new("PiercingTracer");
|
||||
|
|
@ -177,14 +177,14 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
// Wall busting
|
||||
BusterWall.Bust(st.Results,int(st.penetration),self,st.Results.HitVector,st.Results.HitPos.z);
|
||||
}
|
||||
for ( int i=0; i<st.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:st.ShootThroughList )
|
||||
{
|
||||
st.ShootThroughList[i].Activate(self,0,SPAC_PCross);
|
||||
st.ShootThroughList[i].Activate(self,0,SPAC_Impact);
|
||||
l.Activate(self,0,SPAC_PCross);
|
||||
l.Activate(self,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<st.WaterHitList.Size(); i++ )
|
||||
foreach ( w:st.WaterHitList )
|
||||
{
|
||||
let b = Spawn("InvisibleSplasher",st.WaterHitList[i].hitpos);
|
||||
let b = Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -194,24 +194,24 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
let b = Actor.Spawn("SWWMBubble",level.Vec3Offset(origin,dir*i));
|
||||
b.Scale *= FRandom[Boolet](.1,.3);
|
||||
}
|
||||
for ( int i=0; i<st.HitList.Size(); i++ )
|
||||
foreach ( hit:st.HitList )
|
||||
{
|
||||
int realdmg = st.HitList[i].HitDamage;
|
||||
let p = SWWMPuff.Setup(st.HitList[i].HitLocation,st.HitList[i].x,invoker,self,st.HitList[i].HitActor);
|
||||
SWWMDamageAccumulator.Accumulate(st.HitList[i].HitActor,realdmg,p,self,'shot',flags:DMG_INFLICTOR_IS_PUFF);
|
||||
SWWMUtility.DoKnockback(st.HitList[i].HitActor,st.HitList[i].x+(0,0,0.025),15000.*FRandom[Sheen](0.4,1.2));
|
||||
if ( st.HitList[i].HitActor.bNOBLOOD || st.HitList[i].HitActor.bDORMANT || st.HitList[i].HitActor.bINVULNERABLE )
|
||||
int realdmg = hit.HitDamage;
|
||||
let p = SWWMPuff.Setup(hit.HitLocation,hit.x,invoker,self,hit.HitActor);
|
||||
SWWMDamageAccumulator.Accumulate(hit.HitActor,realdmg,p,self,'shot',flags:DMG_INFLICTOR_IS_PUFF);
|
||||
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 )
|
||||
{
|
||||
let p = Spawn("SWWMBulletImpact",st.HitList[i].HitLocation);
|
||||
p.angle = atan2(st.HitList[i].x.y,st.HitList[i].x.x)+180;
|
||||
p.pitch = asin(st.HitList[i].x.z);
|
||||
let p = Spawn("SWWMBulletImpact",hit.HitLocation);
|
||||
p.angle = atan2(hit.x.y,hit.x.x)+180;
|
||||
p.pitch = asin(hit.x.z);
|
||||
p.target = self;
|
||||
}
|
||||
else if ( realdmg > 0 )
|
||||
{
|
||||
st.HitList[i].HitActor.TraceBleed(realdmg,self);
|
||||
st.HitList[i].HitActor.SpawnBlood(st.HitList[i].HitLocation,atan2(st.HitList[i].x.y,st.HitList[i].x.x)+180,realdmg);
|
||||
st.HitList[i].HitActor.A_StartSound("misc/slughitf",CHAN_DAMAGE,CHANF_OVERLAP,1.,2.);
|
||||
hit.HitActor.TraceBleed(realdmg,self);
|
||||
hit.HitActor.SpawnBlood(hit.HitLocation,atan2(hit.x.y,hit.x.x)+180,realdmg);
|
||||
hit.HitActor.A_StartSound("misc/slughitf",CHAN_DAMAGE,CHANF_OVERLAP,1.,2.);
|
||||
}
|
||||
}
|
||||
if ( (st.Results.HitType != TRACE_HitNone) && (st.Results.HitType != TRACE_HasHitSky) && (st.Results.HitType != TRACE_HitActor) )
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ Class MisterRailTracer : LineTracer
|
|||
bool pastwall, fullstop;
|
||||
Array<WallPenetrate> WallPenetrateList;
|
||||
Vector3 exitpoint;
|
||||
transient Array<F3DFloor> ffloors; // needs to be done like this because HAHA SCOPE
|
||||
|
||||
override ETraceStatus TraceCallback()
|
||||
{
|
||||
|
|
@ -100,11 +99,12 @@ Class MisterRailTracer : LineTracer
|
|||
// double-check if we're piercing through a 3D floor (yes this is a thing that happens, oh boy)
|
||||
Sector s = level.PointInSector(ofs.xy);
|
||||
bool stop3d = false;
|
||||
for ( int j=0; j<ffloors.Size(); j++ )
|
||||
for ( int j=0; j<s.Get3DFloorCount(); j++ )
|
||||
{
|
||||
if ( ffloors[j].target != s ) continue;
|
||||
double minz = ffloors[j].bottom.ZAtPoint(ofs.xy);
|
||||
double maxz = ffloors[j].top.ZAtPoint(ofs.xy);
|
||||
let ff = s.Get3DFloor(j);
|
||||
if ( !(ff.flags&(F3DFloor.FF_EXISTS|F3DFloor.FF_SOLID)) ) continue;
|
||||
double minz = ff.bottom.ZAtPoint(ofs.xy);
|
||||
double maxz = ff.top.ZAtPoint(ofs.xy);
|
||||
if ( (ofs.z < minz) || (ofs.z > maxz) ) continue;
|
||||
stop3d = true;
|
||||
break;
|
||||
|
|
@ -182,9 +182,9 @@ Class MisterRailCounter : Thinker
|
|||
override void Tick()
|
||||
{
|
||||
int neff = 0;
|
||||
for ( int i=0; i<effectors.Size(); i++ )
|
||||
foreach ( e:effectors )
|
||||
{
|
||||
if ( !effectors[i] ) continue;
|
||||
if ( !e ) continue;
|
||||
neff++;
|
||||
}
|
||||
if ( neff > 0 ) return;
|
||||
|
|
@ -364,7 +364,7 @@ Class MisterRifle : SWWMWeapon
|
|||
if ( !invoker.waschambered ) return;
|
||||
// brass it up (though it's not made of brass)
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),2*x+3*y-18*z);
|
||||
let c = Spawn("MisterCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -408,7 +408,7 @@ Class MisterRifle : SWWMWeapon
|
|||
if ( swwm_nomagdrop ) return;
|
||||
// drop it
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),6*x+3*y-18*z);
|
||||
let c = Spawn("MisterMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -476,7 +476,7 @@ Class MisterRifle : SWWMWeapon
|
|||
}
|
||||
SWWMHandler.DoFlash(self,Color(48,64,224,255),3);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2.8*y-2.4*z);
|
||||
if ( invoker.firemode == 1 )
|
||||
{
|
||||
|
|
@ -496,7 +496,7 @@ Class MisterRifle : SWWMWeapon
|
|||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
double a, s;
|
||||
Vector3 dir;
|
||||
for ( int i=0; i<8; i++ )
|
||||
|
|
@ -581,8 +581,7 @@ Class MisterRifle : SWWMWeapon
|
|||
s.vel += vel*.5+x*FRandom[Mister](1.,2.);
|
||||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 dir;
|
||||
dir = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = SWWMUtility.Vec3FromAngles(angle,BulletSlope());
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
SWWMBulletTrail.DoTrail(self,origin,dir,10000,2);
|
||||
|
|
@ -643,7 +642,7 @@ Class MisterRifle : SWWMWeapon
|
|||
A_SWWMFlash("FastFlash");
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2.8*y-2.4*z);
|
||||
SWWMUtility.DoKnockback(self,-x,5000.);
|
||||
A_QuakeEx(3,3,3,5,0,10,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.4);
|
||||
|
|
@ -659,7 +658,7 @@ Class MisterRifle : SWWMWeapon
|
|||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
static const double spd[] = {.00,.01,.03,.06,.10};
|
||||
double a = FRandom[Mister](0,360), s = FRandom[Mister](spd[index],spd[index+1]);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
|
|
@ -763,7 +762,7 @@ Class MisterRifle : SWWMWeapon
|
|||
A_StopSound(CHAN_WEAPONEXTRA);
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2.8*y-2.4*z);
|
||||
SWWMHandler.DoFlash(self,Color(64,64,224,255),9);
|
||||
A_SWWMFlash();
|
||||
|
|
@ -782,26 +781,15 @@ Class MisterRifle : SWWMWeapon
|
|||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 dir, startdir;
|
||||
startdir = dir = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
startdir = dir = SWWMUtility.Vec3FromAngles(angle,BulletSlope());
|
||||
let mrt = new("MisterRailTracer"); // I pity the fool
|
||||
mrt.ignoreme = self;
|
||||
mrt.hitlist.Clear();
|
||||
mrt.shootthroughlist.Clear();
|
||||
mrt.waterhitlist.Clear();
|
||||
mrt.wallpenetratelist.Clear();
|
||||
mrt.ffloors.Clear();
|
||||
mrt.portalseg.Clear();
|
||||
mrt.maxpen = 400;
|
||||
for ( int i=0; i<level.Sectors.Size(); i++ )
|
||||
{
|
||||
Sector s = level.Sectors[i];
|
||||
for ( int j=0; j<s.Get3DFloorCount(); j++ )
|
||||
{
|
||||
F3DFloor ff = s.Get3DFloor(j);
|
||||
if ( ff.flags&(F3DFloor.FF_EXISTS|F3DFloor.FF_SOLID) )
|
||||
mrt.ffloors.Push(ff);
|
||||
}
|
||||
}
|
||||
mrt.pastwall = false;
|
||||
Vector3 norigin = origin;
|
||||
double maxdist = 10000.;
|
||||
|
|
@ -892,14 +880,14 @@ Class MisterRifle : SWWMWeapon
|
|||
mrc.effectors.Push(b);
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<mrt.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:mrt.ShootThroughList )
|
||||
{
|
||||
mrt.ShootThroughList[i].Activate(self,0,SPAC_Impact);
|
||||
mrt.ShootThroughList[i].Activate(self,0,SPAC_PCross);
|
||||
l.Activate(self,0,SPAC_Impact);
|
||||
l.Activate(self,0,SPAC_PCross);
|
||||
}
|
||||
for ( int i=0; i<mrt.WaterHitList.Size(); i++ )
|
||||
foreach ( w:mrt.WaterHitList )
|
||||
{
|
||||
let b = Spawn("InvisibleSplasher",mrt.WaterHitList[i].hitpos);
|
||||
let b = Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -1010,7 +998,7 @@ Class MisterRifle : SWWMWeapon
|
|||
if ( mrt.Results.HitType == TRACE_HitWall ) mrt.Results.HitLine.RemoteActivate(self,mrt.Results.Side,SPAC_Impact,mrt.Results.HitPos);
|
||||
if ( swwm_omnibust ) BusterWall.Bust(mrt.Results,444,self,mrt.Results.HitVector,mrt.Results.HitPos.z);
|
||||
}
|
||||
for ( int i=0; i<bi.Size(); i++ ) bi[i].A_BulletExplode();
|
||||
foreach ( b:bi ) b.A_BulletExplode();
|
||||
double dist = level.Vec3Diff(origin,mrt.Results.HitPos).length();
|
||||
for ( double d=0.; d<=dist; d+=250. )
|
||||
{
|
||||
|
|
@ -1127,7 +1115,7 @@ Class MisterRifle : SWWMWeapon
|
|||
{
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2.8*y-4.*z);
|
||||
SWWMHandler.DoFlash(self,Color(64,64,224,255),3);
|
||||
A_SWWMFlash("AltFlash");
|
||||
|
|
@ -1145,8 +1133,7 @@ Class MisterRifle : SWWMWeapon
|
|||
s.vel += vel*.5+x*FRandom[Mister](1.,4.);
|
||||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 dir;
|
||||
dir = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = SWWMUtility.Vec3FromAngles(angle,BulletSlope());
|
||||
let p = Spawn("MisterGrenade",origin);
|
||||
p.target = self;
|
||||
p.angle = atan2(dir.y,dir.x);
|
||||
|
|
@ -1184,7 +1171,7 @@ Class MisterRifle : SWWMWeapon
|
|||
if ( !invoker.wasgchambered ) return;
|
||||
// droppage
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),8*x+3*y-18*z);
|
||||
let c = Spawn("MisterGCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -871,13 +871,13 @@ Class MisterRailBeam : SWWMNonInteractiveActor
|
|||
Vector3 dir = SWWMUtility.Vec3FromAngles(angle,pitch-90);
|
||||
cbt.ShootThroughList.Clear();
|
||||
cbt.Trace(pos,CurSector,dir,scale.y,0);
|
||||
for ( int i=0; i<cbt.hitlist.Size(); i++ )
|
||||
foreach ( hit:cbt.hitlist )
|
||||
{
|
||||
if ( !cbt.hitlist[i].hitactor || (cbt.hitlist[i].hitactor == target) ) continue;
|
||||
SWWMUtility.DoKnockback(cbt.hitlist[i].hitactor,cbt.hitlist[i].x,12000);
|
||||
let p = SWWMPuff.Setup(cbt.hitlist[i].hitlocation,cbt.hitlist[i].x,self,target,cbt.hitlist[i].hitactor);
|
||||
cbt.hitlist[i].hitactor.DamageMobj(p,target,44,'Mortal',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( mrc && (!cbt.hitlist[i].hitactor || (cbt.hitlist[i].hitactor.Health <= 0)) )
|
||||
if ( !hit.hitactor || (hit.hitactor == target) ) continue;
|
||||
SWWMUtility.DoKnockback(hit.hitactor,hit.x,12000);
|
||||
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
|
||||
hit.hitactor.DamageMobj(p,target,44,'Mortal',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( mrc && (!hit.hitactor || (hit.hitactor.Health <= 0)) )
|
||||
mrc.nkill++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1213,9 +1213,9 @@ Class MisterGrenade : Actor
|
|||
// don't seek if enemy is too close to another candidate
|
||||
// this would cause some of the splash damage potential to go to waste
|
||||
bool tooclose = false;
|
||||
for ( int i=0; i<candidates.Size(); i++ )
|
||||
foreach ( c:candidates )
|
||||
{
|
||||
if ( !SWWMUtility.SphereIntersect(t,candidates[i].pos,150) ) continue;
|
||||
if ( !SWWMUtility.SphereIntersect(t,c.pos,150) ) continue;
|
||||
tooclose = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Class Quadravol : SWWMWeapon
|
|||
A_StartSound("quadshot/fire"..BaseNum[idx],CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
double offy = invoker.onehand?3.5:3;
|
||||
double offz = invoker.onehand?2:2.5;
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+offy*y-offz*z);
|
||||
|
|
@ -78,7 +78,7 @@ Class Quadravol : SWWMWeapon
|
|||
if ( bMelee && fool ) SWWMUtility.AchievementProgressInc("roast",1,player);
|
||||
if ( bMelee || fool || (idx>=4) ) A_StartSound("quadshot/pointblank",CHAN_WEAPON,CHANF_OVERLAP,.6+idx*.1,.4-idx*.05,1.2-idx*.05);
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
double a, s;
|
||||
Actor p;
|
||||
bool bExtra = ((idx>=4)&&invoker.chambered&&!invoker.charged);
|
||||
|
|
@ -270,8 +270,8 @@ Class Quadravol : SWWMWeapon
|
|||
}
|
||||
else return;
|
||||
invoker.wastecycle = 0;
|
||||
if ( (s.quadegg > 0) && (player == players[consoleplayer]) )
|
||||
Console.MidPrint(null,"swwmquadravoleasteregg"..s.quadegg);
|
||||
if (( s.quadegg > 0) && (player == players[consoleplayer]) )
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_LEVER1+(s.quadegg-1));
|
||||
}
|
||||
|
||||
action void A_LoadOverlay()
|
||||
|
|
@ -301,7 +301,7 @@ Class Quadravol : SWWMWeapon
|
|||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-8*x+8*y-16*z);
|
||||
if ( invoker.wascharged )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ Class QuadProj : Actor
|
|||
{
|
||||
A_QuadTrail();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
double a = FRandom[Quadravol](0.,360.), s = FRandom[Quadravol](0.,drift);
|
||||
vel += x*(accelrate/GameTicRate);
|
||||
vel += SWWMUtility.CircleOffset(y,z,a,s);
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ Class MadcatGameStateManager : Thinker
|
|||
{
|
||||
let gsm = MadcatGameStateManager(ThinkerIterator.Create("MadcatGameStateManager").Next());
|
||||
if ( !gsm ) ThrowAbortException("Game State Manager not found.");
|
||||
for ( int i=0; i<gsm.GameState.Size(); i++ )
|
||||
foreach ( gs:gsm.GameState )
|
||||
{
|
||||
if ( gsm.GameState[i].GameName != GameName ) continue;
|
||||
return gsm.GameState[i];
|
||||
if ( gs.GameName != GameName ) continue;
|
||||
return gs;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ extend Class SWWMHandler
|
|||
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
|
||||
S_StartSound("misc/w_pkup",CHAN_VOICE,CHANF_UI);
|
||||
}
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let w = (Class<SWWMWeapon>)(AllActorClasses[i]);
|
||||
let w = (Class<SWWMWeapon>)(cls);
|
||||
if ( !w || (w == 'SWWMWeapon') ) continue;
|
||||
let def = GetDefaultByType(w);
|
||||
if ( def.bCHEATNOTWEAPON ) continue;
|
||||
|
|
@ -179,9 +179,9 @@ extend Class SWWMHandler
|
|||
if ( !(i is 'Ammo') ) continue;
|
||||
i.Amount = i.MaxAmount;
|
||||
}
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let w = (Class<SWWMWeapon>)(AllActorClasses[i]);
|
||||
let w = (Class<SWWMWeapon>)(cls);
|
||||
if ( !w || (w == 'SWWMWeapon') ) continue;
|
||||
let def = GetDefaultByType(w);
|
||||
if ( def.bCHEATNOTWEAPON ) continue;
|
||||
|
|
@ -411,17 +411,7 @@ extend Class SWWMHandler
|
|||
let s = SWWMStats.Find(players[consoleplayer]);
|
||||
if ( (i > 5) && !swwm_nomapmsg && (!s || !s.oldcheat) )
|
||||
{
|
||||
if ( !swwm_oldcheats )
|
||||
{
|
||||
let m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_ZNVSNAME"),StringTable.Localize("$SWWM_ZNVNAME"),"Znv");
|
||||
m.seqname = "ZNVTXT";
|
||||
m.seqcnt = 5;
|
||||
m.znvspecial = true;
|
||||
m.delay = 80;
|
||||
m.enddelay = 90;
|
||||
m.pausedelay = 40;
|
||||
StatusBar.AttachMessage(m,-1232);
|
||||
}
|
||||
if ( !swwm_oldcheats ) SWWMDialogues.StartSeq(SWWMDLG_CHEATS);
|
||||
CVar.GetCVar('swwm_oldcheats').SetBool(true);
|
||||
SendNetworkEvent("swwmsetoldcheat",consoleplayer);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ extend Class SWWMHandler
|
|||
ctr.ignoreme = mo;
|
||||
Vector3 x, y, z, ofs, origin;
|
||||
Color col;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(e.ViewPitch,e.ViewAngle,e.ViewRoll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);
|
||||
int chp = crosshairhealth;
|
||||
for ( int i=0; i<numcrosshairs; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ extend Class SWWMHandler
|
|||
private ui void DrawWorldCircle( RenderEvent e, Vector3 pos, double radius, Color col )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(e.viewpitch,e.viewangle,e.viewroll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(e.viewangle,e.viewpitch,e.viewroll);
|
||||
Vector3 ndc[64];
|
||||
for ( int i=0; i<64; i++ )
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@ extend Class SWWMHandler
|
|||
DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b2.y,b2.z),"White");
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(a.pitch,a.angle,a.roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(a.angle,a.pitch,a.roll);
|
||||
DrawWorldLine(e,pos,pos+x*16,"Red");
|
||||
DrawWorldLine(e,pos,pos+y*16,"Green");
|
||||
DrawWorldLine(e,pos,pos+z*16,"Blue");
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ extend Class SWWMHandler
|
|||
Vector3 x, y, z;
|
||||
double ang = e.Thing.target.target?e.Thing.AngleTo(e.Thing.target.target):e.Thing.angle;
|
||||
double pt = e.Thing.target.target?SWWMUtility.PitchTo(e.Thing,e.Thing.target.target,.5):e.Thing.pitch;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pt,ang,e.Thing.roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(ang,pt,e.Thing.roll);
|
||||
int numpt = Random[ExtraMissiles](1,2);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ extend Class SWWMHandler
|
|||
if ( !(p.mo is 'Demolitionist') )
|
||||
{
|
||||
// make sure it's defined here, so special purpose classes (player chunks, scripted overrides) are respected
|
||||
for ( int i=0; i<PlayerClasses.Size(); i++ )
|
||||
foreach ( pc:PlayerClasses )
|
||||
{
|
||||
if ( !(p.mo is PlayerClasses[i].Type) ) continue;
|
||||
if ( !(p.mo is pc.Type) ) continue;
|
||||
// perform a hotswap, code adapted from my .flow player morph in spooktober
|
||||
let n = PlayerPawn(Actor.Spawn("Demolitionist",p.mo.pos));
|
||||
n.player = p;
|
||||
|
|
@ -130,10 +130,10 @@ extend Class SWWMHandler
|
|||
if ( swwm_resetscore && level.info.flags2&LEVEL2_RESETINVENTORY && !e.IsReturn )
|
||||
c.credits = 0;
|
||||
// re-add any missing collectibles after a death exit (yes, this happens)
|
||||
for ( int i=0; i<s.ownedcollectibles.Size(); i++ )
|
||||
foreach ( oc:s.ownedcollectibles )
|
||||
{
|
||||
if ( p.mo.FindInventory(s.ownedcollectibles[i]) ) continue;
|
||||
let c = SWWMCollectible(Actor.Spawn(s.ownedcollectibles[i],p.mo.pos));
|
||||
if ( p.mo.FindInventory(oc) ) continue;
|
||||
let c = SWWMCollectible(Actor.Spawn(oc,p.mo.pos));
|
||||
c.propagated = true;
|
||||
if ( !c.CallTryPickup(p.mo) )
|
||||
c.Destroy();
|
||||
|
|
|
|||
|
|
@ -37,6 +37,51 @@ extend Class SWWMHandler
|
|||
}
|
||||
}
|
||||
|
||||
override void InterfaceProcess( ConsoleEvent e )
|
||||
{
|
||||
if ( e.IsManual ) return;
|
||||
if ( e.Name ~== "swwmsetdialogue" )
|
||||
SWWMDialogues.StartSeq(e.Args[0]);
|
||||
else if ( e.Name.Left(11) ~== "swwmkeyget." )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
if ( !bar || (bar.CPlayer != players[e.Args[0]]) ) return;
|
||||
String kname = e.Name.Mid(11);
|
||||
Class<Key> k = kname;
|
||||
if ( k )
|
||||
{
|
||||
let kg = new("KeyGet");
|
||||
kg.got = k;
|
||||
kg.flashtime = gametic+25;
|
||||
bar.keyflash.Push(kg);
|
||||
}
|
||||
}
|
||||
else if ( e.Name.Left(15) ~== "swwmwpntooltip." )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
if ( !bar ) return;
|
||||
String wname = e.Name.Mid(15);
|
||||
Class<SWWMWeapon> w = wname;
|
||||
if ( w )
|
||||
{
|
||||
let tt = new("SWWMWeaponTooltip").Init(w);
|
||||
bool appended = false;
|
||||
for ( SWWMWeaponTooltip t=bar.ctip; t; t=t.next )
|
||||
{
|
||||
if ( t.next ) continue;
|
||||
appended = true;
|
||||
t.next = tt;
|
||||
break;
|
||||
}
|
||||
if ( !appended )
|
||||
{
|
||||
bar.ctip = tt;
|
||||
bar.AttachMessage(tt,-2910);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override void NetworkProcess( ConsoleEvent e )
|
||||
{
|
||||
if ( e.Name ~== "swwmgesture" )
|
||||
|
|
@ -343,18 +388,18 @@ extend Class SWWMHandler
|
|||
// if it's an ammo, check the largest unit givable
|
||||
if ( i is 'Ammo' )
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let a = (Class<Ammo>)(AllActorClasses[i]);
|
||||
let a = (Class<Ammo>)(cls);
|
||||
if ( !a || (a.GetParentClass() != item) || (GetDefaultByType(a).Amount < amt) ) continue;
|
||||
amt = GetDefaultByType(a).Amount;
|
||||
}
|
||||
}
|
||||
if ( i is 'MagAmmo' )
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let a = (Class<MagAmmo>)(AllActorClasses[i]);
|
||||
let a = (Class<MagAmmo>)(cls);
|
||||
if ( !a || (a.GetParentClass() != item) || (GetDefaultByType(a).Amount < amt) ) continue;
|
||||
amt = GetDefaultByType(a).Amount;
|
||||
}
|
||||
|
|
@ -457,8 +502,6 @@ extend Class SWWMHandler
|
|||
}
|
||||
else if ( e.Name ~== "swwmccstart" )
|
||||
gdat.ccstartonce = true;
|
||||
else if ( e.Name ~== "swwmcclilith" )
|
||||
gdat.cclilithonce = true;
|
||||
// cheats go here
|
||||
else CheatEvent(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ extend Class SWWMHandler
|
|||
PPShader.SetUniform1f("ZoomBlur","Fade",clamp((spd-20.)/60.,0.,1.));
|
||||
double str = min(spd/40.,15.);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(e.ViewPitch,e.ViewAngle,e.ViewRoll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);
|
||||
Vector3 reldir = (worlddir dot y, worlddir dot z, worlddir dot x);
|
||||
Vector2 centerspot = (.5+reldir.x*.5,.5+reldir.y*.5);
|
||||
if ( reldir.z < 0 )
|
||||
|
|
|
|||
|
|
@ -1,561 +0,0 @@
|
|||
// misc. UI Tick stuff
|
||||
|
||||
extend Class SWWMHandler
|
||||
{
|
||||
ui bool didstartmsg;
|
||||
bool doextramsg;
|
||||
ui bool didextramsg;
|
||||
// april fools special
|
||||
ui bool didaprmsg;
|
||||
// corruption cards stuff
|
||||
ui bool incardmenu, cardmessaged;
|
||||
bool dolilithmsg, doromerobotmsg;
|
||||
ui bool didlilithmsg, didromerobotmsg;
|
||||
|
||||
private ui void MapstartUITick()
|
||||
{
|
||||
if ( !didextramsg && doextramsg )
|
||||
{
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
// angry about phase two
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAEVIB";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 20;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
didextramsg = true;
|
||||
}
|
||||
if ( !didlilithmsg && !gdat.cclilithonce && dolilithmsg )
|
||||
{
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
// saya's live freakout™
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALILITHA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 1050; // give it about 15 seconds for it to happen
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYALILITHB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYALILITHC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYALILITHD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYALILITHE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 50;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
didlilithmsg = true;
|
||||
SendNetworkEvent("swwmcclilith");
|
||||
}
|
||||
if ( !didromerobotmsg && doromerobotmsg )
|
||||
{
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
// rom3r-0 is about to make you his bitch
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAROMEROA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYAROMEROB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAROMEROC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYAROMEROD";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 50;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAROMEROE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 70;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
didromerobotmsg = true;
|
||||
}
|
||||
if ( ccloaded && !gdat.ccstartonce && !cardmessaged && (gamestate == GS_LEVEL) )
|
||||
{
|
||||
let m = Menu.GetCurrentMenu();
|
||||
if ( m && (m.GetClassName() == 'CorruptionCardsSelector') ) incardmenu = true;
|
||||
else if ( incardmenu )
|
||||
{
|
||||
if ( !swwm_ccmessage )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg.seqname = "CYTHOCCA";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 120;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "CYTHOCCB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "CYTHOCCC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 45;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
CVar.GetCVar('swwm_ccmessage').SetBool(true);
|
||||
cardmessaged = true;
|
||||
SendNetworkEvent("swwmccstart");
|
||||
}
|
||||
}
|
||||
if ( didstartmsg ) return;
|
||||
if ( swwm_nomapmsg )
|
||||
{
|
||||
didstartmsg = true;
|
||||
return;
|
||||
}
|
||||
if ( !didaprmsg && (gamestate == GS_LEVEL) )
|
||||
{
|
||||
didaprmsg = true;
|
||||
if ( SystemTime.Format("%d%m",SystemTime.Now()) == "0104" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAFOOL";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 120;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
didstartmsg = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
int whichboss = WhichVanillaBossMap();
|
||||
if ( bossmap == MAP_DE1M8 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAPHOBOS";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_DE2M8 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADEIMOS";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_DE3M8 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADIS";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_DE4M8 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYATHY";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_DMAP07 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADIMPLE";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_DMAP30 )
|
||||
{
|
||||
// rampancy check
|
||||
bool rampancy = false;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() != "Robot_BossBrain" ) continue;
|
||||
rampancy = true;
|
||||
break;
|
||||
}
|
||||
if ( rampancy )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYARAMPANCY";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 250;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAIOS";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
}
|
||||
else if ( bossmap == MAP_DLVL08 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg.seqname = "CYTHONERVE";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_EVMAP30 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAEVIA";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_HE1M8_HE4M8 )
|
||||
{
|
||||
if ( level.mapname ~== "E1M8" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAMAW";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAHEADS";
|
||||
msg.seqcnt = 6;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
}
|
||||
else if ( bossmap == MAP_HE2M8_HE5M8 )
|
||||
{
|
||||
if ( level.mapname ~== "E2M8" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAMASTERS";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYABULLS";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
}
|
||||
else if ( bossmap == MAP_HE3M8 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADSPARIL";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_HMAP38 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACLERICA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYACLERICB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYACLERICC";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
else if ( bossmap == MAP_HMAP36 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAFIGHTER";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_HMAP37 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAMAGE";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_HMAP12 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAHYPO";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_HMAP40 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAKORAXA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAKORAXB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYAKORAXC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAKORAXD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAKORAXE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
else if ( (bossmap == MAP_HMAP23_HMAP27_HMAP48_HMAP55) && (level.mapname ~== "MAP48") )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACONSTABLEA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYACONSTABLEB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYACONSTABLEC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYACONSTABLED";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
else if ( bossmap == MAP_HMAP60 )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADEATHKINGS";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
else if ( bossmap == MAP_NONE ) // gotta get checksums here
|
||||
{
|
||||
String csum = level.GetChecksum();
|
||||
// SIGIL E5M8
|
||||
if ( (csum ~== "3D72FD17F36D2D43FD9A21E6E57EE357")
|
||||
|| (csum ~== "09B30C9DA9D73D3D5A709502FBB947AA")
|
||||
|| (csum ~== "6EAD80DA1F30B4B3546FA294EEF9F87C") )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg.seqname = "CYTHOSIGIL";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// Doom 2 MAP11
|
||||
else if ( (csum ~== "73D9E03CEE7BF1A97EFD2EAD86688EF8")
|
||||
|| (csum ~== "F4F2A769609988837458772AAE99008C")
|
||||
|| (csum ~== "DF6A001A6C42DB5CCA599EE5883B294A") )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACIRCLE";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// Doom 2 MAP20
|
||||
else if ( (csum ~== "8898F5EC9CBDCD98019A1BC1BF892A8A")
|
||||
|| (csum ~== "CC53CFFCB30E873669AA2F09DA0D3566") )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAGOTCHA";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// Eviternity
|
||||
// MAP05
|
||||
else if ( csum ~== "33B8501B10CE5E2555C03725F765A914" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADMN";
|
||||
msg.seqcnt = 8;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// MAP10
|
||||
else if ( csum ~== "9E83602D325677B8D7C3BC44BEF9B03F" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACRE";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// MAP15
|
||||
else if ( csum ~== "CA40E6DDAB6B5C924CDC36B1F851421E" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACRY";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// MAP20
|
||||
else if ( csum ~== "F34B3FD4D13AC763469A8E0D7379B9D0" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACON";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// MAP25
|
||||
else if ( csum ~== "196BC735473C593F924A59B238574C35" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYASLA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 120;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
}
|
||||
// Deathkings
|
||||
// Blight
|
||||
else if ( csum ~== "E3EFB0156A20ADF2DF00915A0EA85DF5" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYABLIGHTA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYABLIGHTB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 5;
|
||||
msg2.enddelay = 15;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYABLIGHTC";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
// Nave
|
||||
else if ( csum ~== "E2B5D1400279335811C1C1C0B437D9C8" )
|
||||
{
|
||||
let msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYANAVEA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
let msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYANAVEB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYANAVEC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 5;
|
||||
msg2.enddelay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYANAVED";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYANAVEE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYANAVEF";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
}
|
||||
}
|
||||
didstartmsg = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,8 +49,7 @@ Class ROM3R0Message : Inventory
|
|||
if ( Owner.InStateSequence(Owner.CurState,Owner.SeeState) )
|
||||
{
|
||||
Console.PrintfEx(PRINT_CHAT,StringTable.Localize("$BOSSLINE_ROM3R0"));
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( hnd ) hnd.doromerobotmsg = true;
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_ROMERO);
|
||||
DepleteOrDestroy();
|
||||
return;
|
||||
}
|
||||
|
|
@ -460,7 +459,7 @@ extend Class SWWMHandler
|
|||
bosstag = "$BT_ARCHANGELUS";
|
||||
e.Thing.GiveInventory('BossMarker',1);
|
||||
e.Thing.GiveInventory('EndgameBossMarker',1);
|
||||
doextramsg = true;
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_EVIB);
|
||||
}
|
||||
}
|
||||
if ( ccloaded && (e.Thing.GetClassName() == "CCards_Boss_Romero") )
|
||||
|
|
@ -478,10 +477,10 @@ extend Class SWWMHandler
|
|||
{
|
||||
if ( initialized ) return;
|
||||
// wait until bosses are active
|
||||
for ( int i=0; i<bossactors.Size(); i++ )
|
||||
foreach ( a:bossactors )
|
||||
{
|
||||
if ( !bossactors[i] ) continue;
|
||||
if ( (!bossactors[i].target || !bossactors[i].CheckSight(bossactors[i].target,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
|
||||
if ( !a ) continue;
|
||||
if ( (!a.target || !a.CheckSight(a.target,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
|
||||
&& (!bossviewactor || (bossviewactor && !bossviewactor.target)) ) continue;
|
||||
initialized = true;
|
||||
// oneliners
|
||||
|
|
@ -515,10 +514,10 @@ extend Class SWWMHandler
|
|||
{
|
||||
ui_initialized = true;
|
||||
thealth = 0;
|
||||
for ( int i=0; i<bossactors.Size(); i++ )
|
||||
foreach ( a:bossactors )
|
||||
{
|
||||
if ( !bossactors[i] ) continue;
|
||||
thealth += max(0,bossactors[i].SpawnHealth());
|
||||
if ( !a ) continue;
|
||||
thealth += max(0,a.SpawnHealth());
|
||||
}
|
||||
hmax = thealth;
|
||||
for ( int i=0; i<30; i++ ) oldhealth[i] = thealth;
|
||||
|
|
@ -532,10 +531,10 @@ extend Class SWWMHandler
|
|||
if ( !ui_initialized ) return;
|
||||
// update healthbar
|
||||
int newhealth = 0;
|
||||
for ( int i=0; i<bossactors.Size(); i++ )
|
||||
foreach ( a:bossactors )
|
||||
{
|
||||
if ( !bossactors[i] ) continue;
|
||||
newhealth += max(0,bossactors[i].Health);
|
||||
if ( !a ) continue;
|
||||
newhealth += max(0,a.Health);
|
||||
}
|
||||
oldhealth[0] = newhealth;
|
||||
int curcumm = max(0,thealth-newhealth);
|
||||
|
|
|
|||
|
|
@ -19,13 +19,6 @@ Class RampancyLogonDummy : Actor
|
|||
|
||||
extend Class SWWMHandler
|
||||
{
|
||||
// list contains a sector that belongs to each portal group
|
||||
// used to ease some portal-aware functions
|
||||
Array<int> psectors;
|
||||
|
||||
// for minimap
|
||||
Array<int> ffsectors;
|
||||
|
||||
bool maphaskeys;
|
||||
|
||||
// level end stats
|
||||
|
|
@ -217,9 +210,122 @@ extend Class SWWMHandler
|
|||
}
|
||||
}
|
||||
|
||||
private void MapStartDialogues()
|
||||
{
|
||||
int whichboss = WhichVanillaBossMap();
|
||||
switch ( whichboss )
|
||||
{
|
||||
case MAP_DE1M8:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_PHOBOS);
|
||||
break;
|
||||
case MAP_DE2M8:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_DEIMOS);
|
||||
break;
|
||||
case MAP_DE3M8:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_DIS);
|
||||
break;
|
||||
case MAP_DE4M8:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_THY);
|
||||
break;
|
||||
case MAP_DMAP07:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_DIMPLE);
|
||||
break;
|
||||
case MAP_DMAP30:
|
||||
bool rampancy = false;
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( cls.GetClassName() != "Robot_BossBrain" ) continue;
|
||||
rampancy = true;
|
||||
break;
|
||||
}
|
||||
if ( rampancy ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_RAMPANCY);
|
||||
else SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_IOS);
|
||||
break;
|
||||
case MAP_DLVL08:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_NERVE);
|
||||
break;
|
||||
case MAP_EVMAP30:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_EVIA);
|
||||
break;
|
||||
case MAP_HE1M8_HE4M8:
|
||||
if ( level.mapname ~== "E1M8" ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_MAW);
|
||||
else SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_HEADS);
|
||||
break;
|
||||
case MAP_HE2M8_HE5M8:
|
||||
if ( level.mapname ~== "E2M8" ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_PORTALS);
|
||||
else SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_BULLS);
|
||||
break;
|
||||
case MAP_HE3M8:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_DSPARIL);
|
||||
break;
|
||||
case MAP_HMAP38:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_CLERIC);
|
||||
break;
|
||||
case MAP_HMAP36:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_FIGHTER);
|
||||
break;
|
||||
case MAP_HMAP37:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_MAGE);
|
||||
break;
|
||||
case MAP_HMAP12:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_HYPO);
|
||||
break;
|
||||
case MAP_HMAP40:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_KORAX);
|
||||
break;
|
||||
case MAP_HMAP23_HMAP27_HMAP48_HMAP55:
|
||||
if ( level.mapname ~== "MAP48" ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_CONSTABLE);
|
||||
break;
|
||||
case MAP_HMAP60:
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_DEATHKINGS);
|
||||
break;
|
||||
case MAP_NONE:
|
||||
String csum = level.GetChecksum();
|
||||
// SIGIL E5M8
|
||||
if ( (csum ~== "3D72FD17F36D2D43FD9A21E6E57EE357")
|
||||
|| (csum ~== "09B30C9DA9D73D3D5A709502FBB947AA")
|
||||
|| (csum ~== "6EAD80DA1F30B4B3546FA294EEF9F87C") )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_SIGIL);
|
||||
// Doom 2 MAP11
|
||||
else if ( (csum ~== "73D9E03CEE7BF1A97EFD2EAD86688EF8")
|
||||
|| (csum ~== "F4F2A769609988837458772AAE99008C")
|
||||
|| (csum ~== "DF6A001A6C42DB5CCA599EE5883B294A") )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_CIRCLE);
|
||||
// Doom 2 MAP20
|
||||
else if ( (csum ~== "8898F5EC9CBDCD98019A1BC1BF892A8A")
|
||||
|| (csum ~== "CC53CFFCB30E873669AA2F09DA0D3566") )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_GOTCHA);
|
||||
// Eviternity
|
||||
// MAP05
|
||||
else if ( csum ~== "33B8501B10CE5E2555C03725F765A914" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_DMN);
|
||||
// MAP10
|
||||
else if ( csum ~== "9E83602D325677B8D7C3BC44BEF9B03F" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_CRE);
|
||||
// MAP15
|
||||
else if ( csum ~== "CA40E6DDAB6B5C924CDC36B1F851421E" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_CRY);
|
||||
// MAP20
|
||||
else if ( csum ~== "F34B3FD4D13AC763469A8E0D7379B9D0" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_CON);
|
||||
// MAP25
|
||||
else if ( csum ~== "196BC735473C593F924A59B238574C35" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_SLA);
|
||||
// Deathkings
|
||||
// Blight
|
||||
else if ( csum ~== "E3EFB0156A20ADF2DF00915A0EA85DF5" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_BLIGHT);
|
||||
// Nave
|
||||
else if ( csum ~== "E2B5D1400279335811C1C1C0B437D9C8" )
|
||||
SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_NAVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
override void WorldLoaded( WorldEvent e )
|
||||
{
|
||||
if ( e.IsReopen ) return;
|
||||
MapStartDialogues();
|
||||
if ( gamestate != GS_TITLELEVEL )
|
||||
{
|
||||
if ( (level.GetChecksum() ~== "D0E5ECD94BD38DF33F25515C00148693")
|
||||
|
|
@ -268,9 +374,9 @@ extend Class SWWMHandler
|
|||
// since KDiKDiZD requires software rendering, while this is a
|
||||
// hardware-only mod... but hey, they can sort-of-work together
|
||||
// (with broken visual effects, but still... somewhat working)
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
if ( AllClasses[i].GetClassName() != 'KdikdizdCompatEventHandler' )
|
||||
if ( cls.GetClassName() != 'KdikdizdCompatEventHandler' )
|
||||
continue;
|
||||
ti = ThinkerIterator.Create("Thinker");
|
||||
Thinker t;
|
||||
|
|
@ -285,36 +391,12 @@ extend Class SWWMHandler
|
|||
// setup cached lockdefs data
|
||||
let cli = SWWMCachedLockInfo.GetInstance();
|
||||
if ( cli.ent.Size() == 0 ) SetupLockdefsCache(cli);
|
||||
// keep a list of sectors containing 3D floors, for use by the minimap
|
||||
// also does the same for the portal group list
|
||||
ffsectors.Clear();
|
||||
psectors.Clear();
|
||||
for ( int i=0; i<level.sectors.Size(); i++ )
|
||||
{
|
||||
Sector s = level.sectors[i];
|
||||
if ( psectors.Size() <= s.portalgroup )
|
||||
psectors.Resize(s.portalgroup+1);
|
||||
psectors[s.portalgroup] = s.Index();
|
||||
if ( !s.Get3DFloorCount() ) continue;
|
||||
int realcount = 0;
|
||||
for ( int j=0; j<s.Get3DFloorCount(); j++ )
|
||||
{
|
||||
F3DFloor rover = s.Get3DFloor(j);
|
||||
if ( rover.flags&F3DFloor.FF_THISINSIDE ) continue;
|
||||
if ( !(rover.flags&F3DFloor.FF_EXISTS) ) continue;
|
||||
if ( rover.alpha == 0 ) continue;
|
||||
realcount++;
|
||||
}
|
||||
if ( !realcount ) continue;
|
||||
ffsectors.Push(s.Index());
|
||||
}
|
||||
// for skipping over merged exit lines (sharing vertices)
|
||||
Array<Line> skipme;
|
||||
skipme.Clear();
|
||||
// find exit lines, and use lines that aren't exits
|
||||
for ( int i=0; i<level.lines.Size(); i++ )
|
||||
foreach ( l:level.Lines )
|
||||
{
|
||||
Line l = level.lines[i];
|
||||
// all lines are immediately visible in DM
|
||||
if ( deathmatch && !(l.flags&Line.ML_DONTDRAW) )
|
||||
l.flags |= Line.ML_MAPPED;
|
||||
|
|
@ -340,15 +422,14 @@ extend Class SWWMHandler
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int j=0; j<l.frontsector.Lines.Size(); j++ )
|
||||
foreach ( l2:l.frontsector.Lines )
|
||||
{
|
||||
let l2 = l.frontsector.Lines[j];
|
||||
if ( (l2.special != l.special) || (con.Find(l2) < con.Size()) ) continue;
|
||||
// needs to have a point in common with this one or any of the added lines
|
||||
bool nomatches = true;
|
||||
for ( int k=0; k<con.Size(); k++ )
|
||||
foreach ( c:con )
|
||||
{
|
||||
if ( (l2.v1 != con[k].v1) && (l2.v2 != con[k].v2) && (l2.v1 != con[k].v2) && (l2.v2 != con[k].v1) )
|
||||
if ( (l2.v1 != c.v1) && (l2.v2 != c.v2) && (l2.v1 != c.v2) && (l2.v2 != c.v1) )
|
||||
continue;
|
||||
nomatches = false;
|
||||
break;
|
||||
|
|
@ -366,15 +447,14 @@ extend Class SWWMHandler
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int j=0; j<l.backsector.Lines.Size(); j++ )
|
||||
foreach ( l2:l.backsector.Lines )
|
||||
{
|
||||
let l2 = l.backsector.Lines[j];
|
||||
if ( (l2.special != l.special) || (con.Find(l2) < con.Size()) ) continue;
|
||||
// needs to have a point in common with this one or any of the added lines
|
||||
bool nomatches = true;
|
||||
for ( int k=0; k<skipme.Size(); k++ )
|
||||
foreach ( s:skipme )
|
||||
{
|
||||
if ( (l2.v1 != skipme[k].v1) && (l2.v2 != skipme[k].v2) && (l2.v1 != skipme[k].v2) && (l2.v2 != skipme[k].v1) )
|
||||
if ( (l2.v1 != s.v1) && (l2.v2 != s.v2) && (l2.v1 != s.v2) && (l2.v2 != s.v1) )
|
||||
continue;
|
||||
nomatches = false;
|
||||
break;
|
||||
|
|
@ -388,8 +468,8 @@ extend Class SWWMHandler
|
|||
while ( found > 0 );
|
||||
}
|
||||
Vector3 lpos = (0,0,0);
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
lpos += SWWMUtility.UseLinePos(con[i]);
|
||||
foreach ( c:con )
|
||||
lpos += SWWMUtility.UseLinePos(c);
|
||||
lpos /= con.Size();
|
||||
SWWMInterest.Spawn(self,lpos,theline:l,theexit:exittype);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -396,7 +396,10 @@ extend Class SWWMHandler
|
|||
e.Thing.ActiveSound = "grunt/active";
|
||||
}
|
||||
else if ( ccloaded && (e.Thing.GetClassName() == "CCards_Token_Glitched") )
|
||||
dolilithmsg = true;
|
||||
{
|
||||
if ( !gdat.cclilithonce ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_LILITH);
|
||||
gdat.cclilithonce = true;
|
||||
}
|
||||
if ( SWWMUtility.IdentifyingDog(e.Thing) || SWWMUtility.IdentifyingCaco(e.Thing)
|
||||
|| SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -306,9 +306,8 @@ extend Class SWWMHandler
|
|||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
// we need to refer to the suckables array to find missiles
|
||||
for ( int i=0; i<suckableactors.Size(); i++ )
|
||||
foreach ( a:suckableactors )
|
||||
{
|
||||
let a = suckableactors[i];
|
||||
if ( !a || !a.bMISSILE ) continue;
|
||||
Vector2 rv = a.pos.xy-players[consoleplayer].Camera.pos.xy;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
|
|
@ -317,9 +316,8 @@ extend Class SWWMHandler
|
|||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
for ( int i=0; i<beams.Size(); i++ )
|
||||
foreach ( a:beams )
|
||||
{
|
||||
let a = beams[i];
|
||||
if ( !a ) continue;
|
||||
Vector2 rv = a.pos.xy-players[consoleplayer].Camera.pos.xy;
|
||||
double rad = SWWMUtility.IsYBeam(a)?(a.scale.y*cos(a.pitch-90)):(a.speed*cos(a.pitch));
|
||||
|
|
@ -330,63 +328,58 @@ extend Class SWWMHandler
|
|||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
bt.Destroy();
|
||||
if ( psectors.Size() > 1 )
|
||||
// oh boy here we go
|
||||
int thisgroup = players[consoleplayer].Camera.CurSector.portalgroup;
|
||||
for ( int i=0; i<level.GetPortalGroupCount(); i++ )
|
||||
{
|
||||
// oh boy here we go
|
||||
int thisgroup = players[consoleplayer].Camera.CurSector.portalgroup;
|
||||
for ( int i=0; i<psectors.Size(); i++ )
|
||||
if ( i == thisgroup ) continue;
|
||||
Vector2 relpos = players[consoleplayer].Camera.pos.xy+level.GetDisplacement(thisgroup,i);
|
||||
if ( bt ) bt.Destroy();
|
||||
bt = BlockThingsIterator.CreateFromPos(relpos.x,relpos.y,players[consoleplayer].Camera.pos.z,players[consoleplayer].Camera.pos.z+players[consoleplayer].Camera.height,viewdist,false);
|
||||
while ( bt.Next() )
|
||||
{
|
||||
if ( i == thisgroup ) continue;
|
||||
Vector2 relpos = players[consoleplayer].Camera.pos.xy+SWWMUtility.PortalDisplacement(level.Sectors[psectors[thisgroup]],level.Sectors[psectors[i]]);
|
||||
if ( bt ) bt.Destroy();
|
||||
bt = BlockThingsIterator.CreateFromPos(relpos.x,relpos.y,players[consoleplayer].Camera.pos.z,players[consoleplayer].Camera.pos.z+players[consoleplayer].Camera.height,viewdist,false);
|
||||
while ( bt.Next() )
|
||||
{
|
||||
let a = bt.Thing;
|
||||
if ( !a ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
continue;
|
||||
if ( a == players[consoleplayer].Camera )
|
||||
continue;
|
||||
if ( a is 'GhostTarget' )
|
||||
continue;
|
||||
if ( !a.player && !a.bSOLID && !a.bSHOOTABLE && !a.bISMONSTER && !a.bFRIENDLY && !(a is 'Inventory') && !(a is 'Chancebox') )
|
||||
continue;
|
||||
if ( !level.allmap && !(deathmatch && (a is 'Inventory') && !a.bDROPPED) && !a.IsFriend(players[consoleplayer].mo) && !a.CheckSight(players[consoleplayer].Camera,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
if ( a.bKILLED || (a.Health <= 0) || a.bUnmorphed )
|
||||
continue;
|
||||
if ( (a is 'Inventory') && (!a.bSPECIAL || Inventory(a).Owner) )
|
||||
continue;
|
||||
if ( (a is 'Chancebox') && (a.CurState != a.SpawnState) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
// we need to refer to the suckables array to find missiles
|
||||
for ( int i=0; i<suckableactors.Size(); i++ )
|
||||
{
|
||||
let a = suckableactors[i];
|
||||
if ( !a || !a.bMISSILE ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
continue;
|
||||
if ( !level.allmap && !(a.target && a.target.IsFriend(players[consoleplayer].mo)) && !a.CheckSight(players[consoleplayer].Camera,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
for ( int i=0; i<beams.Size(); i++ )
|
||||
{
|
||||
let a = beams[i];
|
||||
if ( !a ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
double rad = SWWMUtility.IsYBeam(a)?(a.scale.y*cos(a.pitch-90)):(a.speed*cos(a.pitch));
|
||||
if ( max(abs(rv.x)-rad,abs(rv.y)-rad) > viewdist )
|
||||
continue;
|
||||
if ( !level.allmap && !(a.target && a.target.IsFriend(players[consoleplayer].mo)) && !a.CheckSight(players[consoleplayer].Camera,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
let a = bt.Thing;
|
||||
if ( !a ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
continue;
|
||||
if ( a == players[consoleplayer].Camera )
|
||||
continue;
|
||||
if ( a is 'GhostTarget' )
|
||||
continue;
|
||||
if ( !a.player && !a.bSOLID && !a.bSHOOTABLE && !a.bISMONSTER && !a.bFRIENDLY && !(a is 'Inventory') && !(a is 'Chancebox') )
|
||||
continue;
|
||||
if ( !level.allmap && !(deathmatch && (a is 'Inventory') && !a.bDROPPED) && !a.IsFriend(players[consoleplayer].mo) && !a.CheckSight(players[consoleplayer].Camera,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
if ( a.bKILLED || (a.Health <= 0) || a.bUnmorphed )
|
||||
continue;
|
||||
if ( (a is 'Inventory') && (!a.bSPECIAL || Inventory(a).Owner) )
|
||||
continue;
|
||||
if ( (a is 'Chancebox') && (a.CurState != a.SpawnState) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
// we need to refer to the suckables array to find missiles
|
||||
foreach ( a:suckableactors )
|
||||
{
|
||||
if ( !a || !a.bMISSILE ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
if ( max(abs(rv.x)-a.radius,abs(rv.y)-a.radius) > viewdist )
|
||||
continue;
|
||||
if ( !level.allmap && !(a.target && a.target.IsFriend(players[consoleplayer].mo)) && !a.CheckSight(players[consoleplayer].Camera,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
foreach ( a:beams )
|
||||
{
|
||||
if ( !a ) continue;
|
||||
Vector2 rv = a.pos.xy-relpos;
|
||||
double rad = SWWMUtility.IsYBeam(a)?(a.scale.y*cos(a.pitch-90)):(a.speed*cos(a.pitch));
|
||||
if ( max(abs(rv.x)-rad,abs(rv.y)-rad) > viewdist )
|
||||
continue;
|
||||
if ( !level.allmap && !(a.target && a.target.IsFriend(players[consoleplayer].mo)) && !a.CheckSight(players[consoleplayer].Camera,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
SWWMSimpleTracker.Track(self,a);
|
||||
}
|
||||
}
|
||||
SWWMSimpleTracker trk = strackers;
|
||||
|
|
|
|||
|
|
@ -119,12 +119,12 @@ extend Class SWWMStaticHandler
|
|||
dat.Replace("\r","");
|
||||
list.Clear();
|
||||
dat.Split(list,"\n");
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
foreach ( l:list )
|
||||
{
|
||||
if ( (list[i].Length() == 0) || (list[i].Left(1) == "#") || (list[i].Left(1) == "") )
|
||||
if ( (l.Length() == 0) || (l.Left(1) == "#") || (l.Left(1) == "") )
|
||||
continue;
|
||||
ln.Clear();
|
||||
list[i].Split(ln,",",0);
|
||||
l.Split(ln,",",0);
|
||||
// game filtering
|
||||
if ( !(gameinfo.gametype&GAME_DOOM) && (ln[3] ~== "doom") ) continue;
|
||||
else if ( !(gameinfo.gametype&GAME_HERETIC) && (ln[3] ~== "heretic") ) continue;
|
||||
|
|
@ -142,9 +142,9 @@ extend Class SWWMStaticHandler
|
|||
if ( (ac.maxval == -1) && (ac.basename == "allcoll") )
|
||||
{
|
||||
int nc = 0;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let c = (Class<SWWMCollectible>)(AllActorClasses[i]);
|
||||
let c = (Class<SWWMCollectible>)(cls);
|
||||
if ( !c || (c == 'SWWMCollectible') ) continue;
|
||||
let def = GetDefaultByType(c);
|
||||
// check that we can collect it in this IWAD
|
||||
|
|
@ -212,29 +212,29 @@ extend Class SWWMStaticHandler
|
|||
Array<String> keys;
|
||||
keys.Clear();
|
||||
statestr.Split(keys,",");
|
||||
for ( int i=0; i<keys.Size(); i++ )
|
||||
foreach ( k:keys )
|
||||
{
|
||||
int colon = keys[i].IndexOf(":");
|
||||
int colon = k.IndexOf(":");
|
||||
// no value separator?
|
||||
if ( colon == -1 )
|
||||
{
|
||||
CreateAchievements();
|
||||
return;
|
||||
}
|
||||
achievementstate.Insert(keys[i].Left(colon),keys[i].Mid(colon+1));
|
||||
achievementstate.Insert(k.Left(colon),k.Mid(colon+1));
|
||||
}
|
||||
keys.Clear();
|
||||
progstr.Split(keys,",");
|
||||
for ( int i=0; i<keys.Size(); i++ )
|
||||
foreach ( k:keys )
|
||||
{
|
||||
int colon = keys[i].IndexOf(":");
|
||||
int colon = k.IndexOf(":");
|
||||
// no value separator?
|
||||
if ( colon == -1 )
|
||||
{
|
||||
CreateAchievements();
|
||||
return;
|
||||
}
|
||||
achievementprogress.Insert(keys[i].Left(colon),keys[i].Mid(colon+1));
|
||||
achievementprogress.Insert(k.Left(colon),k.Mid(colon+1));
|
||||
}
|
||||
// load achievement info and trim any bogus keys, as well as adding any new ones that are missing
|
||||
ParseAchievementList(achievementinfo);
|
||||
|
|
@ -243,9 +243,9 @@ extend Class SWWMStaticHandler
|
|||
{
|
||||
String key = di.Key();
|
||||
bool deleteme = true;
|
||||
for ( int i=0; i<achievementinfo.Size(); i++ )
|
||||
foreach ( inf:achievementinfo )
|
||||
{
|
||||
if ( achievementinfo[i].basename != key ) continue;
|
||||
if ( inf.basename != key ) continue;
|
||||
deleteme = false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -260,10 +260,10 @@ extend Class SWWMStaticHandler
|
|||
{
|
||||
String key = di.Key();
|
||||
bool deleteme = true;
|
||||
for ( int i=0; i<achievementinfo.Size(); i++ )
|
||||
foreach ( inf:achievementinfo )
|
||||
{
|
||||
if ( achievementinfo[i].basename != key ) continue;
|
||||
if ( !achievementinfo[i].maxval ) continue;
|
||||
if ( inf.basename != key ) continue;
|
||||
if ( !inf.maxval ) continue;
|
||||
deleteme = false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -273,17 +273,17 @@ extend Class SWWMStaticHandler
|
|||
achievementprogress.Remove(key);
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<achievementinfo.Size(); i++ )
|
||||
foreach ( inf:achievementinfo )
|
||||
{
|
||||
if ( achievementstate.At(achievementinfo[i].basename) == "" )
|
||||
if ( achievementstate.At(inf.basename) == "" )
|
||||
{
|
||||
if ( developer >= 2 ) Console.Printf("Adding missing achievement state %s",achievementinfo[i].basename);
|
||||
achievementstate.Insert(achievementinfo[i].basename,"0");
|
||||
if ( developer >= 2 ) Console.Printf("Adding missing achievement state %s",inf.basename);
|
||||
achievementstate.Insert(inf.basename,"0");
|
||||
}
|
||||
if ( achievementinfo[i].maxval && (achievementprogress.At(achievementinfo[i].basename) == "") )
|
||||
if ( inf.maxval && (achievementprogress.At(inf.basename) == "") )
|
||||
{
|
||||
if ( developer >= 2 ) Console.Printf("Adding missing achievement progress %s",achievementinfo[i].basename);
|
||||
achievementprogress.Insert(achievementinfo[i].basename,"0");
|
||||
if ( developer >= 2 ) Console.Printf("Adding missing achievement progress %s",inf.basename);
|
||||
achievementprogress.Insert(inf.basename,"0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -334,11 +334,11 @@ extend Class SWWMStaticHandler
|
|||
achievementstate = Dictionary.Create();
|
||||
achievementprogress = Dictionary.Create();
|
||||
ParseAchievementList(achievementinfo);
|
||||
for ( int i=0; i<achievementinfo.Size(); i++ )
|
||||
foreach ( inf:achievementinfo )
|
||||
{
|
||||
achievementstate.Insert(achievementinfo[i].basename,"0");
|
||||
if ( !achievementinfo[i].maxval ) continue;
|
||||
achievementprogress.Insert(achievementinfo[i].basename,"0");
|
||||
achievementstate.Insert(inf.basename,"0");
|
||||
if ( !inf.maxval ) continue;
|
||||
achievementprogress.Insert(inf.basename,"0");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -349,17 +349,17 @@ extend Class SWWMStaticHandler
|
|||
achievementprogress = Dictionary.Create();
|
||||
ParseAchievementList(achievementinfo);
|
||||
CVar cv;
|
||||
for ( int i=0; i<achievementinfo.Size(); i++ )
|
||||
foreach ( inf:achievementinfo )
|
||||
{
|
||||
String val = "0";
|
||||
cv = CVar.FindCVar("swwm_achievement_"..achievementinfo[i].basename);
|
||||
cv = CVar.FindCVar("swwm_achievement_"..inf.basename);
|
||||
if ( cv ) val = cv.GetString();
|
||||
achievementstate.Insert(achievementinfo[i].basename,val);
|
||||
if ( !achievementinfo[i].maxval ) continue;
|
||||
achievementstate.Insert(inf.basename,val);
|
||||
if ( !inf.maxval ) continue;
|
||||
val = "0";
|
||||
cv = CVar.FindCVar("swwm_progress_"..achievementinfo[i].basename);
|
||||
cv = CVar.FindCVar("swwm_progress_"..inf.basename);
|
||||
if ( cv ) val = cv.GetString();
|
||||
achievementprogress.Insert(achievementinfo[i].basename,val);
|
||||
achievementprogress.Insert(inf.basename,val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
994
zscript/hud/swwm_dialogue.zsc
Normal file
994
zscript/hud/swwm_dialogue.zsc
Normal file
|
|
@ -0,0 +1,994 @@
|
|||
// dialogue sequences
|
||||
enum SWWMDialogue
|
||||
{
|
||||
SWWMDLG_None = 0, // dummy
|
||||
SWWMDLG_PHOBOS,
|
||||
SWWMDLG_DEIMOS,
|
||||
SWWMDLG_DIS,
|
||||
SWWMDLG_THY,
|
||||
SWWMDLG_SIGIL,
|
||||
SWWMDLG_DIMPLE,
|
||||
SWWMDLG_CIRCLE,
|
||||
SWWMDLG_GOTCHA,
|
||||
SWWMDLG_GOTCHAEND,
|
||||
SWWMDLG_IOS,
|
||||
SWWMDLG_RAMPANCY,
|
||||
SWWMDLG_NERVE,
|
||||
SWWMDLG_DMN,
|
||||
SWWMDLG_CRE,
|
||||
SWWMDLG_CRY,
|
||||
SWWMDLG_CON,
|
||||
SWWMDLG_SLA,
|
||||
SWWMDLG_EVIA,
|
||||
SWWMDLG_EVIB,
|
||||
SWWMDLG_MAW,
|
||||
SWWMDLG_PORTALS,
|
||||
SWWMDLG_DSPARIL,
|
||||
SWWMDLG_HEADS,
|
||||
SWWMDLG_BULLS,
|
||||
SWWMDLG_GREET,
|
||||
SWWMDLG_BLOOD,
|
||||
SWWMDLG_HYPO,
|
||||
SWWMDLG_WORSHIP,
|
||||
SWWMDLG_GAME,
|
||||
SWWMDLG_MASTERS,
|
||||
SWWMDLG_FIGHTER,
|
||||
SWWMDLG_CLERIC,
|
||||
SWWMDLG_MAGE,
|
||||
SWWMDLG_KORAX,
|
||||
SWWMDLG_BLIGHT,
|
||||
SWWMDLG_CONSTABLE,
|
||||
SWWMDLG_NAVE,
|
||||
SWWMDLG_DEATHKINGS,
|
||||
SWWMDLG_PUZZLE1,
|
||||
SWWMDLG_PUZZLE2,
|
||||
SWWMDLG_PUZZLE3,
|
||||
SWWMDLG_PUZZLE4,
|
||||
SWWMDLG_PUZZLE5,
|
||||
SWWMDLG_PUZZLE6,
|
||||
SWWMDLG_PUZZLE7,
|
||||
SWWMDLG_PUZZLE8,
|
||||
SWWMDLG_PUZZLE9,
|
||||
SWWMDLG_CHEATS,
|
||||
SWWMDLG_WASTE1,
|
||||
SWWMDLG_WASTE2,
|
||||
SWWMDLG_WASTE3,
|
||||
SWWMDLG_WASTE4,
|
||||
SWWMDLG_WASTE5,
|
||||
SWWMDLG_WASTE6,
|
||||
SWWMDLG_LEVER1,
|
||||
SWWMDLG_LEVER2,
|
||||
SWWMDLG_LEVER3,
|
||||
SWWMDLG_LEVER4,
|
||||
SWWMDLG_LEVER5,
|
||||
SWWMDLG_LEVER6,
|
||||
SWWMDLG_LEVER7,
|
||||
SWWMDLG_FOOL,
|
||||
SWWMDLG_CC,
|
||||
SWWMDLG_LILITH,
|
||||
SWWMDLG_ROMERO,
|
||||
NUM_SWWMDLG
|
||||
};
|
||||
|
||||
// this immense string of spaghetti code should be proof enough of the fact I did not think things through when writing the message system
|
||||
Class SWWMDialogues abstract
|
||||
{
|
||||
// try to work around "too many registers" by splitting the pasta into chunks
|
||||
private static ui void StartSeq_SubA( int dlg )
|
||||
{
|
||||
SWWMDirectMessage msg, msg2;
|
||||
switch ( dlg )
|
||||
{
|
||||
case SWWMDLG_PHOBOS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAPHOBOS";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_DEIMOS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADEIMOS";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_DIS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADIS";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_THY:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYATHY";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_SIGIL:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg.seqname = "CYTHOSIGIL";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_DIMPLE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADIMPLE";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_CIRCLE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACIRCLE";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_GOTCHA:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAGOTCHA";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_GOTCHAEND:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAGOTCHAEND";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_IOS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAIOS";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_RAMPANCY:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYARAMPANCY";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 250;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_NERVE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg.seqname = "CYTHONERVE";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_DMN:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADMN";
|
||||
msg.seqcnt = 8;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_CRE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACRE";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_CRY:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACRY";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_CON:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACON";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_SLA:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYASLA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 120;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_EVIA:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAEVIA";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_EVIB:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAEVIB";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 20;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private static ui void StartSeq_SubB( int dlg )
|
||||
{
|
||||
SWWMDirectMessage msg, msg2;
|
||||
switch ( dlg )
|
||||
{
|
||||
case SWWMDLG_MAW:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAMAW";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PORTALS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAPORTALS";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_DSPARIL:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADSPARIL";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_HEADS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAHEADS";
|
||||
msg.seqcnt = 6;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_BULLS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYABULLS";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_GREET:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAGREETA";
|
||||
msg.seqcnt = 3;
|
||||
msg.delay = 150;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAGREETB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAGREETC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAGREETD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAGREETE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAGREETF";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_BLOOD:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYABLOODA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 220;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYABLOODB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYABLOODC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYABLOODD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_HYPO:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAHYPO";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WORSHIP:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINWORSHIPA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 150;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINWORSHIPB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg2.enddelay = 10;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "KIRINWORSHIPC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 10;
|
||||
msg2.enddelay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINWORSHIPD";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 10;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "KIRINWORSHIPE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg2.enddelay = 10;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINWORSHIPF";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 10;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_GAME:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAGAMEA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 200;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYAGAMEB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAGAMEC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_MASTERS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAMASTERSA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 150;
|
||||
msg.enddelay = 60;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYAMASTERSB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAMASTERSC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYAMASTERSD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAMASTERSE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAMASTERSF";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_FIGHTER:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAFIGHTER";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_CLERIC:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACLERICA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYACLERICB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYACLERICC";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_MAGE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAMAGE";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_KORAX:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAKORAXA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAKORAXB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYAKORAXC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAKORAXD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYAKORAXE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_BLIGHT:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYABLIGHTA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYABLIGHTB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 5;
|
||||
msg2.enddelay = 15;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYABLIGHTC";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_CONSTABLE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYACONSTABLEA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYACONSTABLEB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYACONSTABLEC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYACONSTABLED";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_NAVE:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYANAVEA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYANAVEB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "SAYANAVEC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 5;
|
||||
msg2.enddelay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYANAVED";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "SAYANAVEE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYANAVEF";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_DEATHKINGS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYADEATHKINGS";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private static ui void StartSeq_SubC( int dlg )
|
||||
{
|
||||
SWWMDirectMessage msg, msg2;
|
||||
switch ( dlg )
|
||||
{
|
||||
case SWWMDLG_PUZZLE1:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 90;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PUZZLE2:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEB";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 80;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PUZZLE3:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEC";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 70;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PUZZLE4:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLED";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 70;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PUZZLE5:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEE";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 60;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PUZZLE6:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEF";
|
||||
msg.seqcnt = 3;
|
||||
msg.delay = 60;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINPUZZLEG";
|
||||
msg2.seqcnt = 1;
|
||||
msg.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "KIRINPUZZLEH";
|
||||
msg2.seqcnt = 1;
|
||||
msg.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINPUZZLEI";
|
||||
msg2.seqcnt = 2;
|
||||
msg.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_PUZZLE7:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEJ";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 80;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_PUZZLE8:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLEK";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 60;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "KIRINPUZZLEL";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "KIRINPUZZLEM";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 10;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINPUZZLEN";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "KIRINPUZZLEO";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINPUZZLEP";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
msg2.seqname = "KIRINPUZZLEQ";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_PUZZLE9:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg.seqname = "KIRINPUZZLER";
|
||||
msg.seqcnt = 3;
|
||||
msg.delay = 60;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINPUZZLES";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
msg2.seqname = "KIRINPUZZLET";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "KIRINPUZZLEU";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_CHEATS:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_ZNVSNAME"),StringTable.Localize("$SWWM_ZNVNAME"),"Znv");
|
||||
msg.seqname = "ZNVTXT";
|
||||
msg.seqcnt = 5;
|
||||
msg.znvspecial = true;
|
||||
msg.delay = 80;
|
||||
msg.enddelay = 90;
|
||||
msg.pausedelay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WASTE1:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAWASTEA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 5;
|
||||
msg.startdelay = 10;
|
||||
msg.enddelay = 25;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WASTE2:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAWASTEB";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 10;
|
||||
msg.startdelay = 20;
|
||||
msg.enddelay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WASTE3:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAWASTEC";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 30;
|
||||
msg.startdelay = 15;
|
||||
msg.enddelay = 25;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WASTE4:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAWASTED";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 40;
|
||||
msg.startdelay = 10;
|
||||
msg.enddelay = 20;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WASTE5:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAWASTEE";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 20;
|
||||
msg.startdelay = 10;
|
||||
msg.enddelay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_WASTE6:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAWASTEF";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 50;
|
||||
msg.startdelay = 20;
|
||||
msg.enddelay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER1:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 5;
|
||||
msg.startdelay = 20;
|
||||
msg.enddelay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER2:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERB";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 10;
|
||||
msg.startdelay = 30;
|
||||
msg.enddelay = 40;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER3:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERC";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 30;
|
||||
msg.startdelay = 10;
|
||||
msg.enddelay = 25;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER4:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERD";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 40;
|
||||
msg.startdelay = 10;
|
||||
msg.enddelay = 20;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER5:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERE";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 20;
|
||||
msg.startdelay = 10;
|
||||
msg.enddelay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER6:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERF";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 50;
|
||||
msg.startdelay = 20;
|
||||
msg.enddelay = 30;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_LEVER7:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALEVERG";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 50;
|
||||
msg.startdelay = 30;
|
||||
msg.enddelay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private static ui void StartSeq_SubD( int dlg )
|
||||
{
|
||||
SWWMDirectMessage msg, msg2;
|
||||
switch ( dlg )
|
||||
{
|
||||
case SWWMDLG_FOOL:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAFOOL";
|
||||
msg.seqcnt = 5;
|
||||
msg.delay = 120;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
break;
|
||||
case SWWMDLG_CC:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg.seqname = "CYTHOCCA";
|
||||
msg.seqcnt = 4;
|
||||
msg.delay = 120;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "CYTHOCCB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "CYTHOCCC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 45;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_LILITH:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYALILITHA";
|
||||
msg.seqcnt = 2;
|
||||
msg.delay = 1050; // give it about 15 seconds for it to happen
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYALILITHB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYALILITHC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 20;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYALILITHD";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYALILITHE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 50;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
case SWWMDLG_ROMERO:
|
||||
msg = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg.seqname = "SAYAROMEROA";
|
||||
msg.seqcnt = 1;
|
||||
msg.delay = 50;
|
||||
StatusBar.AttachMessage(msg,-1232);
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYAROMEROB";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 40;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAROMEROC";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 30;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_CYTHOSNAME"),StringTable.Localize("$SWWM_CYTHONAME"),"Cytho");
|
||||
msg2.seqname = "SAYAROMEROD";
|
||||
msg2.seqcnt = 2;
|
||||
msg2.delay = 50;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
msg = msg2;
|
||||
msg2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
msg2.seqname = "SAYAROMEROE";
|
||||
msg2.seqcnt = 1;
|
||||
msg2.delay = 70;
|
||||
msg.nextmsg = msg2;
|
||||
msg.nextdirect = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static ui void StartSeq( int dlg )
|
||||
{
|
||||
if ( swwm_nomapmsg ) return;
|
||||
if ( dlg < SWWMDLG_MAW ) StartSeq_SubA(dlg);
|
||||
else if ( dlg < SWWMDLG_PUZZLE1 ) StartSeq_SubB(dlg);
|
||||
else if ( dlg < SWWMDLG_FOOL ) StartSeq_SubC(dlg);
|
||||
else StartSeq_SubD(dlg);
|
||||
}
|
||||
}
|
||||
|
|
@ -234,167 +234,6 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
|
||||
override bool ProcessMidPrint( Font fnt, String msg, bool bold )
|
||||
{
|
||||
// hack lol
|
||||
if ( msg.Left(15) ~== "swwmwpntooltip." )
|
||||
{
|
||||
String wname = msg.Mid(15);
|
||||
Class<SWWMWeapon> w = wname;
|
||||
if ( w )
|
||||
{
|
||||
let tt = new("SWWMWeaponTooltip").Init(w);
|
||||
bool appended = false;
|
||||
for ( SWWMWeaponTooltip t=ctip; t; t=t.next )
|
||||
{
|
||||
if ( t.next ) continue;
|
||||
appended = true;
|
||||
t.next = tt;
|
||||
break;
|
||||
}
|
||||
if ( !appended )
|
||||
{
|
||||
ctip = tt;
|
||||
AttachMessage(tt,-2910);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if ( msg.Left(11) ~== "swwmkeyget." )
|
||||
{
|
||||
String kname = msg.Mid(11);
|
||||
Class<Key> k = kname;
|
||||
if ( k )
|
||||
{
|
||||
let kg = new("KeyGet");
|
||||
kg.got = k;
|
||||
kg.flashtime = gametic+25;
|
||||
keyflash.Push(kg);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
SWWMDirectMessage m, m2;
|
||||
// more hack
|
||||
if ( msg ~== "swwmultdoom2map20dlg" )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m.seqname = "SAYAGOTCHAEND";
|
||||
m.seqcnt = 5;
|
||||
m.delay = 40;
|
||||
AttachMessage(m,-1232);
|
||||
return true;
|
||||
}
|
||||
else if ( msg.Left(25) ~== "swwmsilverbulleteasteregg" )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
let num = msg.Mid(25).ToInt();
|
||||
switch ( num )
|
||||
{
|
||||
case 1:
|
||||
default:
|
||||
m.seqname = "SAYAWASTEA";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 5;
|
||||
m.startdelay = 10;
|
||||
m.enddelay = 25;
|
||||
break;
|
||||
case 2:
|
||||
m.seqname = "SAYAWASTEB";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 10;
|
||||
m.startdelay = 20;
|
||||
m.enddelay = 30;
|
||||
break;
|
||||
case 3:
|
||||
m.seqname = "SAYAWASTEC";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 30;
|
||||
m.startdelay = 15;
|
||||
m.enddelay = 25;
|
||||
break;
|
||||
case 4:
|
||||
m.seqname = "SAYAWASTED";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 40;
|
||||
m.startdelay = 10;
|
||||
m.enddelay = 20;
|
||||
break;
|
||||
case 5:
|
||||
m.seqname = "SAYAWASTEE";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 20;
|
||||
m.startdelay = 10;
|
||||
m.enddelay = 30;
|
||||
break;
|
||||
case 6:
|
||||
m.seqname = "SAYAWASTEF";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 50;
|
||||
m.startdelay = 20;
|
||||
m.enddelay = 30;
|
||||
break;
|
||||
}
|
||||
AttachMessage(m,-1232);
|
||||
return true;
|
||||
}
|
||||
else if ( msg.Left(22) ~== "swwmquadravoleasteregg" )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
let num = msg.Mid(22).ToInt();
|
||||
switch ( num )
|
||||
{
|
||||
case 1:
|
||||
default:
|
||||
m.seqname = "SAYALEVERA";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 5;
|
||||
m.startdelay = 20;
|
||||
m.enddelay = 50;
|
||||
break;
|
||||
case 2:
|
||||
m.seqname = "SAYALEVERB";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 10;
|
||||
m.startdelay = 30;
|
||||
m.enddelay = 40;
|
||||
break;
|
||||
case 3:
|
||||
m.seqname = "SAYALEVERC";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 30;
|
||||
m.startdelay = 10;
|
||||
m.enddelay = 25;
|
||||
break;
|
||||
case 4:
|
||||
m.seqname = "SAYALEVERD";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 40;
|
||||
m.startdelay = 10;
|
||||
m.enddelay = 20;
|
||||
break;
|
||||
case 5:
|
||||
m.seqname = "SAYALEVERE";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 20;
|
||||
m.startdelay = 10;
|
||||
m.enddelay = 30;
|
||||
break;
|
||||
case 6:
|
||||
m.seqname = "SAYALEVERF";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 50;
|
||||
m.startdelay = 20;
|
||||
m.enddelay = 30;
|
||||
break;
|
||||
case 7:
|
||||
m.seqname = "SAYALEVERG";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 50;
|
||||
m.startdelay = 30;
|
||||
m.enddelay = 50;
|
||||
break;
|
||||
}
|
||||
AttachMessage(m,-1232);
|
||||
return true;
|
||||
}
|
||||
// check for Korax lines, add them to chat (and reply to some of them)
|
||||
bool koraxline = false;
|
||||
if ( msg == StringTable.Localize("$TXT_ACS_MAP02_9_GREET") )
|
||||
|
|
@ -403,81 +242,13 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
EventHandler.SendNetworkEvent("swwmkoraxline",0,consoleplayer);
|
||||
koraxline = true;
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m.seqname = "SAYAGREETA";
|
||||
m.seqcnt = 3;
|
||||
m.delay = 150;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "SAYAGREETB";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "SAYAGREETC";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "SAYAGREETD";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "SAYAGREETE";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "SAYAGREETF";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
}
|
||||
SWWMDialogues.StartSeq(SWWMDLG_GREET);
|
||||
}
|
||||
else if ( msg == StringTable.Localize("$TXT_ACS_MAP13_11_MYSER") )
|
||||
{
|
||||
EventHandler.SendNetworkEvent("swwmkoraxline",1,consoleplayer);
|
||||
koraxline = true;
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m.seqname = "SAYABLOODA";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 220;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "SAYABLOODB";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "SAYABLOODC";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "SAYABLOODD";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
}
|
||||
SWWMDialogues.StartSeq(SWWMDLG_BLOOD);
|
||||
}
|
||||
else if ( msg == StringTable.Localize("$TXT_ACS_MAP22_27_YOUHA") )
|
||||
koraxline = true;
|
||||
|
|
@ -485,27 +256,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
EventHandler.SendNetworkEvent("swwmkoraxline",2,consoleplayer);
|
||||
koraxline = true;
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m.seqname = "SAYAGAMEA";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 200;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "SAYAGAMEB";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "SAYAGAMEC";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
}
|
||||
SWWMDialogues.StartSeq(SWWMDLG_GAME);
|
||||
}
|
||||
else if ( msg == StringTable.Localize("$TXT_ACS_MAP27_8_WORSH") )
|
||||
koraxline = true;
|
||||
|
|
@ -513,51 +264,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
EventHandler.SendNetworkEvent("swwmkoraxline",3,consoleplayer);
|
||||
koraxline = true;
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINWORSHIPA";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 150;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINWORSHIPB";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 40;
|
||||
m2.enddelay = 10;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "KIRINWORSHIPC";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 10;
|
||||
m2.enddelay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINWORSHIPD";
|
||||
m2.seqcnt = 2;
|
||||
m2.delay = 10;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "KIRINWORSHIPE";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m2.enddelay = 10;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINWORSHIPF";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 10;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
}
|
||||
SWWMDialogues.StartSeq(SWWMDLG_WORSHIP);
|
||||
}
|
||||
else if ( msg == StringTable.Localize("$TXT_ACS_MAP35_12_AREYO") )
|
||||
koraxline = true;
|
||||
|
|
@ -565,49 +272,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
EventHandler.SendNetworkEvent("swwmkoraxline",4,consoleplayer);
|
||||
koraxline = true;
|
||||
if ( !swwm_nomapmsg )
|
||||
{
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m.seqname = "SAYAMASTERSA";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 150;
|
||||
m.enddelay = 60;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "SAYAMASTERSB";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "SAYAMASTERSC";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "SAYAMASTERSD";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "SAYAMASTERSE";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 40;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "SAYAMASTERSF";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
}
|
||||
SWWMDialogues.StartSeq(SWWMDLG_MASTERS);
|
||||
}
|
||||
if ( koraxline )
|
||||
{
|
||||
|
|
@ -687,148 +352,31 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
switch ( puzzlecnt )
|
||||
{
|
||||
case 1:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEA";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 90;
|
||||
AttachMessage(m,-1232);
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE1);
|
||||
break;
|
||||
case 2:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEB";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 80;
|
||||
AttachMessage(m,-1232);
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE2);
|
||||
break;
|
||||
case 3:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEC";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 70;
|
||||
AttachMessage(m,-1232);
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE3);
|
||||
break;
|
||||
case 5:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLED";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 70;
|
||||
AttachMessage(m,-1232);
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE4);
|
||||
break;
|
||||
case 8:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEE";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 60;
|
||||
AttachMessage(m,-1232);
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE5);
|
||||
break;
|
||||
case 11:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEF";
|
||||
m.seqcnt = 3;
|
||||
m.delay = 60;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINPUZZLEG";
|
||||
m2.seqcnt = 1;
|
||||
m.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "KIRINPUZZLEH";
|
||||
m2.seqcnt = 1;
|
||||
m.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINPUZZLEI";
|
||||
m2.seqcnt = 2;
|
||||
m.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE6);
|
||||
break;
|
||||
case 20:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEJ";
|
||||
m.seqcnt = 2;
|
||||
m.delay = 80;
|
||||
AttachMessage(m,-1232);
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE7);
|
||||
break;
|
||||
case 30:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLEK";
|
||||
m.seqcnt = 1;
|
||||
m.delay = 60;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "KIRINPUZZLEL";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "KIRINPUZZLEM";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 10;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINPUZZLEN";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "KIRINPUZZLEO";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINPUZZLEP";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_IBUKISNAME"),StringTable.Localize("$SWWM_IBUKINAME"),"Ibuki");
|
||||
m2.seqname = "KIRINPUZZLEQ";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE8);
|
||||
break;
|
||||
case 31:
|
||||
m = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m.seqname = "KIRINPUZZLER";
|
||||
m.seqcnt = 3;
|
||||
m.delay = 60;
|
||||
AttachMessage(m,-1232);
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINPUZZLES";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_KIRINSNAME"),StringTable.Localize("$SWWM_KIRINNAME"),"Kirin");
|
||||
m2.seqname = "KIRINPUZZLET";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 30;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
m = m2;
|
||||
m2 = new("SWWMDirectMessage").Init(StringTable.Localize("$SWWM_SAYASNAME"),StringTable.Localize("$SWWM_SAYANAME"),"Saya");
|
||||
m2.seqname = "KIRINPUZZLEU";
|
||||
m2.seqcnt = 1;
|
||||
m2.delay = 20;
|
||||
m.nextmsg = m2;
|
||||
m.nextdirect = true;
|
||||
SWWMDialogues.StartSeq(SWWMDLG_PUZZLE9);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1120,22 +668,8 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
}
|
||||
lastwep = CPlayer.PendingWeapon;
|
||||
// make sure vanilla nametags don't display
|
||||
DetachMessageID(0x5745504e); // WEPN
|
||||
DetachMessageID(0x53494e56); // SINV
|
||||
// also try with different endianness, just in case
|
||||
DetachMessageID(0x4e504557); // WEPN
|
||||
DetachMessageID(0x564e4953); // SINV
|
||||
// deathmatch stuff
|
||||
if ( !deathmatch ) return;
|
||||
// forcibly strip these messages
|
||||
// (I decided to drop MP support, so even though there are no
|
||||
// actual spree/multikill announcements in this mod, keeping
|
||||
// the vanilla ones out is important for graphical consistency)
|
||||
DetachMessageID(0x4b535052); // KSPR
|
||||
DetachMessageID(0x5250534b);
|
||||
DetachMessageID(0x4d4b494c); // MKIL
|
||||
DetachMessageID(0x4c494b4d);
|
||||
if ( teamplay )
|
||||
{
|
||||
if ( teamactive.Size() != Teams.Size() ) teamactive.Resize(Teams.Size());
|
||||
|
|
@ -2008,13 +1542,48 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
private bool CheckFFBoundary( Line l )
|
||||
{
|
||||
if ( !hnd || !hnd.ffsectors.Size() ) return false;
|
||||
int frontidx = hnd.ffsectors.Find(l.frontsector.Index());
|
||||
int backidx = hnd.ffsectors.Find(l.backsector.Index());
|
||||
int fcount = l.frontsector.Get3DFloorCount(),
|
||||
bcount = l.backsector.Get3DFloorCount();
|
||||
// no 3D floors, no boundary
|
||||
if ( (frontidx == hnd.ffsectors.Size()) && (backidx == frontidx) )
|
||||
return false;
|
||||
return true;
|
||||
if ( !fcount && !bcount ) return false;
|
||||
int fvalid = 0, bvalid = 0;
|
||||
for ( int i=0; i<fcount; i++ )
|
||||
{
|
||||
F3DFloor ff = l.frontsector.Get3DFloor(i);
|
||||
if ( (ff.flags&F3DFloor.FF_THISINSIDE) || !(ff.flags&F3DFloor.FF_EXISTS) || (ff.alpha == 0) )
|
||||
continue;
|
||||
fvalid++;
|
||||
}
|
||||
for ( int i=0; i<bcount; i++ )
|
||||
{
|
||||
F3DFloor ff = l.backsector.Get3DFloor(i);
|
||||
if ( (ff.flags&F3DFloor.FF_THISINSIDE) || !(ff.flags&F3DFloor.FF_EXISTS) || (ff.alpha == 0) )
|
||||
continue;
|
||||
bvalid++;
|
||||
}
|
||||
// unmatched counts, there's definitely a boundary
|
||||
if ( fvalid != bvalid ) return true;
|
||||
for ( int i=0; i<fcount; i++ )
|
||||
{
|
||||
F3DFloor ff = l.frontsector.Get3DFloor(i);
|
||||
if ( (ff.flags&F3DFloor.FF_THISINSIDE) || !(ff.flags&F3DFloor.FF_EXISTS) || (ff.alpha == 0) )
|
||||
continue;
|
||||
bool found = false;
|
||||
for ( int j=0; j<bcount; j++ )
|
||||
{
|
||||
F3DFloor ff2 = l.frontsector.Get3DFloor(i);
|
||||
if ( (ff2.flags&F3DFloor.FF_THISINSIDE) || !(ff2.flags&F3DFloor.FF_EXISTS) || (ff2.alpha == 0) )
|
||||
continue;
|
||||
if ( (ff.model != ff2.model) || (ff.flags != ff2.flags) )
|
||||
continue;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
// at least one mismatch between sectors, there's a boundary for sure
|
||||
if ( !found ) return true;
|
||||
}
|
||||
// no boundary here
|
||||
return false;
|
||||
}
|
||||
|
||||
private void DrawMapLines( Vector2 basepos )
|
||||
|
|
@ -2023,102 +1592,109 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
double zoomview = MAPVIEWDIST*zoomlevel, zoomclip = CLIPDIST*zoomlevel;
|
||||
Vector2 cpos = SWWMUtility.LerpVector2(players[consoleplayer].Camera.prev.xy,players[consoleplayer].Camera.pos.xy,FracTic);
|
||||
Sector csec = players[consoleplayer].Camera.CurSector;
|
||||
for ( int i=0; i<level.lines.Size(); i++ )
|
||||
int thisgroup = csec.portalgroup;
|
||||
int numgroups = level.GetPortalGroupCount();
|
||||
// draw overlays first
|
||||
for ( int p=numgroups-1; p >= -1; p-- )
|
||||
{
|
||||
Line l = level.lines[i];
|
||||
if ( !(l.flags&Line.ML_MAPPED) && !level.allmap && !am_cheat ) continue;
|
||||
if ( (l.flags&Line.ML_DONTDRAW) && ((am_cheat == 0) || (am_cheat >= 4)) )
|
||||
continue;
|
||||
Vector2 rv1 = l.v1.p-cpos, rv2 = l.v2.p-cpos;
|
||||
bool isportal = false;
|
||||
Sector linesector;
|
||||
if ( l.sidedef[0].flags&Side.WALLF_POLYOBJ ) linesector = level.PointInSector(l.v1.p+l.delta/2.);
|
||||
else linesector = l.frontsector;
|
||||
isportal = (linesector.portalgroup!=csec.portalgroup);
|
||||
if ( isportal )
|
||||
if ( p == thisgroup ) continue;
|
||||
foreach ( l : level.lines )
|
||||
{
|
||||
// portal displacement
|
||||
Vector2 pofs = SWWMUtility.PortalDisplacement(csec,linesector);
|
||||
rv1 -= pofs;
|
||||
rv2 -= pofs;
|
||||
}
|
||||
Vector2 mid = (rv1+rv2)/2.;
|
||||
Vector2 siz = (abs(rv1.x-rv2.x),abs(rv1.y-rv2.y))/2.;
|
||||
if ( (((siz.x+zoomview)-abs(mid.x)) <= 0) || (((siz.y+zoomview)-abs(mid.y)) <= 0) )
|
||||
continue;
|
||||
// flip Y
|
||||
rv1.y *= -1;
|
||||
rv2.y *= -1;
|
||||
// rotate by view
|
||||
rv1 = Actor.RotateVector(rv1,ViewRot.x-90);
|
||||
rv2 = Actor.RotateVector(rv2,ViewRot.x-90);
|
||||
// clip to frame
|
||||
bool visible;
|
||||
[visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2);
|
||||
if ( !visible ) continue;
|
||||
// scale to minimap frame
|
||||
rv1 *= (HALFMAPSIZE/zoomclip)*hs;
|
||||
rv2 *= (HALFMAPSIZE/zoomclip)*hs;
|
||||
// offset to minimap center
|
||||
rv1 += basepos;
|
||||
rv2 += basepos;
|
||||
// get the line color
|
||||
Color col = mm_wallcolor;
|
||||
if ( (l.flags&Line.ML_MAPPED) || am_cheat )
|
||||
{
|
||||
int secwit = CheckSecret(l);
|
||||
int lock = SWWMUtility.GetLineLock(l);
|
||||
if ( secwit == 1 ) col = mm_secretsectorcolor;
|
||||
else if ( secwit == 2 ) col = mm_unexploredsecretcolor;
|
||||
else if ( l.flags&Line.ML_SECRET )
|
||||
if ( !(l.flags&Line.ML_MAPPED) && !level.allmap && !am_cheat ) continue;
|
||||
if ( (l.flags&Line.ML_DONTDRAW) && ((am_cheat == 0) || (am_cheat >= 4)) )
|
||||
continue;
|
||||
Vector2 rv1 = l.v1.p-cpos, rv2 = l.v2.p-cpos;
|
||||
int lgroup;
|
||||
if ( l.sidedef[0].flags&Side.WALLF_POLYOBJ ) lgroup = level.PointInSector(l.v1.p+l.delta/2.).portalgroup;
|
||||
else lgroup = l.frontsector.portalgroup;
|
||||
bool isportal = ((numgroups>0)&&(lgroup!=thisgroup));
|
||||
if ( lgroup == p )
|
||||
{
|
||||
if ( am_cheat && l.backsector && mm_secretwallcolor )
|
||||
col = mm_secretwallcolor;
|
||||
else col = mm_wallcolor;
|
||||
// portal displacement
|
||||
Vector2 pofs = level.GetDisplacement(lgroup,thisgroup);
|
||||
rv1 += pofs;
|
||||
rv2 += pofs;
|
||||
}
|
||||
else if ( mm_interlevelcolor
|
||||
&& ((l.special == Exit_Normal)
|
||||
|| (l.special == Exit_Secret)
|
||||
|| (l.special == Teleport_NewMap)
|
||||
|| (l.special == Teleport_EndGame)) )
|
||||
col = mm_interlevelcolor;
|
||||
else if ( mm_intralevelcolor &&
|
||||
(l.activation&SPAC_PlayerActivate)
|
||||
&& ((l.special == Teleport)
|
||||
|| (l.special == Teleport_NoFog)
|
||||
|| (l.special == Teleport_ZombieChanger)
|
||||
|| (l.special == Teleport_Line)) )
|
||||
col = mm_intralevelcolor;
|
||||
else if ( mm_displaylocks
|
||||
&& (lock > 0) && (lock < 256) )
|
||||
else if ( (p != -1) || (lgroup != thisgroup) )
|
||||
continue;
|
||||
Vector2 mid = (rv1+rv2)/2.;
|
||||
Vector2 siz = (abs(rv1.x-rv2.x),abs(rv1.y-rv2.y))/2.;
|
||||
if ( (((siz.x+zoomview)-abs(mid.x)) <= 0) || (((siz.y+zoomview)-abs(mid.y)) <= 0) )
|
||||
continue;
|
||||
// flip Y
|
||||
rv1.y *= -1;
|
||||
rv2.y *= -1;
|
||||
// rotate by view
|
||||
rv1 = Actor.RotateVector(rv1,ViewRot.x-90);
|
||||
rv2 = Actor.RotateVector(rv2,ViewRot.x-90);
|
||||
// clip to frame
|
||||
bool visible;
|
||||
[visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2);
|
||||
if ( !visible ) continue;
|
||||
// scale to minimap frame
|
||||
rv1 *= (HALFMAPSIZE/zoomclip)*hs;
|
||||
rv2 *= (HALFMAPSIZE/zoomclip)*hs;
|
||||
// offset to minimap center
|
||||
rv1 += basepos;
|
||||
rv2 += basepos;
|
||||
// get the line color
|
||||
Color col = mm_wallcolor;
|
||||
if ( (l.flags&Line.ML_MAPPED) || am_cheat )
|
||||
{
|
||||
let lcol = SWWMUtility.GetLockColor(lock);
|
||||
if ( lcol ) col = lcol;
|
||||
else col = mm_lockedcolor;
|
||||
}
|
||||
else if ( mm_specialwallcolor && ShowTriggerLine(l) )
|
||||
col = mm_specialwallcolor;
|
||||
else if ( l.frontsector && l.backsector )
|
||||
{
|
||||
if ( !CmpFloorPlanes(l) ) col = mm_fdwallcolor;
|
||||
else if ( !CmpCeilingPlanes(l) ) col = mm_cdwallcolor;
|
||||
else if ( CheckFFBoundary(l) ) col = mm_efwallcolor;
|
||||
else
|
||||
int secwit = CheckSecret(l);
|
||||
int lock = SWWMUtility.GetLineLock(l);
|
||||
if ( secwit == 1 ) col = mm_secretsectorcolor;
|
||||
else if ( secwit == 2 ) col = mm_unexploredsecretcolor;
|
||||
else if ( l.flags&Line.ML_SECRET )
|
||||
{
|
||||
if ( (am_cheat == 0) || (am_cheat >= 4) )
|
||||
continue;
|
||||
col = mm_tswallcolor;
|
||||
if ( am_cheat && l.backsector && mm_secretwallcolor )
|
||||
col = mm_secretwallcolor;
|
||||
else col = mm_wallcolor;
|
||||
}
|
||||
else if ( mm_interlevelcolor
|
||||
&& ((l.special == Exit_Normal)
|
||||
|| (l.special == Exit_Secret)
|
||||
|| (l.special == Teleport_NewMap)
|
||||
|| (l.special == Teleport_EndGame)) )
|
||||
col = mm_interlevelcolor;
|
||||
else if ( mm_intralevelcolor &&
|
||||
(l.activation&SPAC_PlayerActivate)
|
||||
&& ((l.special == Teleport)
|
||||
|| (l.special == Teleport_NoFog)
|
||||
|| (l.special == Teleport_ZombieChanger)
|
||||
|| (l.special == Teleport_Line)) )
|
||||
col = mm_intralevelcolor;
|
||||
else if ( mm_displaylocks
|
||||
&& (lock > 0) && (lock < 256) )
|
||||
{
|
||||
let lcol = SWWMUtility.GetLockColor(lock);
|
||||
if ( lcol ) col = lcol;
|
||||
else col = mm_lockedcolor;
|
||||
}
|
||||
else if ( mm_specialwallcolor && ShowTriggerLine(l) )
|
||||
col = mm_specialwallcolor;
|
||||
else if ( l.frontsector && l.backsector )
|
||||
{
|
||||
if ( !CmpFloorPlanes(l) ) col = mm_fdwallcolor;
|
||||
else if ( !CmpCeilingPlanes(l) ) col = mm_cdwallcolor;
|
||||
else if ( CheckFFBoundary(l) ) col = mm_efwallcolor;
|
||||
else
|
||||
{
|
||||
if ( (am_cheat == 0) || (am_cheat >= 4) )
|
||||
continue;
|
||||
col = mm_tswallcolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
else col = mm_notseencolor;
|
||||
// draw the line
|
||||
if ( isportal )
|
||||
{
|
||||
col = Color((col.r+mm_portalcolor.r*7)/8,(col.g+mm_portalcolor.g*7)/8,(col.b+mm_portalcolor.b*7)/8);
|
||||
Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs*.25),col);
|
||||
}
|
||||
else Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs*.5),col);
|
||||
}
|
||||
else col = mm_notseencolor;
|
||||
// draw the line
|
||||
if ( isportal )
|
||||
{
|
||||
col = Color((col.r+mm_portalcolor.r*7)/8,(col.g+mm_portalcolor.g*7)/8,(col.b+mm_portalcolor.b*7)/8);
|
||||
Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs*.25),col);
|
||||
}
|
||||
else Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs*.5),col);
|
||||
}
|
||||
}
|
||||
private void DrawMapMarkers( Vector2 basepos )
|
||||
|
|
@ -2159,7 +1735,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
isportal = true;
|
||||
// portal displacement
|
||||
rv -= SWWMUtility.PortalDisplacement(csec,sec);
|
||||
rv += level.GetDisplacement(sec.portalgroup,csec.portalgroup);
|
||||
}
|
||||
if ( (((radius+zoomview)-abs(rv.x)) <= 0) || (((radius+zoomview)-abs(rv.y)) <= 0) )
|
||||
continue;
|
||||
|
|
@ -2184,7 +1760,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
isportal = true;
|
||||
// portal displacement
|
||||
rv -= SWWMUtility.PortalDisplacement(csec,sec);
|
||||
rv += level.GetDisplacement(sec.portalgroup,csec.portalgroup);
|
||||
}
|
||||
if ( (((radius+zoomview)-abs(rv.x)) <= 0) || (((radius+zoomview)-abs(rv.y)) <= 0) )
|
||||
continue;
|
||||
|
|
@ -2256,7 +1832,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
isportal = true;
|
||||
// portal displacement
|
||||
rv -= SWWMUtility.PortalDisplacement(csec,sec);
|
||||
rv += level.GetDisplacement(sec.portalgroup,csec.portalgroup);
|
||||
// and blend in the color too
|
||||
col = Color((col.r+mm_portalcolor.r*7)/8,(col.g+mm_portalcolor.g*7)/8,(col.b+mm_portalcolor.b*7)/8);
|
||||
}
|
||||
|
|
@ -2509,18 +2085,17 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
klist.Push(k);
|
||||
}
|
||||
int maxcolc = (gameinfo.gametype&GAME_DOOMCHEX)?6:4;
|
||||
for ( int i=0; i<klist.Size(); i++ )
|
||||
foreach ( k:klist )
|
||||
{
|
||||
let k = klist[i];
|
||||
// Hexen key icons aren't meant for this kind of HUD
|
||||
TextureID icon = (k is 'HexenKey')?k.SpawnState.GetSpriteTexture(0):k.Icon;
|
||||
Vector2 siz = TexMan.GetScaledSize(icon);
|
||||
Screen.DrawTexture(icon,false,keypos.x-siz.x,keypos.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_TopLeft,true);
|
||||
for ( int j=0; j<keyflash.Size(); j++ )
|
||||
foreach ( f:keyflash )
|
||||
{
|
||||
if ( !(k is keyflash[j].got) ) continue;
|
||||
if ( !keyflash[j].flashtime || (gametic >= keyflash[j].flashtime) ) continue;
|
||||
double alph = max((keyflash[j].flashtime-(gametic+FracTic))/25.,0.)**1.5;
|
||||
if ( !(k is f.got) ) continue;
|
||||
if ( !f.flashtime || (gametic >= f.flashtime) ) continue;
|
||||
double alph = max((f.flashtime-(gametic+FracTic))/25.,0.)**1.5;
|
||||
Screen.DrawTexture(icon,false,keypos.x-siz.x,keypos.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_TopLeft,true,DTA_ColorOverlay,0xFFFFC040,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
|
||||
break;
|
||||
}
|
||||
|
|
@ -2738,9 +2313,9 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
if ( checkowned )
|
||||
{
|
||||
bool owned = false;
|
||||
for ( int j=0; j<OwnedWeapons.Size(); j++ )
|
||||
foreach ( w:OwnedWeapons )
|
||||
{
|
||||
if ( OwnedWeapons[j].UsesAmmo(a) )
|
||||
if ( w.UsesAmmo(a) )
|
||||
owned = true;
|
||||
}
|
||||
if ( !owned ) continue;
|
||||
|
|
@ -3311,8 +2886,25 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
|
||||
override void Draw( int state, double TicFrac )
|
||||
{
|
||||
Super.Draw(state,TicFrac);
|
||||
double CurFrame = MSTimeF();
|
||||
// make sure vanilla nametags don't display
|
||||
DetachMessageID(0x5745504e); // WEPN
|
||||
DetachMessageID(0x53494e56); // SINV
|
||||
// also try with different endianness, just in case
|
||||
DetachMessageID(0x4e504557); // WEPN
|
||||
DetachMessageID(0x564e4953); // SINV
|
||||
if ( deathmatch )
|
||||
{
|
||||
// forcibly strip these messages
|
||||
// (I decided to drop MP support, so even though there are no
|
||||
// actual spree/multikill announcements in this mod, keeping
|
||||
// the vanilla ones out is important for graphical consistency)
|
||||
DetachMessageID(0x4b535052); // KSPR
|
||||
DetachMessageID(0x5250534b);
|
||||
DetachMessageID(0x4d4b494c); // MKIL
|
||||
DetachMessageID(0x4c494b4d);
|
||||
}
|
||||
Super.Draw(state,TicFrac);
|
||||
FrameTime = (CurFrame-PrevFrame)/1000.;
|
||||
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.);
|
||||
|
|
|
|||
|
|
@ -339,11 +339,11 @@ Class SWWMDirectMessage : HUDMessageBase
|
|||
// some messages may have newlines in them, split them
|
||||
Array<String> storemsg;
|
||||
txt.Split(storemsg,"\n");
|
||||
for ( int i=0; i<storemsg.Size(); i++ )
|
||||
foreach ( msg:storemsg )
|
||||
{
|
||||
EventHandler.SendNetworkEvent("swwmstoremessage."..chrname..": "..storemsg[i],level.totaltime,PRINT_CHAT,consoleplayer);
|
||||
EventHandler.SendNetworkEvent("swwmstoremessage."..chrname..": "..msg,level.totaltime,PRINT_CHAT,consoleplayer);
|
||||
// stick it into the console as well
|
||||
Console.PrintfEx(PRINT_CHAT|PRINT_NONOTIFY,chrname..": "..storemsg[i]);
|
||||
Console.PrintfEx(PRINT_CHAT|PRINT_NONOTIFY,chrname..": "..msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -537,24 +537,14 @@ Class SWWMDirectMessage : HUDMessageBase
|
|||
}
|
||||
}
|
||||
|
||||
// used to manually trigger dialogues through a hacky method in the hud
|
||||
// because zscript is fucking stupid with its handling of names, we can't
|
||||
// pass the dialogue name to arguments, so it'll have to be hardcoded
|
||||
Class SWWMDialogueTrigger : Actor
|
||||
// used to manually trigger dialogues
|
||||
// the AMBUSH flag means the dialogue only shows for the activator
|
||||
Class SWWMDialogueTrigger : SWWMNonInteractiveActor
|
||||
{
|
||||
default
|
||||
{
|
||||
+NOBLOCKMAP;
|
||||
+NOINTERACTION;
|
||||
}
|
||||
override void Activate( Actor activator )
|
||||
{
|
||||
static const String dlglist[] =
|
||||
{
|
||||
"swwmultdoom2map20dlg"
|
||||
};
|
||||
if ( !swwm_nomapmsg )
|
||||
Console.MidPrint(null,dlglist[args[0]]);
|
||||
if ( !bAMBUSH || (activator && (activator.player == players[consoleplayer])) )
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmsetdialogue",args[0]);
|
||||
Destroy();
|
||||
}
|
||||
override void Tick() {}
|
||||
|
|
|
|||
|
|
@ -113,9 +113,9 @@ Class AmmoFabricator : Inventory abstract
|
|||
{
|
||||
Array<Class<SWWMAmmo> > available;
|
||||
// populate ammo production list
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let a = (Class<SWWMAmmo>)(AllActorClasses[i]);
|
||||
let a = (Class<SWWMAmmo>)(cls);
|
||||
// skip over candy gun spares, they're "special ammo"
|
||||
if ( a == 'CandyGunSpares' ) continue;
|
||||
// only direct descendants of swwmammo with a set price below our max unit price
|
||||
|
|
@ -151,11 +151,11 @@ Class AmmoFabricator : Inventory abstract
|
|||
bool comma = false;
|
||||
int tpertype = pertype;
|
||||
int ttotal = maxunits;
|
||||
for ( int i=0; i<available.Size(); i++ )
|
||||
foreach ( type:available )
|
||||
{
|
||||
int amt, lim;
|
||||
int cnt = 0;
|
||||
SWWMAmmo cur = SWWMAmmo(Owner.FindInventory(available[i]));
|
||||
SWWMAmmo cur = SWWMAmmo(Owner.FindInventory(type));
|
||||
if ( cur )
|
||||
{
|
||||
amt = cur.Amount;
|
||||
|
|
@ -163,7 +163,7 @@ Class AmmoFabricator : Inventory abstract
|
|||
}
|
||||
else
|
||||
{
|
||||
cur = SWWMAmmo(Spawn(available[i]));
|
||||
cur = SWWMAmmo(Spawn(type));
|
||||
amt = cur.Amount = 0;
|
||||
lim = cur.MaxAmount;
|
||||
cur.AttachToOwner(Owner);
|
||||
|
|
@ -321,9 +321,9 @@ Class HammerspaceEmbiggener : Inventory
|
|||
if ( !traded ) other.A_StartSound("powerup/embiggener",CHAN_ITEMEXTRA);
|
||||
// Find every unique type of ammoitem. Give it to the player if
|
||||
// they don't have it already, and increase its maximum capacity.
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<Ammo>)(AllActorClasses[i]);
|
||||
let type = (class<Ammo>)(cls);
|
||||
if ( !type || (type.GetParentClass() != 'SWWMAmmo') ) continue;
|
||||
let ammoitem = Ammo(other.FindInventory(type));
|
||||
int amount = GetDefaultByType(type).BackpackAmount*self.Amount;
|
||||
|
|
@ -362,9 +362,9 @@ Class HammerspaceEmbiggener : Inventory
|
|||
}
|
||||
}
|
||||
// do the same for mag ammo, in a separate loop
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<MagAmmo>)(AllActorClasses[i]);
|
||||
let type = (class<MagAmmo>)(cls);
|
||||
if ( !type || (type.GetParentClass() != 'MagAmmo') ) continue;
|
||||
let magitem = MagAmmo(other.FindInventory(type));
|
||||
int amount = GetDefaultByType(type).BackpackAmount*self.Amount;
|
||||
|
|
|
|||
|
|
@ -111,10 +111,10 @@ Class SWWMAmmo : Ammo
|
|||
// enumerate all subclasses
|
||||
Array<Class<Ammo> > ammotypes;
|
||||
ammotypes.Clear();
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i] is GetParentAmmo() )
|
||||
ammotypes.Push((Class<Ammo>)(AllActorClasses[i]));
|
||||
if ( cls is GetParentAmmo() )
|
||||
ammotypes.Push((Class<Ammo>)(cls));
|
||||
}
|
||||
// sort from largest to smallest
|
||||
qsort_ammotypes(ammotypes,0,ammotypes.Size()-1);
|
||||
|
|
@ -122,12 +122,12 @@ Class SWWMAmmo : Ammo
|
|||
Inventory last = null;
|
||||
while ( amt > 0 )
|
||||
{
|
||||
for ( int i=0; i<ammotypes.Size(); i++ )
|
||||
foreach ( type:ammotypes )
|
||||
{
|
||||
let def = GetDefaultByType(ammotypes[i]);
|
||||
let def = GetDefaultByType(type);
|
||||
if ( amt >= def.Amount )
|
||||
{
|
||||
last = DoDrop(ammotypes[i]);
|
||||
last = DoDrop(type);
|
||||
amt -= def.Amount;
|
||||
Amount -= def.Amount;
|
||||
break;
|
||||
|
|
@ -149,10 +149,10 @@ Class SWWMAmmo : Ammo
|
|||
// enumerate all subclasses
|
||||
Array<Class<Ammo> > ammotypes;
|
||||
ammotypes.Clear();
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i] is GetParentAmmo() )
|
||||
ammotypes.Push((Class<Ammo>)(AllActorClasses[i]));
|
||||
if ( cls is GetParentAmmo() )
|
||||
ammotypes.Push((Class<Ammo>)(cls));
|
||||
}
|
||||
// sort from largest to smallest
|
||||
qsort_ammotypes(ammotypes,0,ammotypes.Size()-1);
|
||||
|
|
@ -177,13 +177,13 @@ Class SWWMAmmo : Ammo
|
|||
continue;
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<ammotypes.Size(); i++ )
|
||||
foreach ( type:ammotypes )
|
||||
{
|
||||
let def = GetDefaultByType(ammotypes[i]);
|
||||
let def = GetDefaultByType(type);
|
||||
if ( excess >= def.Amount )
|
||||
{
|
||||
double ang = FRandom[Junk](0,360);
|
||||
last = DoDrop(ammotypes[i]);
|
||||
last = DoDrop(type);
|
||||
last.SetOrigin(item.pos,false);
|
||||
last.vel.xy = AngleToVector(ang,FRandom[Junk](2,5));
|
||||
excess -= def.Amount;
|
||||
|
|
@ -252,10 +252,10 @@ Class SWWMAmmo : Ammo
|
|||
{
|
||||
Super.ModifyDropAmount(dropamount);
|
||||
int maxdrop = 1;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( !(AllActorClasses[i] is GetParentAmmo()) ) continue;
|
||||
let def = GetDefaultByType((Class<Ammo>)(AllActorClasses[i]));
|
||||
if ( !(cls is GetParentAmmo()) ) continue;
|
||||
let def = GetDefaultByType((Class<Ammo>)(cls));
|
||||
maxdrop = max(maxdrop,def.amount);
|
||||
}
|
||||
Amount = Random[ShellDrop](1,clamp(dropamount,1,maxdrop));
|
||||
|
|
@ -393,10 +393,10 @@ Class MagAmmo : Inventory abstract
|
|||
// enumerate all subclasses
|
||||
Array<Class<MagAmmo> > ammotypes;
|
||||
ammotypes.Clear();
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i] is GetParentMagAmmo() )
|
||||
ammotypes.Push((Class<MagAmmo>)(AllActorClasses[i]));
|
||||
if ( cls is GetParentMagAmmo() )
|
||||
ammotypes.Push((Class<MagAmmo>)(cls));
|
||||
}
|
||||
// sort from largest to smallest
|
||||
qsort_ammotypes(ammotypes,0,ammotypes.Size()-1);
|
||||
|
|
@ -415,13 +415,13 @@ Class MagAmmo : Inventory abstract
|
|||
continue;
|
||||
}
|
||||
// drop bullets otherwise
|
||||
for ( int i=0; i<ammotypes.Size(); i++ )
|
||||
foreach ( type:ammotypes )
|
||||
{
|
||||
let def = GetDefaultByType(ammotypes[i]);
|
||||
let def = GetDefaultByType(type);
|
||||
if ( excess >= def.Amount )
|
||||
{
|
||||
double ang = FRandom[Junk](0,360);
|
||||
last = DoDrop(ammotypes[i]);
|
||||
last = DoDrop(type);
|
||||
last.SetOrigin(item.pos,false);
|
||||
last.vel.xy = AngleToVector(ang,FRandom[Junk](2,5));
|
||||
excess -= def.Amount;
|
||||
|
|
@ -566,10 +566,10 @@ Class MagAmmo : Inventory abstract
|
|||
// enumerate all subclasses
|
||||
Array<Class<MagAmmo> > ammotypes;
|
||||
ammotypes.Clear();
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i] is GetParentMagAmmo() )
|
||||
ammotypes.Push((Class<MagAmmo>)(AllActorClasses[i]));
|
||||
if ( cls is GetParentMagAmmo() )
|
||||
ammotypes.Push((Class<MagAmmo>)(cls));
|
||||
}
|
||||
// sort from largest to smallest
|
||||
qsort_ammotypes(ammotypes,0,ammotypes.Size()-1);
|
||||
|
|
@ -587,12 +587,12 @@ Class MagAmmo : Inventory abstract
|
|||
continue;
|
||||
}
|
||||
// drop bullets otherwise
|
||||
for ( int i=0; i<ammotypes.Size(); i++ )
|
||||
foreach ( type:ammotypes )
|
||||
{
|
||||
let def = GetDefaultByType(ammotypes[i]);
|
||||
let def = GetDefaultByType(type);
|
||||
if ( amt >= def.Amount )
|
||||
{
|
||||
last = DoDrop(ammotypes[i]);
|
||||
last = DoDrop(type);
|
||||
amt -= def.Amount;
|
||||
Amount -= def.Amount;
|
||||
break;
|
||||
|
|
@ -606,10 +606,10 @@ Class MagAmmo : Inventory abstract
|
|||
{
|
||||
Super.ModifyDropAmount(dropamount);
|
||||
int maxdrop = 1;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( !(AllActorClasses[i] is GetParentMagAmmo()) ) continue;
|
||||
let def = GetDefaultByType((Class<MagAmmo>)(AllActorClasses[i]));
|
||||
if ( !(cls is GetParentMagAmmo()) ) continue;
|
||||
let def = GetDefaultByType((Class<MagAmmo>)(cls));
|
||||
maxdrop = max(maxdrop,def.amount);
|
||||
}
|
||||
Amount = Random[ShellDrop](1,clamp(dropamount,1,maxdrop));
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ Class SWWMCollectible : Inventory abstract
|
|||
Super.AttachToOwner(other);
|
||||
// count how many we have, set progress accordingly
|
||||
int nc = 0, cnc = 0;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let c = (Class<SWWMCollectible>)(AllActorClasses[i]);
|
||||
let c = (Class<SWWMCollectible>)(cls);
|
||||
if ( !c || (c == 'SWWMCollectible') ) continue;
|
||||
let def = GetDefaultByType(c);
|
||||
// check that we can collect it in this IWAD
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ Class SayaBeanGesture : SWWMItemGesture
|
|||
let realbean = SayaBean(FindInventory("SayaBean"));
|
||||
if ( realbean && !realbean.callout && !Random[Gesture](0,3) )
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() != "HDoomPlayer" ) continue;
|
||||
if ( cls.GetClassName() != "HDoomPlayer" ) continue;
|
||||
A_StartSound("saya/pervert",CHAN_ITEMEXTRA,CHANF_OVERLAP);
|
||||
realbean.callout = true;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -296,8 +296,7 @@ Class SWWMGasCloudSpawner : SWWMNonInteractiveActor
|
|||
if ( isFrozen() ) return;
|
||||
if ( !(special1%5) )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
let c = Spawn("SWWMGasCloud",level.Vec3Offset(pos,x*(20+special1*12)));
|
||||
c.target = target;
|
||||
c.specialf1 = 1+special1/10.;
|
||||
|
|
@ -1004,17 +1003,15 @@ Class Chancebox : Actor
|
|||
// find all secret sectors, find potential spawn spots within them
|
||||
// after that, spawn up to 3 boxes total within them
|
||||
int tboxes = 0;
|
||||
for ( int i=0; i<level.Sectors.Size(); i++ )
|
||||
foreach ( s:level.Sectors )
|
||||
{
|
||||
if ( !(level.Sectors[i].flags&Sector.SECF_SECRET) ) continue;
|
||||
Sector s = level.Sectors[i];
|
||||
if ( !(s.flags&Sector.SECF_SECRET) ) continue;
|
||||
// find any spots in the sector that are within it and have no linedefs or blocking actors within a 32 unit box
|
||||
// start from the center, expand in rings
|
||||
Vector2 origin = s.centerspot;
|
||||
double maxradius = 0;
|
||||
for ( int j=0; j<s.lines.Size(); j++ )
|
||||
foreach ( l:s.lines )
|
||||
{
|
||||
Line l = s.lines[j];
|
||||
double v1len = (l.v1.p-origin).length(),
|
||||
v2len = (l.v2.p-origin).length();
|
||||
if ( v1len > maxradius ) maxradius = v1len;
|
||||
|
|
@ -1122,9 +1119,9 @@ Class Chancebox : Actor
|
|||
{
|
||||
Array<Class <SWWMCollectible> > candidates;
|
||||
candidates.Clear();
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let c = (Class<SWWMCollectible>)(AllActorClasses[i]);
|
||||
let c = (Class<SWWMCollectible>)(cls);
|
||||
if ( !c || (c == 'SWWMCollectible') ) continue;
|
||||
let def = GetDefaultByType(c);
|
||||
// check that we can collect it in this IWAD
|
||||
|
|
@ -1156,9 +1153,9 @@ Class Chancebox : Actor
|
|||
{
|
||||
// populate reward choices to randomize
|
||||
Array<ChanceboxReward> rewards;
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
let cls = (Class<ChanceboxReward>)(AllClasses[i]);
|
||||
let cls = (Class<ChanceboxReward>)(cls);
|
||||
if ( !cls || cls.isAbstract() ) continue;
|
||||
let cr = ChanceboxReward(new(cls));
|
||||
rewards.Push(cr);
|
||||
|
|
@ -1213,9 +1210,9 @@ Class Chancebox : Actor
|
|||
SWWMCollectible c;
|
||||
while ( c = SWWMCollectible(ti.Next()) ) col++;
|
||||
int tcol = 0;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let c = (Class<SWWMCollectible>)(AllActorClasses[i]);
|
||||
let c = (Class<SWWMCollectible>)(cls);
|
||||
if ( !c || (c == 'SWWMCollectible') ) continue;
|
||||
let def = GetDefaultByType(c);
|
||||
// check that we can collect it in this IWAD
|
||||
|
|
|
|||
|
|
@ -313,9 +313,8 @@ Class GhostTarget : Actor
|
|||
if ( !master || (LastHeard == master) || !master.FindInventory("GhostPower") )
|
||||
{
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( hnd ) for ( int i=0; i<hnd.suckableactors.Size(); i++ )
|
||||
if ( hnd ) foreach ( a:hnd.suckableactors )
|
||||
{
|
||||
let a = hnd.suckableactors[i];
|
||||
if ( !a || !a.bISMONSTER || a.player || !a.IsHostile(master) || (a.Health <= 0) ) continue;
|
||||
if ( a.target == self ) a.target = master;
|
||||
}
|
||||
|
|
@ -368,9 +367,8 @@ Class GhostPower : PowerInvisibility
|
|||
// are any enemies targetting us? if so, make them focus on a fake target located where we currently are standing
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
Actor gt = null;
|
||||
if ( hnd ) for ( int i=0; i<hnd.suckableactors.Size(); i++ )
|
||||
if ( hnd ) foreach ( a:hnd.suckableactors )
|
||||
{
|
||||
let a = hnd.suckableactors[i];
|
||||
if ( !a || !a.bISMONSTER || a.player || !a.IsHostile(Owner) || (a.Health <= 0) ) continue;
|
||||
// make them forget the ghost if we make noise
|
||||
if ( (a.LastHeard == Owner) && (a.target is 'GhostTarget') && (a.target.master == Owner) )
|
||||
|
|
@ -1663,16 +1661,17 @@ Class CompanionLamp : Actor
|
|||
Actor f = Spawn("SWWMItemFog",pos);
|
||||
f.A_StartSound("lamp/disappear",CHAN_VOICE);
|
||||
// carry over the moths
|
||||
foreach ( m:moff )
|
||||
for ( int i=0; i<moff.Size(); i++ )
|
||||
{
|
||||
if ( !moff[i] ) continue;
|
||||
Vector3 whereto = level.Vec3Offset(moff[i].pos,rel);
|
||||
if ( !m ) continue;
|
||||
Vector3 whereto = level.Vec3Offset(m.pos,rel);
|
||||
if ( !level.IsPointInLevel(whereto) )
|
||||
continue;
|
||||
Vector3 oldp = moff[i].pos;
|
||||
moff[i].SetOrigin(whereto,false);
|
||||
if ( !moff[i].TestMobjLocation() )
|
||||
moff[i].SetOrigin(oldp,false);
|
||||
Vector3 oldp = m.pos;
|
||||
m.SetOrigin(whereto,false);
|
||||
if ( !m.TestMobjLocation() )
|
||||
m.SetOrigin(oldp,false);
|
||||
}
|
||||
SetOrigin(trail,false);
|
||||
angle = AngleTo(parent);
|
||||
|
|
@ -2238,7 +2237,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
{
|
||||
tics = bMISSILEMORE?2:1;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
if ( !bSTANDSTILL )
|
||||
{
|
||||
let t = new("TendrilTracer");
|
||||
|
|
@ -2246,21 +2245,21 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
t.hitlist.Clear();
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,0);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
foreach ( hit:t.hitlist )
|
||||
{
|
||||
if ( t.hitlist[i].hitactor.IsFriend(target) ) continue;
|
||||
if ( (t.hitlist[i].hitactor == tracer) && bMISSILEMORE ) bMISSILEEVENMORE = true; // we split
|
||||
int dmg = (t.hitlist[i].hitactor.bBOSS||t.hitlist[i].hitactor.FindInventory("BossMarker"))?(GetMissileDamage(0,0)*4):max(t.hitlist[i].hitactor.Health,GetMissileDamage(0,0));
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,-t.hitlist[i].x+(0,0,.5),((t.hitlist[i].hitactor.Health-dmg)<=0)?60000:8000);
|
||||
let p = SWWMPuff.Setup(t.hitlist[i].hitlocation,t.hitlist[i].x,self,target,t.hitlist[i].hitactor);
|
||||
t.hitlist[i].hitactor.DamageMobj(p,target,dmg,'Plasma',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Mykradvo](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
if ( hit.hitactor.IsFriend(target) ) continue;
|
||||
if ( (hit.hitactor == tracer) && bMISSILEMORE ) bMISSILEEVENMORE = true; // we split
|
||||
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);
|
||||
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);
|
||||
if ( hit.hitactor && hit.hitactor.bISMONSTER && !Random[Mykradvo](0,3) )
|
||||
hit.hitactor.Howl();
|
||||
}
|
||||
}
|
||||
nextpos = level.Vec3Offset(pos,x*speed);
|
||||
|
|
@ -2296,7 +2295,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
{
|
||||
// spread into sub-tendrils
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
int ntendies = tracer?clamp(tracer.GetSpawnHealth()/400,2,10):2;
|
||||
for ( int i=0; i<ntendies; i++ )
|
||||
{
|
||||
|
|
@ -2318,7 +2317,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
{
|
||||
int numpt = bMISSILEMORE?9:3;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
double a = FRandom[ExploS](0,360), s = FRandom[ExploS](0,1.);
|
||||
|
|
@ -4034,18 +4033,18 @@ Class SaltBeam : SWWMNonInteractiveActor
|
|||
{
|
||||
special1 = 1;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let t = new("SaltTracer");
|
||||
t.ignore = target;
|
||||
t.Trace(pos,cursector,x,speed,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Actor.Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Actor.Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = target;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,17 +190,28 @@ Class DemolitionistMenu : GenericMenu
|
|||
'DemolitionistHelpTab',
|
||||
'DemolitionistSecretTab'
|
||||
};
|
||||
// since GZDoom 4.10 we have to "pre-tick" tabs as soon as they're initialized
|
||||
for ( int i=0; i<deftabs.Size()-2; i++ )
|
||||
tabs.Push(DemolitionistMenuTab(new(deftabs[i])).Init(self));
|
||||
// custom tabs go before the help and secret tabs
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
{
|
||||
let ct = (Class<DemolitionistMenuTabCustom>)(AllClasses[i]);
|
||||
let t = DemolitionistMenuTab(new(deftabs[i])).Init(self);
|
||||
t.Ticker();
|
||||
tabs.Push(t);
|
||||
}
|
||||
// custom tabs go before the help and secret tabs
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
let ct = (Class<DemolitionistMenuTabCustom>)(cls);
|
||||
if ( !ct || (ct.GetParentClass() != 'DemolitionistMenuTabCustom') ) continue;
|
||||
tabs.Push(DemolitionistMenuTab(new(ct)).Init(self));
|
||||
let t = DemolitionistMenuTab(new(ct)).Init(self);
|
||||
t.Ticker();
|
||||
tabs.Push(t);
|
||||
}
|
||||
for ( int i=deftabs.Size()-2; i<deftabs.Size(); i++ )
|
||||
tabs.Push(DemolitionistMenuTab(new(deftabs[i])).Init(self));
|
||||
{
|
||||
let t = DemolitionistMenuTab(new(deftabs[i])).Init(self);
|
||||
t.Ticker();
|
||||
tabs.Push(t);
|
||||
}
|
||||
if ( shnd.menustate )
|
||||
{
|
||||
Class<DemolitionistMenuTab> saved = shnd.menustate.At("LastTab");
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ Class DemolitionistMenuList ui
|
|||
|
||||
override void OnDestroy()
|
||||
{
|
||||
for ( int i=0; i<items.Size(); i++ )
|
||||
foreach ( i:items )
|
||||
{
|
||||
// just in case do a null pointer check
|
||||
if ( !items[i] ) continue;
|
||||
items[i].Destroy();
|
||||
if ( !i ) continue;
|
||||
i.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -21,9 +21,9 @@ Class DemolitionistMenuList ui
|
|||
int GetWidth()
|
||||
{
|
||||
int mw = 0;
|
||||
for ( int i=0; i<items.Size(); i++ )
|
||||
foreach ( i:items )
|
||||
{
|
||||
int cw = items[i].GetWidth();
|
||||
int cw = i.GetWidth();
|
||||
if ( cw > mw ) mw = cw;
|
||||
}
|
||||
return mw;
|
||||
|
|
@ -31,8 +31,8 @@ Class DemolitionistMenuList ui
|
|||
// tick all items
|
||||
void Ticker()
|
||||
{
|
||||
for ( int i=0; i<items.Size(); i++ )
|
||||
items[i].Ticker();
|
||||
foreach ( i:items )
|
||||
i.Ticker();
|
||||
}
|
||||
// draw all items with a specific offset
|
||||
void Drawer( Vector2 offset )
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ Class DemolitionistChatTab : DemolitionistMenuTab
|
|||
}
|
||||
else
|
||||
{
|
||||
for ( int i=0; i<msglist.items.Size(); i++ )
|
||||
ypos += msglist.items[i].GetHeight();
|
||||
foreach ( i:msglist.items )
|
||||
ypos += i.GetHeight();
|
||||
recenter = false;
|
||||
}
|
||||
maxofs = max(ypos-int(master.ws.y-46),0);
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ Class DemolitionistGameTab : DemolitionistMenuTab
|
|||
override DemolitionistMenuTab Init( DemolitionistMenu master )
|
||||
{
|
||||
title = StringTable.Localize("$SWWM_GAMETAB");
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
if ( AllClasses[i].isAbstract() || !(AllClasses[i] is 'MadcatGame') ) continue;
|
||||
gamelist.Push((Class<MadcatGame>)(AllClasses[i]));
|
||||
if ( cls.isAbstract() || !(cls is 'MadcatGame') ) continue;
|
||||
gamelist.Push((Class<MadcatGame>)(cls));
|
||||
}
|
||||
bDirectInput = true;
|
||||
return Super.Init(master);
|
||||
|
|
@ -30,9 +30,9 @@ Class DemolitionistGameTab : DemolitionistMenuTab
|
|||
// auto-add lore for kris
|
||||
let lore = SWWMLoreLibrary.Find(players[consoleplayer]);
|
||||
bool found = false;
|
||||
for ( int i=0; i<lore.ent.Size(); i++ )
|
||||
foreach ( ent:lore.ent )
|
||||
{
|
||||
if ( !(lore.ent[i].tag ~== "$SWWM_LORETAG_MADCAT") ) continue;
|
||||
if ( !(ent.tag ~== "$SWWM_LORETAG_MADCAT") ) continue;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
else if ( a is 'Ammo' )
|
||||
{
|
||||
Class<Weapon> usesa, usesb;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let w = (Class<Weapon>)(AllActorClasses[i]);
|
||||
let w = (Class<Weapon>)(cls);
|
||||
if ( !w ) continue;
|
||||
let def = GetDefaultByType(w);
|
||||
if ( w is 'SWWMWeapon' )
|
||||
|
|
@ -95,9 +95,9 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
pamoa = MagAmmo(a).ParentAmmo;
|
||||
pamob = MagAmmo(b).ParentAmmo;
|
||||
Class<Weapon> usesa, usesb;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let w = (Class<Weapon>)(AllActorClasses[i]);
|
||||
let w = (Class<Weapon>)(cls);
|
||||
if ( !w ) continue;
|
||||
let def = GetDefaultByType(w);
|
||||
if ( w is 'SWWMWeapon' )
|
||||
|
|
@ -254,32 +254,32 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
i--;
|
||||
}
|
||||
// check if new entries must be added
|
||||
for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv )
|
||||
for ( Inventory inv=players[consoleplayer].mo.inv; inv; inv=inv.inv )
|
||||
{
|
||||
if ( FilterInventory(i) ) continue;
|
||||
if ( FilterInventory(inv) ) continue;
|
||||
// skip if it's already there
|
||||
bool skipme = false;
|
||||
for ( int j=0; j<invlist.items.Size(); j++ )
|
||||
foreach ( i:invlist.items )
|
||||
{
|
||||
if ( DemolitionistMenuInvItem(invlist.items[j]).inv != i ) continue;
|
||||
if ( DemolitionistMenuInvItem(i).inv != inv ) continue;
|
||||
skipme = true;
|
||||
break;
|
||||
}
|
||||
if ( skipme ) continue;
|
||||
// make sure we sort alphabetically on first insert
|
||||
String tag = i.GetTag();
|
||||
String tag = inv.GetTag();
|
||||
bool greater = false;
|
||||
for ( int j=0; j<invlist.items.Size(); j++ )
|
||||
{
|
||||
String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag();
|
||||
if ( tag > tag2 ) continue;
|
||||
greater = true;
|
||||
invlist.items.Insert(j,new("DemolitionistMenuInvItem").Init(master,i));
|
||||
invlist.items.Insert(j,new("DemolitionistMenuInvItem").Init(master,inv));
|
||||
mustsort = true;
|
||||
break;
|
||||
}
|
||||
if ( greater ) continue;
|
||||
invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i));
|
||||
invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,inv));
|
||||
mustsort = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -299,11 +299,11 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
int maxw = invlist.GetWidth();
|
||||
int xx = 0;
|
||||
int yy = 0;
|
||||
for ( int i=0; i<invlist.items.Size(); i++ )
|
||||
foreach ( i:invlist.items )
|
||||
{
|
||||
maxofs = max(maxofs,int(xx+invlist.items[i].GetWidth()));
|
||||
invlist.items[i].xpos = xx;
|
||||
invlist.items[i].ypos = yy;
|
||||
maxofs = max(maxofs,int(xx+i.GetWidth()));
|
||||
i.xpos = xx;
|
||||
i.ypos = yy;
|
||||
yy += 16;
|
||||
if ( yy > (master.ws.y-62) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,11 +57,10 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab
|
|||
lists[i].master = master;
|
||||
}
|
||||
loresz = lore.ent.Size();
|
||||
for ( int i=0; i<loresz; i++ )
|
||||
foreach ( e:lore.ent )
|
||||
{
|
||||
let ent = lore.ent[i];
|
||||
let le = new("DemolitionistMenuLoreItem").Init(master,ent);
|
||||
lists[ent.tab].items.Push(le);
|
||||
let le = new("DemolitionistMenuLoreItem").Init(master,e);
|
||||
lists[e.tab].items.Push(le);
|
||||
lwidth = max(lwidth,master.mSmallFont.StringWidth("‼"..le.label)+6);
|
||||
}
|
||||
for ( int i=0; i<4; i++ )
|
||||
|
|
|
|||
|
|
@ -135,10 +135,10 @@ Class DemolitionistMissionTab : DemolitionistMenuTab
|
|||
}
|
||||
override void OnDestroy()
|
||||
{
|
||||
for ( int i=0; i<mtext.Size(); i++ )
|
||||
foreach ( t:mtext )
|
||||
{
|
||||
if ( !mtext[i] ) continue;
|
||||
mtext[i].Destroy();
|
||||
if ( !t ) continue;
|
||||
t.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,24 +31,23 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
|
|||
// because these types of stats don't actually change while the menu is open, we can initialize their lists ONLY ONCE here
|
||||
if ( swwm_uniqstats )
|
||||
{
|
||||
for ( int i=0; i<stats.lstats.Size(); i++ )
|
||||
foreach ( s:stats.lstats )
|
||||
{
|
||||
if ( stats.lstats[i].mapname ~== level.mapname ) continue;
|
||||
if ( s.mapname ~== level.mapname ) continue;
|
||||
for ( int j=0; j<lists[2].items.Size(); j++ )
|
||||
{
|
||||
if ( !(DemolitionistMenuMapStatItem(lists[2].items[j]).s.mapname ~== stats.lstats[i].mapname) ) continue;
|
||||
if ( !(DemolitionistMenuMapStatItem(lists[2].items[j]).s.mapname ~== s.mapname) ) continue;
|
||||
lists[2].items[j].Destroy();
|
||||
lists[2].items.Delete(j);
|
||||
j--;
|
||||
}
|
||||
lists[2].items.Push(new("DemolitionistMenuMapStatItem").Init(master,stats.lstats[i]));
|
||||
lists[2].items.Push(new("DemolitionistMenuMapStatItem").Init(master,s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lists[2].items.Resize(stats.lstats.Size());
|
||||
for ( int i=0; i<stats.lstats.Size(); i++ )
|
||||
lists[2].items[i] = new("DemolitionistMenuMapStatItem").Init(master,stats.lstats[i]);
|
||||
foreach ( s:stats.lstats )
|
||||
lists[2].items.Push(new("DemolitionistMenuMapStatItem").Init(master,s));
|
||||
}
|
||||
clstat = new("LevelStat");
|
||||
clstat.hub = !!(level.clusterflags&level.CLUSTER_HUB);
|
||||
|
|
@ -62,8 +61,8 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
|
|||
lists[2].selected = lists[2].items.Size()-1; // so it shows the "current level" indicator
|
||||
for ( int i=0; i<lists[2].items.Size(); i++ )
|
||||
lists[2].items[i].ypos = i*16;
|
||||
for ( int i=0; i<master.shnd.achievementinfo.Size(); i++ )
|
||||
lists[3].items.Push(new("DemolitionistMenuAchievementItem").Init(master,master.shnd.achievementinfo[i]));
|
||||
foreach ( inf:master.shnd.achievementinfo )
|
||||
lists[3].items.Push(new("DemolitionistMenuAchievementItem").Init(master,inf));
|
||||
return Super.Init(master);
|
||||
}
|
||||
override void OnDestroy()
|
||||
|
|
@ -326,9 +325,9 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
|
|||
// update widths
|
||||
w = int(master.ws.x-(18+lwidth));
|
||||
if ( maxofs[1] > 0 ) w -= 8;
|
||||
for ( int i=0; i<lists[1].items.Size(); i++ )
|
||||
foreach ( i:lists[1].items )
|
||||
{
|
||||
let k = DemolitionistMenuKillItem(lists[1].items[i]);
|
||||
let k = DemolitionistMenuKillItem(i);
|
||||
k.width = w;
|
||||
}
|
||||
// sort
|
||||
|
|
@ -352,9 +351,9 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
|
|||
if ( maxofs[2] > 0 ) w -= 8;
|
||||
int len[4], maxlen[4];
|
||||
for ( int i=0; i<4; i++ ) maxlen[i] = 0;
|
||||
for ( int i=0; i<lists[2].items.Size(); i++ )
|
||||
foreach ( i:lists[2].items )
|
||||
{
|
||||
let l = DemolitionistMenuMapStatItem(lists[2].items[i]);
|
||||
let l = DemolitionistMenuMapStatItem(i);
|
||||
l.width = w;
|
||||
// and calculate "max lengths"
|
||||
int sec = Thinker.Tics2Seconds(l.s.time);
|
||||
|
|
@ -381,25 +380,25 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
|
|||
}
|
||||
}
|
||||
// second pass to propagate the "max lengths"
|
||||
for ( int i=0; i<lists[2].items.Size(); i++ )
|
||||
foreach ( i:lists[2].items )
|
||||
{
|
||||
let l = DemolitionistMenuMapStatItem(lists[2].items[i]);
|
||||
let l = DemolitionistMenuMapStatItem(i);
|
||||
for ( int j=0; j<4; j++ )
|
||||
l.maxlen[j] = maxlen[j];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
// update achievement progress
|
||||
for ( int i=0; i<lists[3].items.Size(); i++ )
|
||||
DemolitionistMenuAchievementItem(lists[3].items[i]).Update();
|
||||
foreach ( i:lists[3].items )
|
||||
DemolitionistMenuAchievementItem(i).Update();
|
||||
// sort achievements
|
||||
qsort_achievements(lists[3].items,0,lists[3].items.Size()-1);
|
||||
// set offsets (based on which ones should be hidden, too)
|
||||
int ay = 0;
|
||||
bool dohide = (swwm_filterachievements==2);
|
||||
for ( int i=0; i<lists[3].items.Size(); i++ )
|
||||
foreach ( i:lists[3].items )
|
||||
{
|
||||
let ai = DemolitionistMenuAchievementItem(lists[3].items[i]);
|
||||
let ai = DemolitionistMenuAchievementItem(i);
|
||||
let key = ai.a.basename;
|
||||
ai.bHidden = true;
|
||||
if ( (key == "everything") && !ai.a.state ) continue;
|
||||
|
|
@ -413,9 +412,9 @@ Class DemolitionistStatsTab : DemolitionistMenuTab
|
|||
// update widths
|
||||
w = int(master.ws.x-(24+lwidth));
|
||||
if ( maxofs[3] > 0 ) w -= 8;
|
||||
for ( int i=0; i<lists[3].items.Size(); i++ )
|
||||
foreach ( i:lists[3].items )
|
||||
{
|
||||
let ai = DemolitionistMenuAchievementItem(lists[3].items[i]);
|
||||
let ai = DemolitionistMenuAchievementItem(i);
|
||||
ai.width = w;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,18 +174,18 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
|
|||
if ( invlist[bSell].selected > i ) invlist[bSell].selected = max(0,invlist[bSell].selected-1);
|
||||
i--;
|
||||
}
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (Class<Inventory>)(AllActorClasses[i]);
|
||||
let type = (Class<Inventory>)(cls);
|
||||
if ( !type ) continue;
|
||||
let cur = players[consoleplayer].mo.FindInventory(type);
|
||||
let inv = GetDefaultByType(type);
|
||||
if ( FilterStore(type,cur,inv) ) continue;
|
||||
// skip if it's already there
|
||||
bool skipme = false;
|
||||
for ( int j=0; j<invlist[bSell].items.Size(); j++ )
|
||||
foreach ( i:invlist[bSell].items )
|
||||
{
|
||||
if ( DemolitionistMenuStoreItem(invlist[bSell].items[j]).inv != type ) continue;
|
||||
if ( DemolitionistMenuStoreItem(i).inv != type ) continue;
|
||||
skipme = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -219,19 +219,19 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
|
|||
// rearrange all item positions
|
||||
maxofs = 0;
|
||||
maxw = 0;
|
||||
for ( int i=0; i<invlist[bSell].items.Size(); i++ )
|
||||
foreach ( i:invlist[bSell].items )
|
||||
{
|
||||
let fw = DemolitionistMenuStoreItem(invlist[bSell].items[i]).GetFullWidth();
|
||||
let fw = DemolitionistMenuStoreItem(i).GetFullWidth();
|
||||
if ( fw > maxw ) maxw = fw;
|
||||
}
|
||||
int xx = 0;
|
||||
int yy = 0;
|
||||
for ( int i=0; i<invlist[bSell].items.Size(); i++ )
|
||||
foreach ( i:invlist[bSell].items )
|
||||
{
|
||||
maxofs = max(maxofs,xx+maxw-16);
|
||||
DemolitionistMenuStoreItem(invlist[bSell].items[i]).width = maxw;
|
||||
invlist[bSell].items[i].xpos = xx;
|
||||
invlist[bSell].items[i].ypos = yy;
|
||||
DemolitionistMenuStoreItem(i).width = maxw;
|
||||
i.xpos = xx;
|
||||
i.ypos = yy;
|
||||
yy += 16;
|
||||
if ( yy > (master.ws.y-62) )
|
||||
{
|
||||
|
|
@ -478,9 +478,9 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem
|
|||
if ( bSell ) maxamt = cur.Amount; // we can sell ALL our ammo
|
||||
else maxamt = cur?(cur.MaxAmount-cur.Amount):def.MaxAmount;
|
||||
// get the largest affordable child pickup amount (that we need, or we can sell)
|
||||
for ( int j=0; j<AllActorClasses.Size(); j++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let inv2 = (Class<Ammo>)(AllActorClasses[j]);
|
||||
let inv2 = (Class<Ammo>)(cls);
|
||||
if ( !inv2 || (inv2.GetParentClass() != inv) ) continue;
|
||||
let def2 = GetDefaultByType(inv2);
|
||||
int cprice = int(abs(def.Stamina)*(1.+.75*(def2.Amount-1)));
|
||||
|
|
@ -496,9 +496,9 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem
|
|||
// never bought, only sold
|
||||
int maxamt = cur.Amount;
|
||||
// get the largest affordable child pickup amount (that we can sell)
|
||||
for ( int j=0; j<AllActorClasses.Size(); j++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let inv2 = (Class<MagAmmo>)(AllActorClasses[j]);
|
||||
let inv2 = (Class<MagAmmo>)(cls);
|
||||
if ( !inv2 || (inv2.GetParentClass() != inv) ) continue;
|
||||
let def2 = GetDefaultByType(inv2);
|
||||
int cprice = int(abs(def.Stamina)*(1.+.75*(def2.Amount-1)));
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@ Class SWWMAchievementMenu : GenericMenu
|
|||
// recalculate counters
|
||||
completed = 0;
|
||||
incomplete = 0;
|
||||
for ( int i=0; i<mItems.Size(); i++ )
|
||||
foreach ( itm:mItems )
|
||||
{
|
||||
if ( !!(hnd.achievementstate.At(mItems[i].basename).ToInt()) ) completed++;
|
||||
else if ( mItems[i].maxval && mItems[i].val ) incomplete++;
|
||||
if ( !!(hnd.achievementstate.At(itm.basename).ToInt()) ) completed++;
|
||||
else if ( itm.maxval && itm.val ) incomplete++;
|
||||
}
|
||||
// calculate how many rows to display
|
||||
int realh = (Screen.GetHeight()/CleanYFac_1)-160;
|
||||
|
|
|
|||
|
|
@ -214,45 +214,45 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
// calc total height
|
||||
theight = int(logosz.y);
|
||||
theight += 8*(SECTION_PAD+mBigFont.GetHeight()*2);
|
||||
for ( int i=0; i<cdev.Size(); i++ )
|
||||
foreach ( c:cdev )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cdev[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cassets.Size(); i++ )
|
||||
foreach ( c:cassets )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cassets[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cmusic.Size(); i++ )
|
||||
foreach ( c:cmusic )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cmusic[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cvoice.Size(); i++ )
|
||||
foreach ( c:cvoice )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cvoice[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cfanart.Size(); i++ )
|
||||
foreach ( c:cfanart )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cfanart[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<clocal.Size(); i++ )
|
||||
foreach ( c:clocal )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += clocal[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cpatrons.Size(); i++ )
|
||||
foreach ( c:cpatrons )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cpatrons[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cthanks.Size(); i++ )
|
||||
foreach ( c:cthanks )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cthanks[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
// music swap
|
||||
oldmus = musplaying.name;
|
||||
|
|
@ -302,66 +302,66 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
// developer
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sdev);
|
||||
for ( int i=0; i<cdev.Size(); i++ )
|
||||
foreach ( c:cdev )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cdev[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// assets
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sassets);
|
||||
for ( int i=0; i<cassets.Size(); i++ )
|
||||
foreach ( c:cassets )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cassets[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// music
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,smusic);
|
||||
for ( int i=0; i<cmusic.Size(); i++ )
|
||||
foreach ( c:cmusic )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cmusic[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// voices
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,svoice);
|
||||
for ( int i=0; i<cvoice.Size(); i++ )
|
||||
foreach ( c:cvoice )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cvoice[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// fanart
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sfanart);
|
||||
for ( int i=0; i<cfanart.Size(); i++ )
|
||||
foreach ( c:cfanart )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cfanart[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// localization
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,slocal);
|
||||
for ( int i=0; i<clocal.Size(); i++ )
|
||||
foreach ( c:clocal )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += clocal[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// patrons
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,spatrons);
|
||||
for ( int i=0; i<cpatrons.Size(); i++ )
|
||||
foreach ( c:cpatrons )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cpatrons[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// thanks
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sthanks);
|
||||
for ( int i=0; i<cthanks.Size(); i++ )
|
||||
foreach ( c:cthanks )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cthanks[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
}
|
||||
override void Ticker()
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ Class SWWMStatScreen : StatusScreen abstract
|
|||
}
|
||||
else
|
||||
{
|
||||
for ( int i=0; i<shnd.lastart.Size(); i++ )
|
||||
foreach ( la:shnd.lastart )
|
||||
{
|
||||
int f = ents.Find(shnd.lastart[i]);
|
||||
int f = ents.Find(la);
|
||||
if ( f != ents.Size() )
|
||||
ents.Delete(f);
|
||||
}
|
||||
|
|
@ -122,9 +122,9 @@ Class SWWMStatScreen : StatusScreen abstract
|
|||
}
|
||||
else
|
||||
{
|
||||
for ( int i=0; i<shnd.lasttip.Size(); i++ )
|
||||
foreach ( lt:shnd.lasttip )
|
||||
{
|
||||
int f = ents.Find(shnd.lasttip[i]);
|
||||
int f = ents.Find(lt);
|
||||
if ( f != ents.Size() )
|
||||
ents.Delete(f);
|
||||
}
|
||||
|
|
@ -1015,9 +1015,8 @@ Class SWWMStatScreen_DM : SWWMStatScreen
|
|||
String str;
|
||||
Array<Int> sorted;
|
||||
GetSortedPlayers(sorted,teamplay);
|
||||
for ( int j=0; j<sorted.Size(); j++ )
|
||||
foreach ( i:sorted )
|
||||
{
|
||||
int i = sorted[j];
|
||||
if ( !playeringame[i] ) continue;
|
||||
xx = int((ss.x-boxwidth)/2+pad);
|
||||
Screen.Dim(players[i].GetDisplayColor(),.4,int(xx*hs),int(yy*hs),int(linew*hs),int(lineh*hs));
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ Class OptionMenuItemSWWMVoiceOption : OptionMenuItemOptionBase
|
|||
lst.Clear();
|
||||
String dat = Wads.ReadLump(lmp);
|
||||
dat.Split(lst,"\n",0);
|
||||
for ( int i=0; i<lst.Size(); i++ )
|
||||
foreach ( l:lst )
|
||||
{
|
||||
if ( (lst[i].Length() <= 0) || (lst[i].GetNextCodePoint(0) == 0) || (lst[i].Left(1) == "\n") || (lst[i].Left(1) == "#") ) continue;
|
||||
types.Push(lst[i]);
|
||||
if ( (l.Length() <= 0) || (l.GetNextCodePoint(0) == 0) || (l.Left(1) == "\n") || (l.Left(1) == "#") ) continue;
|
||||
types.Push(l);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
|
|
@ -355,11 +355,11 @@ Class SWWMMainMenu : SWWMCleanMenu
|
|||
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,0,DTA_Rotate,270,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(demotex,false,Screen.GetWidth()/2,0,DTA_ScaleX,scl,DTA_ScaleY,scl,DTA_Alpha,alph,DTA_ColorOverlay,Color(int(255*(1.-(alph**2))),0,0,0));
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(GetMenuYOffset());
|
||||
Super.Drawer();
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(-GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(-GetMenuYOffset());
|
||||
int xx, yy;
|
||||
String str = StringTable.Localize("$SWWM_MODVER");
|
||||
int width = mSmallFont.StringWidth(str)+8;
|
||||
|
|
@ -373,11 +373,11 @@ Class SWWMMainMenu : SWWMCleanMenu
|
|||
|
||||
override bool MouseEvent( int type, int x, int y )
|
||||
{
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(GetMenuYOffset());
|
||||
let res = Super.MouseEvent(type,x,y);
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(-GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(-GetMenuYOffset());
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -432,9 +432,8 @@ Class SWWMBigMenuHack : SWWMCleanMenu
|
|||
}
|
||||
// realign everything to be vertically centered
|
||||
int ntext = 0;
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
foreach ( itm:mDesc.mItems )
|
||||
{
|
||||
let itm = mDesc.mItems[i];
|
||||
if ( (itm.GetClass() == 'ListMenuItemSWWMTextItemM') || (itm.GetClass() == 'ListMenuItemSWWMPatchItemM') )
|
||||
ntext++;
|
||||
}
|
||||
|
|
@ -448,9 +447,9 @@ Class SWWMBigMenuHack : SWWMCleanMenu
|
|||
if ( h == -1 ) h = 200;
|
||||
double oy = int((h-theight)/2);
|
||||
// apply offsets
|
||||
for ( int i=0, j=0; i<mDesc.mItems.Size(); i++ )
|
||||
int j = 0;
|
||||
foreach ( itm:mDesc.mItems )
|
||||
{
|
||||
let itm = mDesc.mItems[i];
|
||||
if ( (itm.GetClass() == 'ListMenuItemSWWMTextItemM') || (itm.GetClass() == 'ListMenuItemSWWMPatchItemM') )
|
||||
{
|
||||
itm.OffsetPositionY(oy+56); // offset from static text header
|
||||
|
|
|
|||
|
|
@ -166,10 +166,10 @@ Class SWWMDamageAccumulator : Inventory
|
|||
// make sure accumulation isn't reentrant
|
||||
if ( inflictor && (inflictor is 'EvisceratorChunk') ) inflictor.bAMBUSH = true;
|
||||
// 何?
|
||||
for ( int i=0; i<amounts.Size(); i++ )
|
||||
foreach ( dmg:amounts )
|
||||
{
|
||||
if ( !Owner ) break;
|
||||
Owner.DamageMobj(inflictor,source,amounts[i],type,DMG_THRUSTLESS|flags);
|
||||
Owner.DamageMobj(inflictor,source,dmg,type,DMG_THRUSTLESS|flags);
|
||||
}
|
||||
// clean up
|
||||
if ( inflictor )
|
||||
|
|
|
|||
|
|
@ -1159,15 +1159,15 @@ Class SWWMBulletTrail : LineTracer
|
|||
t.WaterHitList.Clear();
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,level.PointInSector(pos.xy),dir,dist,0);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
// have to do both because WOW, HOW THE FUCK IS THIS INTENTIONAL???
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Actor.Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Actor.Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = target;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,9 +67,8 @@ Class SWWMGesture : SWWMWeapon
|
|||
{
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( !hnd ) return;
|
||||
for ( int i=0; i<hnd.suckableactors.Size(); i++ )
|
||||
foreach ( a:hnd.suckableactors )
|
||||
{
|
||||
let a = hnd.suckableactors[i];
|
||||
if ( !a || (a.Health > 0) || (a.tics == -1) || !(a.bISMONSTER || a.player) || !a.IsHostile(Owner) ) continue;
|
||||
// check if we can see it
|
||||
if ( !SWWMUtility.InPlayerFOV(Owner.player,a) ) continue;
|
||||
|
|
@ -124,9 +123,9 @@ Class SWWMGesture : SWWMWeapon
|
|||
{
|
||||
// already gesturing
|
||||
// queue if unique
|
||||
for ( int i=0; i<w.sweapon.Size(); i++ )
|
||||
foreach ( sw:w.sweapon )
|
||||
{
|
||||
if ( w.sweapon[i] != a ) continue;
|
||||
if ( sw != a ) continue;
|
||||
return null;
|
||||
}
|
||||
w.sweapon.Push(a);
|
||||
|
|
@ -272,10 +271,10 @@ Class SWWMGesture : SWWMWeapon
|
|||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-3*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("ExplodiumMagProj",origin);
|
||||
p.special1 = 7;
|
||||
|
|
@ -295,7 +294,7 @@ Class SWWMGesture : SWWMWeapon
|
|||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return false;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,DEFMELEERANGE*1.5,pitch,TRF_ABSPOSITION|TRF_THRUACTORS|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -307,7 +306,7 @@ Class SWWMGesture : SWWMWeapon
|
|||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
|
||||
let p = Spawn("ExplodiumMagAttach",origin);
|
||||
p.special1 = 7;
|
||||
|
|
@ -330,7 +329,7 @@ Class SWWMGesture : SWWMWeapon
|
|||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x, y, z, x2, y2, z2, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-1*z);
|
||||
let p = Spawn("LoveHeart",origin);
|
||||
p.target = self;
|
||||
|
|
@ -338,7 +337,7 @@ Class SWWMGesture : SWWMWeapon
|
|||
p.pitch = BulletSlope();
|
||||
p.vel = SWWMUtility.Vec3FromAngles(p.angle,p.pitch)*p.speed;
|
||||
// try to catch target in cone of vision
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(p.pitch,p.angle,0);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Array<HHitList> hits;
|
||||
hits.Clear();
|
||||
int rings = 1;
|
||||
|
|
@ -351,11 +350,11 @@ Class SWWMGesture : SWWMWeapon
|
|||
LineTrace(atan2(dir.y,dir.x),8000.,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType != TRACE_HitActor ) continue;
|
||||
bool addme = true;
|
||||
for ( int k=0; k<hits.Size(); k++ )
|
||||
foreach ( hit:hits )
|
||||
{
|
||||
if ( hits[k].a != d.HitActor ) continue;
|
||||
if ( (hits[k].dir dot x2) < (dir dot x2) )
|
||||
hits[k].dir = dir; // closer to centerpoint
|
||||
if ( hit.a != d.HitActor ) continue;
|
||||
if ( (hit.dir dot x2) < (dir dot x2) )
|
||||
hit.dir = dir; // closer to centerpoint
|
||||
addme = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,16 +313,15 @@ Class LoveHeart : Actor
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int i=0; i<s.Lines.Size(); i++ )
|
||||
foreach ( l:s.Lines )
|
||||
{
|
||||
let l = s.Lines[i];
|
||||
if ( !l.sidedef[LineSide] || (l.sidedef[LineSide].GetTexture(LinePart) != HitTexture) )
|
||||
continue;
|
||||
if ( con.Find(l) < con.Size() ) continue;
|
||||
bool notmatched = true;
|
||||
for ( int j=0; j<con.Size(); j++ )
|
||||
foreach ( c:con )
|
||||
{
|
||||
if ( (l.v1 != con[j].v1) && (l.v2 != con[j].v2) && (l.v1 != con[j].v2) && (l.v2 != con[j].v1) )
|
||||
if ( (l.v1 != c.v1) && (l.v2 != c.v2) && (l.v1 != c.v2) && (l.v2 != c.v1) )
|
||||
continue;
|
||||
notmatched = false;
|
||||
break;
|
||||
|
|
@ -333,8 +332,8 @@ Class LoveHeart : Actor
|
|||
}
|
||||
}
|
||||
while ( found > 0 );
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
con[i].sidedef[LineSide].SetTexture(LinePart,replacewith);
|
||||
foreach ( c:con )
|
||||
c.sidedef[LineSide].SetTexture(LinePart,replacewith);
|
||||
}
|
||||
}
|
||||
else if ( HitSector && HitCeiling )
|
||||
|
|
@ -354,12 +353,10 @@ Class LoveHeart : Actor
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
foreach ( s:con )
|
||||
{
|
||||
Sector s = con[i];
|
||||
for ( int j=0; j<s.Lines.Size(); j++ )
|
||||
foreach ( l:s.Lines )
|
||||
{
|
||||
Line l = s.Lines[j];
|
||||
// only check two-sided
|
||||
if ( !l.sidedef[1] ) continue;
|
||||
// don't check if there's a height difference
|
||||
|
|
@ -380,8 +377,8 @@ Class LoveHeart : Actor
|
|||
}
|
||||
}
|
||||
while ( found > 0 );
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
con[i].SetTexture(1,replacewith);
|
||||
foreach ( s:con )
|
||||
s.SetTexture(1,replacewith);
|
||||
}
|
||||
}
|
||||
else if ( HitSector && !HitCeiling )
|
||||
|
|
@ -401,12 +398,10 @@ Class LoveHeart : Actor
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
foreach ( s:con )
|
||||
{
|
||||
Sector s = con[i];
|
||||
for ( int j=0; j<s.Lines.Size(); j++ )
|
||||
foreach ( l:s.Lines )
|
||||
{
|
||||
Line l = s.Lines[j];
|
||||
// only check two-sided
|
||||
if ( !l.sidedef[1] ) continue;
|
||||
// don't check if there's a height difference
|
||||
|
|
@ -427,8 +422,8 @@ Class LoveHeart : Actor
|
|||
}
|
||||
}
|
||||
while ( found > 0 );
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
con[i].SetTexture(0,replacewith);
|
||||
foreach ( s:con )
|
||||
s.SetTexture(0,replacewith);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ Class SWWMHandler : EventHandler
|
|||
// to avoid some overlaps
|
||||
ui DSMapTitle mapmsg;
|
||||
|
||||
// corruption cards stuff
|
||||
ui bool incardmenu, cardmessaged;
|
||||
|
||||
enum EProfileTimer
|
||||
{
|
||||
PT_WORLDTICK,
|
||||
|
|
@ -78,14 +81,14 @@ Class SWWMHandler : EventHandler
|
|||
indoomvacation = -1;
|
||||
inultdoom2 = -1;
|
||||
// class-checking ones can be initialized here easily
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() == "RLMonster" ) hasdrlamonsters = true;
|
||||
else if ( AllActorClasses[i].GetClassName() == "LOBZombieman" ) haslegionofbones = true;
|
||||
if ( cls.GetClassName() == "RLMonster" ) hasdrlamonsters = true;
|
||||
else if ( cls.GetClassName() == "LOBZombieman" ) haslegionofbones = true;
|
||||
}
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
if ( AllClasses[i].GetClassName() != "CCards_Global" ) continue;
|
||||
if ( cls.GetClassName() != "CCards_Global" ) continue;
|
||||
ccloaded = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -100,11 +103,11 @@ Class SWWMHandler : EventHandler
|
|||
dat.Replace("\r","");
|
||||
list.Clear();
|
||||
dat.Split(list,"\n");
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
foreach ( l:list )
|
||||
{
|
||||
if ( (list[i].Length() == 0) || (list[i].Left(2) == "//") || (list[i].Left(1) == "") )
|
||||
if ( (l.Length() == 0) || (l.Left(2) == "//") || (l.Left(1) == "") )
|
||||
continue;
|
||||
bludtypes.Push(list[i]);
|
||||
bludtypes.Push(l);
|
||||
}
|
||||
}
|
||||
// read damnum colors
|
||||
|
|
@ -118,13 +121,13 @@ Class SWWMHandler : EventHandler
|
|||
dat.Replace("\r","");
|
||||
list.Clear();
|
||||
dat.Split(list,"\n");
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
foreach ( l:list )
|
||||
{
|
||||
if ( (list[i].Length() == 0) || (list[i].Left(1) == "#") || (list[i].Left(1) == "") )
|
||||
if ( (l.Length() == 0) || (l.Left(1) == "#") || (l.Left(1) == "") )
|
||||
continue;
|
||||
int spc = list[i].IndexOf(" ");
|
||||
damtypes.Push(list[i].Left(spc));
|
||||
damcolors.Push(list[i].Mid(spc+1));
|
||||
int spc = l.IndexOf(" ");
|
||||
damtypes.Push(l.Left(spc));
|
||||
damcolors.Push(l.Mid(spc+1));
|
||||
}
|
||||
}
|
||||
// cache various services into the handler on register
|
||||
|
|
@ -247,7 +250,19 @@ Class SWWMHandler : EventHandler
|
|||
OnelinerUITick();
|
||||
FlashUITick();
|
||||
VanillaBossUITick();
|
||||
MapstartUITick();
|
||||
// corruption cards dialogue
|
||||
if ( ccloaded && !gdat.ccstartonce && !cardmessaged && (gamestate == GS_LEVEL) )
|
||||
{
|
||||
let m = Menu.GetCurrentMenu();
|
||||
if ( m && (m.GetClassName() == 'CorruptionCardsSelector') ) incardmenu = true;
|
||||
else if ( incardmenu )
|
||||
{
|
||||
if ( !swwm_ccmessage ) SWWMDialogues.StartSeq(SWWMDLG_CC);
|
||||
CVar.GetCVar('swwm_ccmessage').SetBool(true);
|
||||
cardmessaged = true;
|
||||
SendNetworkEvent("swwmccstart");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override void WorldLinePreActivated( WorldEvent e )
|
||||
|
|
|
|||
|
|
@ -350,9 +350,9 @@ Class Demolitionist : PlayerPawn
|
|||
void CheatGive_Ammo()
|
||||
{
|
||||
// Max out all mod ammo
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<Ammo>)(AllActorClasses[i]);
|
||||
let type = (class<Ammo>)(cls);
|
||||
if ( !type || type.IsAbstract() || (type.GetParentClass() != 'SWWMAmmo') ) continue;
|
||||
let ammoitem = Ammo(FindInventory(type));
|
||||
if ( !ammoitem )
|
||||
|
|
@ -383,9 +383,9 @@ Class Demolitionist : PlayerPawn
|
|||
void CheatGive_Armor()
|
||||
{
|
||||
// only give armors that have spares associated
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (Class<SWWMSpareArmor>)(AllActorClasses[i]);
|
||||
let type = (Class<SWWMSpareArmor>)(cls);
|
||||
if ( !type || type.IsAbstract() || (type == 'SWWMSpareArmor') ) continue;
|
||||
if ( GetReplacement(type) != type ) continue;
|
||||
let def = GetDefaultByType(type);
|
||||
|
|
@ -400,9 +400,9 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
void CheatGive_Keys()
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (Class<Key>)(AllActorClasses[i]);
|
||||
let type = (Class<Key>)(cls);
|
||||
if ( !type ) continue;
|
||||
let keyitem = GetDefaultByType(type);
|
||||
if ( !keyitem.special1 ) continue;
|
||||
|
|
@ -424,9 +424,9 @@ Class Demolitionist : PlayerPawn
|
|||
void CheatGive_Weapons()
|
||||
{
|
||||
let savedpending = player.PendingWeapon;
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<Weapon>)(AllActorClasses[i]);
|
||||
let type = (class<Weapon>)(cls);
|
||||
if ( !type || (type == "Weapon") ) continue;
|
||||
// Don't give already owned weapons
|
||||
let owned = FindInventory(type);
|
||||
|
|
@ -446,9 +446,9 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
void CheatGive_Artifacts( int amount = 0 )
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<Inventory>)(AllActorClasses[i]);
|
||||
let type = (class<Inventory>)(cls);
|
||||
if ( !type ) continue;
|
||||
let rep = GetReplacement(type);
|
||||
// don't give replaced items
|
||||
|
|
@ -470,9 +470,9 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
void CheatGive_PuzzlePieces( int amount = 0 )
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<PuzzleItem>)(AllActorClasses[i]);
|
||||
let type = (class<PuzzleItem>)(cls);
|
||||
if ( !type ) continue;
|
||||
let def = GetDefaultByType(type);
|
||||
if ( !def.Icon.isValid() ) continue;
|
||||
|
|
@ -481,14 +481,14 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
void CheatGive_Collectibles()
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let type = (class<SWWMCollectible>)(AllActorClasses[i]);
|
||||
let type = (class<SWWMCollectible>)(cls);
|
||||
if ( !type || (type == 'SWWMCollectible') ) continue;
|
||||
let def = GetDefaultByType(type);
|
||||
// check that we can collect it in this IWAD
|
||||
if ( !def.ValidGame() ) continue;
|
||||
let item = Inventory(Spawn(AllActorClasses[i]));
|
||||
let item = Inventory(Spawn(cls));
|
||||
SWWMCollectible(item).propagated = true; // no score or anims
|
||||
if ( !item.CallTryPickup(self) ) item.Destroy();
|
||||
}
|
||||
|
|
@ -731,16 +731,15 @@ Class Demolitionist : PlayerPawn
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int i=0; i<s.Lines.Size(); i++ )
|
||||
foreach ( l:s.Lines )
|
||||
{
|
||||
let l = s.Lines[i];
|
||||
if ( !l.sidedef[d.LineSide] || (l.sidedef[d.LineSide].GetTexture(d.LinePart) != d.HitTexture) )
|
||||
continue;
|
||||
if ( con.Find(l) < con.Size() ) continue;
|
||||
bool notmatched = true;
|
||||
for ( int j=0; j<con.Size(); j++ )
|
||||
foreach ( c:con )
|
||||
{
|
||||
if ( (l.v1 != con[j].v1) && (l.v2 != con[j].v2) && (l.v1 != con[j].v2) && (l.v2 != con[j].v1) )
|
||||
if ( (l.v1 != c.v1) && (l.v2 != c.v2) && (l.v1 != c.v2) && (l.v2 != c.v1) )
|
||||
continue;
|
||||
notmatched = false;
|
||||
break;
|
||||
|
|
@ -751,8 +750,8 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
}
|
||||
while ( found > 0 );
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
con[i].sidedef[d.LineSide].SetTexture(d.LinePart,replacewith);
|
||||
foreach ( c:con )
|
||||
c.sidedef[d.LineSide].SetTexture(d.LinePart,replacewith);
|
||||
}
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitCeiling )
|
||||
|
|
@ -772,12 +771,10 @@ Class Demolitionist : PlayerPawn
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
foreach ( s:con )
|
||||
{
|
||||
Sector s = con[i];
|
||||
for ( int j=0; j<s.Lines.Size(); j++ )
|
||||
foreach ( l:s.Lines )
|
||||
{
|
||||
Line l = s.Lines[j];
|
||||
// only check two-sided
|
||||
if ( !l.sidedef[1] ) continue;
|
||||
// don't check if there's a height difference
|
||||
|
|
@ -798,8 +795,8 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
}
|
||||
while ( found > 0 );
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
con[i].SetTexture(1,replacewith);
|
||||
foreach ( s:con )
|
||||
s.SetTexture(1,replacewith);
|
||||
}
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitFloor )
|
||||
|
|
@ -819,12 +816,10 @@ Class Demolitionist : PlayerPawn
|
|||
do
|
||||
{
|
||||
found = 0;
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
foreach ( s:con )
|
||||
{
|
||||
Sector s = con[i];
|
||||
for ( int j=0; j<s.Lines.Size(); j++ )
|
||||
foreach ( l:s.Lines )
|
||||
{
|
||||
Line l = s.Lines[j];
|
||||
// only check two-sided
|
||||
if ( !l.sidedef[1] ) continue;
|
||||
// don't check if there's a height difference
|
||||
|
|
@ -845,8 +840,8 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
}
|
||||
while ( found > 0 );
|
||||
for ( int i=0; i<con.Size(); i++ )
|
||||
con[i].SetTexture(0,replacewith);
|
||||
foreach ( s:con )
|
||||
s.SetTexture(0,replacewith);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -856,7 +851,7 @@ Class Demolitionist : PlayerPawn
|
|||
return;
|
||||
if ( !itrace ) itrace = new("SWWMItemTracer");
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz);
|
||||
Sector os = level.PointInSector(origin.xy);
|
||||
int rings = 1;
|
||||
|
|
@ -1840,9 +1835,9 @@ Class Demolitionist : PlayerPawn
|
|||
{
|
||||
if ( (p.Type != swwm_PolyobjectHandle.POTYP_CRUSH) && (p.Type != swwm_PolyobjectHandle.POTYP_HURT) )
|
||||
continue;
|
||||
for ( int i=0; i<touching.Size(); i++ )
|
||||
foreach ( l:touching )
|
||||
{
|
||||
if ( p.Lines.Find(touching[i]) >= p.Lines.Size() ) continue;
|
||||
if ( p.Lines.Find(l) >= p.Lines.Size() ) continue;
|
||||
Vector2 diragainst = pos.xy-p.GetPos();
|
||||
double vsiz = diragainst.length();
|
||||
if ( vsiz > 0 ) diragainst /= vsiz;
|
||||
|
|
@ -2060,7 +2055,7 @@ Class Demolitionist : PlayerPawn
|
|||
{
|
||||
double fs = TweakSpeed();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 accel;
|
||||
if ( (player.cmd.upmove == -32768) || sendtoground )
|
||||
{
|
||||
|
|
@ -2107,6 +2102,7 @@ Class Demolitionist : PlayerPawn
|
|||
if ( isdashing ) player.cmd.forwardmove = player.cmd.sidemove = 0;
|
||||
if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) )
|
||||
{
|
||||
player.cheats &= ~CF_SCALEDNOLERP; // we cannot permit this flag here
|
||||
player.onground = false;
|
||||
if ( player.turnticks )
|
||||
{
|
||||
|
|
@ -2131,7 +2127,7 @@ Class Demolitionist : PlayerPawn
|
|||
if ( player.cmd.buttons&BT_CROUCH ) jcmove -= 4096.;
|
||||
if ( CanCrouch() && (player.crouchfactor != -1) ) fs *= player.crouchfactor;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector2 nmove = NormalizedMove();
|
||||
Vector3 accel = x*nmove.x-y*nmove.y+z*jcmove;
|
||||
accel *= fs/320.;
|
||||
|
|
@ -2151,6 +2147,7 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
else
|
||||
{
|
||||
player.cheats |= CF_SCALEDNOLERP; // smoother turning
|
||||
if ( player.turnticks )
|
||||
{
|
||||
player.turnticks--;
|
||||
|
|
@ -2256,7 +2253,7 @@ Class Demolitionist : PlayerPawn
|
|||
if ( !(player.cheats & CF_PREDICTING) && !(player.cmd.forwardmove|player.cmd.sidemove) )
|
||||
PlayIdle();
|
||||
Vector3 dodge = (0,0,0), x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
int fm = player.cmd.forwardmove;
|
||||
int sm = player.cmd.sidemove;
|
||||
if ( !(fm|sm) ) fm = 1;
|
||||
|
|
@ -3186,7 +3183,7 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
// notify key obtained to flash icon
|
||||
if ( item is 'Key' )
|
||||
Console.MidPrint(null,"swwmkeyget."..item.GetClassName());
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmkeyget."..item.GetClassName(),PlayerNumber());
|
||||
}
|
||||
override bool UseInventory( Inventory item )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
// for intermissions, to prevent repetition
|
||||
ui Array<int> lasttip, lastart;
|
||||
// stupid dumb thing
|
||||
ui int aprcheck;
|
||||
ui bool aprilfools;
|
||||
ui Font aprfnt;
|
||||
|
||||
override void NewGame()
|
||||
|
|
@ -51,7 +51,11 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
|
||||
override void WorldTick()
|
||||
{
|
||||
if ( mttics > 0 ) mttics--;
|
||||
if ( mttics > 0 )
|
||||
{
|
||||
mttics--;
|
||||
if ( mttics == 0 ) EventHandler.SendInterfaceEvent(consoleplayer,"swwmmaptitle");
|
||||
}
|
||||
maptime++;
|
||||
// in case we start late?
|
||||
if ( multiplayer && !mpwarned )
|
||||
|
|
@ -68,7 +72,7 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
while ( t = sti.Next() ) stinkers.Push(t);
|
||||
if ( stinkers.Size() > 0 )
|
||||
{
|
||||
for ( int i=0; i<stinkers.Size(); i++ ) Console.Printf("%s is not STAT_STATIC!",stinkers[i].GetClassName());
|
||||
foreach ( s:stinkers ) Console.Printf("%s is not STAT_STATIC!",s.GetClassName());
|
||||
ThrowAbortException("Panic! %d static thinker%s been tampered with!",stinkers.Size(),(stinkers.Size()==1)?" has":"s have");
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +99,7 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
else if ( mmz >= 1. ) mmz = 1.;
|
||||
else mmz = .5;
|
||||
CVar.FindCVar('swwm_mm_zoom').SetFloat(mmz);
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmaprcheck");
|
||||
if ( !e.IsSaveGame ) return;
|
||||
// save version checker
|
||||
tainted = false;
|
||||
|
|
@ -138,10 +143,10 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
lst.Clear();
|
||||
String dat = Wads.ReadLump(lmp);
|
||||
dat.Split(lst,"\n",0);
|
||||
for ( int i=0; i<lst.Size(); i++ )
|
||||
foreach ( l:lst )
|
||||
{
|
||||
if ( (lst[i].Length() <= 0) || (lst[i].GetNextCodePoint(0) == 0) || (lst[i].Left(1) == "\n") || (lst[i].Left(1) == "#") ) continue;
|
||||
types.Push(lst[i]);
|
||||
if ( (l.Length() <= 0) || (l.GetNextCodePoint(0) == 0) || (l.Left(1) == "\n") || (l.Left(1) == "#") ) continue;
|
||||
types.Push(l);
|
||||
}
|
||||
}
|
||||
let cv = CVar.FindCVar('swwm_voicetype');
|
||||
|
|
@ -184,40 +189,61 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
override void RenderOverlay( RenderEvent e )
|
||||
{
|
||||
// silly april fools thing
|
||||
if ( (aprcheck == 2) && (gamestate == GS_LEVEL) )
|
||||
if ( aprilfools && (gamestate == GS_LEVEL) )
|
||||
{
|
||||
String str = "Unregistered Ultracam";
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
override void InterfaceProcess( ConsoleEvent e )
|
||||
{
|
||||
if ( e.IsManual ) return;
|
||||
if ( e.Name ~== "swwmmaptitle" )
|
||||
{
|
||||
if ( (gamestate != GS_LEVEL) || !swwm_showmaptitle ) return;
|
||||
StatusBar.AttachMessage(new("DSMapTitle").Init(),-7777);
|
||||
}
|
||||
else if ( e.Name ~== "swwmaprcheck" )
|
||||
{
|
||||
if ( gamestate != GS_LEVEL ) return;
|
||||
if ( SystemTime.Format("%d%m",SystemTime.Now()) == "0104" )
|
||||
{
|
||||
if ( !aprilfools ) SWWMDialogues.StartSeq(SWWMDLG_FOOL);
|
||||
aprilfools = true;
|
||||
}
|
||||
else aprilfools = false;
|
||||
}
|
||||
}
|
||||
|
||||
override void ConsoleProcess( ConsoleEvent e )
|
||||
{
|
||||
if ( e.Name ~== "swwmresetmmcolors" )
|
||||
{
|
||||
Array<String> cvarlist;
|
||||
SWWMUtility.GetCVars(cvarlist);
|
||||
for ( int i=0; i<cvarlist.Size(); i++ )
|
||||
foreach ( cv:cvarlist )
|
||||
{
|
||||
if ( (cvarlist[i].Left(8) != "swwm_mm_")
|
||||
|| (cvarlist[i].IndexOf("color") == -1)
|
||||
|| (cvarlist[i] == "swwm_mm_colorset") )
|
||||
if ( (cv.Left(8) != "swwm_mm_")
|
||||
|| (cv.IndexOf("color") == -1)
|
||||
|| (cv == "swwm_mm_colorset") )
|
||||
continue;
|
||||
CVar.FindCVar(cvarlist[i]).ResetToDefault();
|
||||
CVar.FindCVar(cv).ResetToDefault();
|
||||
}
|
||||
}
|
||||
else if ( e.Name ~== "swwmresetcvars" )
|
||||
{
|
||||
Array<String> cvarlist;
|
||||
SWWMUtility.GetCVars(cvarlist);
|
||||
for ( int i=0; i<cvarlist.Size(); i++ )
|
||||
foreach ( cv:cvarlist )
|
||||
{
|
||||
// don't reset these
|
||||
if ( (cvarlist[i] == "swwm_playtime")
|
||||
|| (cvarlist[i] == "swwm_achievementstate")
|
||||
|| (cvarlist[i] == "swwm_achievementprogress") )
|
||||
if ( (cv == "swwm_playtime")
|
||||
|| (cv == "swwm_achievementstate")
|
||||
|| (cv == "swwm_achievementprogress") )
|
||||
continue;
|
||||
CVar.FindCVar(cvarlist[i]).ResetToDefault();
|
||||
CVar.FindCVar(cv).ResetToDefault();
|
||||
}
|
||||
}
|
||||
else if ( e.Name ~== "swwmresettooltips" )
|
||||
|
|
@ -230,10 +256,10 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
// debug
|
||||
Array<String> cvarlist;
|
||||
SWWMUtility.GetCVars(cvarlist);
|
||||
for ( int i=0; i<cvarlist.Size(); i++ )
|
||||
foreach ( cv:cvarlist )
|
||||
{
|
||||
let cv = CVar.FindCVar(cvarlist[i]);
|
||||
Console.Printf(cvarlist[i].." = "..cv.GetString());
|
||||
let rcv = CVar.FindCVar(cv);
|
||||
Console.Printf(cv.." = "..rcv.GetString());
|
||||
}
|
||||
}
|
||||
else if ( e.Name ~== "swwmgetplaytime" )
|
||||
|
|
@ -265,11 +291,11 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
}
|
||||
else if ( e.Name ~== "swwmresetachievements" )
|
||||
{
|
||||
for ( int i=0; i<achievementinfo.Size(); i++ )
|
||||
foreach ( inf:achievementinfo )
|
||||
{
|
||||
achievementstate.Insert(achievementinfo[i].basename,"0");
|
||||
if ( achievementinfo[i].maxval )
|
||||
achievementprogress.Insert(achievementinfo[i].basename,"0");
|
||||
achievementstate.Insert(inf.basename,"0");
|
||||
if ( inf.maxval )
|
||||
achievementprogress.Insert(inf.basename,"0");
|
||||
}
|
||||
}
|
||||
else if ( e.Name ~== "swwmdumpachievements" )
|
||||
|
|
@ -295,9 +321,8 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
else if ( e.Name ~== "swwmdumpthinkers" )
|
||||
{
|
||||
Array<Class<Thinker> > sdefs;
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
foreach ( cls : AllClasses )
|
||||
{
|
||||
let cls = AllClasses[i];
|
||||
if ( !(cls is 'Thinker') || (cls is 'Actor') || (cls == 'Thinker') )
|
||||
continue;
|
||||
sdefs.Push(cls);
|
||||
|
|
@ -334,9 +359,8 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
}
|
||||
else if ( e.Name ~== "swwmdumphandlers" )
|
||||
{
|
||||
for ( int i=0; i<AllClasses.Size(); i++ )
|
||||
foreach ( cls:AllClasses )
|
||||
{
|
||||
let cls = AllClasses[i];
|
||||
if ( !(cls is 'StaticEventHandler') || (cls == 'StaticEventHandler') || (cls == 'EventHandler') )
|
||||
continue;
|
||||
bool reg = (cls is 'EventHandler')?EventHandler.Find((Class<EventHandler>)(cls)):StaticEventHandler.Find((Class<StaticEventHandler>)(cls));
|
||||
|
|
@ -354,25 +378,25 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
bool skipme = true;
|
||||
Console.Printf("[default]");
|
||||
bool fail = false;
|
||||
for ( int i=0; i<lst.Size(); i++ )
|
||||
foreach ( l:lst )
|
||||
{
|
||||
if ( lst[i].Left(7) == "// E1M8" ) skipme = false;
|
||||
if ( lst[i].Left(5) != "SWWM_" ) continue;
|
||||
if ( l.Left(7) == "// E1M8" ) skipme = false;
|
||||
if ( l.Left(5) != "SWWM_" ) continue;
|
||||
if ( skipme ) continue;
|
||||
// extract string
|
||||
int st = lst[i].IndexOf("\"")+1;
|
||||
int en = lst[i].RightIndexOf("\"");
|
||||
String line = lst[i].Mid(st,en-st);
|
||||
int st = l.IndexOf("\"")+1;
|
||||
int en = l.RightIndexOf("\"");
|
||||
String line = l.Mid(st,en-st);
|
||||
//line.Filter(); // DOES NOT WORK, FOR SOME REASON
|
||||
line.Substitute("\\\"","\"");
|
||||
line.Substitute("\\c","\c");
|
||||
BrokenLines l = f.BreakLines(line,220);
|
||||
if ( l.Count() > 4 )
|
||||
BrokenLines bl = f.BreakLines(line,220);
|
||||
if ( bl.Count() > 4 )
|
||||
{
|
||||
Console.Printf("\cg%s [%d]\c-",lst[i].Left(st-4),l.Count());
|
||||
Console.Printf("\cg%s [%d]\c-",l.Left(st-4),bl.Count());
|
||||
fail = true;
|
||||
}
|
||||
l.Destroy();
|
||||
bl.Destroy();
|
||||
}
|
||||
if ( !fail ) Console.Printf("ALL OK");
|
||||
lmp = Wads.FindLumpFullName("language.es_dlg");
|
||||
|
|
@ -381,25 +405,25 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
dat.Split(lst,"\n",0);
|
||||
skipme = true;
|
||||
Console.Printf("[es]");
|
||||
for ( int i=0; i<lst.Size(); i++ )
|
||||
foreach ( l:lst )
|
||||
{
|
||||
if ( lst[i].Left(7) == "// E1M8" ) skipme = false;
|
||||
if ( lst[i].Left(5) != "SWWM_" ) continue;
|
||||
if ( l.Left(7) == "// E1M8" ) skipme = false;
|
||||
if ( l.Left(5) != "SWWM_" ) continue;
|
||||
if ( skipme ) continue;
|
||||
// extract string
|
||||
int st = lst[i].IndexOf("\"")+1;
|
||||
int en = lst[i].RightIndexOf("\"");
|
||||
String line = lst[i].Mid(st,en-st);
|
||||
int st = l.IndexOf("\"")+1;
|
||||
int en = l.RightIndexOf("\"");
|
||||
String line = l.Mid(st,en-st);
|
||||
//line.Filter(); // DOES NOT WORK, FOR SOME REASON
|
||||
line.Substitute("\\\"","\"");
|
||||
line.Substitute("\\c","\c");
|
||||
BrokenLines l = f.BreakLines(line,220);
|
||||
if ( l.Count() > 4 )
|
||||
BrokenLines bl = f.BreakLines(line,220);
|
||||
if ( bl.Count() > 4 )
|
||||
{
|
||||
Console.Printf("\cg%s [%d]\c-",lst[i].Left(st-4),l.Count());
|
||||
Console.Printf("\cg%s [%d]\c-",l.Left(st-4),bl.Count());
|
||||
fail = true;
|
||||
}
|
||||
l.Destroy();
|
||||
bl.Destroy();
|
||||
}
|
||||
if ( !fail ) Console.Printf("ALL OK");
|
||||
}
|
||||
|
|
@ -437,13 +461,6 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
{
|
||||
if ( !uid ) EventHandler.SendNetworkEvent("swwmsessionid",SystemTime.Now());
|
||||
if ( gamestate != GS_TITLELEVEL ) titlefirst = true; // we skip it
|
||||
if ( !aprcheck && (gamestate == GS_LEVEL) )
|
||||
{
|
||||
aprfnt = Font.GetFont("TewiFontOutline");
|
||||
aprcheck = 1;
|
||||
if ( SystemTime.Format("%d%m",SystemTime.Now()) == "0104" )
|
||||
aprcheck = 2;
|
||||
}
|
||||
if ( (gametic > 0) && !(gametic%GameTicRate) )
|
||||
{
|
||||
let pt = CVar.FindCVar('swwm_playtime');
|
||||
|
|
@ -451,8 +468,6 @@ Class SWWMStaticHandler : StaticEventHandler
|
|||
pt.SetInt(ct+1);
|
||||
}
|
||||
if ( gamestate != GS_LEVEL ) return;
|
||||
if ( (mttics == 1) && swwm_showmaptitle )
|
||||
StatusBar.AttachMessage(new("DSMapTitle").Init(),-7777);
|
||||
CheckAllAchievements();
|
||||
if ( gametic != checktic ) return;
|
||||
String cver = StringTable.Localize("$SWWM_SHORTVER");
|
||||
|
|
|
|||
|
|
@ -186,9 +186,9 @@ Class SWWMCachedLockInfo : SWWMStaticThinker
|
|||
let ti = ThinkerIterator.Create("SWWMCachedLockInfo",STAT_STATIC);
|
||||
SWWMCachedLockInfo cli = SWWMCachedLockInfo(ti.Next());
|
||||
if ( !cli ) return false;
|
||||
for ( int i=0; i<cli.ent.Size(); i++ )
|
||||
foreach ( e:cli.ent )
|
||||
{
|
||||
if ( cli.ent[i].locknumber == l )
|
||||
if ( e.locknumber == l )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -199,10 +199,10 @@ Class SWWMCachedLockInfo : SWWMStaticThinker
|
|||
let ti = ThinkerIterator.Create("SWWMCachedLockInfo",STAT_STATIC);
|
||||
SWWMCachedLockInfo cli = SWWMCachedLockInfo(ti.Next());
|
||||
if ( !cli ) return 0;
|
||||
for ( int i=0; i<cli.ent.Size(); i++ )
|
||||
foreach ( e:cli.ent )
|
||||
{
|
||||
if ( (cli.ent[i].locknumber == l) && cli.ent[i].hascolor )
|
||||
return cli.ent[i].mapcolor;
|
||||
if ( (e.locknumber == l) && e.hascolor )
|
||||
return e.mapcolor;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,9 +149,9 @@ Class SWWMStats : SWWMStaticThinker
|
|||
|
||||
bool GotWeapon( Class<Weapon> which )
|
||||
{
|
||||
for ( int i=0; i<alreadygot.Size(); i++ )
|
||||
foreach ( a:alreadygot )
|
||||
{
|
||||
if ( alreadygot[i] == which ) return true;
|
||||
if ( a == which ) return true;
|
||||
}
|
||||
alreadygot.Push(which);
|
||||
return false;
|
||||
|
|
@ -256,11 +256,11 @@ Class SWWMStats : SWWMStaticThinker
|
|||
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
Class<Actor> mvictim = SWWMUtility.MergeMonster(hnd,victim.GetClass());
|
||||
bool found = false;
|
||||
for ( int i=0; i<mstats.Size(); i++ )
|
||||
foreach ( ms:mstats )
|
||||
{
|
||||
if ( mstats[i].m != mvictim ) continue;
|
||||
if ( ms.m != mvictim ) continue;
|
||||
found = true;
|
||||
mstats[i].kills++;
|
||||
ms.kills++;
|
||||
break;
|
||||
}
|
||||
if ( !found )
|
||||
|
|
@ -405,9 +405,9 @@ Class SWWMLoreLibrary : SWWMStaticThinker
|
|||
if ( ref ~== "Administrators" ) return true; // not met
|
||||
}
|
||||
// check if entry is for a collectible
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
let c = (Class<SWWMCollectible>)(AllActorClasses[i]);
|
||||
let c = (Class<SWWMCollectible>)(cls);
|
||||
if ( !c || (c == 'SWWMCollectible') ) continue;
|
||||
let def = GetDefaultByType(c);
|
||||
// skip if we match and it's not for this game
|
||||
|
|
@ -548,9 +548,9 @@ Class SWWMLoreLibrary : SWWMStaticThinker
|
|||
text = "SWWM_LORETXT_ZANAVETH32"; // iagb happened
|
||||
}
|
||||
// check if existing
|
||||
for ( int i=0; i<ent.Size(); i++ )
|
||||
foreach ( e:ent )
|
||||
{
|
||||
if ( ent[i].tag != "$"..tag ) continue;
|
||||
if ( e.tag != "$"..tag ) continue;
|
||||
return true;
|
||||
}
|
||||
SWWMLore e = new("SWWMLore");
|
||||
|
|
@ -612,10 +612,10 @@ Class SWWMLoreLibrary : SWWMStaticThinker
|
|||
rel.Clear();
|
||||
String assocstr = StringTable.Localize(ent[idx].assoc);
|
||||
assocstr.Split(rel,";",0);
|
||||
for ( int i=0; i<rel.Size(); i++ )
|
||||
foreach ( r:rel )
|
||||
{
|
||||
if ( (rel[i] != "") && !DirectAdd(rel[i]) )
|
||||
Console.Printf("Related entry \"%s\" not found, please update LANGUAGE.txt",rel[i]);
|
||||
if ( (r != "") && !DirectAdd(r) )
|
||||
Console.Printf("Related entry \"%s\" not found, please update LANGUAGE.txt",r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,19 +129,19 @@ Class SWWMUtility
|
|||
dat.Replace("\r","");
|
||||
list.Clear();
|
||||
dat.Split(list,"\n");
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
foreach ( l:list )
|
||||
{
|
||||
if ( (list[i].Length() == 0) || (list[i].Left(2) == "//") || (list[i].Left(1) == "") )
|
||||
if ( (l.Length() == 0) || (l.Left(2) == "//") || (l.Left(1) == "") )
|
||||
continue;
|
||||
int eq = list[i].IndexOf("=");
|
||||
int eq = l.IndexOf("=");
|
||||
if ( eq == -1 ) continue;
|
||||
list[i].Truncate(eq);
|
||||
l.Truncate(eq);
|
||||
ln.Clear();
|
||||
list[i].Split(ln," ",0);
|
||||
for ( int j=0; j<ln.Size(); j++ )
|
||||
l.Split(ln," ",0);
|
||||
foreach ( w:ln )
|
||||
{
|
||||
if ( (ln[j].Left(5) != "swwm_") ) continue;
|
||||
cvarlist.Push(ln[j]);
|
||||
if ( (w.Left(5) != "swwm_") ) continue;
|
||||
cvarlist.Push(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -154,15 +154,14 @@ Class SWWMUtility
|
|||
String tt = v.GetString();
|
||||
Array<String> wpn;
|
||||
tt.Split(wpn,",");
|
||||
for ( int i=0; i<wpn.Size(); i++ )
|
||||
foreach ( w:wpn )
|
||||
{
|
||||
if ( wpn[i] == which.GetClassName() ) return;
|
||||
if ( w == which.GetClassName() ) return;
|
||||
}
|
||||
if ( tt == "" ) tt = which.GetClassName();
|
||||
else tt = tt..","..which.GetClassName();
|
||||
v.SetString(tt);
|
||||
// this is kinda hacky but hey, as long as it works
|
||||
Console.MidPrint(null,"swwmwpntooltip."..which.GetClassName());
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmwpntooltip."..which.GetClassName());
|
||||
v = CVar.FindCVar('swwm_tooltipnote');
|
||||
if ( v.GetBool() ) return;
|
||||
v.SetBool(true);
|
||||
|
|
@ -250,6 +249,14 @@ Class SWWMUtility
|
|||
return (v2d.x,v2d.y,0);
|
||||
}
|
||||
|
||||
// new GetAxes
|
||||
static clearscope Vector3, Vector3, Vector3 GetAxes( double angle, double pitch, double roll )
|
||||
{
|
||||
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // right-handed Y
|
||||
Quat r = Quat.FromAngles(angle,pitch,roll);
|
||||
return r*x,r*y,r*z;
|
||||
}
|
||||
|
||||
// thanks zscript
|
||||
static clearscope double fract( double a )
|
||||
{
|
||||
|
|
@ -794,9 +801,8 @@ Class SWWMUtility
|
|||
if ( (part == 1) && (cb.csec == s) ) return true;
|
||||
}
|
||||
// hard mode: look for all lines/actors with movement specials referencing us
|
||||
for ( int i=0; i<level.Lines.Size(); i++ )
|
||||
foreach ( l:level.Lines )
|
||||
{
|
||||
Line l = level.Lines[i];
|
||||
if ( !l.special ) continue;
|
||||
if ( (part && (l.special >= 10) && (l.special <= 13))
|
||||
|| (!part && (l.special >= 20) && (l.special <= 25))
|
||||
|
|
@ -929,9 +935,8 @@ Class SWWMUtility
|
|||
static play String GetFunTag( SWWMHandler hnd, Actor a, String defstr = "" )
|
||||
{
|
||||
// look up fun tag services if available
|
||||
for ( int i=0; i<hnd.funtagsv.Size(); i++ )
|
||||
foreach ( sv:hnd.funtagsv )
|
||||
{
|
||||
let sv = hnd.funtagsv[i];
|
||||
if ( !sv ) continue;
|
||||
String res = sv.GetString("GetFunTag",objectArg:a);
|
||||
if ( res == "" ) continue;
|
||||
|
|
@ -1283,22 +1288,11 @@ Class SWWMUtility
|
|||
if ( (!a || (a.Health <= 0)) && (!(flags&DE_COUNTENEMIES) || hostile) && (!(flags&DE_COUNTSTEALTH) || inactive) ) nkill++;
|
||||
}
|
||||
// traverse portals (needed since BlockThingsIterator can't properly cross sector portals in both vertical directions)
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( !hnd || (hnd.psectors.Size() <= 1) )
|
||||
{
|
||||
if ( (Instigator is 'Demolitionist') && haskilled && !(flags&DE_NONEXPLOSIVE) )
|
||||
{
|
||||
let demo = Demolitionist(Instigator);
|
||||
if ( (gametic > demo.lastbang+30) && (!hnd || (gametic > hnd.lastcombat+10)) && !Random[DemoLines](0,1) )
|
||||
demo.lastbang = SWWMHandler.AddOneLiner("blast",2,10);
|
||||
}
|
||||
return nhit, nkill;
|
||||
}
|
||||
int thisgroup = Source.CurSector.portalgroup;
|
||||
for ( int i=0; i<hnd.psectors.Size(); i++ )
|
||||
for ( int i=0; i<level.GetPortalGroupCount(); i++ )
|
||||
{
|
||||
if ( i == thisgroup ) continue;
|
||||
Vector2 relpos = Source.pos.xy+PortalDisplacement(level.Sectors[hnd.psectors[thisgroup]],level.Sectors[hnd.psectors[i]]);
|
||||
Vector2 relpos = Source.pos.xy+level.GetDisplacement(thisgroup,i);
|
||||
bi = BlockThingsIterator.CreateFromPos(relpos.x,relpos.y,Source.pos.z,Source.pos.z+Source.height,ExplosionRadius,false);
|
||||
while ( bi.Next() )
|
||||
{
|
||||
|
|
@ -1379,8 +1373,9 @@ Class SWWMUtility
|
|||
}
|
||||
if ( (Instigator is 'Demolitionist') && haskilled && !(flags&DE_NONEXPLOSIVE) )
|
||||
{
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
let demo = Demolitionist(Instigator);
|
||||
if ( (gametic > demo.lastbang+30) && (gametic > hnd.lastcombat+10) && !Random[DemoLines](0,1) )
|
||||
if ( hnd && (gametic > demo.lastbang+30) && (gametic > hnd.lastcombat+10) && !Random[DemoLines](0,1) )
|
||||
demo.lastbang = SWWMHandler.AddOneLiner("blast",2,10);
|
||||
}
|
||||
return nhit, nkill;
|
||||
|
|
@ -1536,9 +1531,9 @@ Class SWWMUtility
|
|||
static play Class<Actor> MergeMonster( SWWMHandler hnd, Class<Actor> a )
|
||||
{
|
||||
// see if any services can resolve this first
|
||||
foreach ( sv:hnd.mergemonstersv )
|
||||
for ( int i=0; i<hnd.mergemonstersv.Size(); i++ )
|
||||
{
|
||||
let sv = hnd.mergemonstersv[i];
|
||||
if ( !sv ) continue;
|
||||
String res = sv.GetString("MergeMonster",stringArg:a.GetClassName());
|
||||
if ( res == "" ) continue;
|
||||
|
|
@ -1765,16 +1760,6 @@ Class SWWMUtility
|
|||
return (al+ah+bl+bh)*.25;
|
||||
}
|
||||
|
||||
// get how much a sector's physical position is offset by portals
|
||||
static Vector2 PortalDisplacement( Sector a, Sector b )
|
||||
{
|
||||
if ( a.portalgroup == b.portalgroup ) return (0,0); // ez
|
||||
// we can't access level.displacements, so we gotta improvise
|
||||
Vector2 pdisp = b.centerspot-a.centerspot;
|
||||
Vector2 vdisp = level.Vec2Diff(a.centerspot,b.centerspot);
|
||||
return pdisp-vdisp;
|
||||
}
|
||||
|
||||
// shorthand for some of these checks (these are generally used by the mission briefing system)
|
||||
static bool IsKnownMap()
|
||||
{
|
||||
|
|
@ -1807,9 +1792,9 @@ Class SWWMUtility
|
|||
// detect eviternity (naive method)
|
||||
static bool IsEviternity()
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() != "Archangelus" )
|
||||
if ( cls.GetClassName() != "Archangelus" )
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1823,9 +1808,9 @@ Class SWWMUtility
|
|||
if ( Wads.FindLump("VACABEX") != -1 )
|
||||
{
|
||||
// just to make sure
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
foreach ( cls:AllActorClasses )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() != "Babe" )
|
||||
if ( cls.GetClassName() != "Babe" )
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1855,11 +1840,11 @@ Class SWWMUtility
|
|||
Array<String> list;
|
||||
list.Clear();
|
||||
dat.Split(list,"\n");
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
foreach ( l:list )
|
||||
{
|
||||
if ( (list[i].Length() == 0) || (list[i].Left(1) == "#") || (list[i].Left(1) == "") )
|
||||
if ( (l.Length() == 0) || (l.Left(1) == "#") || (l.Left(1) == "") )
|
||||
continue;
|
||||
if ( csum ~== list[i] )
|
||||
if ( csum ~== l )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1956,9 +1941,8 @@ Class SWWMUtility
|
|||
// first pass, find which vertex out of all lines is closest
|
||||
Vertex v = o.StartLine.v1;
|
||||
double dist = (v.p-p).length();
|
||||
for ( int i=0; i<o.Lines.Size(); i++ )
|
||||
foreach ( l:o.Lines )
|
||||
{
|
||||
Line l = o.Lines[i];
|
||||
double dist2 = (l.v1.p-p).length();
|
||||
if ( dist2 < dist )
|
||||
{
|
||||
|
|
@ -1975,9 +1959,8 @@ Class SWWMUtility
|
|||
// second pass, find which two lines share that vertex
|
||||
// (in theory there should only be two)
|
||||
Line a = null, b = null;
|
||||
for ( int i=0; i<o.Lines.Size(); i++ )
|
||||
foreach ( l:o.Lines )
|
||||
{
|
||||
Line l = o.Lines[i];
|
||||
if ( (l.v1 == v) || (l.v2 == v) )
|
||||
{
|
||||
if ( !a ) a = l;
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
Coordinate Utility helper class.
|
||||
Reproduces the old UnrealScript Get(Un)Axes functions, providing XYZ axis
|
||||
vectors relative to an euler rotation (defaults to left-handed coords).
|
||||
|
||||
Copyright (c)2018-2022 Marisa the Magician, UnSX Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
Class swwm_CoordUtil
|
||||
{
|
||||
// In Tim Sweeney's own words: "transform by a pitch-yaw-roll rotation"
|
||||
static Vector3, Vector3, Vector3 GetUnAxes( double pitch, double yaw, double roll, bool rhand = false )
|
||||
{
|
||||
Vector3 x = (1,0,0), y = (0,rhand?1:-1,0), z = (0,0,1);
|
||||
Vector3 a, b, c;
|
||||
// pitch and roll in gzdoom work in reverse compared to UE
|
||||
pitch = -pitch;
|
||||
roll = -roll;
|
||||
// yaw
|
||||
a = (cos(yaw),sin(yaw),0);
|
||||
b = (-sin(yaw),cos(yaw),0);
|
||||
c = (0,0,1);
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// pitch
|
||||
a = (cos(pitch),0,sin(pitch));
|
||||
b = (0,1,0);
|
||||
c = (-sin(pitch),0,cos(pitch));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// roll
|
||||
a = (1,0,0);
|
||||
b = (0,cos(roll),-sin(roll));
|
||||
c = (0,sin(roll),cos(roll));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
return x, y, z;
|
||||
}
|
||||
|
||||
// In Tim Sweeney's own words: "detransform by a pitch-yaw-roll rotation"
|
||||
static Vector3, Vector3, Vector3 GetAxes( double pitch, double yaw, double roll, bool rhand = false )
|
||||
{
|
||||
Vector3 x = (1,0,0), y = (0,rhand?1:-1,0), z = (0,0,1);
|
||||
Vector3 a, b, c;
|
||||
// pitch and roll in gzdoom work in reverse compared to UE
|
||||
pitch = -pitch;
|
||||
roll = -roll;
|
||||
// inverse roll
|
||||
a = (1,0,0);
|
||||
b = (0,cos(roll),sin(roll));
|
||||
c = (0,-sin(roll),cos(roll));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// inverse pitch
|
||||
a = (cos(pitch),0,-sin(pitch));
|
||||
b = (0,1,0);
|
||||
c = (sin(pitch),0,cos(pitch));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// inverse yaw
|
||||
a = (cos(yaw),-sin(yaw),0);
|
||||
b = (sin(yaw),cos(yaw),0);
|
||||
c = (0,0,1);
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
return x, y, z;
|
||||
}
|
||||
}
|
||||
|
|
@ -13,10 +13,10 @@ extend Class SWWMWeapon
|
|||
protected void BufferAmmo( Class<Ammo> type, int amount )
|
||||
{
|
||||
AmmoBuffer b;
|
||||
for ( int i=0; i<BufferedAmmo.Size(); i++ )
|
||||
foreach ( b:BufferedAmmo )
|
||||
{
|
||||
if ( BufferedAmmo[i].AmmoType != type ) continue;
|
||||
BufferedAmmo[i].Amount += amount;
|
||||
if ( b.AmmoType != type ) continue;
|
||||
b.Amount += amount;
|
||||
return;
|
||||
}
|
||||
b = new("AmmoBuffer");
|
||||
|
|
@ -29,10 +29,10 @@ extend Class SWWMWeapon
|
|||
protected void BufferMagAmmo( Class<MagAmmo> type, int amount )
|
||||
{
|
||||
AmmoBuffer b;
|
||||
for ( int i=0; i<BufferedAmmo.Size(); i++ )
|
||||
foreach ( b:BufferedAmmo )
|
||||
{
|
||||
if ( BufferedAmmo[i].MagAmmoType != type ) continue;
|
||||
BufferedAmmo[i].Amount += amount;
|
||||
if ( b.MagAmmoType != type ) continue;
|
||||
b.Amount += amount;
|
||||
return;
|
||||
}
|
||||
b = new("AmmoBuffer");
|
||||
|
|
@ -81,10 +81,10 @@ extend Class SWWMWeapon
|
|||
protected int CountBufferedAmmo( Class<Ammo> type )
|
||||
{
|
||||
int cnt = 0;
|
||||
for ( int i=0; i<BufferedAmmo.Size(); i++ )
|
||||
foreach ( b:BufferedAmmo )
|
||||
{
|
||||
if ( BufferedAmmo[i].AmmoType != type ) continue;
|
||||
cnt += BufferedAmmo[i].amount;
|
||||
if ( b.AmmoType != type ) continue;
|
||||
cnt += b.amount;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
|
@ -92,10 +92,10 @@ extend Class SWWMWeapon
|
|||
protected int CountBufferedMagAmmo( Class<MagAmmo> type )
|
||||
{
|
||||
int cnt = 0;
|
||||
for ( int i=0; i<BufferedAmmo.Size(); i++ )
|
||||
foreach ( b:BufferedAmmo )
|
||||
{
|
||||
if ( BufferedAmmo[i].MagAmmoType != type ) continue;
|
||||
cnt += BufferedAmmo[i].amount;
|
||||
if ( b.MagAmmoType != type ) continue;
|
||||
cnt += b.amount;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ Class SWWMWeaponLight : DynamicLight
|
|||
if ( target.player )
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(target.angle,target.pitch,target.roll);
|
||||
origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*12);
|
||||
SetOrigin(origin,true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ Class ParryField : SWWMNonInteractiveActor
|
|||
return;
|
||||
}
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(master.pitch,master.angle,master.roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(master.angle,master.pitch,master.roll);
|
||||
origin = level.Vec3Offset(master.Vec2OffsetZ(0,0,master.player.viewz),x*20);
|
||||
SetOrigin(origin,false);
|
||||
let raging = RagekitPower(master.FindInventory("RagekitPower"));
|
||||
|
|
@ -301,14 +301,14 @@ Class MeleeTracer : LineTracer
|
|||
|| (Results.HitActor == ignoreme)
|
||||
|| Results.HitActor.FindInventory("ParriedBuff") ) return TRACE_Skip;
|
||||
bool addme = true;
|
||||
for ( int k=0; k<hits.Size(); k++ )
|
||||
foreach ( hit:hits )
|
||||
{
|
||||
if ( hits[k].a != Results.HitActor ) continue;
|
||||
if ( (hits[k].dir dot x) < (Results.HitVector dot x) )
|
||||
if ( hit.a != Results.HitActor ) continue;
|
||||
if ( (hit.dir dot x) < (Results.HitVector dot x) )
|
||||
{
|
||||
// closer to centerpoint
|
||||
hits[k].dir = Results.HitVector;
|
||||
hits[k].pos = Results.HitPos;
|
||||
hit.dir = Results.HitVector;
|
||||
hit.pos = Results.HitPos;
|
||||
}
|
||||
addme = false;
|
||||
break;
|
||||
|
|
@ -362,7 +362,7 @@ extend Class SWWMWeapon
|
|||
action void A_Parry( int duration )
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*20-(0,0,20));
|
||||
if ( invoker.pfield ) invoker.pfield.Destroy();
|
||||
invoker.pfield = Spawn("ParryField",origin);
|
||||
|
|
@ -376,7 +376,7 @@ extend Class SWWMWeapon
|
|||
private action bool TryMelee( double spread, int dmg, String hitsound, double rangemul, double kickmul, int flags, Class<Actor> impactclass )
|
||||
{
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz);
|
||||
if ( !invoker.mt ) invoker.mt = new("MeleeTracer");
|
||||
let mt = invoker.mt; // for convenience
|
||||
|
|
@ -408,38 +408,38 @@ extend Class SWWMWeapon
|
|||
int quakin = raging?8:2;
|
||||
double diff = 0.;
|
||||
bool hdoomgal = false;
|
||||
for ( int i=0; i<mt.hits.Size(); i++ )
|
||||
foreach ( hit:mt.hits )
|
||||
{
|
||||
if ( !mt.hits[i].a ) continue;
|
||||
diff += deltaangle(self.angle,AngleTo(mt.hits[i].a));
|
||||
SWWMUtility.DoKnockback(mt.hits[i].a,mt.hits[i].dir,dmg*2000*kickmul);
|
||||
if ( !hit.a ) continue;
|
||||
diff += deltaangle(self.angle,AngleTo(hit.a));
|
||||
SWWMUtility.DoKnockback(hit.a,hit.dir,dmg*2000*kickmul);
|
||||
// lol oops
|
||||
if ( !mt.hits[i].a.bDORMANT ) mt.hits[i].a.DaggerAlert(self);
|
||||
if ( !mt.hits[i].a.bNOBLOOD && !mt.hits[i].a.bDORMANT && (raging || !mt.hits[i].a.bINVULNERABLE) ) blooded = true;
|
||||
if ( !hit.a.bDORMANT ) hit.a.DaggerAlert(self);
|
||||
if ( !hit.a.bNOBLOOD && !hit.a.bDORMANT && (raging || !hit.a.bINVULNERABLE) ) blooded = true;
|
||||
else bloodless = true;
|
||||
if ( SWWMHDoomHandler.IsCuteGirl(mt.hits[i].a) ) hdoomgal = true;
|
||||
let p = SWWMPuff.Setup(mt.hits[i].pos,mt.hits[i].dir,invoker,self,mt.hits[i].a);
|
||||
int newdmg = mt.hits[i].a.DamageMobj(p,self,dmg,'Melee',flg);
|
||||
if ( SWWMHDoomHandler.IsCuteGirl(hit.a) ) hdoomgal = true;
|
||||
let p = SWWMPuff.Setup(hit.pos,hit.dir,invoker,self,hit.a);
|
||||
int newdmg = hit.a.DamageMobj(p,self,dmg,'Melee',flg);
|
||||
// things can instantly cease to exist after taking damage (wow)
|
||||
if ( mt.hits[i].a )
|
||||
if ( hit.a )
|
||||
{
|
||||
if ( mt.hits[i].a.player ) mt.hits[i].a.A_QuakeEx(quakin,quakin,quakin,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.125*quakin);
|
||||
if ( (newdmg > 0) && !mt.hits[i].a.bNOBLOOD && !mt.hits[i].a.bDORMANT && (raging || !mt.hits[i].a.bINVULNERABLE) )
|
||||
if ( hit.a.player ) hit.a.A_QuakeEx(quakin,quakin,quakin,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.125*quakin);
|
||||
if ( (newdmg > 0) && !hit.a.bNOBLOOD && !hit.a.bDORMANT && (raging || !hit.a.bINVULNERABLE) )
|
||||
{
|
||||
mt.hits[i].a.TraceBleed(newdmg,invoker);
|
||||
mt.hits[i].a.SpawnBlood(mt.hits[i].pos,atan2(mt.hits[i].dir.y,mt.hits[i].dir.x)+180,newdmg);
|
||||
hit.a.TraceBleed(newdmg,invoker);
|
||||
hit.a.SpawnBlood(hit.pos,atan2(hit.dir.y,hit.dir.x)+180,newdmg);
|
||||
}
|
||||
else if ( impactclass )
|
||||
{
|
||||
let p = Spawn(raging?(Class<Actor>)("BigPunchImpact"):impactclass,mt.hits[i].pos);
|
||||
p.angle = atan2(mt.hits[i].dir.y,mt.hits[i].dir.x);
|
||||
let p = Spawn(raging?(Class<Actor>)("BigPunchImpact"):impactclass,hit.pos);
|
||||
p.angle = atan2(hit.dir.y,hit.dir.x);
|
||||
}
|
||||
if ( (flags&MELEE_HammerHit) && (mt.hits[i].a.Health <= mt.hits[i].a.GetGibHealth()) )
|
||||
if ( (flags&MELEE_HammerHit) && (hit.a.Health <= hit.a.GetGibHealth()) )
|
||||
SWWMUtility.AchievementProgressInc("dab",1,player);
|
||||
}
|
||||
if ( raging )
|
||||
{
|
||||
let ps = Spawn("BigPunchSplash",mt.hits[i].pos);
|
||||
let ps = Spawn("BigPunchSplash",hit.pos);
|
||||
ps.target = self;
|
||||
ps.special1 = dmg;
|
||||
}
|
||||
|
|
@ -496,22 +496,22 @@ extend Class SWWMWeapon
|
|||
ut.uses.Clear();
|
||||
ut.Trace(origin,level.PointInSector(origin.xy),dir,DEFMELEERANGE*rangemul,0);
|
||||
invoker.wallponch = true;
|
||||
for ( int i=0; i<ut.uses.Size(); i++ )
|
||||
foreach ( u:ut.uses )
|
||||
{
|
||||
if ( ut.uses[i].hitactor )
|
||||
if ( u.hitactor )
|
||||
{
|
||||
// punching is not greeting/patting (that'd be weird)
|
||||
if ( (ut.uses[i].hitactor == self) || (ut.uses[i].hitactor is 'Demolitionist')
|
||||
|| (ut.uses[i].hitactor is 'HeadpatTracker')
|
||||
|| (ut.uses[i].hitactor is 'FroggyChair') ) continue;
|
||||
if ( ut.uses[i].hitactor.Used(self) ) break;
|
||||
if ( (u.hitactor == self) || (u.hitactor is 'Demolitionist')
|
||||
|| (u.hitactor is 'HeadpatTracker')
|
||||
|| (u.hitactor is 'FroggyChair') ) continue;
|
||||
if ( u.hitactor.Used(self) ) break;
|
||||
}
|
||||
else if ( ut.uses[i].hitline && UseLineTracer.TangibleLine(ut.uses[i]) )
|
||||
else if ( u.hitline && UseLineTracer.TangibleLine(u) )
|
||||
{
|
||||
int locknum = SWWMUtility.GetLineLock(ut.uses[i].hitline);
|
||||
int locknum = SWWMUtility.GetLineLock(u.hitline);
|
||||
if ( !locknum || CheckKeys(locknum,false,true) )
|
||||
ut.uses[i].hitline.RemoteActivate(self,ut.uses[i].hitside,SPAC_Use,ut.uses[i].pos);
|
||||
if ( !(ut.uses[i].hitline.activation&SPAC_UseThrough) ) break;
|
||||
u.hitline.RemoteActivate(self,u.hitside,SPAC_Use,u.pos);
|
||||
if ( !(u.hitline.activation&SPAC_UseThrough) ) break;
|
||||
}
|
||||
}
|
||||
invoker.wallponch = false;
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ Class Hellblazer : SWWMWeapon
|
|||
invoker.spinskipped++;
|
||||
Vector3 x, y, z, x2, y2, z2, dir, origin;
|
||||
double a, s;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,bAlt?22000.:32000.);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3.5*y-5*z);
|
||||
a = FRandom[Hellblazer](0,360);
|
||||
s = FRandom[Hellblazer](0,bAlt?.02:.005);
|
||||
|
|
@ -215,11 +215,10 @@ Class Hellblazer : SWWMWeapon
|
|||
action void A_CheckLockOn()
|
||||
{
|
||||
if ( invoker.seekcnt > invoker.preload ) return;
|
||||
Vector3 x, y, z, x2, y2, z2, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*SWWMUtility.Vec3FromAngles(angle,pitch));
|
||||
// try to catch target in cone of vision
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Array<HHitList> hits;
|
||||
hits.Clear();
|
||||
int rings = 1;
|
||||
|
|
@ -228,7 +227,7 @@ Class Hellblazer : SWWMWeapon
|
|||
{
|
||||
for ( int j=0; j<360; j+=(360/rings) )
|
||||
{
|
||||
dir = SWWMUtility.ConeSpread(x2,y2,z2,j,i);
|
||||
dir = SWWMUtility.ConeSpread(x,y,z,j,i);
|
||||
LineTrace(atan2(dir.y,dir.x),8000.,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType != TRACE_HitActor ) continue;
|
||||
if ( (d.HitActor == invoker.seektarget[0])
|
||||
|
|
@ -241,7 +240,7 @@ Class Hellblazer : SWWMWeapon
|
|||
for ( int k=0; k<hits.Size(); k++ )
|
||||
{
|
||||
if ( hits[k].a != d.HitActor ) continue;
|
||||
if ( (hits[k].dir dot x2) < (dir dot x2) )
|
||||
if ( (hits[k].dir dot x) < (dir dot x) )
|
||||
hits[k].dir = dir; // closer to centerpoint
|
||||
addme = false;
|
||||
break;
|
||||
|
|
@ -258,7 +257,7 @@ Class Hellblazer : SWWMWeapon
|
|||
double closestdot = -1;
|
||||
for ( int i=0; i<hits.Size(); i++ )
|
||||
{
|
||||
double thisdot = (hits[i].dir dot x2);
|
||||
double thisdot = (hits[i].dir dot x);
|
||||
if ( thisdot < closestdot ) continue;
|
||||
closest = i;
|
||||
closestdot = thisdot;
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@ Class Wallbuster : SWWMWeapon
|
|||
int bustdmg = dmg;
|
||||
BusterWall.Bust(t.Results,bustdmg,self,t.Results.HitVector,t.Results.HitPos.z);
|
||||
}
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(self,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(self,0,SPAC_Impact);
|
||||
l.Activate(self,0,SPAC_PCross);
|
||||
l.Activate(self,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Spawn("SmolInvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Spawn("SmolInvisibleSplasher",w.hitpos);
|
||||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -92,25 +92,25 @@ Class Wallbuster : SWWMWeapon
|
|||
let b = Actor.Spawn("SWWMBubble",level.Vec3Offset(origin,dir*i));
|
||||
b.Scale *= FRandom[Boolet](.1,.3);
|
||||
}
|
||||
for ( int i=0; i<t.HitList.Size(); i++ )
|
||||
foreach( hit:t.HitList )
|
||||
{
|
||||
int realdmg = dmg?dmg:t.HitList[i].HitDamage;
|
||||
let p = SWWMPuff.Setup(t.HitList[i].HitLocation,t.HitList[i].x,invoker,self,t.HitList[i].HitActor);
|
||||
SWWMDamageAccumulator.Accumulate(t.HitList[i].HitActor,realdmg,p,self,'shot',false,DMG_INFLICTOR_IS_PUFF);
|
||||
SWWMUtility.DoKnockback(t.HitList[i].HitActor,t.HitList[i].x+(0,0,0.025),mm*FRandom[Wallbuster](0.4,1.2));
|
||||
if ( t.HitList[i].HitActor.bNOBLOOD || t.HitList[i].HitActor.bINVULNERABLE || t.HitList[i].HitActor.bDORMANT )
|
||||
int realdmg = dmg?dmg:hit.HitDamage;
|
||||
let p = SWWMPuff.Setup(hit.HitLocation,hit.x,invoker,self,hit.HitActor);
|
||||
SWWMDamageAccumulator.Accumulate(hit.HitActor,realdmg,p,self,'shot',false,DMG_INFLICTOR_IS_PUFF);
|
||||
SWWMUtility.DoKnockback(hit.HitActor,hit.x+(0,0,0.025),mm*FRandom[Wallbuster](0.4,1.2));
|
||||
if ( hit.HitActor.bNOBLOOD || hit.HitActor.bINVULNERABLE || hit.HitActor.bDORMANT )
|
||||
{
|
||||
let p = Spawn(impact,t.HitList[i].HitLocation);
|
||||
p.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180;
|
||||
p.pitch = asin(t.HitList[i].x.z);
|
||||
let p = Spawn(impact,hit.HitLocation);
|
||||
p.angle = atan2(hit.x.y,hit.x.x)+180;
|
||||
p.pitch = asin(hit.x.z);
|
||||
p.target = self;
|
||||
p.special1 = max(0,(bc-5)/4);
|
||||
}
|
||||
else
|
||||
{
|
||||
t.HitList[i].HitActor.TraceBleed(realdmg,self);
|
||||
t.HitList[i].HitActor.SpawnBlood(t.HitList[i].HitLocation,atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180,realdmg);
|
||||
t.HitList[i].HitActor.A_StartSound("spreadgun/pelletf",CHAN_DAMAGE,CHANF_OVERLAP,.4,4.);
|
||||
hit.HitActor.TraceBleed(realdmg,self);
|
||||
hit.HitActor.SpawnBlood(hit.HitLocation,atan2(hit.x.y,hit.x.x)+180,realdmg);
|
||||
hit.HitActor.A_StartSound("spreadgun/pelletf",CHAN_DAMAGE,CHANF_OVERLAP,.4,4.);
|
||||
}
|
||||
}
|
||||
if ( (t.Results.HitType != TRACE_HitNone) && (t.Results.HitType != TRACE_HasHitSky) && (t.Results.HitType != TRACE_HitActor) )
|
||||
|
|
@ -195,8 +195,8 @@ Class Wallbuster : SWWMWeapon
|
|||
}
|
||||
Vector3 x, y, z, origin, x2, y2, z2, dir;
|
||||
double a, s;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
int flashstr = 0;
|
||||
int alertness = 0;
|
||||
// second pass, play the fire effects
|
||||
|
|
@ -376,7 +376,7 @@ Class Wallbuster : SWWMWeapon
|
|||
if ( invoker.fired[invoker.rotation[5]*5+i] )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-3*y-13*z);
|
||||
let c = Spawn("RedShellCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -120,9 +120,9 @@ Class BusterWall : Thinker
|
|||
|
||||
private void SpawnDebrisPoly( bool initial = false )
|
||||
{
|
||||
for ( int i=0; i<polygrid.Size(); i++ ) for ( double z=boundsmin.z; z<boundsmax.z; z+=step.z )
|
||||
foreach ( g:polygrid ) for ( double z=boundsmin.z; z<boundsmax.z; z+=step.z )
|
||||
{
|
||||
Vector3 spot = (polygrid[i].pos.x,polygrid[i].pos.y,z);
|
||||
Vector3 spot = (g.pos.x,g.pos.y,z);
|
||||
spot += (FRandom[Wallbuster](-step.x,step.x),FRandom[Wallbuster](-step.y,step.y),FRandom[Wallbuster](-step.z,step.z));
|
||||
if ( !level.IsPointInLevel(spot) ) continue;
|
||||
if ( (initial || !(busttics%2)) && !Random[Wallbuster](0,1) )
|
||||
|
|
@ -291,9 +291,8 @@ Class BusterWall : Thinker
|
|||
if ( bust.accdamage < 100 ) return false;
|
||||
// estimate polyobject volume
|
||||
Vector3 a = (32767,32767,32767), b = (-32768,-32768,-32768);
|
||||
for ( int i=0; i<p.lines.Size(); i++ )
|
||||
foreach ( l:p.Lines )
|
||||
{
|
||||
Line l = p.lines[i];
|
||||
if ( l.v1.p.x < a.x ) a.x = l.v1.p.x;
|
||||
if ( l.v2.p.x < a.x ) a.x = l.v2.p.x;
|
||||
if ( l.v1.p.y < a.y ) a.y = l.v1.p.y;
|
||||
|
|
@ -376,8 +375,8 @@ Class BusterWall : Thinker
|
|||
bust.SpawnDebris(true);
|
||||
// damnums
|
||||
Vector3 bcenter = (bust.boundsmin+bust.boundsmax)*.5;
|
||||
for ( int i=0; i<bust.acchits.Size(); i++ )
|
||||
SWWMDamNum.Spawn(bust.acchits[i],level.Vec3Offset(bcenter,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.),'Wallbust');
|
||||
foreach ( hit:bust.acchits )
|
||||
SWWMDamNum.Spawn(hit,level.Vec3Offset(bcenter,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.),'Wallbust');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -406,18 +405,20 @@ Class BusterWall : Thinker
|
|||
else if ( d.HitType == TRACE_HitCeiling )
|
||||
{
|
||||
// no busting the goat
|
||||
for ( int i=0; i<hs.lines.Size(); i++ )
|
||||
foreach ( l:hs.Lines )
|
||||
{
|
||||
if( IsIOSWall(hs.lines[i]) ) return false;
|
||||
if( IsIOSWall(l) )
|
||||
return false;
|
||||
}
|
||||
hp = 1;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitFloor )
|
||||
{
|
||||
// no busting the goat
|
||||
for ( int i=0; i<hs.lines.Size(); i++ )
|
||||
foreach ( l:hs.Lines )
|
||||
{
|
||||
if( IsIOSWall(hs.lines[i]) ) return false;
|
||||
if( IsIOSWall(l) )
|
||||
return false;
|
||||
}
|
||||
hp = 0;
|
||||
}
|
||||
|
|
@ -480,9 +481,8 @@ Class BusterWall : Thinker
|
|||
if ( bust.accdamage < 100 ) return false;
|
||||
// estimate sector volume
|
||||
Vector2 a = (32767,32767), b = (-32768,-32768);
|
||||
for ( int i=0; i<hs.lines.Size(); i++ )
|
||||
foreach ( l:hs.Lines )
|
||||
{
|
||||
Line l = hs.lines[i];
|
||||
if ( l.v1.p.x < a.x ) a.x = l.v1.p.x;
|
||||
if ( l.v2.p.x < a.x ) a.x = l.v2.p.x;
|
||||
if ( l.v1.p.y < a.y ) a.y = l.v1.p.y;
|
||||
|
|
@ -537,9 +537,8 @@ Class BusterWall : Thinker
|
|||
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("WASTE03");
|
||||
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("textures/DefaultTexture.png"); // a fun little fallback should none of those exist
|
||||
// activate all shoot/use specials (not locked) associated with this sector's two-sided lines
|
||||
for ( int i=0; i<hs.Lines.Size(); i++ )
|
||||
foreach ( l:hs.Lines )
|
||||
{
|
||||
Line l = hs.Lines[i];
|
||||
int locknum = SWWMUtility.GetLineLock(l);
|
||||
if ( locknum && (!instigator || !instigator.CheckKeys(locknum,false,true)) ) continue;
|
||||
if ( !l.sidedef[1] ) continue;
|
||||
|
|
@ -583,9 +582,8 @@ Class BusterWall : Thinker
|
|||
hs.SetXScale(hp,1.);
|
||||
hs.SetYScale(hp,1.);
|
||||
hs.SetAngle(hp,0.);
|
||||
for ( int i=0; i<hs.Lines.Size(); i++ )
|
||||
foreach ( l:hs.Lines )
|
||||
{
|
||||
Line l = hs.Lines[i];
|
||||
if ( !l.sidedef[1] )
|
||||
{
|
||||
if ( hp && !(l.flags&Line.ML_DONTPEGBOTTOM) )
|
||||
|
|
@ -618,8 +616,8 @@ Class BusterWall : Thinker
|
|||
}
|
||||
// damnums
|
||||
Vector3 bcenter = (bust.boundsmin+bust.boundsmax)*.5;
|
||||
for ( int i=0; i<bust.acchits.Size(); i++ )
|
||||
SWWMDamNum.Spawn(bust.acchits[i],level.Vec3Offset(bcenter,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.),'Wallbust');
|
||||
foreach( hit:bust.acchits )
|
||||
SWWMDamNum.Spawn(hit,level.Vec3Offset(bcenter,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.),'Wallbust');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ Class Eviscerator : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:4500);
|
||||
Vector3 x, y, z, x2, y2, z2, dir, origin;
|
||||
double a, s;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,25000.);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-5*z);
|
||||
int trail = CVar.GetCVar('swwm_funtrails',player).GetInt();
|
||||
if ( trail == 8 ) trail = Random[Eviscerator](1,7);
|
||||
|
|
@ -171,9 +171,9 @@ Class Eviscerator : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:4000);
|
||||
Vector3 x, y, z, x2, y2, z2, dir, origin;
|
||||
double a, s;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,32000.);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-5*z);
|
||||
a = FRandom[Eviscerator](0,360);
|
||||
s = FRandom[Eviscerator](0,invoker.extended?.003:.02);
|
||||
|
|
@ -204,7 +204,7 @@ Class Eviscerator : SWWMWeapon
|
|||
action void A_EvisceratorEject()
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*10-y*10-z*10);
|
||||
let c = Spawn("EvisceratorCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -217,7 +217,7 @@ Class Eviscerator : SWWMWeapon
|
|||
action void A_EvisceratorCasingSmoke( Vector3 ofs )
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*ofs.x+y*ofs.y+z*ofs.z);
|
||||
let s = Spawn("SWWMHalfSmoke",origin);
|
||||
s.scale *= .2;
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ Class EvisceratorProj : Actor
|
|||
Spawn("EvisceratorProjLight",pos);
|
||||
Vector3 x, y, z;
|
||||
double a, s;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
EvisceratorChunk p;
|
||||
Vector3 spawnofs;
|
||||
if ( BlockingMobj ) spawnofs = (0,0,0);
|
||||
|
|
|
|||
|
|
@ -82,10 +82,8 @@ Class Ynykron : SWWMWeapon
|
|||
A_StopSound(CHAN_WEAPONEXTRA2);
|
||||
A_StartSound(invoker.inverted?"ynykron/altfire":"ynykron/fire",CHAN_WEAPON,CHANF_OVERLAP,1.,.2);
|
||||
// global alert
|
||||
int ns = level.Sectors.Size();
|
||||
for ( int i=0; i<ns; i++ )
|
||||
foreach ( s:level.Sectors )
|
||||
{
|
||||
Sector s = level.Sectors[i];
|
||||
for ( Actor a=s.thinglist; a; a=a.snext )
|
||||
a.LastHeard = self;
|
||||
}
|
||||
|
|
@ -100,7 +98,7 @@ Class Ynykron : SWWMWeapon
|
|||
invoker.chargestate = CS_POSTFIRE;
|
||||
invoker.clipcount = 0;
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*15+y*4-z);
|
||||
Actor s;
|
||||
if ( invoker.inverted ) s = Spawn("YnykronAltShot",origin);
|
||||
|
|
@ -115,7 +113,7 @@ Class Ynykron : SWWMWeapon
|
|||
action void A_Backblast()
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-x*15+y*4-z);
|
||||
int numpt = Random[Ynykron](10,20);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
|
|||
|
|
@ -481,9 +481,8 @@ Class YnykronImpact : SWWMNonInteractiveActor
|
|||
}
|
||||
qsort_candidates(candidates,0,candidates.Size()-1);
|
||||
candidates.Resize(2);
|
||||
for ( int i=0; i<candidates.Size(); i++ )
|
||||
foreach ( t:candidates )
|
||||
{
|
||||
let t = candidates[i];
|
||||
if ( !t ) continue;
|
||||
Vector3 dirto = level.Vec3Diff(pos,t.Vec3Offset(0,0,t.Height/2));
|
||||
double dist = dirto.length();
|
||||
|
|
@ -616,22 +615,21 @@ Class YnykronBeam : SWWMNonInteractiveActor
|
|||
|
||||
void TraceOut()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
let t = new("YnykronTracer");
|
||||
t.ignore = target;
|
||||
t.ShootThroughList.Clear();
|
||||
t.WaterHitList.Clear();
|
||||
t.HitList.Clear();
|
||||
t.Trace(pos,cursector,x,speed,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = target;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -644,40 +642,40 @@ Class YnykronBeam : SWWMNonInteractiveActor
|
|||
b.alpha *= .3;
|
||||
b.vel += x*FRandom[Ynykron](-.2,.4);
|
||||
}
|
||||
for ( int i=0; i<t.HitList.Size(); i++ )
|
||||
foreach ( hit:t.hitlist )
|
||||
{
|
||||
if ( YnykronShot(master) && (YnykronShot(master).hitlist.Find(t.HitList[i].hitactor) < YnykronShot(master).hitlist.Size()) )
|
||||
if ( YnykronShot(master) && (YnykronShot(master).hitlist.Find(hit.hitactor) < YnykronShot(master).hitlist.Size()) )
|
||||
continue;
|
||||
if ( t.hitlist[i].hitactor is 'YnykronSingularityHitbox' )
|
||||
if ( hit.hitactor is 'YnykronSingularityHitbox' )
|
||||
{
|
||||
// detonate it instantly
|
||||
let s = YnykronSingularity(t.hitlist[i].hitactor.target);
|
||||
let s = YnykronSingularity(hit.hitactor.target);
|
||||
s.specialf2 = s.critmass;
|
||||
let b = Spawn("YnykronImpact",t.hitlist[i].hitlocation);
|
||||
let b = Spawn("YnykronImpact",hit.hitlocation);
|
||||
b.target = target;
|
||||
b.master = master;
|
||||
b.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x);
|
||||
b.pitch = asin(-t.HitList[i].x.z);
|
||||
b.angle = atan2(hit.x.y,hit.x.x);
|
||||
b.pitch = asin(-hit.x.z);
|
||||
if ( YnykronShot(master) )
|
||||
{
|
||||
YnykronShot(master).hitlist.Push(t.hitlist[i].hitactor);
|
||||
YnykronShot(master).hitlist.Push(hit.hitactor);
|
||||
YnykronShot(master).blastcount++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
int trad = int(max(t.hitlist[i].hitactor.radius,t.hitlist[i].hitactor.height));
|
||||
if ( t.hitlist[i].hitactor && YnykronShot(master) )
|
||||
int trad = int(max(hit.hitactor.radius,hit.hitactor.height));
|
||||
if ( hit.hitactor && YnykronShot(master) )
|
||||
{
|
||||
YnykronShot(master).hitlist.Push(t.hitlist[i].hitactor);
|
||||
if ( t.hitlist[i].hitactor.bBOSS || t.hitlist[i].hitactor.FindInventory("BossMarker") ) YnykronShot(master).hitboss = true;
|
||||
YnykronShot(master).hitlist.Push(hit.hitactor);
|
||||
if ( hit.hitactor.bBOSS || hit.hitactor.FindInventory("BossMarker") ) YnykronShot(master).hitboss = true;
|
||||
}
|
||||
// spawn blast that will propagate
|
||||
let b = Spawn("YnykronImpact",t.hitlist[i].hitlocation);
|
||||
b.tracer = t.HitList[i].hitactor;
|
||||
let b = Spawn("YnykronImpact",hit.hitlocation);
|
||||
b.tracer = hit.hitactor;
|
||||
b.target = target;
|
||||
b.master = master;
|
||||
b.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x);
|
||||
b.pitch = asin(-t.HitList[i].x.z);
|
||||
b.angle = atan2(hit.x.y,hit.x.x);
|
||||
b.pitch = asin(-hit.x.z);
|
||||
b.args[0] = trad;
|
||||
if ( YnykronShot(master) )
|
||||
YnykronShot(master).blastcount++;
|
||||
|
|
@ -742,14 +740,14 @@ Class YnykronBeam : SWWMNonInteractiveActor
|
|||
it.WaterHitList.Clear();
|
||||
it.HitList.Clear();
|
||||
it.Trace(t.Results.HitPos,level.PointInSector(t.Results.HitPos.xy),x,i,TRACE_HitSky);
|
||||
for ( int i=0; i<it.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:it.ShootThroughList )
|
||||
{
|
||||
it.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
it.ShootThroughList[i].Activate(target,0,SPAC_Impact); // just in case
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact); // just in case
|
||||
}
|
||||
for ( int i=0; i<it.WaterHitList.Size(); i++ )
|
||||
foreach ( w:it.WaterHitList )
|
||||
{
|
||||
let b = Spawn("InvisibleSplasher",it.WaterHitList[i].hitpos);
|
||||
let b = Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = target;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -763,23 +761,23 @@ Class YnykronBeam : SWWMNonInteractiveActor
|
|||
b.alpha *= .3;
|
||||
b.vel += x*FRandom[Ynykron](-.2,.4);
|
||||
}
|
||||
for ( int i=0; i<it.HitList.Size(); i++ )
|
||||
foreach ( hit:it.hitlist )
|
||||
{
|
||||
if ( YnykronShot(master) && (YnykronShot(master).hitlist.Find(it.HitList[i].hitactor) < YnykronShot(master).hitlist.Size()) )
|
||||
if ( YnykronShot(master) && (YnykronShot(master).hitlist.Find(hit.hitactor) < YnykronShot(master).hitlist.Size()) )
|
||||
continue;
|
||||
int trad = int(max(it.hitlist[i].hitactor.radius,it.hitlist[i].hitactor.height));
|
||||
if ( it.hitlist[i].hitactor && YnykronShot(master) )
|
||||
int trad = int(max(hit.hitactor.radius,hit.hitactor.height));
|
||||
if ( hit.hitactor && YnykronShot(master) )
|
||||
{
|
||||
YnykronShot(master).hitlist.Push(it.hitlist[i].hitactor);
|
||||
if ( it.hitlist[i].hitactor.bBOSS || it.hitlist[i].hitactor.FindInventory("BossMarker") ) YnykronShot(master).hitboss = true;
|
||||
YnykronShot(master).hitlist.Push(hit.hitactor);
|
||||
if ( hit.hitactor.bBOSS || hit.hitactor.FindInventory("BossMarker") ) YnykronShot(master).hitboss = true;
|
||||
}
|
||||
// spawn blast that will propagate
|
||||
let b = Spawn("YnykronImpact",it.hitlist[i].hitlocation);
|
||||
b.tracer = it.hitlist[i].hitactor;
|
||||
let b = Spawn("YnykronImpact",hit.hitlocation);
|
||||
b.tracer = hit.hitactor;
|
||||
b.target = target;
|
||||
b.master = master;
|
||||
b.angle = atan2(it.HitList[i].x.y,it.HitList[i].x.x);
|
||||
b.pitch = asin(-it.HitList[i].x.z);
|
||||
b.angle = atan2(hit.x.y,hit.x.x);
|
||||
b.pitch = asin(-hit.x.z);
|
||||
b.args[0] = trad;
|
||||
if ( YnykronShot(master) )
|
||||
YnykronShot(master).blastcount++;
|
||||
|
|
@ -810,8 +808,7 @@ Class YnykronBeam : SWWMNonInteractiveActor
|
|||
void SpreadOut()
|
||||
{
|
||||
if ( nospread ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
// propagate
|
||||
let next = Spawn("YnykronBeam",level.Vec3Offset(pos,x*speed));
|
||||
next.angle = atan2(x.y,x.x);
|
||||
|
|
@ -1049,7 +1046,7 @@ Class YnykronShot : SWWMNonInteractiveActor
|
|||
int rings = 1;
|
||||
Vector3 x, y, z, dir;
|
||||
double a, s;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
for ( double i=0; i<.04; i+=.006 )
|
||||
{
|
||||
for ( int j=0; j<360; j+=(360/rings) )
|
||||
|
|
@ -1365,21 +1362,21 @@ Class YnykronVoidBeam : SWWMNonInteractiveActor
|
|||
Destroy();
|
||||
return;
|
||||
}
|
||||
Vector3 x = swwm_CoordUtil.GetAxes(pitch,angle,0);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
if ( !t ) t = new("YnykronTracer");
|
||||
t.ShootThroughList.Clear();
|
||||
t.WaterHitList.Clear();
|
||||
t.HitList.Clear();
|
||||
t.Trace(pos,cursector,x,16*scale.x,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.HitList.Size(); i++ )
|
||||
foreach ( hit:t.hitlist )
|
||||
{
|
||||
// yoink
|
||||
SWWMUtility.DoKnockback(t.HitList[i].HitActor,-t.HitList[i].x,80000*scale.x*alpha);
|
||||
SWWMUtility.DoKnockback(hit.HitActor,-hit.x,80000*scale.x*alpha);
|
||||
}
|
||||
spreadtimer++;
|
||||
if ( (t.Results.HitType != TRACE_HitNone) || (segnum > maxlen) || (spreadtimer < stamina) )
|
||||
|
|
@ -1491,20 +1488,20 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
|
|||
let t = new("CandyBeamTracer");
|
||||
t.hitlist.Clear();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
foreach ( hit:t.hitlist )
|
||||
{
|
||||
if ( !t.hitlist[i].hitactor ) continue;
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,-t.hitlist[i].x,GetMissileDamage(0,0)*1000);
|
||||
let p = SWWMPuff.Setup(t.hitlist[i].hitlocation,t.hitlist[i].x,self,target,t.hitlist[i].hitactor);
|
||||
t.hitlist[i].hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Electric',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( !hit.hitactor ) continue;
|
||||
SWWMUtility.DoKnockback(hit.hitactor,-hit.x,GetMissileDamage(0,0)*1000);
|
||||
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
|
||||
hit.hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Electric',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
}
|
||||
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||
if ( t.Results.HitType != TRACE_HitNone )
|
||||
|
|
@ -1580,7 +1577,7 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
|
|||
{
|
||||
let r = Spawn("YnykronLightningArcSub",level.Vec3Offset(pos,tdir*FRandom[Ynykron](0,1)));
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
double a = FRandom[Ynykron](0,360), s = FRandom[Sparkster](0.,1.);
|
||||
Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s);
|
||||
r.angle = atan2(sdir.y,sdir.x);
|
||||
|
|
@ -1690,7 +1687,7 @@ Class YnykronCloud : SWWMNonInteractiveActor
|
|||
Scale.y *= RandomPick[ExploS](-1,1);
|
||||
if ( master ) Scale *= master.scale.x;
|
||||
// orbit axes
|
||||
[gx, gy, gz] = swwm_CoordUtil.GetAxes(FRandom[ExploS](-90,90),FRandom[ExploS](0,360),FRandom[ExploS](-90,90));
|
||||
[gx, gy, gz] = SWWMUtility.GetAxes(FRandom[ExploS](0,360),FRandom[ExploS](-90,90),FRandom[ExploS](-90,90));
|
||||
specialf1 = FRandom[ExploS](200,400);
|
||||
scale *= specialf1/200.;
|
||||
specialf2 = FRandom[ExploS](3.,8.)*RandomPick[ExploS](-1,1);
|
||||
|
|
@ -2234,9 +2231,8 @@ Class YnykronSingularity : SWWMNonInteractiveActor
|
|||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( hnd )
|
||||
{
|
||||
for ( int i=0; i<hnd.SuckableActors.Size(); i++ )
|
||||
foreach ( a:hnd.SuckableActors )
|
||||
{
|
||||
let a = hnd.SuckableActors[i];
|
||||
if ( !a ) continue;
|
||||
if ( a.bDORMANT || (a.Health <= 0) || (a == self) || !SWWMUtility.SphereIntersect(a,pos,20000.*scale.x) || !CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
|
|
@ -2494,21 +2490,20 @@ Class YnykronAltBeam : SWWMNonInteractiveActor
|
|||
|
||||
void TraceOut()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
let t = new("YnykronAltTracer");
|
||||
t.ignore = target;
|
||||
t.ShootThroughList.Clear();
|
||||
t.WaterHitList.Clear();
|
||||
t.Trace(pos,cursector,x,speed,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = target;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -2575,8 +2570,7 @@ Class YnykronAltBeam : SWWMNonInteractiveActor
|
|||
void SpreadOut()
|
||||
{
|
||||
if ( nospread ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
// propagate
|
||||
let next = Spawn("YnykronAltBeam",level.Vec3Offset(pos,x*speed));
|
||||
next.angle = atan2(x.y,x.x);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ Class DeepImpact : SWWMWeapon
|
|||
A_StartSound("deepimpact/dryfire",CHAN_WEAPON,CHANF_OVERLAP,.5);
|
||||
A_AlertMonsters(swwm_uncapalert?0:70);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-3*z);
|
||||
int numpt = Random[Impact](5,7);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -121,7 +121,7 @@ Class DeepImpact : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
invoker.clipcount = max(0,invoker.clipcount-3);
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,2000.);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-3*z);
|
||||
DeepTracer t = new("DeepTracer");
|
||||
|
|
@ -144,25 +144,25 @@ Class DeepImpact : SWWMWeapon
|
|||
t.hitposz.Clear();
|
||||
t.Trace(origin,level.PointInSector(origin.xy),dir,250-i*150,0);
|
||||
SWWMBulletTrail.DoTrail(self,origin,dir,250-i*150,0);
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
for ( int k=0; k<t.hitlist.Size(); k++ )
|
||||
{
|
||||
int inl = -1;
|
||||
for ( int k=0; k<list.Size(); k++ )
|
||||
for ( int l=0; l<list.Size(); l++ )
|
||||
{
|
||||
if ( list[k].a != t.hitlist[i] ) continue;
|
||||
inl = k;
|
||||
if ( list[l].a != t.hitlist[k] ) continue;
|
||||
inl = l;
|
||||
break;
|
||||
}
|
||||
if ( inl == -1 )
|
||||
{
|
||||
THitList l = new("THitList");
|
||||
l.a = t.hitlist[i];
|
||||
l.a = t.hitlist[k];
|
||||
inl = list.Push(l);
|
||||
}
|
||||
list[inl].nhits++;
|
||||
list[inl].avgdir += dir;
|
||||
list[inl].avgdist += t.hitdist[i];
|
||||
list[inl].avgpos += (t.hitposx[i],t.hitposy[i],t.hitposz[i]);
|
||||
list[inl].avgdist += t.hitdist[k];
|
||||
list[inl].avgpos += (t.hitposx[k],t.hitposy[k],t.hitposz[k]);
|
||||
}
|
||||
if ( t.Results.HitType == TRACE_HitWall )
|
||||
{
|
||||
|
|
@ -198,16 +198,16 @@ Class DeepImpact : SWWMWeapon
|
|||
if ( (pos.z > floorz) && TestMobjZ() ) wnorm *= 2.4;
|
||||
SWWMUtility.DoKnockback(self,wnorm.unit(),wnorm.length()*5000000.);
|
||||
}
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
foreach ( l:list )
|
||||
{
|
||||
if ( !list[i].a ) continue;
|
||||
Vector3 avgdir = list[i].avgdir/list[i].nhits;
|
||||
double avgdist = list[i].avgdist/list[i].nhits;
|
||||
Vector3 avgpos = list[i].avgpos/list[i].nhits;
|
||||
if ( !l.a ) continue;
|
||||
Vector3 avgdir = l.avgdir/l.nhits;
|
||||
double avgdist = l.avgdist/l.nhits;
|
||||
Vector3 avgpos = l.avgpos/l.nhits;
|
||||
double dmg = 5000.*(1.-clamp(avgdist/250.,0.,1.));
|
||||
SWWMUtility.DoKnockback(list[i].a,avgdir,dmg*35.);
|
||||
let p = SWWMPuff.Setup(avgpos,avgdir,invoker,self,list[i].a);
|
||||
list[i].a.DamageMobj(p,self,int(dmg/250.),'Push',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
SWWMUtility.DoKnockback(l.a,avgdir,dmg*35.);
|
||||
let p = SWWMPuff.Setup(avgpos,avgdir,invoker,self,l.a);
|
||||
l.a.DamageMobj(p,self,int(dmg/250.),'Push',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
}
|
||||
let ti = ThinkerIterator.Create("Actor");
|
||||
Actor m;
|
||||
|
|
@ -266,11 +266,11 @@ Class DeepImpact : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
invoker.clipcount = 0;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,42000.);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-3*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("AirBullet",origin);
|
||||
p.target = self;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ Class Spreadgun : SWWMWeapon
|
|||
return;
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-10*z);
|
||||
let c = Spawn(invoker.wasgold?"GoldShellCasing":"RedShellCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -159,14 +159,14 @@ Class Spreadgun : SWWMWeapon
|
|||
int bustdmg = dmg;
|
||||
BusterWall.Bust(t.Results,bustdmg,self,t.Results.HitVector,t.Results.HitPos.z);
|
||||
}
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(self,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(self,0,SPAC_Impact);
|
||||
l.Activate(self,0,SPAC_PCross);
|
||||
l.Activate(self,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Spawn("SmolInvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Spawn("SmolInvisibleSplasher",w.hitpos);
|
||||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
|
|
@ -176,24 +176,24 @@ Class Spreadgun : SWWMWeapon
|
|||
let b = Actor.Spawn("SWWMBubble",level.Vec3Offset(origin,dir*i));
|
||||
b.Scale *= FRandom[Boolet](.1,.3);
|
||||
}
|
||||
for ( int i=0; i<t.HitList.Size(); i++ )
|
||||
foreach( hit:t.HitList )
|
||||
{
|
||||
int realdmg = dmg?dmg:t.HitList[i].HitDamage;
|
||||
let p = SWWMPuff.Setup(t.HitList[i].HitLocation,t.HitList[i].x,invoker,self,t.HitList[i].HitActor);
|
||||
SWWMDamageAccumulator.Accumulate(t.HitList[i].HitActor,realdmg,p,self,'shot',false,DMG_INFLICTOR_IS_PUFF);
|
||||
SWWMUtility.DoKnockback(t.HitList[i].HitActor,t.HitList[i].x+(0,0,0.025),mm*FRandom[Spreadgun](0.4,1.2));
|
||||
if ( t.HitList[i].HitActor.bNOBLOOD || t.HitList[i].HitActor.bDORMANT || t.HitList[i].HitActor.bINVULNERABLE )
|
||||
int realdmg = dmg?dmg:hit.HitDamage;
|
||||
let p = SWWMPuff.Setup(hit.HitLocation,hit.x,invoker,self,hit.HitActor);
|
||||
SWWMDamageAccumulator.Accumulate(hit.HitActor,realdmg,p,self,'shot',false,DMG_INFLICTOR_IS_PUFF);
|
||||
SWWMUtility.DoKnockback(hit.HitActor,hit.x+(0,0,0.025),mm*FRandom[Spreadgun](0.4,1.2));
|
||||
if ( hit.HitActor.bNOBLOOD || hit.HitActor.bDORMANT || hit.HitActor.bINVULNERABLE )
|
||||
{
|
||||
let p = Spawn(impact,t.HitList[i].HitLocation);
|
||||
p.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180;
|
||||
p.pitch = asin(t.HitList[i].x.z);
|
||||
let p = Spawn(impact,hit.HitLocation);
|
||||
p.angle = atan2(hit.x.y,hit.x.x)+180;
|
||||
p.pitch = asin(hit.x.z);
|
||||
p.target = self;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.HitList[i].HitActor.TraceBleed(realdmg,self);
|
||||
t.HitList[i].HitActor.SpawnBlood(t.HitList[i].HitLocation,atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180,realdmg);
|
||||
t.HitList[i].HitActor.A_StartSound("spreadgun/pelletf",CHAN_DAMAGE,CHANF_OVERLAP,.4,4.);
|
||||
hit.HitActor.TraceBleed(realdmg,self);
|
||||
hit.HitActor.SpawnBlood(hit.HitLocation,atan2(hit.x.y,hit.x.x)+180,realdmg);
|
||||
hit.HitActor.A_StartSound("spreadgun/pelletf",CHAN_DAMAGE,CHANF_OVERLAP,.4,4.);
|
||||
}
|
||||
}
|
||||
if ( (t.Results.HitType != TRACE_HitNone) && (t.Results.HitType != TRACE_HasHitSky) && (t.Results.HitType != TRACE_HitActor) )
|
||||
|
|
@ -250,10 +250,10 @@ Class Spreadgun : SWWMWeapon
|
|||
}
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z);
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
double a, s;
|
||||
Vector3 dir;
|
||||
if ( invoker.goldload )
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Class Sparkster : SWWMWeapon
|
|||
}
|
||||
else invoker.clipcount = max(0,invoker.clipcount-1);
|
||||
Vector3 x, y, z, x2, y2, z2, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4.5*y-5*z);
|
||||
double a, s;
|
||||
Actor p;
|
||||
|
|
@ -56,7 +56,7 @@ Class Sparkster : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
a = FRandom[Spread](0,360);
|
||||
s = FRandom[Spread](0,.007);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
p = Spawn("BiosparkBall",origin);
|
||||
p.target = self;
|
||||
|
|
@ -76,7 +76,7 @@ Class Sparkster : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
a = FRandom[Spread](0,360);
|
||||
s = FRandom[Spread](0,.003);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
p = Spawn("BiosparkBeam",origin);
|
||||
p.target = self;
|
||||
|
|
@ -95,7 +95,7 @@ Class Sparkster : SWWMWeapon
|
|||
SWWMUtility.DoKnockback(self,-x,2500.);
|
||||
a = FRandom[Spread](0,360);
|
||||
s = FRandom[Spread](0,.012);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
p = Spawn("BiosparkCore",origin);
|
||||
p.target = self;
|
||||
|
|
@ -117,7 +117,7 @@ Class Sparkster : SWWMWeapon
|
|||
{
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-10*z);
|
||||
let c = Spawn("SparksterMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Class BigOrbiter : SWWMNonInteractiveActor
|
|||
anglevel = FRandom[Sparkster](5,10);
|
||||
pitchvel = FRandom[Sparkster](5,10);
|
||||
speed = FRandom[Sparkster](20,40);
|
||||
Vector3 x = swwm_CoordUtil.GetAxes(pitch,angle,0);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SetOrigin(level.Vec3Offset(target.pos,x*speed+(0,0,target.height/2)),false);
|
||||
SetState(FindState("Spawn")+Random[Sparkster](0,9));
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ Class BigOrbiter : SWWMNonInteractiveActor
|
|||
if ( isFrozen() ) return;
|
||||
angle += anglevel;
|
||||
pitch += pitchvel;
|
||||
Vector3 x = swwm_CoordUtil.GetAxes(pitch,angle,0);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
SetOrigin(level.Vec3Offset(target.pos,x*speed+(0,0,target.height/2)),true);
|
||||
if ( tics > 0 ) tics--;
|
||||
if ( !SetState(CurState.NextState) )
|
||||
|
|
@ -1022,39 +1022,39 @@ Class BiosparkBeam : SWWMNonInteractiveActor
|
|||
let t = new("BiosparkTracer");
|
||||
t.hitlist.Clear();
|
||||
t.ignoreme = target;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
foreach ( hit:t.hitlist )
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
{
|
||||
if ( !t.hitlist[i].hitactor ) continue;
|
||||
if ( (t.hitlist[i].hitactor is 'BiosparkHitbox') && t.hitlist[i].hitactor.target )
|
||||
if ( !hit.hitactor ) continue;
|
||||
if ( (hit.hitactor is 'BiosparkHitbox') && hit.hitactor.target )
|
||||
{
|
||||
let s = Spawn("BiosparkComboImpact",t.hitlist[i].hitactor.pos);
|
||||
let s = Spawn("BiosparkComboImpact",hit.hitactor.pos);
|
||||
s.target = target;
|
||||
s.angle = atan2(t.hitlist[i].x.y,t.hitlist[i].x.x);
|
||||
s.pitch = asin(-t.hitlist[i].x.z);
|
||||
if ( (t.hitlist[i].hitactor is 'BigBiosparkHitbox') )
|
||||
s.angle = atan2(hit.x.y,hit.x.x);
|
||||
s.pitch = asin(-hit.x.z);
|
||||
if ( (hit.hitactor is 'BigBiosparkHitbox') )
|
||||
{
|
||||
s.bAMBUSH = true;
|
||||
s.Args[0] = t.hitlist[i].hitactor.target.special1;
|
||||
s.Args[0] = hit.hitactor.target.special1;
|
||||
}
|
||||
t.hitlist[i].hitactor.target.Destroy();
|
||||
hit.hitactor.target.Destroy();
|
||||
if ( target ) SWWMUtility.AchievementProgressInc("shock",1,target.player);
|
||||
}
|
||||
else
|
||||
{
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,15000);
|
||||
let p = SWWMPuff.Setup(t.hitlist[i].hitlocation,t.hitlist[i].x,self,target,t.hitlist[i].hitactor);
|
||||
t.hitlist[i].hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Biospark',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
SWWMUtility.DoKnockback(hit.hitactor,hit.x,15000);
|
||||
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
|
||||
hit.hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Biospark',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( hit.hitactor && hit.hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
hit.hitactor.Howl();
|
||||
}
|
||||
}
|
||||
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||
|
|
@ -1186,28 +1186,27 @@ Class BiosparkBeam : SWWMNonInteractiveActor
|
|||
let t = new("BiosparkTracer");
|
||||
t.hitlist.Clear();
|
||||
t.ignoreme = target;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,0);
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
foreach ( hit:t.hitlist )
|
||||
{
|
||||
if ( !t.hitlist[i].hitactor ) continue;
|
||||
if ( (t.hitlist[i].hitactor is 'BiosparkHitbox') && t.hitlist[i].hitactor.target )
|
||||
if ( !hit.hitactor ) continue;
|
||||
if ( (hit.hitactor is 'BiosparkHitbox') && hit.hitactor.target )
|
||||
{
|
||||
let s = Spawn("BiosparkComboImpact",t.hitlist[i].hitactor.pos);
|
||||
let s = Spawn("BiosparkComboImpact",hit.hitactor.pos);
|
||||
s.target = target;
|
||||
s.angle = atan2(t.hitlist[i].x.y,t.hitlist[i].x.x);
|
||||
s.pitch = asin(-t.hitlist[i].x.z);
|
||||
t.hitlist[i].hitactor.target.Destroy();
|
||||
s.angle = atan2(hit.x.y,hit.x.x);
|
||||
s.pitch = asin(-hit.x.z);
|
||||
hit.hitactor.target.Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,15000);
|
||||
let p = SWWMPuff.Setup(t.hitlist[i].hitlocation,t.hitlist[i].x,self,target,t.hitlist[i].hitactor);
|
||||
t.hitlist[i].hitactor.DamageMobj(p,target,int(GetMissileDamage(0,0)*alpha),'Biospark',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
SWWMUtility.DoKnockback(hit.hitactor,hit.x,15000);
|
||||
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
|
||||
hit.hitactor.DamageMobj(p,target,int(GetMissileDamage(0,0)*alpha),'Biospark',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( hit.hitactor && hit.hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
hit.hitactor.Howl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1363,22 +1362,22 @@ Class BiosparkArc : SWWMNonInteractiveActor
|
|||
let t = new("CandyBeamTracer");
|
||||
t.hitlist.Clear();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,TRACE_HitSky);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
foreach( hit:t.hitlist )
|
||||
{
|
||||
if ( !t.hitlist[i].hitactor ) continue;
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,-t.hitlist[i].x,GetMissileDamage(0,0)*1000);
|
||||
let p = SWWMPuff.Setup(t.hitlist[i].hitlocation,t.hitlist[i].x,self,target,t.hitlist[i].hitactor);
|
||||
t.hitlist[i].hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Biospark',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
if ( !hit.hitactor ) continue;
|
||||
SWWMUtility.DoKnockback(hit.hitactor,-hit.x,GetMissileDamage(0,0)*1000);
|
||||
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
|
||||
hit.hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Biospark',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( hit.hitactor && hit.hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
hit.hitactor.Howl();
|
||||
}
|
||||
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||
if ( t.Results.HitType == TRACE_HitWall )
|
||||
|
|
@ -1455,7 +1454,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
|
|||
if ( (extra > 1) && !Random[Sparkster](0,3) )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
for ( int i=0; i<extra; i++ )
|
||||
{
|
||||
let r = Spawn("BiosparkArc",level.Vec3Offset(pos,tdir*FRandom[Sparkster](0,1)));
|
||||
|
|
|
|||
|
|
@ -85,11 +85,11 @@ Class ExplodiumGun : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:5000);
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,4000.);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-2*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -171,10 +171,10 @@ Class ExplodiumGun : SWWMWeapon
|
|||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-3*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("ExplodiumMagProj",origin);
|
||||
p.special1 = invoker.special1;
|
||||
|
|
@ -196,7 +196,7 @@ Class ExplodiumGun : SWWMWeapon
|
|||
invoker.deadeyecnt = 0;
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-10*z);
|
||||
let c = Spawn("ExplodiumMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -208,7 +208,7 @@ Class ExplodiumGun : SWWMWeapon
|
|||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+8*y-10*z);
|
||||
let c = Spawn("ExplodiumCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -622,11 +622,11 @@ Class DualExplodiumGun : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:5000);
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,4000.);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3.5*side*y-2*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -707,7 +707,7 @@ Class DualExplodiumGun : SWWMWeapon
|
|||
ExplodiumGun(invoker.SisterWeapon).deadeyecnt = 0;
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*side*y-10*z);
|
||||
let c = Spawn("ExplodiumMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -719,7 +719,7 @@ Class DualExplodiumGun : SWWMWeapon
|
|||
action void A_DropCasing( int side = 1 )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+8*side*y-10*z);
|
||||
let c = Spawn("ExplodiumCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -132,11 +132,11 @@ Class CandyGun : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:9000);
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
SWWMUtility.DoKnockback(self,-x,18000.);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-2*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -210,10 +210,10 @@ Class CandyGun : SWWMWeapon
|
|||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-3*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.01);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("CandyMagProj",origin);
|
||||
p.special1 = invoker.special1;
|
||||
|
|
@ -236,10 +236,10 @@ Class CandyGun : SWWMWeapon
|
|||
weap.Ammo2.Amount = max(0,weap.Ammo2.Amount-1);
|
||||
}
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-3*z);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.015);
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("CandyGunProj",origin);
|
||||
p.special1 = invoker.clipcount+invoker.chambered;
|
||||
|
|
@ -257,7 +257,7 @@ Class CandyGun : SWWMWeapon
|
|||
{
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-10*z);
|
||||
let c = Spawn("CandyMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -309,7 +309,7 @@ Class CandyGun : SWWMWeapon
|
|||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+8*y-10*z);
|
||||
let c = Spawn("CandyCasing",origin);
|
||||
c.special1 = special1;
|
||||
|
|
|
|||
|
|
@ -98,20 +98,20 @@ Class CandyBeam : SWWMNonInteractiveActor
|
|||
let t = new("CandyBeamTracer");
|
||||
t.hitlist.Clear();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,0);
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_PCross);
|
||||
t.ShootThroughList[i].Activate(target,0,SPAC_Impact);
|
||||
l.Activate(target,0,SPAC_PCross);
|
||||
l.Activate(target,0,SPAC_Impact);
|
||||
}
|
||||
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||
foreach( hit:t.hitlist )
|
||||
{
|
||||
if ( !t.hitlist[i].hitactor ) continue;
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,12000);
|
||||
let p = SWWMPuff.Setup(t.hitlist[i].hitlocation,t.hitlist[i].x,self,target,t.hitlist[i].hitactor);
|
||||
t.hitlist[i].hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Candy',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( !hit.hitactor ) continue;
|
||||
SWWMUtility.DoKnockback(hit.hitactor,hit.x,12000);
|
||||
let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor);
|
||||
hit.hitactor.DamageMobj(p,target,GetMissileDamage(0,0),'Candy',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
}
|
||||
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||
if ( t.Results.HitType == TRACE_HitWall )
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ Class SilverBulletTracer : SpreadgunTracer
|
|||
bool pastwall, fullstop;
|
||||
Array<WallPenetrate> WallPenetrateList;
|
||||
Vector3 exitpoint;
|
||||
transient Array<F3DFloor> ffloors; // needs to be done like this because HAHA SCOPE
|
||||
|
||||
override ETraceStatus TraceCallback()
|
||||
{
|
||||
|
|
@ -100,11 +99,12 @@ Class SilverBulletTracer : SpreadgunTracer
|
|||
// double-check if we're piercing through a 3D floor (yes this is a thing that happens, oh boy)
|
||||
Sector s = level.PointInSector(ofs.xy);
|
||||
bool stop3d = false;
|
||||
for ( int j=0; j<ffloors.Size(); j++ )
|
||||
for ( int j=0; j<s.Get3DFloorCount(); j++ )
|
||||
{
|
||||
if ( ffloors[j].target != s ) continue;
|
||||
double minz = ffloors[j].bottom.ZAtPoint(ofs.xy);
|
||||
double maxz = ffloors[j].top.ZAtPoint(ofs.xy);
|
||||
let ff = s.Get3DFloor(j);
|
||||
if ( !(ff.flags&(F3DFloor.FF_EXISTS|F3DFloor.FF_SOLID)) ) continue;
|
||||
double minz = ff.bottom.ZAtPoint(ofs.xy);
|
||||
double maxz = ff.top.ZAtPoint(ofs.xy);
|
||||
if ( (ofs.z < minz) || (ofs.z > maxz) ) continue;
|
||||
stop3d = true;
|
||||
break;
|
||||
|
|
@ -287,72 +287,72 @@ Class SilverBullet : SWWMWeapon
|
|||
|
||||
action void ProcessTraceHit( SilverBulletTracer t, Vector3 origin, Vector3 dir )
|
||||
{
|
||||
for ( int i=0; i<t.ShootThroughList.Size(); i++ )
|
||||
foreach ( l:t.ShootThroughList )
|
||||
{
|
||||
t.ShootThroughList[i].Activate(self,0,SPAC_Impact);
|
||||
t.ShootThroughList[i].Activate(self,0,SPAC_PCross);
|
||||
l.Activate(self,0,SPAC_Impact);
|
||||
l.Activate(self,0,SPAC_PCross);
|
||||
}
|
||||
for ( int i=0; i<t.WaterHitList.Size(); i++ )
|
||||
foreach ( w:t.WaterHitList )
|
||||
{
|
||||
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
|
||||
let b = Spawn("InvisibleSplasher",w.hitpos);
|
||||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
for ( int i=0; i<t.HitList.Size(); i++ )
|
||||
foreach( hit:t.HitList )
|
||||
{
|
||||
if ( !t.HitList[i].HitActor ) continue;
|
||||
SWWMUtility.DoKnockback(t.HitList[i].HitActor,t.HitList[i].x+(0,0,0.025),t.Hitlist[i].HitDamage*20.*FRandom[SilverBullet](.8,1.2));
|
||||
let p = SWWMPuff.Setup(t.HitList[i].HitLocation,t.HitList[i].x,invoker,self,t.HitList[i].HitActor);
|
||||
int dmg = t.HitList[i].HitActor.DamageMobj(p,self,t.Hitlist[i].HitDamage,'Sniped',DMG_FOILINVUL|DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( t.HitList[i].HitActor && (t.HitList[i].HitActor.Health <= 0) && (t.HitList[i].HitActor.bIsMonster || t.HitList[i].HitActor.player) && t.HitList[i].HitActor.IsHostile(self) )
|
||||
if ( !hit.HitActor ) continue;
|
||||
SWWMUtility.DoKnockback(hit.HitActor,hit.x+(0,0,0.025),hit.HitDamage*20.*FRandom[SilverBullet](.8,1.2));
|
||||
let p = SWWMPuff.Setup(hit.HitLocation,hit.x,invoker,self,hit.HitActor);
|
||||
int dmg = hit.HitActor.DamageMobj(p,self,hit.HitDamage,'Sniped',DMG_FOILINVUL|DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF);
|
||||
if ( hit.HitActor && (hit.HitActor.Health <= 0) && (hit.HitActor.bIsMonster || hit.HitActor.player) && hit.HitActor.IsHostile(self) )
|
||||
{
|
||||
invoker.nkills++;
|
||||
SWWMUtility.AchievementProgress("conga",invoker.nkills,player);
|
||||
if ( t.Hitlist[i].pastwall ) SWWMUtility.AchievementProgressInc("thruwall",1,player);
|
||||
if ( hit.pastwall ) SWWMUtility.AchievementProgressInc("thruwall",1,player);
|
||||
}
|
||||
if ( (dmg > 0) && t.HitList[i].HitActor && !t.HitList[i].HitActor.bNOBLOOD && !t.HitList[i].HitActor.bDORMANT )
|
||||
if ( (dmg > 0) && hit.HitActor && !hit.HitActor.bNOBLOOD && !hit.HitActor.bDORMANT )
|
||||
{
|
||||
t.HitList[i].HitActor.TraceBleed(dmg,self);
|
||||
t.HitList[i].HitActor.SpawnBlood(t.HitList[i].HitLocation,atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180,dmg);
|
||||
t.HitList[i].HitActor.A_StartSound("silverbullet/flesh",CHAN_DAMAGE,CHANF_OVERLAP,1.,2.);
|
||||
let p = Spawn("SilverImpact",t.HitList[i].HitLocation);
|
||||
hit.HitActor.TraceBleed(dmg,self);
|
||||
hit.HitActor.SpawnBlood(hit.HitLocation,atan2(hit.x.y,hit.x.x)+180,dmg);
|
||||
hit.HitActor.A_StartSound("silverbullet/flesh",CHAN_DAMAGE,CHANF_OVERLAP,1.,2.);
|
||||
let p = Spawn("SilverImpact",hit.HitLocation);
|
||||
p.special1 = 1;
|
||||
p.target = self;
|
||||
p.master = invoker;
|
||||
p.bAMBUSH = t.HitList[i].pastwall;
|
||||
p.bAMBUSH = hit.pastwall;
|
||||
}
|
||||
else
|
||||
{
|
||||
let p = Spawn("SilverImpact",t.HitList[i].HitLocation);
|
||||
p.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180;
|
||||
p.pitch = asin(t.HitList[i].x.z);
|
||||
let p = Spawn("SilverImpact",hit.HitLocation);
|
||||
p.angle = atan2(hit.x.y,hit.x.x)+180;
|
||||
p.pitch = asin(hit.x.z);
|
||||
p.target = self;
|
||||
p.master = invoker;
|
||||
p.bAMBUSH = t.HitList[i].pastwall;
|
||||
p.bAMBUSH = hit.pastwall;
|
||||
}
|
||||
}
|
||||
LineTracer faketracer = new("LineTracer");
|
||||
for ( int i=0; i<t.WallPenetrateList.Size(); i++ )
|
||||
foreach ( wp:t.WallPenetrateList )
|
||||
{
|
||||
Vector3 hitpos = t.WallPenetrateList[i].hitpos;
|
||||
Vector3 hitnormal = t.WallPenetrateList[i].hitnormal;
|
||||
Vector3 hitpos = wp.hitpos;
|
||||
Vector3 hitnormal = wp.hitnormal;
|
||||
let p = Spawn("SilverImpact",hitpos+hitnormal*4);
|
||||
p.angle = atan2(hitnormal.y,hitnormal.x);
|
||||
p.pitch = asin(-hitnormal.z);
|
||||
p.target = self;
|
||||
p.master = invoker;
|
||||
p.bAMBUSH = t.WallPenetrateList[i].pastwall;
|
||||
if ( t.WallPenetrateList[i].hittype == TRACE_HitWall )
|
||||
t.WallPenetrateList[i].hitline.Activate(self,t.WallPenetrateList[i].hitside,SPAC_Impact);
|
||||
p.bAMBUSH = wp.pastwall;
|
||||
if ( wp.hittype == TRACE_HitWall )
|
||||
wp.hitline.Activate(self,wp.hitside,SPAC_Impact);
|
||||
if ( swwm_omnibust )
|
||||
{
|
||||
faketracer.Results.HitType = t.WallPenetrateList[i].HitType;
|
||||
faketracer.Results.HitSector = t.WallPenetrateList[i].HitSector;
|
||||
faketracer.Results.HitLine = t.WallPenetrateList[i].HitLine;
|
||||
faketracer.Results.ffloor = t.WallPenetrateList[i].HitFFloor;
|
||||
faketracer.Results.Side = t.WallPenetrateList[i].HitSide;
|
||||
faketracer.Results.Tier = t.WallPenetrateList[i].HitTier;
|
||||
BusterWall.Bust(faketracer.Results,t.WallPenetrateList[i].penetration,self,t.WallPenetrateList[i].BustDir,t.WallPenetrateList[i].HitPos.z);
|
||||
faketracer.Results.HitType = wp.HitType;
|
||||
faketracer.Results.HitSector = wp.HitSector;
|
||||
faketracer.Results.HitLine = wp.HitLine;
|
||||
faketracer.Results.ffloor = wp.HitFFloor;
|
||||
faketracer.Results.Side = wp.HitSide;
|
||||
faketracer.Results.Tier = wp.HitTier;
|
||||
BusterWall.Bust(faketracer.Results,wp.penetration,self,wp.BustDir,wp.HitPos.z);
|
||||
}
|
||||
}
|
||||
if ( (t.Results.HitType != TRACE_HitNone) && (t.Results.HitType != TRACE_HasHitSky) && (t.Results.HitType != TRACE_HitActor) )
|
||||
|
|
@ -496,11 +496,11 @@ Class SilverBullet : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
SWWMHandler.DoFlash(self,Color(110,255,192,80),8);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz);
|
||||
if ( !invoker.zoomed ) origin = level.Vec3Offset(origin,10*x+1*y-1*z);
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = SWWMUtility.GetAxes(angle,BulletSlope(),roll);
|
||||
SilverBulletTracer sst = new("SilverBulletTracer");
|
||||
sst.ignoreme = self;
|
||||
sst.penetration = invoker.proneme?1200.:1000.;
|
||||
|
|
@ -508,17 +508,6 @@ Class SilverBullet : SWWMWeapon
|
|||
sst.shootthroughlist.Clear();
|
||||
sst.waterhitlist.Clear();
|
||||
sst.wallpenetratelist.Clear();
|
||||
sst.ffloors.Clear();
|
||||
for ( int i=0; i<level.Sectors.Size(); i++ )
|
||||
{
|
||||
Sector s = level.Sectors[i];
|
||||
for ( int j=0; j<s.Get3DFloorCount(); j++ )
|
||||
{
|
||||
F3DFloor ff = s.Get3DFloor(j);
|
||||
if ( ff.flags&(F3DFloor.FF_EXISTS|F3DFloor.FF_SOLID) )
|
||||
sst.ffloors.Push(ff);
|
||||
}
|
||||
}
|
||||
sst.pastwall = false;
|
||||
Vector3 norigin = origin;
|
||||
double maxdist = 20000.;
|
||||
|
|
@ -566,7 +555,7 @@ Class SilverBullet : SWWMWeapon
|
|||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+10*y-8*z);
|
||||
let c = Spawn("SilverBulletCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -577,7 +566,7 @@ Class SilverBullet : SWWMWeapon
|
|||
action void A_DropBullet()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+10*y-8*z);
|
||||
MagAmmo ma = MagAmmo(FindInventory("SilverBullets"));
|
||||
if ( !ma )
|
||||
|
|
@ -607,8 +596,8 @@ Class SilverBullet : SWWMWeapon
|
|||
}
|
||||
else return;
|
||||
invoker.wastecycle = 0;
|
||||
if ( (s.silveregg > 2) && (s.silveregg%2) && player == players[consoleplayer] )
|
||||
Console.MidPrint(null,"swwmsilverbulleteasteregg"..((s.silveregg-1)/2));
|
||||
if ( (s.silveregg > 2) && (s.silveregg%2) && (player == players[consoleplayer]) )
|
||||
EventHandler.SendInterfaceEvent(consoleplayer,"swwmsetdialogue",SWWMDLG_WASTE1+(((s.silveregg-1)/2)-1));
|
||||
}
|
||||
action void A_DropMag()
|
||||
{
|
||||
|
|
@ -627,7 +616,7 @@ Class SilverBullet : SWWMWeapon
|
|||
invoker.ClipCount = 0;
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),6*x-15*z);
|
||||
let c = Spawn("SilverBulletMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -639,7 +628,7 @@ Class SilverBullet : SWWMWeapon
|
|||
{
|
||||
invoker.specialf1 -= .06;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
vel += x*min(1.,invoker.specialf1)*(600./Mass);
|
||||
A_OverlayAlpha(PSP_WEAPON+1,clamp(invoker.specialf1*3.,0.,1.));
|
||||
if ( Random[SilverBullet](0,int(invoker.specialf1*2)) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue