diff --git a/src/actor.h b/src/actor.h index 2199c205e..e9d50e9a3 100644 --- a/src/actor.h +++ b/src/actor.h @@ -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); diff --git a/src/g_inventory/a_pickups.cpp b/src/g_inventory/a_pickups.cpp index 705a2539f..7b7721b48 100644 --- a/src/g_inventory/a_pickups.cpp +++ b/src/g_inventory/a_pickups.cpp @@ -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 diff --git a/src/g_inventory/a_pickups.h b/src/g_inventory/a_pickups.h index cbcb2d9cd..4cb202f7d 100644 --- a/src/g_inventory/a_pickups.h +++ b/src/g_inventory/a_pickups.h @@ -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.