- re-fixed crosshair scale to only use one CVAR for everything.

This commit is contained in:
Christoph Oelckers 2020-11-13 17:56:55 +01:00
parent 34dfb6c5fc
commit 36479b623d
5 changed files with 5 additions and 15 deletions

View file

@ -57,7 +57,7 @@ IMPLEMENT_CLASS(DHUDFont, false, false);
CVAR(Color, crosshaircolor, 0xff0000, CVAR_ARCHIVE);
CVAR(Int, crosshairhealth, 2, CVAR_ARCHIVE);
CVARD(Float, crosshairscale, 0.3, CVAR_ARCHIVE, "changes the size of the crosshair");
CVARD(Float, crosshairscale, 0.5, CVAR_ARCHIVE, "changes the size of the crosshair");
CVAR(Bool, crosshairgrow, false, CVAR_ARCHIVE);
EXTERN_CVAR(Bool, vid_fps)

View file

@ -1271,7 +1271,7 @@ void DrawCrosshair(int deftile, int health, double xdelta, double ydelta, double
auto tile = tileGetTexture(deftile);
if (tile)
{
double crosshair_scale = cl_crosshairscale * .01 * scale;
double crosshair_scale = crosshairscale * scale;
DrawTexture(twod, tile, 160 + xdelta, 100 + ydelta, DTA_Color, color,
DTA_FullscreenScale, FSMode_Fit320x200, DTA_ScaleX, crosshair_scale, DTA_ScaleY, crosshair_scale, DTA_CenterOffsetRel, true,
DTA_ViewportX, windowxy1.x, DTA_ViewportY, windowxy1.y, DTA_ViewportWidth, windowxy2.x - windowxy1.x + 1, DTA_ViewportHeight, windowxy2.y - windowxy1.y + 1, TAG_DONE);

View file

@ -83,11 +83,6 @@ CVARD(Bool, cl_smoothsway, false, CVAR_ARCHIVE, "move SW weapon left and right s
CVARD(Bool, cl_showmagamt, false, CVAR_ARCHIVE, "show the amount of rounds left in the magazine of your weapon on the modern HUD")
CVARD(Bool, cl_nomeleeblur, false, CVAR_ARCHIVE, "enable/disable blur effect with melee weapons in SW")
CVARD(Bool, cl_exhumedoldturn, false, CVAR_ARCHIVE, "enable/disable legacy turning speed for Powerslave/Exhumed")
CUSTOM_CVARD(Int, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair")
{
if (self < 1) self = 1;
else if (self > 100) self = 100;
}
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")

View file

@ -19,7 +19,7 @@ EXTERN_CVAR(Bool, cl_interpolate)
EXTERN_CVAR(Bool, cl_slopetilting)
EXTERN_CVAR(Int, cl_showweapon)
EXTERN_CVAR(Int, cl_weaponswitch)
EXTERN_CVAR(Int, cl_crosshairscale)
EXTERN_CVAR(Float, crosshairscale)
EXTERN_CVAR(Bool, cl_sointerpolation)
EXTERN_CVAR(Bool, cl_syncinput)
EXTERN_CVAR(Bool, cl_swaltnukeinit)

View file

@ -159,7 +159,7 @@ LISTMENU "EpisodeMenu"
captionItem "$MNU_SELECTEPISODE"
animatedtransition
}
ifgame(Blood)
ifgame(blood)
{
position 160, 45
Linespacing 20
@ -1162,15 +1162,10 @@ OptionMenu "HUDOptions" protected
{
StaticText ""
Option "$DSPLYMNU_CLIPAMT", "cl_showmagamt", OnOff
Slider "$DSPLYMNU_CROSSHAIRSCALE", "cl_crosshairscale", 50, 100, 10, 1
}
ifgame(Exhumed)
{
Slider "$DSPLYMNU_CROSSHAIRSCALE", "crosshairscale", 0.3, 1.0, 0.125, 2
}
StaticText ""
Option "$DSPLYMNU_CROSSHAIR", "cl_crosshair", OnOff
Slider "$DSPLYMNU_CROSSHAIRSCALE", "crosshairscale", 0.25, 1.0, 0.125, 2
Option "$HUDMNU_CROSSHAIR", "crosshair", "Crosshairs"
//ColorPicker "$HUDMNU_CROSSHAIRCOLOR", "crosshaircolor" fixme: Does not exist yet in Raze.
Option "$HUDMNU_CROSSHAIRHEALTH", "crosshairhealth", "CrosshairHealthTypes"