mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
splitscreen: tweak weapon selection to do the expected thing for shrinker/grower.
git-svn-id: https://svn.eduke32.com/eduke32@2949 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6953dbd964
commit
5d83f679dd
1 changed files with 25 additions and 10 deletions
|
@ -82,24 +82,39 @@ define GROW_WEAPON 11
|
|||
// Next and previous weapon actions will never pick the expander.
|
||||
onevent EVENT_NEXTWEAPON
|
||||
getplayer[THISACTOR].curr_weapon pweapon
|
||||
ifvare pweapon GROW_WEAPON
|
||||
setvar RETURN DEVISTATOR_WEAPON
|
||||
ifvare pweapon HANDBOMB_WEAPON // XXX: HANDREMOTE_WEAPON?
|
||||
{
|
||||
getplayer[THISACTOR].subweapon tmp
|
||||
andvar tmp 0xfffff7ff
|
||||
setplayer[THISACTOR].subweapon tmp
|
||||
}
|
||||
else ifvare pweapon SHRINKER_WEAPON
|
||||
setvar RETURN SHRINKER_WEAPON // select expander
|
||||
{
|
||||
ifvarg player[THISACTOR].ammo_amount GROW_WEAPON 0
|
||||
setvar RETURN SHRINKER_WEAPON // select expander
|
||||
// else select next weapon
|
||||
}
|
||||
endevent
|
||||
|
||||
onevent EVENT_PREVIOUSWEAPON
|
||||
getplayer[THISACTOR].curr_weapon pweapon
|
||||
|
||||
ifvare pweapon DEVISTATOR_WEAPON
|
||||
{
|
||||
// Select expander. We can't return GROW_WEAPON, because it means
|
||||
// 'next weapon' here.
|
||||
// Ugly, because the shrinker is displayed for a split second.
|
||||
setplayer[THISACTOR].curr_weapon SHRINKER_WEAPON
|
||||
setvar RETURN SHRINKER_WEAPON
|
||||
ifvarg player[THISACTOR].ammo_amount GROW_WEAPON 0
|
||||
{
|
||||
getplayer[THISACTOR].subweapon tmp
|
||||
orvar tmp 0x800
|
||||
setplayer[THISACTOR].subweapon tmp
|
||||
// select previous weapon
|
||||
}
|
||||
}
|
||||
ifvare pweapon GROW_WEAPON
|
||||
{
|
||||
ifvarg player[THISACTOR].ammo_amount SHRINKER_WEAPON 0
|
||||
setvar RETURN SHRINKER_WEAPON // select shrinker
|
||||
// else select previous weapon
|
||||
}
|
||||
else ifvare pweapon GROW_WEAPON
|
||||
setvar RETURN SHRINKER_WEAPON
|
||||
endevent
|
||||
|
||||
// Disable all the following keys, need room for player 2
|
||||
|
|
Loading…
Reference in a new issue