Dashing can activate lines. With ragekit it can bust walls.
Some minor 3D floor handling cleanup.
This commit is contained in:
parent
1ba8aed4a7
commit
dcf612aab5
11 changed files with 174 additions and 94 deletions
|
|
@ -654,10 +654,10 @@ Mixin Class HellblazerGrenade
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -666,10 +666,10 @@ Mixin Class HellblazerGrenade
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
@ -986,10 +986,10 @@ Class HellblazerRavagerArm : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -998,10 +998,10 @@ Class HellblazerRavagerArm : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
|
|||
|
|
@ -206,13 +206,13 @@ Class mkBloodDrop : Actor
|
|||
A_StartSound("misc/blooddrop",volume:.1);
|
||||
dead = true;
|
||||
SWWMUtility.SetToSlope(self,FRandom[Blood](0,360));
|
||||
tracksector = CurSector;
|
||||
tracksector = FloorSector;
|
||||
trackplane = 0;
|
||||
F3DFloor ff;
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<FloorSector.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(FloorSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = FloorSector.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff )
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ Class BustedQuake : Actor
|
|||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
if ( special1 < 4 ) A_StartSound("wallbuster/smallbust",CHAN_VOICE,CHANF_OVERLAP,min(1.,special1*.32),1./max(1.,special1*.35),1.-special1*.05);
|
||||
if ( special1 < 3 ) A_StartSound("wallbuster/smallbust",CHAN_VOICE,CHANF_OVERLAP,min(1.,special1*.32),1./max(1.,special1*.35),1.-special1*.05);
|
||||
else A_StartSound("wallbuster/bigbust",CHAN_VOICE,CHANF_OVERLAP,min(1.,special1*.16),1./max(1.,special1*.35),1.-special1*.03);
|
||||
A_QuakeEx(special1,special1,special1,20+special1*5,0,300+special1*90,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:special1*.1);
|
||||
}
|
||||
|
|
@ -539,34 +539,34 @@ Class BusterWall : Thinker
|
|||
return false;
|
||||
}
|
||||
|
||||
static void Bust( TraceResults d, int accdamage, Actor instigator, Vector3 x, double hitz )
|
||||
static bool Bust( TraceResults d, int accdamage, Actor instigator, Vector3 x, double hitz )
|
||||
{
|
||||
// we can't blow up 3D floors (yet)
|
||||
if ( d.ffloor ) return;
|
||||
if ( d.ffloor ) return false;
|
||||
Sector hs = d.HitSector;
|
||||
int hp;
|
||||
if ( d.HitType == TRACE_HitWall )
|
||||
{
|
||||
// no busting the goat
|
||||
if ( IsIOSWall(d.HitLine) ) return;
|
||||
if ( IsIOSWall(d.HitLine) ) return false;
|
||||
// onesided wall? no bust (TODO: bust polyobjects)
|
||||
if ( !d.HitLine.sidedef[1] ) return;
|
||||
if ( !d.HitLine.sidedef[1] ) return false;
|
||||
// sector is opposite of side hit
|
||||
hs = d.HitLine.sidedef[!d.Side].sector;
|
||||
// what part we hit?
|
||||
if ( d.Tier == TIER_Upper ) hp = 1; // ceiling
|
||||
else if ( d.Tier == TIER_Lower ) hp = 0; // floor
|
||||
else return; // middle ignored
|
||||
else return false; // middle ignored
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitCeiling ) hp = 1;
|
||||
else if ( d.HitType == TRACE_HitFloor ) hp = 0;
|
||||
else return; // this isn't a valid hit, needs to be world geometry
|
||||
else return false; // this isn't a valid hit, needs to be world geometry
|
||||
// needs at least two two-sided lines
|
||||
int lcnt = 0;
|
||||
for ( int i=0; i<hs.Lines.Size(); i++ ) if ( hs.Lines[i].sidedef[1] ) lcnt++;
|
||||
if ( lcnt < 2 ) return;
|
||||
if ( lcnt < 2 ) return false;
|
||||
// Check if it's a door
|
||||
if ( !swwm_cbtall && !SWWMUtility.IsDoorSector(hs,hp) ) return;
|
||||
if ( !swwm_cbtall && !SWWMUtility.IsDoorSector(hs,hp) ) return false;
|
||||
let ti = ThinkerIterator.Create("BusterWall",STAT_USER);
|
||||
BusterWall iter, bust = null;
|
||||
while ( iter = BusterWall(ti.Next()) )
|
||||
|
|
@ -596,25 +596,25 @@ Class BusterWall : Thinker
|
|||
{
|
||||
thisheight = hs.FindLowestCeilingPoint();
|
||||
othersheight = hs.FindHighestCeilingSurrounding();
|
||||
if ( (thisheight-othersheight) >= -4. ) return;
|
||||
if ( (thisheight-othersheight) >= -4. ) return false;
|
||||
cutheight = min(hitz+extracut,othersheight-4);
|
||||
}
|
||||
else
|
||||
{
|
||||
thisheight = hs.FindHighestFloorPoint();
|
||||
othersheight = hs.FindLowestFloorSurrounding();
|
||||
if ( (thisheight-othersheight) <= 4. ) return;
|
||||
if ( (thisheight-othersheight) <= 4. ) return false;
|
||||
cutheight = max(hitz-extracut,othersheight+4);
|
||||
}
|
||||
if ( hp ) bust.cutheight = mnew?cutheight:max(bust.cutheight,cutheight);
|
||||
else bust.cutheight = mnew?cutheight:min(bust.cutheight,cutheight);
|
||||
partheight = abs(thisheight-bust.cutheight);
|
||||
// skip if we don't cut off enough
|
||||
if ( partheight < 4. ) return;
|
||||
if ( partheight < 4. ) return false;
|
||||
// skip if already busted
|
||||
if ( bust.busted ) return;
|
||||
if ( bust.busted ) return true;
|
||||
// not enough total damage
|
||||
if ( bust.accdamage < 1000 ) return;
|
||||
if ( bust.accdamage < 1000 ) return false;
|
||||
// estimate sector volume
|
||||
Vector2 a = (32767,32767), b = (-32768,-32768);
|
||||
for ( int i=0; i<hs.lines.Size(); i++ )
|
||||
|
|
@ -639,12 +639,12 @@ Class BusterWall : Thinker
|
|||
allspot++;
|
||||
if ( level.PointInSector((x,y)) == hs ) inspot++;
|
||||
}
|
||||
if ( allspot <= 0 ) return; // what the fuck?
|
||||
if ( allspot <= 0 ) return false; // what the fuck?
|
||||
girthitude = (girthitude*inspot)/allspot;
|
||||
// too fucking huge
|
||||
if ( (girthitude > 16777216) || (max(partheight,max(b.x-a.x,b.y-a.y)) > 1024) ) return;
|
||||
if ( (girthitude > 16777216) || (max(partheight,max(b.x-a.x,b.y-a.y)) > 1024) ) return false;
|
||||
// not strong enough to bust
|
||||
if ( bust.accdamage < girthitude/300. ) return;
|
||||
if ( bust.accdamage < girthitude/300. ) return false;
|
||||
// report bust
|
||||
if ( Instigator.player )
|
||||
{
|
||||
|
|
@ -756,6 +756,7 @@ Class BusterWall : Thinker
|
|||
SWWMScoreObj.Spawn(bust.accdamage,level.Vec3Offset(bcenter,(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8))),Font.CR_RED);
|
||||
else for ( int i=0; i<bust.acchits.Size(); i++ )
|
||||
SWWMScoreObj.Spawn(bust.acchits[i],level.Vec3Offset(bcenter,(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8))),Font.CR_RED);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -150,10 +150,10 @@ Class EvisceratorChunk : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -162,10 +162,10 @@ Class EvisceratorChunk : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
|
|||
|
|
@ -1269,7 +1269,6 @@ Class SWWMWeapon : Weapon abstract
|
|||
A_QuakeEx(quakin,quakin,quakin,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12*quakin);
|
||||
A_StartSound(raging?"pusher/althit":(hitsound!="")?hitsound:"demolitionist/punch",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_AlertMonsters(100);
|
||||
if ( raging ) raging.DoHitFX();
|
||||
}
|
||||
override void PlayUpSound( Actor origin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -180,10 +180,10 @@ Class PusherProjectile : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -192,10 +192,10 @@ Class PusherProjectile : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
|
|||
|
|
@ -709,34 +709,58 @@ Class Demolitionist : PlayerPawn
|
|||
if ( (spd > 0) && !bumped && ((pos.z+Height+dir.z*spd) >= ceilingz) )
|
||||
{
|
||||
F3DFloor ff;
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<CeilingSector.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(CeilingSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CeilingSector.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
Vector3 ceilnorm;
|
||||
if ( ff ) ceilnorm = ff.model.floorplane.Normal;
|
||||
else ceilnorm = CurSector.ceilingplane.Normal;
|
||||
else ceilnorm = CeilingSector.ceilingplane.Normal;
|
||||
// don't bump if we're only grazing it
|
||||
if ( dir dot ceilnorm < -.6 )
|
||||
{
|
||||
// headbump
|
||||
bumped = true;
|
||||
A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
|
||||
bumptic = gametic+int(20+spd/4.);
|
||||
A_QuakeEx(8,8,8,16,0,128,"",QF_RELATIVE|QF_SCALEDOWN);
|
||||
vel *= .2;
|
||||
vel -= dir*(10+(spd*30/mass));
|
||||
vel.z += 5+(spd*(10/mass));
|
||||
vel += ceilnorm*(15+(spd*40/mass));
|
||||
dashboost *= 0.;
|
||||
bool busted = false;
|
||||
if ( raging )
|
||||
{
|
||||
let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height));
|
||||
ps.damagetype = 'Dash';
|
||||
ps.target = self;
|
||||
ps.special1 = int(15+spd*2.5);
|
||||
// see if we can bust it
|
||||
let tempme = new("LineTracer"); // gross hack to pass needed data
|
||||
int dmg = int(128+spd*20);
|
||||
if ( dir dot viewdir < -.3 ) dmg *= 3; // BUTTSLAM
|
||||
if ( ff ) tempme.Results.ffloor = ff;
|
||||
tempme.Results.HitSector = CeilingSector;
|
||||
tempme.Results.HitType = TRACE_HitCeiling;
|
||||
if ( BusterWall.Bust(tempme.Results,dmg,self,dir,pos.z+Height) )
|
||||
{
|
||||
// busted through
|
||||
let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height));
|
||||
ps.damagetype = 'Dash';
|
||||
ps.target = self;
|
||||
ps.special1 = int(15+spd*2.5);
|
||||
A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
|
||||
busted = true;
|
||||
}
|
||||
}
|
||||
if ( !busted )
|
||||
{
|
||||
// headbump
|
||||
bumped = true;
|
||||
A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
|
||||
bumptic = gametic+int(20+spd/4.);
|
||||
A_QuakeEx(8,8,8,16,0,128,"",QF_RELATIVE|QF_SCALEDOWN);
|
||||
vel *= .2;
|
||||
vel -= dir*(10+(spd*30/mass));
|
||||
vel.z += 5+(spd*(10/mass));
|
||||
vel += ceilnorm*(15+(spd*40/mass));
|
||||
dashboost *= 0.;
|
||||
if ( raging )
|
||||
{
|
||||
let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height));
|
||||
ps.damagetype = 'Dash';
|
||||
ps.target = self;
|
||||
ps.special1 = int(15+spd*2.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -748,11 +772,45 @@ Class Demolitionist : PlayerPawn
|
|||
if ( (spd > 0) && !bumped && !CheckMove(Vec2Offset(steppy.x*i,steppy.y*i),PCM_DROPOFF|PCM_NOACTORS,tm) && BlockingLine )
|
||||
{
|
||||
Vector3 wallnorm = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit();
|
||||
int lside = 1;
|
||||
if ( !BlockingLine.sidedef[1] || !SWWMUtility.PointOnLineSide(pos.xy,BlockingLine) )
|
||||
{
|
||||
lside = 0;
|
||||
wallnorm *= -1;
|
||||
}
|
||||
// don't bump if we're only grazing it
|
||||
if ( dir dot wallnorm > -.6 )
|
||||
continue;
|
||||
if ( raging )
|
||||
{
|
||||
// see if we can bust it
|
||||
let tempme = new("LineTracer"); // gross hack to pass needed data
|
||||
int dmg = int(128+spd*20);
|
||||
if ( dir dot viewdir < -.3 ) dmg *= 3; // BUTTSLAM
|
||||
tempme.Results.HitLine = BlockingLine;
|
||||
tempme.Results.HitType = TRACE_HitWall;
|
||||
tempme.Results.Side = lside;
|
||||
tempme.Results.Tier = TIER_MIDDLE;
|
||||
if ( BlockingLine.sidedef[1] )
|
||||
{
|
||||
double ceilz = BlockingLine.sidedef[!lside].sector.ceilingplane.ZAtPoint(pos.xy);
|
||||
double florz = BlockingLine.sidedef[!lside].sector.floorplane.ZAtPoint(pos.xy);
|
||||
if ( pos.z+Height >= ceilz )
|
||||
tempme.Results.Tier = TIER_UPPER;
|
||||
else if ( pos.z <= florz )
|
||||
tempme.Results.Tier = TIER_LOWER;
|
||||
}
|
||||
if ( BusterWall.Bust(tempme.Results,dmg,self,dir,pos.z+Height/2) )
|
||||
{
|
||||
// busted through
|
||||
let ps = Spawn("BigPunchSplash",Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2)));
|
||||
ps.damagetype = 'Dash';
|
||||
ps.target = self;
|
||||
ps.special1 = int(15+spd*2.5);
|
||||
A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// wallbump
|
||||
bumped = true;
|
||||
A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
|
||||
|
|
@ -770,6 +828,11 @@ Class Demolitionist : PlayerPawn
|
|||
ps.target = self;
|
||||
ps.special1 = int(15+spd*2.5);
|
||||
}
|
||||
// activate it
|
||||
int locknum = SWWMUtility.GetLineLock(BlockingLine);
|
||||
if ( !locknum || CheckKeys(locknum,false,true) )
|
||||
BlockingLine.Activate(self,lside,SPAC_Use);
|
||||
BlockingLine.Activate(self,lside,SPAC_Impact);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -802,7 +865,7 @@ Class Demolitionist : PlayerPawn
|
|||
splitdmg[1] = max(1,(damage-splitdmg[0])/4); // reduced part (<25% health)
|
||||
damage = splitdmg[0]+splitdmg[1];
|
||||
}
|
||||
if ( !inflictor && !source && (CurSector.flags&Sector.SECF_ENDLEVEL) )
|
||||
if ( !inflictor && !source && (FloorSector.flags&Sector.SECF_ENDLEVEL) )
|
||||
{
|
||||
// end level hax
|
||||
damage = max(50,health-100);
|
||||
|
|
@ -2176,6 +2239,23 @@ Class DemolitionistShockwave : Actor
|
|||
let s = Spawn("SWWMChip",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
if ( target.FindInventory("RagekitPower") )
|
||||
{
|
||||
// bust the floor if we can
|
||||
let tempme = new("LineTracer"); // gross hack to pass needed data
|
||||
int dmg = (40+min(special1,120))*8;
|
||||
F3DFloor ff;
|
||||
for ( int i=0; i<FloorSector.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(FloorSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = FloorSector.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) tempme.Results.ffloor = ff;
|
||||
tempme.Results.HitSector = FloorSector;
|
||||
tempme.Results.HitType = TRACE_HitFloor;
|
||||
BusterWall.Bust(tempme.Results,dmg,target,(0,0,-1),pos.z);
|
||||
}
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
|
|||
|
|
@ -315,10 +315,10 @@ Class DragonBreathArm : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -327,10 +327,10 @@ Class DragonBreathArm : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
@ -1121,10 +1121,10 @@ Class FlamingChunk : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -1133,10 +1133,10 @@ Class FlamingChunk : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
@ -1426,10 +1426,10 @@ Class TheBall : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff )
|
||||
|
|
@ -1444,10 +1444,10 @@ Class TheBall : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff )
|
||||
|
|
|
|||
|
|
@ -1694,10 +1694,10 @@ Class BiosparkCore : Actor
|
|||
if ( BlockingFloor )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
|
|
@ -1706,10 +1706,10 @@ Class BiosparkCore : Actor
|
|||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
for ( int i=0; i<CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(CurSector.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = CurSector.Get3DFloor(i);
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
|
|
|
|||
|
|
@ -219,13 +219,13 @@ Class SWWMUtility
|
|||
// Thanks to ZZYZX and Nash
|
||||
static play void SetToSlope( Actor a, double dang )
|
||||
{
|
||||
vector3 fnormal = a.CurSector.floorplane.Normal;
|
||||
vector3 fnormal = a.FloorSector.floorplane.Normal;
|
||||
// find closest 3d floor for its normal
|
||||
F3DFloor ff;
|
||||
for ( int i=0; i<a.CurSector.Get3DFloorCount(); i++ )
|
||||
for ( int i=0; i<a.FloorSector.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(a.CurSector.Get3DFloor(i).top.ZAtPoint(a.pos.xy) ~== a.floorz) ) continue;
|
||||
ff = a.CurSector.Get3DFloor(i);
|
||||
if ( !(a.FloorSector.Get3DFloor(i).top.ZAtPoint(a.pos.xy) ~== a.floorz) ) continue;
|
||||
ff = a.FloorSector.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) fnormal = -ff.top.Normal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue