- 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 () void DCeiling::PlayCeilingSound ()
{ {
if (m_Sector->Flags & SECF_SILENTMOVE) return;
if (m_Sector->seqType >= 0) if (m_Sector->seqType >= 0)
{ {
SN_StartSequence (m_Sector, CHAN_CEILING, m_Sector->seqType, SEQ_PLATFORM, 0, false); 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; choice = !raise;
if (m_Sector->Flags & SECF_SILENTMOVE) return;
if (m_Speed >= FRACUNIT*8) if (m_Speed >= FRACUNIT*8)
{ {
choice += 2; choice += 2;

View file

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

View file

@ -198,6 +198,8 @@ DPillar::DPillar (sector_t *sector, EPillar type, fixed_t speed,
m_FloorSpeed = Scale (speed, floordist, ceilingdist); m_FloorSpeed = Scale (speed, floordist, ceilingdist);
} }
if (!(m_Sector->Flags & SECF_SILENTMOVE))
{
if (sector->seqType >= 0) if (sector->seqType >= 0)
{ {
SN_StartSequence(sector, CHAN_FLOOR, sector->seqType, SEQ_PLATFORM, 0); SN_StartSequence(sector, CHAN_FLOOR, sector->seqType, SEQ_PLATFORM, 0);
@ -211,6 +213,7 @@ DPillar::DPillar (sector_t *sector, EPillar type, fixed_t speed,
SN_StartSequence(sector, CHAN_FLOOR, "Floor", 0); SN_StartSequence(sector, CHAN_FLOOR, "Floor", 0);
} }
} }
}
bool EV_DoPillar (DPillar::EPillar type, line_t *line, int tag, bool EV_DoPillar (DPillar::EPillar type, line_t *line, int tag,
fixed_t speed, fixed_t height, fixed_t height2, int crush, bool hexencrush) fixed_t speed, fixed_t height, fixed_t height2, int crush, bool hexencrush)

View file

@ -72,6 +72,8 @@ void DPlat::Serialize (FArchive &arc)
void DPlat::PlayPlatSound (const char *sound) void DPlat::PlayPlatSound (const char *sound)
{ {
if (m_Sector->Flags & SECF_SILENTMOVE) return;
if (m_Sector->seqType >= 0) if (m_Sector->seqType >= 0)
{ {
SN_StartSequence (m_Sector, CHAN_FLOOR, m_Sector->seqType, SEQ_PLATFORM, 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_NORESPAWN = 8, // players can not respawn in this sector
SECF_FRICTION = 16, // sector has friction enabled SECF_FRICTION = 16, // sector has friction enabled
SECF_PUSH = 32, // pushers 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 SECF_WASSECRET = 1 << 30, // a secret that was discovered