diff --git a/language.version b/language.version index 01a9a0f59..e7d5678a4 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \cwGZ\c- r439 (Thu 30 Jul 14:13:36 CEST 2020)"; +SWWM_MODVER="\chSWWM \cwGZ\c- r440 (Thu 30 Jul 16:31:15 CEST 2020)"; diff --git a/zscript/swwm_thiccboolet.zsc b/zscript/swwm_thiccboolet.zsc index 5706289b1..de5d10719 100644 --- a/zscript/swwm_thiccboolet.zsc +++ b/zscript/swwm_thiccboolet.zsc @@ -128,6 +128,8 @@ Class SilverImpact : Actor Class WallPenetrate { Vector3 hitpos, hitdir, hitnormal; + Line hitline; + int hitside; } Class AuxiliarySilverBulletTracer : LineTracer @@ -203,19 +205,21 @@ Class SilverBulletTracer : SpreadSlugTracer { penetration = max(0,penetration-i*4); let wp = new("WallPenetrate"); + wp.hitline = Results.HitLine; + wp.hitside = Results.Side; wp.hitpos = Results.HitPos; wp.hitdir = Results.HitVector; wp.hitnormal = (-Results.HitLine.delta.y,Results.HitLine.delta.x,0).unit(); if ( !Results.Side ) wp.hitnormal *= -1; WallPenetrateList.Push(wp); - if ( Results.HitLine.sidedef[1] ) - ShootThroughList.Push(Results.HitLine); // trace backwards to find exit surface let at = new("AuxiliarySilverBulletTracer"); at.Trace(ofs,level.PointInSector(ofs.xy),-Results.HitVector,2.,TRACE_NoSky); if ( at.Results.HitType != TRACE_HitNone ) { let wp2 = new("WallPenetrate"); + wp2.hitline = at.Results.HitLine; + wp2.hitside = at.Results.Side; wp2.hitpos = at.Results.HitPos; wp2.hitdir = at.Results.HitVector; if ( at.Results.HitType == TRACE_HitWall ) @@ -248,6 +252,8 @@ Class SilverBulletTracer : SpreadSlugTracer { penetration = max(0,penetration-i*4); let wp = new("WallPenetrate"); + wp.hitline = Results.HitLine; + wp.hitside = Results.Side; wp.hitpos = Results.HitPos; wp.hitdir = Results.HitVector; if ( Results.HitType == TRACE_HitWall ) @@ -267,6 +273,8 @@ Class SilverBulletTracer : SpreadSlugTracer if ( at.Results.HitType != TRACE_HitNone ) { let wp2 = new("WallPenetrate"); + wp2.hitline = at.Results.HitLine; + wp2.hitside = at.Results.Side; wp2.hitpos = at.Results.HitPos; wp2.hitdir = at.Results.HitVector; if ( at.Results.HitType == TRACE_HitWall ) @@ -444,6 +452,7 @@ Class SilverBullet : SWWMWeapon p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; + t.WallPenetrateList[i].hitline.Activate(self,t.WallPenetrateList[i].hitside,SPAC_Impact); } if ( (t.Results.HitType != TRACE_HitNone) && (t.Results.HitType != TRACE_HasHitSky) && (t.Results.HitType != TRACE_HitActor) ) {