mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- deleted redundant native ActivateMorphWeapon method.
This commit is contained in:
parent
6fc63b9b78
commit
4440bff83a
3 changed files with 0 additions and 42 deletions
|
@ -99,7 +99,6 @@ public:
|
||||||
|
|
||||||
bool ResetAirSupply (bool playgasp = true);
|
bool ResetAirSupply (bool playgasp = true);
|
||||||
int GetMaxHealth(bool withupgrades = false) const;
|
int GetMaxHealth(bool withupgrades = false) const;
|
||||||
void ActivateMorphWeapon ();
|
|
||||||
AWeapon *PickNewWeapon (PClassActor *ammotype);
|
AWeapon *PickNewWeapon (PClassActor *ammotype);
|
||||||
AWeapon *BestWeapon (PClassActor *ammotype);
|
AWeapon *BestWeapon (PClassActor *ammotype);
|
||||||
void GiveDeathmatchInventory ();
|
void GiveDeathmatchInventory ();
|
||||||
|
|
|
@ -140,9 +140,7 @@ public:
|
||||||
EitherFire
|
EitherFire
|
||||||
};
|
};
|
||||||
bool CheckAmmo (int fireMode, bool autoSwitch, bool requireAmmo=false, int ammocount = -1);
|
bool CheckAmmo (int fireMode, bool autoSwitch, bool requireAmmo=false, int ammocount = -1);
|
||||||
bool DoCheckAmmo(int fireMode, bool autoSwitch, bool requireAmmo, int ammocount);
|
|
||||||
bool DepleteAmmo (bool altFire, bool checkEnough=true, int ammouse = -1);
|
bool DepleteAmmo (bool altFire, bool checkEnough=true, int ammouse = -1);
|
||||||
bool DoDepleteAmmo(bool altFire, bool checkEnough, int ammouse);
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -1503,45 +1503,6 @@ void APlayerPawn::GiveDefaultInventory ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void APlayerPawn::ActivateMorphWeapon ()
|
|
||||||
{
|
|
||||||
PClassActor *morphweapon = PClass::FindActor (MorphWeapon);
|
|
||||||
player->PendingWeapon = WP_NOCHANGE;
|
|
||||||
|
|
||||||
if (player->ReadyWeapon != nullptr)
|
|
||||||
{
|
|
||||||
player->GetPSprite(PSP_WEAPON)->y = WEAPONTOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (morphweapon == nullptr || !morphweapon->IsDescendantOf (RUNTIME_CLASS(AWeapon)))
|
|
||||||
{ // No weapon at all while morphed!
|
|
||||||
player->ReadyWeapon = nullptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player->ReadyWeapon = static_cast<AWeapon *>(player->mo->FindInventory (morphweapon));
|
|
||||||
if (player->ReadyWeapon == nullptr)
|
|
||||||
{
|
|
||||||
player->ReadyWeapon = static_cast<AWeapon *>(player->mo->GiveInventoryType (morphweapon));
|
|
||||||
if (player->ReadyWeapon != nullptr)
|
|
||||||
{
|
|
||||||
player->ReadyWeapon->GivenAsMorphWeapon = true; // flag is used only by new beastweap semantics in P_UndoPlayerMorph
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (player->ReadyWeapon != nullptr)
|
|
||||||
{
|
|
||||||
P_SetPsprite(player, PSP_WEAPON, player->ReadyWeapon->GetReadyState());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player->ReadyWeapon != nullptr)
|
|
||||||
{
|
|
||||||
P_SetPsprite(player, PSP_FLASH, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
player->PendingWeapon = WP_NOCHANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// APlayerPawn :: Die
|
// APlayerPawn :: Die
|
||||||
|
|
Loading…
Reference in a new issue