- 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'.
This commit is contained in:
Christoph Oelckers 2017-01-13 01:44:17 +01:00
parent 1400f401e7
commit 76870beb2e
2 changed files with 1 additions and 7 deletions

View file

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

View file

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