mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +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;
|
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
|
// AWeapon :: GetDownState
|
||||||
|
|
|
@ -129,7 +129,6 @@ public:
|
||||||
void Serialize(FSerializer &arc) override;
|
void Serialize(FSerializer &arc) override;
|
||||||
|
|
||||||
// scripted virtuals.
|
// scripted virtuals.
|
||||||
FState *GetUpState ();
|
|
||||||
FState *GetDownState ();
|
FState *GetDownState ();
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -690,7 +690,8 @@ bool player_t::Resurrect()
|
||||||
}
|
}
|
||||||
if (ReadyWeapon != nullptr)
|
if (ReadyWeapon != nullptr)
|
||||||
{
|
{
|
||||||
P_SetPsprite(this, PSP_WEAPON, ReadyWeapon->GetUpState());
|
PendingWeapon = ReadyWeapon;
|
||||||
|
P_BringUpWeapon(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (morphTics)
|
if (morphTics)
|
||||||
|
|
Loading…
Reference in a new issue