mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
removed the quite redundant GetStateForButtonName function
Since it forwards directly to FindState and has no script bindings there is no need to keep it, it'd only complicate the full scriptification of the weapon class if it stuck around.
This commit is contained in:
parent
ad04001135
commit
e90ed0a01c
3 changed files with 1 additions and 14 deletions
|
@ -467,17 +467,6 @@ FState *AWeapon::GetReadyState ()
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
//
|
|
||||||
// AWeapon :: GetStateForButtonName
|
|
||||||
//
|
|
||||||
//===========================================================================
|
|
||||||
|
|
||||||
FState *AWeapon::GetStateForButtonName (FName button)
|
|
||||||
{
|
|
||||||
return FindState(button);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Weapon slots ***********************************************************/
|
/* Weapon slots ***********************************************************/
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,6 @@ public:
|
||||||
FState *GetDownState ();
|
FState *GetDownState ();
|
||||||
FState *GetReadyState ();
|
FState *GetReadyState ();
|
||||||
|
|
||||||
FState *GetStateForButtonName (FName button);
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PrimaryFire,
|
PrimaryFire,
|
||||||
|
|
|
@ -892,7 +892,7 @@ static void P_CheckWeaponButtons (player_t *player)
|
||||||
if ((player->WeaponState & ButtonChecks[i].StateFlag) &&
|
if ((player->WeaponState & ButtonChecks[i].StateFlag) &&
|
||||||
(player->cmd.ucmd.buttons & ButtonChecks[i].ButtonFlag))
|
(player->cmd.ucmd.buttons & ButtonChecks[i].ButtonFlag))
|
||||||
{
|
{
|
||||||
FState *state = weapon->GetStateForButtonName(ButtonChecks[i].StateName);
|
FState *state = weapon->FindState(ButtonChecks[i].StateName);
|
||||||
// [XA] don't change state if still null, so if the modder
|
// [XA] don't change state if still null, so if the modder
|
||||||
// sets WRF_xxx to true but forgets to define the corresponding
|
// sets WRF_xxx to true but forgets to define the corresponding
|
||||||
// state, the weapon won't disappear. ;)
|
// state, the weapon won't disappear. ;)
|
||||||
|
|
Loading…
Reference in a new issue