mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- scriptified the sector silencer.
This commit is contained in:
parent
3d73919092
commit
cc58f13e4e
2 changed files with 16 additions and 28 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class LowerStackLookOnly : StackPoint
|
|||
}
|
||||
|
||||
|
||||
class SectorSilencer native
|
||||
class SectorSilencer : Actor
|
||||
{
|
||||
default
|
||||
{
|
||||
|
@ -46,4 +46,19 @@ class SectorSilencer native
|
|||
+DONTSPLASH
|
||||
RenderStyle "None";
|
||||
}
|
||||
|
||||
override void BeginPlay ()
|
||||
{
|
||||
Super.BeginPlay ();
|
||||
CurSector.Flags |= Sector.SECF_SILENT;
|
||||
}
|
||||
|
||||
override void OnDestroy ()
|
||||
{
|
||||
if (CurSector != null)
|
||||
{
|
||||
CurSector.Flags &= ~Sector.SECF_SILENT;
|
||||
}
|
||||
Super.OnDestroy();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue