- 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 committed by drfrag666
parent 08a1cc0e7e
commit 2ac665f950
3 changed files with 16 additions and 1 deletions

View file

@ -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);

View file

@ -154,6 +154,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

View file

@ -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.