mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- fixed autoaim check and adjusted presentation in the menu to be correct for all games.
Fixes #264
This commit is contained in:
parent
ba22df2a2a
commit
5b6aa372ea
4 changed files with 12 additions and 3 deletions
|
@ -120,6 +120,7 @@ enum
|
|||
GAMEFLAG_PSEXHUMED = GAMEFLAG_POWERSLAVE | GAMEFLAG_EXHUMED, // the two games really are the same, except for the name and the publisher.
|
||||
GAMEFLAG_WORLDTOUR = 0x00008000,
|
||||
GAMEFLAG_DUKEDC = 0x00010000,
|
||||
GAMEFLAG_DUKECOMPAT = GAMEFLAG_DUKE | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_RRALL,
|
||||
GAMEFLAGMASK = 0x0000FFFF, // flags allowed from grpinfo
|
||||
|
||||
// We still need these for the parsers.
|
||||
|
|
|
@ -87,7 +87,8 @@ CVARD(Bool, cl_exhumedoldturn, false, CVAR_ARCHIVE, "enable/disable legacy turni
|
|||
|
||||
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")
|
||||
{
|
||||
if (self < 0 || self > (isBlood() ? 2 : 3)) self = 1; // The Shadow Warrior backend only has a bool for this.
|
||||
int automodes = (g_gameType & (GAMEFLAG_DUKECOMPAT | GAMEFLAG_BLOOD)) ? 2 : 1;
|
||||
if (self < 0 || self > automodes) self = 1;
|
||||
};
|
||||
|
||||
CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable auto weapon switching")
|
||||
|
|
|
@ -107,7 +107,7 @@ inline const char* PlayerName(int pindex)
|
|||
return playername;
|
||||
}
|
||||
|
||||
inline bool Autoaim(int player)
|
||||
inline int Autoaim(int player)
|
||||
{
|
||||
// Todo: proper implementation of user CVARs.
|
||||
return cl_autoaim;
|
||||
|
|
|
@ -944,7 +944,14 @@ OptionValue "WeapSwitch"
|
|||
OptionMenu GameplayOptions protected
|
||||
{
|
||||
Title "$GMPLYMNU_TITLE"
|
||||
Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "AimMode"
|
||||
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, Blood)
|
||||
{
|
||||
Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "AimMode"
|
||||
}
|
||||
else
|
||||
{
|
||||
Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "OnOff"
|
||||
}
|
||||
Option "$PLYRMNU_ALWAYSRUN", "cl_autorun", "OnOff"
|
||||
Option "$PLRMNU_RUNMODE", "cl_runmode", "RunMode"
|
||||
ifgame(ShadowWarrior)
|
||||
|
|
Loading…
Reference in a new issue