From 1f43d3ad060ba39e7e6c171a14a115bdf0061733 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Wed, 12 Oct 2022 00:04:27 +0200 Subject: [PATCH] Restore old Wallbuster multi-trace reduction behavior. Turns out the performance hit is abysmal otherwise. --- language.version | 4 ++-- zscript/weapons/swwm_cbt.zsc | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/language.version b/language.version index cd3b90989..a036dd3ef 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r565 \cu(Tue 11 Oct 23:39:49 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r565 \cu(2022-10-11 23:39:49)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r566 \cu(Wed 12 Oct 00:04:27 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r566 \cu(2022-10-12 00:04:27)\c-"; diff --git a/zscript/weapons/swwm_cbt.zsc b/zscript/weapons/swwm_cbt.zsc index 09076eb39..249f37c96 100644 --- a/zscript/weapons/swwm_cbt.zsc +++ b/zscript/weapons/swwm_cbt.zsc @@ -260,7 +260,11 @@ Class Wallbuster : SWWMWeapon // the shooting if ( !st ) st = new("SpreadgunTracer"); st.ignoreme = self; - for ( int j=0; j<20; j++ ) + // attempt to uniformize expected damage while reducing traces (mainly for performance) + int expecteddmg = 200; + int numshot = max(21-howmany,5); + int individualdmg = int(ceil(expecteddmg/double(numshot))); + for ( int j=0; j1)); + ProcessTraceHit(st,origin,dir,individualdmg,7000,bc:5+howmany/6,(howmany>1)); } for ( int i=0; i<(16-howmany/2); i++ ) {