mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
- refactored cl_weaponswitch
This commit is contained in:
parent
3f48ecd479
commit
bdf2d24b21
16 changed files with 46 additions and 39 deletions
|
@ -687,7 +687,7 @@ void StartLevel(GAMEOPTIONS *gameOptions)
|
||||||
{
|
{
|
||||||
gProfile[i].skill = gSkill;
|
gProfile[i].skill = gSkill;
|
||||||
gProfile[i].nAutoAim = cl_autoaim;
|
gProfile[i].nAutoAim = cl_autoaim;
|
||||||
gProfile[i].nWeaponSwitch = gWeaponSwitch;
|
gProfile[i].nWeaponSwitch = cl_weaponswitch;
|
||||||
}
|
}
|
||||||
playerInit(i,0);
|
playerInit(i,0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ char szPlayerName[MAXPLAYERNAME];
|
||||||
int32_t gTurnSpeed;
|
int32_t gTurnSpeed;
|
||||||
int32_t gDetail;
|
int32_t gDetail;
|
||||||
int32_t gMouseAim;
|
int32_t gMouseAim;
|
||||||
int32_t gWeaponSwitch;
|
int32_t cl_weaponswitch;
|
||||||
int32_t gAutoRun;
|
int32_t gAutoRun;
|
||||||
int32_t gFollowMap;
|
int32_t gFollowMap;
|
||||||
int32_t gOverlayMap;
|
int32_t gOverlayMap;
|
||||||
|
@ -337,7 +337,7 @@ void CONFIG_SetDefaults(void)
|
||||||
//ud.team = 0;
|
//ud.team = 0;
|
||||||
//ud.textscale = 200;
|
//ud.textscale = 200;
|
||||||
//ud.weaponscale = 100;
|
//ud.weaponscale = 100;
|
||||||
//ud.weaponswitch = 3; // new+empty
|
//cl_weaponswitch = 3; // new+empty
|
||||||
gFov = 90;
|
gFov = 90;
|
||||||
gCenterHoriz = 0;
|
gCenterHoriz = 0;
|
||||||
gDeliriumBlur = 1;
|
gDeliriumBlur = 1;
|
||||||
|
@ -358,7 +358,7 @@ void CONFIG_SetDefaults(void)
|
||||||
|
|
||||||
gMouseAimingFlipped = 0;
|
gMouseAimingFlipped = 0;
|
||||||
gMouseAim = 1;
|
gMouseAim = 1;
|
||||||
gWeaponSwitch = 1;
|
cl_weaponswitch = 1;
|
||||||
|
|
||||||
Bstrcpy(szPlayerName, "Player");
|
Bstrcpy(szPlayerName, "Player");
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ extern char CommbatMacro[MAXRIDECULE][MAXRIDECULELENGTH];
|
||||||
extern char szPlayerName[MAXPLAYERNAME];
|
extern char szPlayerName[MAXPLAYERNAME];
|
||||||
extern int32_t gTurnSpeed;
|
extern int32_t gTurnSpeed;
|
||||||
extern int32_t gDetail;
|
extern int32_t gDetail;
|
||||||
extern int32_t gWeaponSwitch;
|
extern int32_t cl_weaponswitch;
|
||||||
extern int32_t gAutoRun;
|
extern int32_t gAutoRun;
|
||||||
extern int32_t gFollowMap;
|
extern int32_t gFollowMap;
|
||||||
extern int32_t gOverlayMap;
|
extern int32_t gOverlayMap;
|
||||||
|
|
|
@ -1123,7 +1123,7 @@ void SetupOptionsMenu(void)
|
||||||
itemOptionsGameBoolViewBobbing.at20 = cl_viewvbob;
|
itemOptionsGameBoolViewBobbing.at20 = cl_viewvbob;
|
||||||
itemOptionsGameBoolViewSwaying.at20 = cl_viewhbob;
|
itemOptionsGameBoolViewSwaying.at20 = cl_viewhbob;
|
||||||
itemOptionsGameBoolAutoAim.m_nFocus = cl_autoaim;
|
itemOptionsGameBoolAutoAim.m_nFocus = cl_autoaim;
|
||||||
itemOptionsGameWeaponSwitch.m_nFocus = (gWeaponSwitch&1) ? ((gWeaponSwitch&2) ? 1 : 2) : 0;
|
itemOptionsGameWeaponSwitch.m_nFocus = (cl_weaponswitch&1) ? ((cl_weaponswitch&2) ? 1 : 2) : 0;
|
||||||
|
|
||||||
///////
|
///////
|
||||||
itemOptionsGameBoolWeaponsV10X.at20 = gWeaponsV10x;
|
itemOptionsGameBoolWeaponsV10X.at20 = gWeaponsV10x;
|
||||||
|
@ -1494,22 +1494,23 @@ void SetShowMapTitle(CGameMenuItemZBool* pItem)
|
||||||
|
|
||||||
void SetWeaponSwitch(CGameMenuItemZCycle *pItem)
|
void SetWeaponSwitch(CGameMenuItemZCycle *pItem)
|
||||||
{
|
{
|
||||||
gWeaponSwitch &= ~(1|2);
|
|
||||||
|
cl_weaponswitch = cl_weaponswitch & ~(1|2);
|
||||||
switch (pItem->m_nFocus)
|
switch (pItem->m_nFocus)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gWeaponSwitch |= 2;
|
cl_weaponswitch = cl_weaponswitch | 2;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
default:
|
||||||
gWeaponSwitch |= 1;
|
cl_weaponswitch = cl_weaponswitch | 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!gDemo.at0 && !gDemo.at1)
|
if (!gDemo.at0 && !gDemo.at1)
|
||||||
{
|
{
|
||||||
gProfile[myconnectindex].nWeaponSwitch = gWeaponSwitch;
|
gProfile[myconnectindex].nWeaponSwitch = cl_weaponswitch;
|
||||||
netBroadcastPlayerInfo(myconnectindex);
|
netBroadcastPlayerInfo(myconnectindex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3272,14 +3272,14 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
||||||
#endif
|
#endif
|
||||||
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
||||||
{
|
{
|
||||||
ud.weaponswitch &= ~(1|4);
|
ud.weaponswitch = ud.weaponswitch & ~(1|4);
|
||||||
switch (newOption)
|
switch (newOption)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
ud.weaponswitch |= 4;
|
ud.weaponswitch = ud.weaponswitch | 4;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
case 1:
|
case 1:
|
||||||
ud.weaponswitch |= 1;
|
ud.weaponswitch = ud.weaponswitch | 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -3604,7 +3604,7 @@ This is polled when the menu code is populating the screen but for some reason d
|
||||||
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
|
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
|
||||||
{
|
{
|
||||||
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
||||||
return (ud.weaponswitch & 1) ? ((ud.weaponswitch & 4) ? 2 : 1) : 0;
|
return (cl_weaponswitch & 1) ? ((cl_weaponswitch & 4) ? 2 : 1) : 0;
|
||||||
else if (entry == &ME_SOUND_DUKETALK)
|
else if (entry == &ME_SOUND_DUKETALK)
|
||||||
return snd_speech & 1;
|
return snd_speech & 1;
|
||||||
else if (entry == &ME_NETOPTIONS_MONSTERS)
|
else if (entry == &ME_NETOPTIONS_MONSTERS)
|
||||||
|
|
|
@ -579,7 +579,7 @@ void netBroadcastPlayerInfo(int nPlayer)
|
||||||
strcpy(pProfile->name, szPlayerName);
|
strcpy(pProfile->name, szPlayerName);
|
||||||
pProfile->skill = gSkill;
|
pProfile->skill = gSkill;
|
||||||
pProfile->nAutoAim = cl_autoaim;
|
pProfile->nAutoAim = cl_autoaim;
|
||||||
pProfile->nWeaponSwitch = gWeaponSwitch;
|
pProfile->nWeaponSwitch = cl_weaponswitch;
|
||||||
if (numplayers < 2)
|
if (numplayers < 2)
|
||||||
return;
|
return;
|
||||||
char *pPacket = packet;
|
char *pPacket = packet;
|
||||||
|
|
|
@ -39,6 +39,16 @@ CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
||||||
//UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.)
|
//UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE, "enable/disable auto weapon switching")//, (void *)&cl_weaponswitch, CVAR_INT|CVAR_MULTI, 0, 7 }, (void *)&cl_weaponswitch, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||||
|
|
||||||
|
{
|
||||||
|
if (self < 0) self = 0;
|
||||||
|
if (self > 3 && playing_blood) self = 3;
|
||||||
|
if (self > 7) self = 7;
|
||||||
|
//UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, cl_autovote, 0, CVAR_ARCHIVE, "enable/disable automatic voting")
|
CUSTOM_CVARD(Int, cl_autovote, 0, CVAR_ARCHIVE, "enable/disable automatic voting")
|
||||||
{
|
{
|
||||||
if (self < 0 || self > 2) self = 0;
|
if (self < 0 || self > 2) self = 0;
|
||||||
|
@ -119,7 +129,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
// DN3D
|
// DN3D
|
||||||
static osdcvardata_t cvars_game[] =
|
static osdcvardata_t cvars_game[] =
|
||||||
{
|
{
|
||||||
{ "cl_weaponswitch", "enable/disable auto weapon switching", (void *)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 7 },
|
|
||||||
|
|
||||||
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||||
|
|
||||||
|
@ -164,7 +173,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||||
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
||||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||||
{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&ud.detail, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
|
|
||||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||||
|
|
||||||
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||||
|
@ -200,8 +208,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
|
|
||||||
static osdcvardata_t cvars_game[] =
|
static osdcvardata_t cvars_game[] =
|
||||||
{
|
{
|
||||||
{ "cl_weaponswitch", "enable/disable auto weapon switching", (void *)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 7 },
|
|
||||||
|
|
||||||
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
{ "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 },
|
{ "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
||||||
|
@ -245,7 +251,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||||
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
||||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||||
{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&ud.detail, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
|
|
||||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||||
|
|
||||||
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||||
|
@ -285,7 +290,6 @@ int32_t registerosdcommands(void)
|
||||||
static osdcvardata_t cvars_game[] =
|
static osdcvardata_t cvars_game[] =
|
||||||
{
|
{
|
||||||
|
|
||||||
{ "cl_weaponswitch", "enable/disable auto weapon switching", (void *)&gWeaponSwitch, CVAR_INT|CVAR_MULTI, 0, 3 },
|
|
||||||
//
|
//
|
||||||
// { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
// { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||||
//
|
//
|
||||||
|
@ -333,7 +337,7 @@ int32_t registerosdcommands(void)
|
||||||
// { "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
// { "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||||
{ "r_size", "change size of viewable area", (void *)&gViewSize, CVAR_INT|CVAR_FUNCPTR, 0, 7 },
|
{ "r_size", "change size of viewable area", (void *)&gViewSize, CVAR_INT|CVAR_FUNCPTR, 0, 7 },
|
||||||
// { "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
// { "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||||
{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&gUpscaleFactor, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
|
},
|
||||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&useprecache, CVAR_BOOL, 0, 1 },
|
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&useprecache, CVAR_BOOL, 0, 1 },
|
||||||
//
|
//
|
||||||
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||||
|
@ -363,4 +367,7 @@ int32_t registerosdcommands(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// These I don't care about.
|
||||||
|
//{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&ud.detail, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
|
||||||
|
//{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&gUpscaleFactor, CVAR_INT|CVAR_FUNCPTR, 1, 16
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -289,7 +289,6 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.team = 0;
|
ud.team = 0;
|
||||||
ud.textscale = 200;
|
ud.textscale = 200;
|
||||||
ud.weaponscale = 100;
|
ud.weaponscale = 100;
|
||||||
ud.weaponswitch = 3; // new+empty
|
|
||||||
|
|
||||||
Bstrcpy(ud.rtsname, G_DefaultRtsFile());
|
Bstrcpy(ud.rtsname, G_DefaultRtsFile());
|
||||||
|
|
||||||
|
|
|
@ -6145,7 +6145,7 @@ static void P_SetupMiscInputSettings(void)
|
||||||
|
|
||||||
ps->aim_mode = ud.mouseaiming;
|
ps->aim_mode = ud.mouseaiming;
|
||||||
ps->auto_aim = cl_autoaim;
|
ps->auto_aim = cl_autoaim;
|
||||||
ps->weaponswitch = ud.weaponswitch;
|
ps->weaponswitch = cl_weaponswitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_UpdatePlayerFromMenu(void)
|
void G_UpdatePlayerFromMenu(void)
|
||||||
|
|
|
@ -1449,7 +1449,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
||||||
case USERDEFS_STATUSBARSCALE: labelNum = ud.statusbarscale; break;
|
case USERDEFS_STATUSBARSCALE: labelNum = ud.statusbarscale; break;
|
||||||
case USERDEFS_DRAWWEAPON: labelNum = ud.drawweapon; break;
|
case USERDEFS_DRAWWEAPON: labelNum = ud.drawweapon; break;
|
||||||
case USERDEFS_MOUSEAIMING: labelNum = ud.mouseaiming; break;
|
case USERDEFS_MOUSEAIMING: labelNum = ud.mouseaiming; break;
|
||||||
case USERDEFS_WEAPONSWITCH: labelNum = ud.weaponswitch; break;
|
case USERDEFS_WEAPONSWITCH: labelNum = cl_weaponswitch; break;
|
||||||
case USERDEFS_DEMOCAMS: labelNum = cl_democams; break;
|
case USERDEFS_DEMOCAMS: labelNum = cl_democams; break;
|
||||||
case USERDEFS_COLOR: labelNum = ud.color; break;
|
case USERDEFS_COLOR: labelNum = ud.color; break;
|
||||||
case USERDEFS_MSGDISPTIME: labelNum = ud.msgdisptime; break;
|
case USERDEFS_MSGDISPTIME: labelNum = ud.msgdisptime; break;
|
||||||
|
@ -1650,7 +1650,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
||||||
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
|
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
|
||||||
case USERDEFS_DRAWWEAPON: ud.drawweapon = iSet; break;
|
case USERDEFS_DRAWWEAPON: ud.drawweapon = iSet; break;
|
||||||
case USERDEFS_MOUSEAIMING: ud.mouseaiming = iSet; break;
|
case USERDEFS_MOUSEAIMING: ud.mouseaiming = iSet; break;
|
||||||
case USERDEFS_WEAPONSWITCH: ud.weaponswitch = iSet; break;
|
case USERDEFS_WEAPONSWITCH: cl_weaponswitch = iSet; break; //!!!
|
||||||
case USERDEFS_DEMOCAMS: cl_democams = iSet; break;
|
case USERDEFS_DEMOCAMS: cl_democams = iSet; break;
|
||||||
case USERDEFS_COLOR: ud.color = iSet; break;
|
case USERDEFS_COLOR: ud.color = iSet; break;
|
||||||
case USERDEFS_MSGDISPTIME: ud.msgdisptime = iSet; break;
|
case USERDEFS_MSGDISPTIME: ud.msgdisptime = iSet; break;
|
||||||
|
|
|
@ -3286,14 +3286,14 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
||||||
#endif
|
#endif
|
||||||
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
||||||
{
|
{
|
||||||
ud.weaponswitch &= ~(1|4);
|
ud.weaponswitch = ud.weaponswitch & ~(1|4);
|
||||||
switch (newOption)
|
switch (newOption)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
ud.weaponswitch |= 4;
|
ud.weaponswitch = ud.weaponswitch | 4;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
case 1:
|
case 1:
|
||||||
ud.weaponswitch |= 1;
|
ud.weaponswitch = ud.weaponswitch | 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -3618,7 +3618,7 @@ This is polled when the menu code is populating the screen but for some reason d
|
||||||
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
|
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
|
||||||
{
|
{
|
||||||
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
||||||
return (ud.weaponswitch & 1) ? ((ud.weaponswitch & 4) ? 2 : 1) : 0;
|
return (cl_weaponswitch & 1) ? ((cl_weaponswitch & 4) ? 2 : 1) : 0;
|
||||||
else if (entry == &ME_SOUND_DUKETALK)
|
else if (entry == &ME_SOUND_DUKETALK)
|
||||||
return snd_speech & 1;
|
return snd_speech & 1;
|
||||||
else if (entry == &ME_NETOPTIONS_MONSTERS)
|
else if (entry == &ME_NETOPTIONS_MONSTERS)
|
||||||
|
|
|
@ -4809,7 +4809,7 @@ void Net_SendClientInfo(void)
|
||||||
|
|
||||||
tempnetbuf[l++] = g_player[myconnectindex].ps->aim_mode = ud.mouseaiming;
|
tempnetbuf[l++] = g_player[myconnectindex].ps->aim_mode = ud.mouseaiming;
|
||||||
tempnetbuf[l++] = g_player[myconnectindex].ps->auto_aim = cl_autoaim;
|
tempnetbuf[l++] = g_player[myconnectindex].ps->auto_aim = cl_autoaim;
|
||||||
tempnetbuf[l++] = g_player[myconnectindex].ps->weaponswitch = ud.weaponswitch;
|
tempnetbuf[l++] = g_player[myconnectindex].ps->weaponswitch = cl_weaponswitch;
|
||||||
tempnetbuf[l++] = g_player[myconnectindex].ps->palookup = g_player[myconnectindex].pcolor = ud.color;
|
tempnetbuf[l++] = g_player[myconnectindex].ps->palookup = g_player[myconnectindex].pcolor = ud.color;
|
||||||
|
|
||||||
tempnetbuf[l++] = g_player[myconnectindex].pteam = ud.team;
|
tempnetbuf[l++] = g_player[myconnectindex].pteam = ud.team;
|
||||||
|
|
|
@ -253,7 +253,7 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.statusbarmode = 1;
|
ud.statusbarmode = 1;
|
||||||
ud.statusbarscale = 100;
|
ud.statusbarscale = 100;
|
||||||
ud.team = 0;
|
ud.team = 0;
|
||||||
ud.weaponswitch = 3; // new+empty
|
cl_weaponswitch = 3; // new+empty
|
||||||
ud.angleinterpolation = 0;
|
ud.angleinterpolation = 0;
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
ud.setup.usejoystick = 1;
|
ud.setup.usejoystick = 1;
|
||||||
|
|
|
@ -7539,7 +7539,7 @@ static void P_SetupMiscInputSettings(void)
|
||||||
|
|
||||||
ps->aim_mode = ud.mouseaiming;
|
ps->aim_mode = ud.mouseaiming;
|
||||||
ps->auto_aim = cl_autoaim;
|
ps->auto_aim = cl_autoaim;
|
||||||
ps->weaponswitch = ud.weaponswitch;
|
ps->weaponswitch = cl_weaponswitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_UpdatePlayerFromMenu(void)
|
void G_UpdatePlayerFromMenu(void)
|
||||||
|
|
|
@ -3691,14 +3691,14 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
||||||
#endif
|
#endif
|
||||||
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
else if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
||||||
{
|
{
|
||||||
ud.weaponswitch &= ~(1|4);
|
ud.weaponswitch = ud.weaponswitch & ~(1|4);
|
||||||
switch (newOption)
|
switch (newOption)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
ud.weaponswitch |= 4;
|
ud.weaponswitch = ud.weaponswitch | 4;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
case 1:
|
case 1:
|
||||||
ud.weaponswitch |= 1;
|
ud.weaponswitch = ud.weaponswitch | 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -4016,7 +4016,7 @@ This is polled when the menu code is populating the screen but for some reason d
|
||||||
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
|
static int32_t Menu_EntryOptionSource(MenuEntry_t *entry, int32_t currentValue)
|
||||||
{
|
{
|
||||||
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
if (entry == &ME_GAMESETUP_WEAPSWITCH_PICKUP)
|
||||||
return (ud.weaponswitch & 1) ? ((ud.weaponswitch & 4) ? 2 : 1) : 0;
|
return (cl_weaponswitch & 1) ? ((cl_weaponswitch & 4) ? 2 : 1) : 0;
|
||||||
else if (entry == &ME_SOUND_DUKETALK)
|
else if (entry == &ME_SOUND_DUKETALK)
|
||||||
return snd_speech & 1;
|
return snd_speech & 1;
|
||||||
else if (entry == &ME_NETOPTIONS_MONSTERS)
|
else if (entry == &ME_NETOPTIONS_MONSTERS)
|
||||||
|
|
|
@ -3469,7 +3469,7 @@ void Net_SendClientInfo(void)
|
||||||
|
|
||||||
tempbuf[l++] = g_player[myconnectindex].ps->aim_mode = ud.mouseaiming;
|
tempbuf[l++] = g_player[myconnectindex].ps->aim_mode = ud.mouseaiming;
|
||||||
tempbuf[l++] = g_player[myconnectindex].ps->auto_aim = cl_autoaim;
|
tempbuf[l++] = g_player[myconnectindex].ps->auto_aim = cl_autoaim;
|
||||||
tempbuf[l++] = g_player[myconnectindex].ps->weaponswitch = ud.weaponswitch;
|
tempbuf[l++] = g_player[myconnectindex].ps->weaponswitch = cl_weaponswitch;
|
||||||
tempbuf[l++] = g_player[myconnectindex].ps->palookup = g_player[myconnectindex].pcolor = ud.color;
|
tempbuf[l++] = g_player[myconnectindex].ps->palookup = g_player[myconnectindex].pcolor = ud.color;
|
||||||
|
|
||||||
tempbuf[l++] = g_player[myconnectindex].pteam = ud.team;
|
tempbuf[l++] = g_player[myconnectindex].pteam = ud.team;
|
||||||
|
|
Loading…
Reference in a new issue