- Removed the S_Sound() variant that allows for pointing the origin at an

arbitrary point. It has been replaced with a variant that takes a polyobject
  as a source, since that was the only use that couldn't be rewritten with the
  other variants. This also fixes the bug that polyobject sounds were not
  successfully saved and caused a crash when reloading the game. Note that
  this is a significant change to how equality of sound sources is determined,
  so some things may not behave quite the same as before. (Which would be a
  bug, but hopefully everything still sounds the same.)


SVN r1059 (trunk)
This commit is contained in:
Randy Heit 2008-07-01 04:06:56 +00:00
parent 601a6ad04c
commit a3e8a0cefd
39 changed files with 477 additions and 255 deletions

View file

@ -577,20 +577,19 @@ bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *ques
// which wasn't necessarily anywhere near the switch if it was
// facing a big sector (and which wasn't necessarily for the
// button just activated, either).
fixed_t pt[3];
fixed_t pt[2];
line_t *line = &lines[side->linenum];
bool playsound;
pt[0] = line->v1->x + (line->dx >> 1);
pt[1] = line->v1->y + (line->dy >> 1);
pt[2] = 0;
side->SetTexture(texture, SwitchList[i]->u[0].Texture);
if (useAgain || SwitchList[i]->NumFrames > 1)
playsound = P_StartButton (side, texture, i, pt[0], pt[1], !!useAgain);
else
playsound = true;
if (playsound)
S_Sound (pt, CHAN_VOICE|CHAN_LISTENERZ|CHAN_IMMOBILE, sound, 1, ATTN_STATIC);
S_Sound (pt[0], pt[1], 0, CHAN_VOICE|CHAN_LISTENERZ, sound, 1, ATTN_STATIC);
if (quest != NULL)
{
*quest = SwitchList[i]->QuestPanel;
@ -648,16 +647,12 @@ void DActiveButton::Tick ()
FSwitchDef *def = SwitchList[m_SwitchDef];
if (m_Frame == def->NumFrames - 1)
{
fixed_t pt[3];
m_SwitchDef = def->PairIndex;
if (m_SwitchDef != 65535)
{
def = SwitchList[def->PairIndex];
m_Frame = 65535;
pt[0] = m_X;
pt[1] = m_Y;
S_Sound (pt, CHAN_VOICE|CHAN_LISTENERZ|CHAN_IMMOBILE,
S_Sound (m_X, m_Y, 0, CHAN_VOICE|CHAN_LISTENERZ,
def->Sound != 0 ? def->Sound : FSoundID("switches/normbutn"),
1, ATTN_STATIC);
bFlippable = false;