diff --git a/language.version b/language.version index 97028e1e8..5a84b74e3 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \cwGZ\c- r538 (Sat 12 Sep 14:44:39 CEST 2020)"; +SWWM_MODVER="\chSWWM \cwGZ\c- r539 (Sat 12 Sep 17:32:27 CEST 2020)"; diff --git a/zscript/swwm_blazeit.zsc b/zscript/swwm_blazeit.zsc index 8d4ef7fdd..d9ea5a79d 100644 --- a/zscript/swwm_blazeit.zsc +++ b/zscript/swwm_blazeit.zsc @@ -654,10 +654,10 @@ Mixin Class HellblazerGrenade if ( BlockingFloor ) { // find closest 3d floor for its normal - for ( int i=0; i= -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 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 0) && !bumped && ((pos.z+Height+dir.z*spd) >= ceilingz) ) { F3DFloor ff; - for ( int i=0; i 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