- scriptified the sector silencer.

This commit is contained in:
Christoph Oelckers 2017-01-12 23:35:24 +01:00
commit cc58f13e4e
2 changed files with 16 additions and 28 deletions

View file

@ -150,30 +150,3 @@ void AStackPoint::BeginPlay ()
AActor::BeginPlay ();
}
//---------------------------------------------------------------------------
class ASectorSilencer : public AActor
{
DECLARE_CLASS (ASectorSilencer, AActor)
public:
void BeginPlay ();
void OnDestroy() override;
};
IMPLEMENT_CLASS(ASectorSilencer, false, false)
void ASectorSilencer::BeginPlay ()
{
Super::BeginPlay ();
Sector->Flags |= SECF_SILENT;
}
void ASectorSilencer::OnDestroy ()
{
if (Sector != nullptr)
{
Sector->Flags &= ~SECF_SILENT;
}
Super::OnDestroy();
}