mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +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;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: GetStateForButtonName
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FState *AWeapon::GetStateForButtonName (FName button)
|
||||
{
|
||||
return FindState(button);
|
||||
}
|
||||
|
||||
|
||||
/* Weapon slots ***********************************************************/
|
||||
|
||||
|
|
|
@ -132,8 +132,6 @@ public:
|
|||
FState *GetUpState ();
|
||||
FState *GetDownState ();
|
||||
FState *GetReadyState ();
|
||||
|
||||
FState *GetStateForButtonName (FName button);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -892,7 +892,7 @@ static void P_CheckWeaponButtons (player_t *player)
|
|||
if ((player->WeaponState & ButtonChecks[i].StateFlag) &&
|
||||
(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
|
||||
// sets WRF_xxx to true but forgets to define the corresponding
|
||||
// state, the weapon won't disappear. ;)
|
||||
|
|
Loading…
Reference in a new issue