mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
- fixed: Inventory items that have been modified with Dehacked to be monsters should not be killed by P_Massacre when being owned.
This commit is contained in:
parent
2a0c3e63a3
commit
18213f377c
3 changed files with 16 additions and 1 deletions
|
@ -807,7 +807,7 @@ public:
|
||||||
void ObtainInventory (AActor *other);
|
void ObtainInventory (AActor *other);
|
||||||
|
|
||||||
// Die. Now.
|
// Die. Now.
|
||||||
bool Massacre ();
|
virtual bool Massacre ();
|
||||||
|
|
||||||
// Transforms the actor into a finely-ground paste
|
// Transforms the actor into a finely-ground paste
|
||||||
virtual bool Grind(bool items);
|
virtual bool Grind(bool items);
|
||||||
|
|
|
@ -147,6 +147,20 @@ void AInventory::Serialize(FSerializer &arc)
|
||||||
("droptime", DropTime, def->DropTime);
|
("droptime", DropTime, def->DropTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// AInventory :: Massacre
|
||||||
|
//
|
||||||
|
// This is a countermeasure for Dehacked modifications mainly.
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
|
bool AInventory::Massacre()
|
||||||
|
{
|
||||||
|
if (Owner == nullptr) return Super::Massacre();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// AInventory :: MarkPrecacheSounds
|
// AInventory :: MarkPrecacheSounds
|
||||||
|
|
|
@ -75,6 +75,7 @@ public:
|
||||||
virtual void MarkPrecacheSounds() const override;
|
virtual void MarkPrecacheSounds() const override;
|
||||||
virtual void OnDestroy() override;
|
virtual void OnDestroy() override;
|
||||||
virtual void Tick() override;
|
virtual void Tick() override;
|
||||||
|
virtual bool Massacre() override;
|
||||||
virtual bool Grind(bool items) override;
|
virtual bool Grind(bool items) override;
|
||||||
|
|
||||||
bool CallTryPickup(AActor *toucher, AActor **toucher_return = NULL); // Wrapper for script function.
|
bool CallTryPickup(AActor *toucher, AActor **toucher_return = NULL); // Wrapper for script function.
|
||||||
|
|
Loading…
Reference in a new issue