Some precise crosshair fixes.
This commit is contained in:
parent
9b3c2b6a74
commit
aa3343c568
3 changed files with 10 additions and 12 deletions
|
|
@ -42,15 +42,12 @@ extend Class SWWMHandler
|
|||
let sw = SWWMWeapon(players[consoleplayer].ReadyWeapon);
|
||||
if ( !sw )
|
||||
{
|
||||
numcrosshairs = 1;
|
||||
traceofs[0] = (0,0,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
numcrosshairs = sw.NumCrosshairs;
|
||||
for ( int i=0; i<numcrosshairs; i++ )
|
||||
traceofs[i] = sw.GetTraceOffset(i);
|
||||
numcrosshairs = 0;
|
||||
return;
|
||||
}
|
||||
numcrosshairs = clamp(sw.NumCrosshairs,1,MAX_CROSSHAIRS);
|
||||
for ( int i=0; i<numcrosshairs; i++ )
|
||||
traceofs[i] = sw.GetTraceOffset(i);
|
||||
let mo = players[consoleplayer].mo;
|
||||
if ( !ctr ) ctr = new("SWWMCrosshairTracer");
|
||||
ctr.ignoreme = mo;
|
||||
|
|
@ -106,7 +103,7 @@ extend Class SWWMHandler
|
|||
double frametime = (MSTimeF()-prevframe)/1000.;
|
||||
double theta = clamp(15.*frametime,0.,.5); // naive, but whatever
|
||||
// draw precise crosshair(s)
|
||||
if ( automapactive || (players[consoleplayer].Camera != players[consoleplayer].mo) || (players[consoleplayer].cheats&CF_CHASECAM) ) return;
|
||||
if ( automapactive || (players[consoleplayer].Camera != players[consoleplayer].mo) || (players[consoleplayer].cheats&CF_CHASECAM) || (numcrosshairs <= 0) ) return;
|
||||
if ( !swwm_precisecrosshair ) return;
|
||||
if ( crosshairforce ) return;
|
||||
if ( !crosshairon && (swwm_precisecrosshair <= 1) ) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue