- Duke: Implement WeaponSel_Alt for Duke and RR.

This commit is contained in:
Mitchell Richters 2020-08-29 21:27:58 +10:00
parent 7659107b75
commit 51a08fbaf3
3 changed files with 44 additions and 4 deletions

View file

@ -1109,7 +1109,18 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum
{ {
if (weap == WeaponSel_Alt) if (weap == WeaponSel_Alt)
{ {
// todo switch (p->curr_weapon)
{
case SHRINKER_WEAPON:
j = PLUTOPAK ? GROW_WEAPON : p->curr_weapon;
break;
case GROW_WEAPON:
j = SHRINKER_WEAPON;
break;
default:
j = p->curr_weapon;
break;
}
} }
else if (weap == WeaponSel_Next || weap == WeaponSel_Prev) else if (weap == WeaponSel_Next || weap == WeaponSel_Prev)
{ {

View file

@ -957,7 +957,36 @@ void selectweapon_r(int snum, int weap)
{ {
if (weap == WeaponSel_Alt) if (weap == WeaponSel_Alt)
{ {
// todo switch (p->curr_weapon)
{
case THROWSAW_WEAPON:
j = BUZZSAW_WEAPON;
break;
case BUZZSAW_WEAPON:
j = THROWSAW_WEAPON;
break;
case POWDERKEG_WEAPON:
j = BOWLING_WEAPON;
break;
case BOWLING_WEAPON:
j = POWDERKEG_WEAPON;
break;
case KNEE_WEAPON:
j = isRRRA() ? SLINGBLADE_WEAPON : p->curr_weapon;
break;
case SLINGBLADE_WEAPON:
j = KNEE_WEAPON;
break;
case DYNAMITE_WEAPON:
j = isRRRA() ? CHICKEN_WEAPON : p->curr_weapon;
break;
case CHICKEN_WEAPON:
j = DYNAMITE_WEAPON;
break;
default:
j = p->curr_weapon;
break;
}
} }
else if (weap == WeaponSel_Next || weap == WeaponSel_Prev) else if (weap == WeaponSel_Next || weap == WeaponSel_Prev)
{ {

View file

@ -481,9 +481,9 @@ OptionMenu "ActionControlsMenu"// protected
{ {
Control "$CNTRLMNU_ALTATTACK" , "+alt_fire" Control "$CNTRLMNU_ALTATTACK" , "+alt_fire"
} }
ifgame(ShadowWarrior) ifgame(ShadowWarrior, Duke, Redneck)
{ {
Control "$CNTRLMNU_ALTWEAPON" , "+alt_weapon" Control "$CNTRLMNU_ALTWEAPON" , "weapalt"
} }
StaticText "" StaticText ""