foxygit / doom Log in
commit a0104247691296ef80807f7e55183a751fa69db8
Author:     James Haley <haleyjd@hotmail.com>
AuthorDate: Sun Oct 26 20:27:47 2014 -0500
Commit:     James Haley <haleyjd@hotmail.com>
CommitDate: Sun Oct 26 20:27:47 2014 -0500

    Rogue fixed DOOM bug regarding switch sound origins

    Re-examination of assembly reveals use of &line->frontsector->soundorg
    instead of buttonlist->soundorg.
---
 src/strife/p_switch.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/strife/p_switch.c b/src/strife/p_switch.c
index da345e86..a909a039 100644
--- a/src/strife/p_switch.c
+++ b/src/strife/p_switch.c
@@ -287,7 +287,8 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
             if(sl->sound)
                 sound = sl->sound;

-            S_StartSound(buttonlist->soundorg, sound);
+            // haleyjd 20141026: [STRIFE]: Rogue fixed wrong sound origin
+            S_StartSound(&line->frontsector->soundorg, sound);
             sides[line->sidenum[0]].toptexture = switchlist[i^1];

             if(useAgain)
@@ -306,7 +307,8 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
                 if(sl->sound)
                     sound = sl->sound;

-                S_StartSound(buttonlist->soundorg,sound);
+                // haleyjd 20141026: [STRIFE]: Rogue fixed wrong sound origin
+                S_StartSound(&line->frontsector->soundorg, sound);
                 sides[line->sidenum[0]].midtexture = switchlist[i^1];

                 // villsa [STRIFE] affect second side of line
@@ -348,7 +350,8 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
                     if(sl->sound)
                         sound = sl->sound;

-                    S_StartSound(buttonlist->soundorg,sound);
+                    // haleyjd 20141026: [STRIFE]: Rogue fixed wrong sound origin
+                    S_StartSound(&line->frontsector->soundorg, sound);
                     sides[line->sidenum[0]].bottomtexture = switchlist[i^1];

                     if(useAgain)