From de6154094d0bc24dcb20e5b8ab479336dd61544c Mon Sep 17 00:00:00 2001 From: qndel Date: Mon, 25 Oct 2021 18:09:02 +0200 Subject: [PATCH] fix class sounds --- Source/missiles.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index be6747cdd..a6a7a3f61 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -1090,21 +1090,21 @@ BOOL Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, B dam -= (dam * resper) / 100; if (pnum == myplr) NetSendCmdDamage(TRUE, p, dam); - if (plr[pnum]._pClass == PC_WARRIOR) { - PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py); + if (plr[pnum]._pClass == PC_WARRIOR) {// BUGFIX: should use p instead of pnum + PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py);// BUGFIX: should use p instead of pnum #ifndef SPAWN - } else if (plr[pnum]._pClass == PC_ROGUE) { - PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); - } else if (plr[pnum]._pClass == PC_SORCERER) { - PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py); + } else if (plr[pnum]._pClass == PC_ROGUE) {// BUGFIX: should use p instead of pnum + PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py);// BUGFIX: should use p instead of pnum + } else if (plr[pnum]._pClass == PC_SORCERER) {// BUGFIX: should use p instead of pnum + PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py);// BUGFIX: should use p instead of pnum #endif #ifdef HELLFIRE - } else if (plr[pnum]._pClass == PC_MONK) { - PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py); - } else if (plr[pnum]._pClass == PC_BARD) { - PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); - } else if (plr[pnum]._pClass == PC_BARBARIAN) { - PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py); + } else if (plr[pnum]._pClass == PC_MONK) {// BUGFIX: should use p instead of pnum + PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py);// BUGFIX: should use p instead of pnum + } else if (plr[pnum]._pClass == PC_BARD) {// BUGFIX: should use p instead of pnum + PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py);// BUGFIX: should use p instead of pnum + } else if (plr[pnum]._pClass == PC_BARBARIAN) {// BUGFIX: should use p instead of pnum + PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py);// BUGFIX: should use p instead of pnum #endif } return TRUE;