mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- 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:
parent
d34077a3ba
commit
b0db5d9b16
6 changed files with 21 additions and 10 deletions
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -198,17 +198,20 @@ DPillar::DPillar (sector_t *sector, EPillar type, fixed_t speed,
|
||||||
m_FloorSpeed = Scale (speed, floordist, ceilingdist);
|
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);
|
if (sector->seqType >= 0)
|
||||||
}
|
{
|
||||||
else if (sector->SeqName != NAME_None)
|
SN_StartSequence(sector, CHAN_FLOOR, sector->seqType, SEQ_PLATFORM, 0);
|
||||||
{
|
}
|
||||||
SN_StartSequence (sector, CHAN_FLOOR, sector->SeqName, 0);
|
else if (sector->SeqName != NAME_None)
|
||||||
}
|
{
|
||||||
else
|
SN_StartSequence(sector, CHAN_FLOOR, sector->SeqName, 0);
|
||||||
{
|
}
|
||||||
SN_StartSequence (sector, CHAN_FLOOR, "Floor", 0);
|
else
|
||||||
|
{
|
||||||
|
SN_StartSequence(sector, CHAN_FLOOR, "Floor", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue