(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
|
|
@ -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