mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- 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:
parent
1400f401e7
commit
76870beb2e
2 changed files with 1 additions and 7 deletions
|
@ -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 ()
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue