diff --git a/source/blood/src/config.cpp b/source/blood/src/config.cpp index 7e47658c2..333da0074 100644 --- a/source/blood/src/config.cpp +++ b/source/blood/src/config.cpp @@ -301,7 +301,6 @@ void CONFIG_SetDefaults(void) useprecache = 1; configversion = 0; //ud.crosshair = 1; - //ud.crosshairscale = 50; //ud.default_skill = 1; gUpscaleFactor = 0; //ud.display_bonus_screen = 1; diff --git a/source/blood/src/menus.cpp b/source/blood/src/menus.cpp index e96336d0f..9578edfb2 100644 --- a/source/blood/src/menus.cpp +++ b/source/blood/src/menus.cpp @@ -604,7 +604,7 @@ static char const s_Scale[] = "Scale:"; static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair); static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option ); -static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 ); static int32_t vpsize; diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index b91d496ac..3c2353ef4 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -32,6 +32,8 @@ CVARD(Bool, cl_viewvbob, true, CVAR_ARCHIVE, "enable/disable view vertical bobbi CVARD(Bool, cl_interpolate, true, CVAR_ARCHIVE, "enable/disable view interpolation") // only implemented in Blood CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting") // only implemented in Blood CVARD(Bool, cl_showweapon, true, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood +CVARD(Bool, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair") + CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim") { @@ -132,7 +134,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 }, - { "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 }, { "fov", "change the field of view", (void *)&ud.fov, CVAR_INT, 60, 140 }, @@ -210,8 +211,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus { { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 }, - { "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 }, - { "fov", "change the field of view", (void *)&ud.fov, CVAR_INT|CVAR_FUNCPTR, 75, 120 }, { "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 }, @@ -292,8 +291,7 @@ int32_t registerosdcommands(void) // // { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 }, -// -// { "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 }, + // { "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 }, // { "hud_custom", "change the custom hud", (void *)&ud.statusbarcustom, CVAR_INT, 0, ud.statusbarrange }, // { "hud_position", "aligns the status bar to the bottom/top", (void *)&ud.hudontop, CVAR_BOOL, 0, 1 }, diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index 757e7a015..2ba9dbef3 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -254,7 +254,6 @@ void CONFIG_SetDefaults(void) ud.config.SmoothInput = 1; ud.config.useprecache = 1; ud.configversion = 0; - ud.crosshairscale = 50; ud.default_skill = 1; ud.detail = 0; ud.display_bonus_screen = 1; diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 540f564a7..f2b879a07 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -175,7 +175,7 @@ typedef struct { #endif int32_t const_visibility,uw_framerate; int32_t camera_time,folfvel,folavel,folx,foly,fola; - int32_t reccnt,crosshairscale; + int32_t reccnt; int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125 int32_t color,msgdisptime,statusbarmode; diff --git a/source/duke3d/src/gamestructures.cpp b/source/duke3d/src/gamestructures.cpp index 82168bfa6..a92a6aee4 100644 --- a/source/duke3d/src/gamestructures.cpp +++ b/source/duke3d/src/gamestructures.cpp @@ -1465,7 +1465,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2) case USERDEFS_ANGLEINTERPOLATION: labelNum = ud.angleinterpolation; break; case USERDEFS_OBITUARIES: labelNum = cl_obituaries; break; case USERDEFS_LEVELSTATS: labelNum = ud.levelstats; break; - case USERDEFS_CROSSHAIRSCALE: labelNum = ud.crosshairscale; break; + case USERDEFS_CROSSHAIRSCALE: labelNum = cl_crosshairscale; break; case USERDEFS_ALTHUD: labelNum = ud.althud; break; case USERDEFS_DISPLAY_BONUS_SCREEN: labelNum = ud.display_bonus_screen; break; case USERDEFS_SHOW_LEVEL_TEXT: labelNum = ud.show_level_text; break; @@ -1665,8 +1665,8 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons case USERDEFS_WEAPONSWAY: cl_weaponsway = iSet; break; //!!! case USERDEFS_ANGLEINTERPOLATION: ud.angleinterpolation = iSet; break; case USERDEFS_OBITUARIES: cl_obituaries = iSet; break; //!!! - case USERDEFS_LEVELSTATS: ud.levelstats = iSet; break; - case USERDEFS_CROSSHAIRSCALE: ud.crosshairscale = iSet; break; + case USERDEFS_LEVELSTATS: ud.levelstats = iSet; break; //!!! + case USERDEFS_CROSSHAIRSCALE: cl_crosshairscale = iSet; break; case USERDEFS_ALTHUD: ud.althud = iSet; break; case USERDEFS_DISPLAY_BONUS_SCREEN: ud.display_bonus_screen = iSet; break; case USERDEFS_SHOW_LEVEL_TEXT: ud.show_level_text = iSet; break; diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 6c78c33b1..4b226e5b8 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -603,7 +603,7 @@ static char const s_Scale[] = "Scale:"; static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value); static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option ); -static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 ); static int32_t vpsize; diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 0bdc0afe4..d5e481838 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -1119,7 +1119,7 @@ void G_DisplayRest(int32_t smoothratio) vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] }; uint8_t crosshair_pal = CROSSHAIR_PAL; uint32_t crosshair_o = 1|2; - uint32_t crosshair_scale = divscale16(ud.crosshairscale, 100); + uint32_t crosshair_scale = divscale16(cl.crosshairscale, 100); auto const oyxaspect = yxaspect; if (FURY) diff --git a/source/rr/src/config.cpp b/source/rr/src/config.cpp index ab0f67a1d..2ecdcb698 100644 --- a/source/rr/src/config.cpp +++ b/source/rr/src/config.cpp @@ -231,7 +231,6 @@ void CONFIG_SetDefaults(void) #endif ud.color = 0; - ud.crosshairscale = 50; ud.detail = 0; ud.drawweapon = 1; ud.levelstats = 0; diff --git a/source/rr/src/game.h b/source/rr/src/game.h index 3cfb3e17d..b4b5d274a 100644 --- a/source/rr/src/game.h +++ b/source/rr/src/game.h @@ -154,7 +154,7 @@ typedef struct { vec3_t camerapos; int32_t const_visibility,uw_framerate; int32_t camera_time,folfvel,folavel,folx,foly,fola; - int32_t reccnt,crosshairscale; + int32_t reccnt; int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125 int32_t color,msgdisptime,statusbarmode; diff --git a/source/rr/src/menus.cpp b/source/rr/src/menus.cpp index 0886bbb1c..ff55746ac 100644 --- a/source/rr/src/menus.cpp +++ b/source/rr/src/menus.cpp @@ -581,7 +581,7 @@ static char const s_Scale[] = "Scale:"; static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value); static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option ); -static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 ); static int32_t vpsize; diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index 313d31cf7..34f1479f8 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -1143,7 +1143,7 @@ void G_DisplayRest(int32_t smoothratio) vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 }; uint8_t crosshair_pal = CROSSHAIR_PAL; uint32_t crosshair_o = 1|2; - uint32_t crosshair_scale = divscale16(ud.crosshairscale, 100); + uint32_t crosshair_scale = divscale16(cl.crosshairscale, 100); if (RR) crosshair_scale >>= 1;