mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- let player_t::Resurrect use P_BringUpWeapon to raise the weapon again instead of doing it directly.
This seems a bit safer.
This commit is contained in:
parent
9584e3bc53
commit
d8aa39e03e
3 changed files with 2 additions and 22 deletions
|
@ -227,26 +227,6 @@ bool AWeapon::CheckAmmo(int fireMode, bool autoSwitch, bool requireAmmo, int amm
|
|||
return false;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: GetUpState
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FState *AWeapon::GetUpState ()
|
||||
{
|
||||
IFVIRTUAL(AWeapon, GetUpState)
|
||||
{
|
||||
VMValue params[1] = { (DObject*)this };
|
||||
VMReturn ret;
|
||||
FState *retval;
|
||||
ret.PointerAt((void**)&retval);
|
||||
VMCall(func, params, 1, &ret, 1);
|
||||
return retval;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: GetDownState
|
||||
|
|
|
@ -129,7 +129,6 @@ public:
|
|||
void Serialize(FSerializer &arc) override;
|
||||
|
||||
// scripted virtuals.
|
||||
FState *GetUpState ();
|
||||
FState *GetDownState ();
|
||||
|
||||
enum
|
||||
|
|
|
@ -690,7 +690,8 @@ bool player_t::Resurrect()
|
|||
}
|
||||
if (ReadyWeapon != nullptr)
|
||||
{
|
||||
P_SetPsprite(this, PSP_WEAPON, ReadyWeapon->GetUpState());
|
||||
PendingWeapon = ReadyWeapon;
|
||||
P_BringUpWeapon(this);
|
||||
}
|
||||
|
||||
if (morphTics)
|
||||
|
|
Loading…
Reference in a new issue