From 76870beb2e142146bd80083930168cc6eb736f9e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 13 Jan 2017 01:44:17 +0100 Subject: [PATCH] - fixed the final bit of sector actions. The IsActivatedByUse implementation was essentially useless because the value was not serialized so it got lost as soon as the game was reloaded from a savegame. With the refactoring this is no longer an issue but the access function needed to be changed over to read the info from 'health'. --- src/g_shared/a_sectoraction.cpp | 5 +---- src/r_defs.h | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/g_shared/a_sectoraction.cpp b/src/g_shared/a_sectoraction.cpp index 5c180cc47..6cc285afa 100644 --- a/src/g_shared/a_sectoraction.cpp +++ b/src/g_shared/a_sectoraction.cpp @@ -39,12 +39,9 @@ IMPLEMENT_CLASS(ASectorAction, false, false) -ASectorAction::ASectorAction (bool activatedByUse) : - ActivatedByUse (activatedByUse) {} - bool ASectorAction::IsActivatedByUse() const { - return ActivatedByUse; + return !!(health & (SECSPAC_Use|SECSPAC_UseWall)); } void ASectorAction::OnDestroy () diff --git a/src/r_defs.h b/src/r_defs.h index c1bee09cf..e3eed8135 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -282,7 +282,6 @@ class ASectorAction : public AActor { DECLARE_CLASS (ASectorAction, AActor) public: - ASectorAction (bool activatedByUse = false); void OnDestroy() override; void BeginPlay (); void Activate (AActor *source); @@ -292,8 +291,6 @@ public: virtual bool DoTriggerAction(AActor *triggerer, int activationType); protected: bool CheckTrigger(AActor *triggerer) const; -private: - bool ActivatedByUse; }; class ASkyViewpoint;