Fix changing kickstartaccel from the profile menu

- M_ProfileControlSaveResponse: Set without stealth (ie, call command which sends XD_WEAPONPREF netxcmd)
- weaponPrefChange (and its splitscreen ilk): Only build/send XD_WEAPONPREF command when Playing()
This commit is contained in:
toaster 2023-02-18 14:15:58 +00:00
parent a884e332ba
commit d69e92d70f
2 changed files with 9 additions and 5 deletions

View file

@ -1428,22 +1428,26 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n)
static void weaponPrefChange(void)
{
WeaponPref_Send(0);
if (Playing())
WeaponPref_Send(0);
}
static void weaponPrefChange2(void)
{
WeaponPref_Send(1);
if (Playing())
WeaponPref_Send(1);
}
static void weaponPrefChange3(void)
{
WeaponPref_Send(2);
if (Playing())
WeaponPref_Send(2);
}
static void weaponPrefChange4(void)
{
WeaponPref_Send(3);
if (Playing())
WeaponPref_Send(3);
}
//

View file

@ -188,7 +188,7 @@ static void M_ProfileControlSaveResponse(INT32 choice)
if (belongsto > -1 && belongsto < MAXSPLITSCREENPLAYERS)
{
memcpy(&gamecontrol[belongsto], optionsmenu.tempcontrols, sizeof(gamecontroldefault));
CV_StealthSetValue(&cv_kickstartaccel[belongsto], cv_dummyprofilekickstart.value);
CV_SetValue(&cv_kickstartaccel[belongsto], cv_dummyprofilekickstart.value);
}
M_GoBack(0);