From dc2e3d0a552340c047ec7d33c8158a08e6bb61ec Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Thu, 8 Dec 2022 14:42:13 +0100 Subject: [PATCH] Fix Eviscerator chunks passing through solids. --- language.version | 4 ++-- zscript/swwm_common.zsc | 8 +------- zscript/weapons/swwm_danmaku_fx.zsc | 6 +++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/language.version b/language.version index 82bbe132f..e9a876dca 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r673 \cu(Thu 8 Dec 00:28:03 CET 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r673 \cu(2022-12-08 00:28:03)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r674 \cu(Thu 8 Dec 14:42:13 CET 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r674 \cu(2022-12-08 14:42:13)\c-"; diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 3833b586f..2a361d6d9 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -163,8 +163,6 @@ Class SWWMDamageAccumulator : Inventory if ( inflictor ) inflictor.bEXTREMEDEATH = true; else type = 'Extreme'; } - // make sure accumulation isn't reentrant - if ( inflictor && (inflictor is 'EvisceratorChunk') ) inflictor.bAMBUSH = true; // 何? foreach ( dmg:amounts ) { @@ -172,11 +170,7 @@ Class SWWMDamageAccumulator : Inventory Owner.DamageMobj(inflictor,source,dmg,type,DMG_THRUSTLESS|flags); } // clean up - if ( inflictor ) - { - if ( inflictor is 'EvisceratorChunk' ) inflictor.bAMBUSH = false; - inflictor.bEXTREMEDEATH = false; - } + if ( inflictor ) inflictor.bEXTREMEDEATH = inflictor.default.bEXTREMEDEATH; Destroy(); } diff --git a/zscript/weapons/swwm_danmaku_fx.zsc b/zscript/weapons/swwm_danmaku_fx.zsc index 10578e9b1..02449f61e 100644 --- a/zscript/weapons/swwm_danmaku_fx.zsc +++ b/zscript/weapons/swwm_danmaku_fx.zsc @@ -297,17 +297,17 @@ Class EvisceratorChunk : Actor override bool CanCollideWith( Actor other, bool passive ) { // safer to do here - if ( !(other.bSHOOTABLE && other.bSOLID) || ((vel.length() <= 5) && other.bSHOOTABLE) || ((other == target) && !bHITOWNER) || (other == lasthit) ) + if ( !(other.bSHOOTABLE || other.bSOLID) || ((vel.length() <= 5) && other.bSHOOTABLE) || ((other == target) && !bHITOWNER) || (other == lasthit) ) return false; return true; } override int SpecialMissileHit( Actor victim ) { - // directly bounce off shootable solids + // directly bounce off non-shootable solids if ( !victim.bSHOOTABLE ) { - if ( bSOLID ) + if ( victim.bSOLID ) { BlockingMobj = victim; A_HandleBounce();