- 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:
Christoph Oelckers 2018-07-20 11:43:49 +02:00
parent 2a0c3e63a3
commit 18213f377c
3 changed files with 16 additions and 1 deletions

View file

@ -807,7 +807,7 @@ public:
void ObtainInventory (AActor *other);
// Die. Now.
bool Massacre ();
virtual bool Massacre ();
// Transforms the actor into a finely-ground paste
virtual bool Grind(bool items);

View file

@ -147,6 +147,20 @@ void AInventory::Serialize(FSerializer &arc)
("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

View file

@ -75,6 +75,7 @@ public:
virtual void MarkPrecacheSounds() const override;
virtual void OnDestroy() override;
virtual void Tick() override;
virtual bool Massacre() override;
virtual bool Grind(bool items) override;
bool CallTryPickup(AActor *toucher, AActor **toucher_return = NULL); // Wrapper for script function.