(Try to) reduce bullet trail perf hit for some hitscan weapons.
This commit is contained in:
parent
93cd809660
commit
aa7fd5d9b0
5 changed files with 18 additions and 8 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
[default]
|
[default]
|
||||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1217 \cu(mar 20 may 2025 12:05:32 CEST)\c-";
|
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1218 \cu(mar 20 may 2025 12:05:47 CEST)\c-";
|
||||||
SWWM_SHORTVER="\cw1.3pre r1217 \cu(2025-05-20 12:05:32)\c-";
|
SWWM_SHORTVER="\cw1.3pre r1218 \cu(2025-05-20 12:05:47)\c-";
|
||||||
|
|
|
||||||
|
|
@ -174,10 +174,14 @@ Class HeavyMahSheenGun : SWWMWeapon
|
||||||
b.target = self;
|
b.target = self;
|
||||||
b.A_CheckTerrain();
|
b.A_CheckTerrain();
|
||||||
}
|
}
|
||||||
|
Vector3 ppos;
|
||||||
for ( int i=5; i<st.Results.Distance; i+=10 )
|
for ( int i=5; i<st.Results.Distance; i+=10 )
|
||||||
{
|
{
|
||||||
if ( !Random[Boolet](0,2) ) continue;
|
if ( Random[Boolet](0,2+invoker.firespeed*3) ) continue;
|
||||||
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i));
|
if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
||||||
|
ppos = level.Vec3Offset(origin,dir*i);
|
||||||
|
if ( !SWWMUtility.PointInWater(ppos) ) continue;
|
||||||
|
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',ppos);
|
||||||
b.Scale *= FRandom[Boolet](.1,.3);
|
b.Scale *= FRandom[Boolet](.1,.3);
|
||||||
}
|
}
|
||||||
foreach ( hit:st.HitList )
|
foreach ( hit:st.HitList )
|
||||||
|
|
|
||||||
|
|
@ -1406,7 +1406,7 @@ Class SWWMBulletTrail : LineTracer
|
||||||
for ( int i=5; i<t.Results.Distance; i+=10 )
|
for ( int i=5; i<t.Results.Distance; i+=10 )
|
||||||
{
|
{
|
||||||
if ( Random[Boolet](0,bubblesparse) ) continue;
|
if ( Random[Boolet](0,bubblesparse) ) continue;
|
||||||
if ( !Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
||||||
ppos = level.Vec3Offset(pos,dir*i);
|
ppos = level.Vec3Offset(pos,dir*i);
|
||||||
bInWater = SWWMUtility.PointInWater(ppos);
|
bInWater = SWWMUtility.PointInWater(ppos);
|
||||||
if ( smoky && !bInWater ) b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ppos);
|
if ( smoky && !bInWater ) b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ppos);
|
||||||
|
|
|
||||||
|
|
@ -86,11 +86,14 @@ Class Wallbuster : SWWMWeapon
|
||||||
b.target = self;
|
b.target = self;
|
||||||
b.A_CheckTerrain();
|
b.A_CheckTerrain();
|
||||||
}
|
}
|
||||||
|
Vector3 ppos;
|
||||||
for ( int i=5; i<t.Results.Distance; i+=10 )
|
for ( int i=5; i<t.Results.Distance; i+=10 )
|
||||||
{
|
{
|
||||||
if ( Random[Boolet](0,bc) ) continue;
|
if ( Random[Boolet](0,bc) ) continue;
|
||||||
if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
||||||
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i));
|
ppos = level.Vec3Offset(origin,dir*i);
|
||||||
|
if ( !SWWMUtility.PointInWater(ppos) ) continue;
|
||||||
|
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',ppos);
|
||||||
b.Scale *= FRandom[Boolet](.1,.3);
|
b.Scale *= FRandom[Boolet](.1,.3);
|
||||||
}
|
}
|
||||||
foreach( hit:t.HitList )
|
foreach( hit:t.HitList )
|
||||||
|
|
|
||||||
|
|
@ -165,11 +165,14 @@ Class Spreadgun : SWWMWeapon
|
||||||
b.target = self;
|
b.target = self;
|
||||||
b.A_CheckTerrain();
|
b.A_CheckTerrain();
|
||||||
}
|
}
|
||||||
|
Vector3 ppos;
|
||||||
for ( int i=5; i<t.Results.Distance; i+=10 )
|
for ( int i=5; i<t.Results.Distance; i+=10 )
|
||||||
{
|
{
|
||||||
if ( Random[Boolet](0,bc) ) continue;
|
if ( Random[Boolet](0,bc) ) continue;
|
||||||
if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance
|
||||||
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i));
|
ppos = level.Vec3Offset(origin,dir*i);
|
||||||
|
if ( !SWWMUtility.PointInWater(ppos) ) continue;
|
||||||
|
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',ppos);
|
||||||
b.Scale *= FRandom[Boolet](.1,.3);
|
b.Scale *= FRandom[Boolet](.1,.3);
|
||||||
}
|
}
|
||||||
foreach( hit:t.HitList )
|
foreach( hit:t.HitList )
|
||||||
|
|
@ -294,7 +297,7 @@ Class Spreadgun : SWWMWeapon
|
||||||
st.shootthroughlist.Clear();
|
st.shootthroughlist.Clear();
|
||||||
st.waterhitlist.Clear();
|
st.waterhitlist.Clear();
|
||||||
st.Trace(origin,level.PointInSector(origin.xy),dir,8000.,0,ignore:self);
|
st.Trace(origin,level.PointInSector(origin.xy),dir,8000.,0,ignore:self);
|
||||||
ProcessTraceHit(st,origin,dir,10,7000,bc:3);
|
ProcessTraceHit(st,origin,dir,10,7000,bc:5);
|
||||||
}
|
}
|
||||||
for ( int i=0; i<16; i++ )
|
for ( int i=0; i<16; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue