Restore old Wallbuster multi-trace reduction behavior.

Turns out the performance hit is abysmal otherwise.
This commit is contained in:
Mari the Deer 2022-10-12 00:04:27 +02:00
commit 1f43d3ad06
2 changed files with 8 additions and 4 deletions

View file

@ -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-";

View file

@ -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; j<numshot; j++ )
{
a = FRandom[Wallbuster](0,360);
s = FRandom[Wallbuster](0,.05+.006*howmany);
@ -269,7 +273,7 @@ Class Wallbuster : SWWMWeapon
st.shootthroughlist.Clear();
st.waterhitlist.Clear();
st.Trace(origin,level.PointInSector(origin.xy),dir,8000.,TRACE_HitSky);
ProcessTraceHit(st,origin,dir,10,7000,bc:5+howmany/6,(howmany>1));
ProcessTraceHit(st,origin,dir,individualdmg,7000,bc:5+howmany/6,(howmany>1));
}
for ( int i=0; i<(16-howmany/2); i++ )
{