(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
|
|
@ -174,10 +174,14 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
Vector3 ppos;
|
||||
for ( int i=5; i<st.Results.Distance; i+=10 )
|
||||
{
|
||||
if ( !Random[Boolet](0,2) ) continue;
|
||||
let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i));
|
||||
if ( Random[Boolet](0,2+invoker.firespeed*3) ) continue;
|
||||
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);
|
||||
}
|
||||
foreach ( hit:st.HitList )
|
||||
|
|
|
|||
|
|
@ -1406,7 +1406,7 @@ Class SWWMBulletTrail : LineTracer
|
|||
for ( int i=5; i<t.Results.Distance; i+=10 )
|
||||
{
|
||||
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);
|
||||
bInWater = SWWMUtility.PointInWater(ppos);
|
||||
if ( smoky && !bInWater ) b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ppos);
|
||||
|
|
|
|||
|
|
@ -86,11 +86,14 @@ Class Wallbuster : SWWMWeapon
|
|||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
Vector3 ppos;
|
||||
for ( int i=5; i<t.Results.Distance; i+=10 )
|
||||
{
|
||||
if ( Random[Boolet](0,bc) ) continue;
|
||||
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);
|
||||
}
|
||||
foreach( hit:t.HitList )
|
||||
|
|
|
|||
|
|
@ -165,11 +165,14 @@ Class Spreadgun : SWWMWeapon
|
|||
b.target = self;
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
Vector3 ppos;
|
||||
for ( int i=5; i<t.Results.Distance; i+=10 )
|
||||
{
|
||||
if ( Random[Boolet](0,bc) ) continue;
|
||||
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);
|
||||
}
|
||||
foreach( hit:t.HitList )
|
||||
|
|
@ -294,7 +297,7 @@ Class Spreadgun : SWWMWeapon
|
|||
st.shootthroughlist.Clear();
|
||||
st.waterhitlist.Clear();
|
||||
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++ )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue