- in_mouseaiming

This commit is contained in:
Christoph Oelckers 2019-10-23 00:51:49 +02:00
parent 7501120dc8
commit c0c62fe367
17 changed files with 23 additions and 29 deletions

View file

@ -93,7 +93,6 @@ int32_t gMessageFont;
int32_t gbAdultContent;
char gzAdultPassword[9];
int32_t gMouseSensitivity;
int32_t gMouseAiming;
int32_t gMouseAimingFlipped;
bool gNoClip;
bool gInfiniteAmmo;
@ -306,7 +305,6 @@ void CONFIG_SetDefaults(void)
//ud.menu_slidebarz = 65536;
//ud.menu_slidecursorz = 65536;
//ud.menubackground = 1;
//ud.mouseaiming = 0;
//ud.mouseflip = 1;
//ud.msgdisptime = 120;
//ud.pwlockout[0] = '\0';

View file

@ -72,7 +72,6 @@ extern int32_t gMessageFont;
extern int32_t gbAdultContent;
extern char gzAdultPassword[9];
extern int32_t gMouseSensitivity;
extern int32_t gMouseAiming;
extern int32_t gMouseAimingFlipped;
extern bool gNoClip;
extern bool gInfiniteAmmo;

View file

@ -883,7 +883,7 @@ static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( "Sensitivity:", &
#ifndef EDUKE32_SIMPLE_MENU
static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &ud.mouseaiming);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &in_aimmode.Value);
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
@ -2121,7 +2121,7 @@ static void Menu_Pre(MenuID_t cm)
#ifndef EDUKE32_SIMPLE_MENU
case MENU_MOUSESETUP:
MenuEntry_DisableOnCondition(&ME_MOUSESETUP_MOUSEAIMING, ud.mouseaiming);
MenuEntry_DisableOnCondition(&ME_MOUSESETUP_MOUSEAIMING, in_aimmode);
break;
#endif
case MENU_NETOPTIONS:

View file

@ -220,25 +220,26 @@ CUSTOM_CVARD(Int, r_fov, 90, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "change the field o
CVARD(Bool, r_horizcenter, false, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable centered horizon line") // only present in Blood, maybe add to others?
CUSTOM_CVARD(Bool, in_joystick, false, CVAR_ARCHIVE|CVAR_NOINITCALL, "enables input from the joystick if it is present")
CUSTOM_CVARD(Bool, in_joystick, false, CVAR_ARCHIVE||CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "enables input from the joystick if it is present")
{
CONTROL_JoystickEnabled = (self && CONTROL_JoyPresent);
}
CUSTOM_CVARD(Bool, in_mouse, true, CVAR_ARCHIVE|CVAR_NOINITCALL, "enables input from the mouse if it is present")
CUSTOM_CVARD(Bool, in_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "enables input from the mouse if it is present")
{
CONTROL_MouseEnabled = (self && CONTROL_MousePresent);
}
CVARD(Bool, in_aimmode, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "0:toggle, 1:hold to aim")// (void *)&ud.mouseaiming, CVAR_BOOL, 0, 1 },
#if 0
{ "in_aimmode", "0:toggle, 1:hold to aim", (void *)&gMouseAiming, CVAR_BOOL, 0, 1 },
// DN3D
static osdcvardata_t cvars_game[] =
{
{ "in_aimmode", "0:toggle, 1:hold to aim", (void *)&ud.mouseaiming, CVAR_BOOL, 0, 1 },
{
"in_mousebias", "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time",
(void *)&ud.config.MouseBias, CVAR_INT, 0, 32
},
@ -288,7 +289,6 @@ CUSTOM_CVARD(Bool, in_mouse, true, CVAR_ARCHIVE|CVAR_NOINITCALL, "enables input
static osdcvardata_t cvars_game[] =
{
{ "in_aimmode", "0:toggle, 1:hold to aim", (void *)&ud.mouseaiming, CVAR_BOOL, 0, 1 },
{
"in_mousebias", "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time",
(void *)&ud.config.MouseBias, CVAR_INT, 0, 32
@ -342,7 +342,6 @@ int32_t registerosdcommands(void)
char buffer[256];
static osdcvardata_t cvars_game[] =
{
{ "in_aimmode", "0:toggle, 1:hold to aim", (void *)&gMouseAiming, CVAR_BOOL, 0, 1 },
{
"in_mousebias", "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time",
(void *)&MouseBias, CVAR_INT, 0, 32

View file

@ -263,7 +263,6 @@ void CONFIG_SetDefaults(void)
ud.menu_slidebarz = 65536;
ud.menu_slidecursorz = 65536;
ud.menubackground = 1;
ud.mouseaiming = 0;
ud.mouseflip = 1;
ud.msgdisptime = 120;
ud.pwlockout[0] = '\0';

View file

@ -6134,7 +6134,7 @@ static void P_SetupMiscInputSettings(void)
{
auto ps = g_player[myconnectindex].ps;
ps->aim_mode = ud.mouseaiming;
ps->aim_mode = in_aimmode;
ps->auto_aim = cl_autoaim;
ps->weaponswitch = cl_weaponswitch;
}

View file

@ -175,7 +175,7 @@ typedef struct {
int32_t camera_time,folfvel,folavel,folx,foly,fola;
int32_t reccnt;
int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
int32_t runkey_mode,statusbarscale,weaponswitch,drawweapon; // JBF 20031125
int32_t color,msgdisptime,statusbarmode;
int32_t m_noexits,noexits;
int32_t team, althud, weaponscale, textscale;

View file

@ -1448,7 +1448,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_MOUSEFLIP: labelNum = ud.mouseflip; break;
case USERDEFS_STATUSBARSCALE: labelNum = ud.statusbarscale; break;
case USERDEFS_DRAWWEAPON: labelNum = ud.drawweapon; break;
case USERDEFS_MOUSEAIMING: labelNum = ud.mouseaiming; break;
case USERDEFS_MOUSEAIMING: labelNum = in_aimmode; break;
case USERDEFS_WEAPONSWITCH: labelNum = cl_weaponswitch; break;
case USERDEFS_DEMOCAMS: labelNum = cl_democams; break;
case USERDEFS_COLOR: labelNum = ud.color; break;
@ -1649,7 +1649,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_MOUSEFLIP: ud.mouseflip = iSet; break;
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
case USERDEFS_DRAWWEAPON: ud.drawweapon = iSet; break;
case USERDEFS_MOUSEAIMING: ud.mouseaiming = iSet; break;
case USERDEFS_MOUSEAIMING: in_aoimmode = iSet; break;//!!!
case USERDEFS_WEAPONSWITCH: cl_weaponswitch = iSet; break; //!!!
case USERDEFS_DEMOCAMS: cl_democams = iSet; break;
case USERDEFS_COLOR: ud.color = iSet; break;

View file

@ -882,7 +882,7 @@ static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( "Sensitivity:", &
#ifndef EDUKE32_SIMPLE_MENU
static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &ud.mouseaiming);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &in_aimmode.Value);
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
@ -2137,7 +2137,7 @@ static void Menu_Pre(MenuID_t cm)
#ifndef EDUKE32_SIMPLE_MENU
case MENU_MOUSESETUP:
MenuEntry_DisableOnCondition(&ME_MOUSESETUP_MOUSEAIMING, ud.mouseaiming);
MenuEntry_DisableOnCondition(&ME_MOUSESETUP_MOUSEAIMING, in_aimmode);
break;
#endif
case MENU_NETOPTIONS:

View file

@ -4807,7 +4807,7 @@ void Net_SendClientInfo(void)
}
tempnetbuf[l++] = 0;
tempnetbuf[l++] = g_player[myconnectindex].ps->aim_mode = ud.mouseaiming;
tempnetbuf[l++] = g_player[myconnectindex].ps->aim_mode = in_aimmode;
tempnetbuf[l++] = g_player[myconnectindex].ps->auto_aim = cl_autoaim;
tempnetbuf[l++] = g_player[myconnectindex].ps->weaponswitch = cl_weaponswitch;
tempnetbuf[l++] = g_player[myconnectindex].ps->palookup = g_player[myconnectindex].pcolor = ud.color;

View file

@ -2907,7 +2907,7 @@ void P_GetInput(int const playerNum)
CONTROL_ProcessBinds();
if (ud.mouseaiming)
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{

View file

@ -239,7 +239,6 @@ void CONFIG_SetDefaults(void)
ud.menu_slidebarz = 65536;
ud.menu_slidebarmargin = RR ? 6 * 65536 : 65536;
ud.menu_slidecursorz = RR ? 32768 : 65536;
ud.mouseaiming = 0;
ud.mouseflip = 1;
ud.msgdisptime = 120;
ud.pwlockout[0] = '\0';

View file

@ -7523,7 +7523,7 @@ static void P_SetupMiscInputSettings(void)
{
DukePlayer_t *ps = g_player[myconnectindex].ps;
ps->aim_mode = ud.mouseaiming;
ps->aim_mode = in_aimmode;
ps->auto_aim = cl_autoaim;
ps->weaponswitch = cl_weaponswitch;
}

View file

@ -154,7 +154,7 @@ typedef struct {
int32_t camera_time,folfvel,folavel,folx,foly,fola;
int32_t reccnt;
int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
int32_t runkey_mode,statusbarscale,weaponswitch,drawweapon; // JBF 20031125
int32_t color,msgdisptime,statusbarmode;
int32_t m_noexits,noexits,automsg;
int32_t team, althud, weaponscale, textscale;

View file

@ -836,7 +836,7 @@ static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( "Sensitivity:", &
#ifndef EDUKE32_SIMPLE_MENU
static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &ud.mouseaiming);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &in_aimmode.Value);
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
@ -2066,7 +2066,7 @@ static void Menu_Pre(MenuID_t cm)
#ifndef EDUKE32_SIMPLE_MENU
case MENU_MOUSESETUP:
MenuEntry_DisableOnCondition(&ME_MOUSESETUP_MOUSEAIMING, ud.mouseaiming);
MenuEntry_DisableOnCondition(&ME_MOUSESETUP_MOUSEAIMING, in_aimmode);
break;
#endif
case MENU_NETOPTIONS:

View file

@ -3467,7 +3467,7 @@ void Net_SendClientInfo(void)
}
tempbuf[l++] = 0;
tempbuf[l++] = g_player[myconnectindex].ps->aim_mode = ud.mouseaiming;
tempbuf[l++] = g_player[myconnectindex].ps->aim_mode = in_aimmode;
tempbuf[l++] = g_player[myconnectindex].ps->auto_aim = cl_autoaim;
tempbuf[l++] = g_player[myconnectindex].ps->weaponswitch = cl_weaponswitch;
tempbuf[l++] = g_player[myconnectindex].ps->palookup = g_player[myconnectindex].pcolor = ud.color;

View file

@ -2757,7 +2757,7 @@ void P_GetInput(int playerNum)
CONTROL_ProcessBinds();
if (ud.mouseaiming)
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{
@ -3063,7 +3063,7 @@ void P_GetInputMotorcycle(int playerNum)
CONTROL_ProcessBinds();
if (ud.mouseaiming)
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{
@ -3361,7 +3361,7 @@ void P_GetInputBoat(int playerNum)
CONTROL_ProcessBinds();
if (ud.mouseaiming)
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{