Minimap zoom increments like in the Common Library.
This commit is contained in:
parent
ffa897e042
commit
035807acb0
2 changed files with 8 additions and 4 deletions
|
|
@ -18,7 +18,9 @@ extend Class SWWMHandler
|
|||
{
|
||||
if ( (gamestate != GS_LEVEL) || (players[consoleplayer].Health <= 0) || !(players[consoleplayer].mo is 'Demolitionist') )
|
||||
return;
|
||||
double val = max(.5,swwm_mm_zoom/2.);
|
||||
double val = swwm_mm_zoom;
|
||||
if ( val > 1. ) val = max(1.,val-.5);
|
||||
else val = max(.5,val-.25);
|
||||
CVar.FindCVar('swwm_mm_zoom').SetFloat(val);
|
||||
}
|
||||
else if ( e.Name ~== "swwmzoomout" )
|
||||
|
|
@ -26,7 +28,9 @@ extend Class SWWMHandler
|
|||
if ( (gamestate != GS_LEVEL) || (players[consoleplayer].Health <= 0) || !(players[consoleplayer].mo is 'Demolitionist') )
|
||||
return;
|
||||
double maxval = players[consoleplayer].mo.FindInventory("Omnisight")?2.:1.;
|
||||
double val = min(maxval,swwm_mm_zoom*2.);
|
||||
double val = swwm_mm_zoom;
|
||||
if ( val >= 1. ) val = min(maxval,val+.5);
|
||||
else val = min(1.,val+.25);
|
||||
CVar.FindCVar('swwm_mm_zoom').SetFloat(val);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue