mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +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
08a1cc0e7e
commit
2ac665f950
3 changed files with 16 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -154,6 +154,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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue