Fix crosshair drawing for scoped weapons.
This commit is contained in:
parent
047946bb3d
commit
67a899aaa9
4 changed files with 15 additions and 4 deletions
|
|
@ -17,7 +17,7 @@ extend Class SWWMWeapon
|
|||
// force custom crosshair
|
||||
if ( swwm_precisecrosshair && (players[consoleplayer].Camera == players[consoleplayer].mo) && !(players[consoleplayer].cheats&CF_CHASECAM) )
|
||||
crosshair = 99;
|
||||
else crosshair = 0;
|
||||
else crosshair = ShouldDrawCrosshair()?0:99;
|
||||
}
|
||||
|
||||
// where the trace is coming from relative to eyes
|
||||
|
|
@ -25,4 +25,10 @@ extend Class SWWMWeapon
|
|||
{
|
||||
return (0.,0.,0.);
|
||||
}
|
||||
|
||||
// should we draw the crosshair? (for scoped weapons)
|
||||
virtual clearscope bool ShouldDrawCrosshair() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,6 @@ Class SilverBullet : SWWMWeapon
|
|||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( zoomed ) crosshair = 99;
|
||||
if ( !Owner || !Owner.player )
|
||||
{
|
||||
proneme = false;
|
||||
|
|
@ -281,6 +280,10 @@ Class SilverBullet : SWWMWeapon
|
|||
else PPShader.SetEnabled("SilverScope",false);
|
||||
Super.RenderUnderlay(e);
|
||||
}
|
||||
override bool ShouldDrawCrosshair()
|
||||
{
|
||||
return !zoomed;
|
||||
}
|
||||
|
||||
action void ProcessTraceHit( SilverBulletTracer t, Vector3 origin, Vector3 dir )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue