mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
- fixed usage of floor sound with Plat_DownWaitUpStayLip special
https://forum.zdoom.org/viewtopic.php?t=67126
This commit is contained in:
parent
dd54c14380
commit
c58e98cc7f
2 changed files with 10 additions and 4 deletions
|
@ -86,6 +86,11 @@ void DPlat::PlayPlatSound (const char *sound)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *DPlat::GetSoundByType () const
|
||||||
|
{
|
||||||
|
return m_Type == platDownWaitUpStayStone ? "Floor" : "Platform";
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Move a plat up and down
|
// Move a plat up and down
|
||||||
|
@ -105,7 +110,7 @@ void DPlat::Tick ()
|
||||||
{
|
{
|
||||||
m_Count = m_Wait;
|
m_Count = m_Wait;
|
||||||
m_Status = down;
|
m_Status = down;
|
||||||
PlayPlatSound ("Platform");
|
PlayPlatSound (GetSoundByType ());
|
||||||
}
|
}
|
||||||
else if (res == EMoveResult::pastdest)
|
else if (res == EMoveResult::pastdest)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +181,7 @@ void DPlat::Tick ()
|
||||||
{
|
{
|
||||||
m_Status = up;
|
m_Status = up;
|
||||||
m_Count = m_Wait;
|
m_Count = m_Wait;
|
||||||
PlayPlatSound ("Platform");
|
PlayPlatSound (GetSoundByType ());
|
||||||
}
|
}
|
||||||
|
|
||||||
//jff 1/26/98 remove the plat if it bounced so it can be tried again
|
//jff 1/26/98 remove the plat if it bounced so it can be tried again
|
||||||
|
@ -206,7 +211,7 @@ void DPlat::Tick ()
|
||||||
if (m_Type == platToggle)
|
if (m_Type == platToggle)
|
||||||
SN_StartSequence (m_Sector, CHAN_FLOOR, "Silence", 0);
|
SN_StartSequence (m_Sector, CHAN_FLOOR, "Silence", 0);
|
||||||
else
|
else
|
||||||
PlayPlatSound ("Platform");
|
PlayPlatSound (GetSoundByType ());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -359,7 +364,7 @@ bool FLevelLocals::EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, doub
|
||||||
|
|
||||||
plat->m_High = sec->floorplane.fD();
|
plat->m_High = sec->floorplane.fD();
|
||||||
plat->m_Status = DPlat::down;
|
plat->m_Status = DPlat::down;
|
||||||
plat->PlayPlatSound (type == DPlat::platDownWaitUpStay ? "Platform" : "Floor");
|
plat->PlayPlatSound (plat->GetSoundByType ());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DPlat::platUpNearestWaitDownStay:
|
case DPlat::platUpNearestWaitDownStay:
|
||||||
|
|
|
@ -52,6 +52,7 @@ protected:
|
||||||
EPlatType m_Type;
|
EPlatType m_Type;
|
||||||
|
|
||||||
void PlayPlatSound (const char *sound);
|
void PlayPlatSound (const char *sound);
|
||||||
|
const char *GetSoundByType () const;
|
||||||
void Reactivate ();
|
void Reactivate ();
|
||||||
void Stop ();
|
void Stop ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue