- added a SECF_SILENTMOVE flag.

Since Eternity got this it's a good candidate for a potential Super-Boom standard, and it's also useful for silencing a sector temporarily without removing the sound sequence.
This commit is contained in:
Christoph Oelckers 2016-01-06 02:16:33 +01:00
parent d34077a3ba
commit b0db5d9b16
6 changed files with 21 additions and 10 deletions

View File

@ -90,6 +90,7 @@ void DCeiling::Serialize (FArchive &arc)
void DCeiling::PlayCeilingSound ()
{
if (m_Sector->Flags & SECF_SILENTMOVE) return;
if (m_Sector->seqType >= 0)
{
SN_StartSequence (m_Sector, CHAN_CEILING, m_Sector->seqType, SEQ_PLATFORM, 0, false);

View File

@ -250,6 +250,8 @@ void DDoor::DoorSound(bool raise, DSeqNode *curseq) const
choice = !raise;
if (m_Sector->Flags & SECF_SILENTMOVE) return;
if (m_Speed >= FRACUNIT*8)
{
choice += 2;

View File

@ -55,6 +55,8 @@ inline FArchive &operator<< (FArchive &arc, DFloor::EFloor &type)
static void StartFloorSound (sector_t *sec)
{
if (sec->Flags & SECF_SILENTMOVE) return;
if (sec->seqType >= 0)
{
SN_StartSequence (sec, CHAN_FLOOR, sec->seqType, SEQ_PLATFORM, 0);

View File

@ -198,17 +198,20 @@ DPillar::DPillar (sector_t *sector, EPillar type, fixed_t speed,
m_FloorSpeed = Scale (speed, floordist, ceilingdist);
}
if (sector->seqType >= 0)
if (!(m_Sector->Flags & SECF_SILENTMOVE))
{
SN_StartSequence (sector, CHAN_FLOOR, sector->seqType, SEQ_PLATFORM, 0);
}
else if (sector->SeqName != NAME_None)
{
SN_StartSequence (sector, CHAN_FLOOR, sector->SeqName, 0);
}
else
{
SN_StartSequence (sector, CHAN_FLOOR, "Floor", 0);
if (sector->seqType >= 0)
{
SN_StartSequence(sector, CHAN_FLOOR, sector->seqType, SEQ_PLATFORM, 0);
}
else if (sector->SeqName != NAME_None)
{
SN_StartSequence(sector, CHAN_FLOOR, sector->SeqName, 0);
}
else
{
SN_StartSequence(sector, CHAN_FLOOR, "Floor", 0);
}
}
}

View File

@ -72,6 +72,8 @@ void DPlat::Serialize (FArchive &arc)
void DPlat::PlayPlatSound (const char *sound)
{
if (m_Sector->Flags & SECF_SILENTMOVE) return;
if (m_Sector->seqType >= 0)
{
SN_StartSequence (m_Sector, CHAN_FLOOR, m_Sector->seqType, SEQ_PLATFORM, 0);

View File

@ -357,6 +357,7 @@ enum
SECF_NORESPAWN = 8, // players can not respawn in this sector
SECF_FRICTION = 16, // sector has friction enabled
SECF_PUSH = 32, // pushers enabled
SECF_SILENTMOVE = 64, // Sector movement makes mo sound (Eternity got this so this may be useful for an extended cross-port standard.)
SECF_WASSECRET = 1 << 30, // a secret that was discovered