diff --git a/docs/rh-log.txt b/docs/rh-log.txt index b1dd39e1e4..35675b1c51 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ June 11, 2008 (Changes by Graf Zahl) +- Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index 84b9463443..04742c047c 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -246,8 +246,8 @@ void DSBarInfo::Draw (EHudState state) popbar = STBAR_POPUPKEYS; else if(currentPopup == POP_Status) popbar = STBAR_POPUPSTATUS; - doCommands(SBarInfoScript->huds[popbar], SBarInfoScript->popups[currentPopup].getXOffset(), SBarInfoScript->popups[currentPopup].getYOffset(), - SBarInfoScript->popups[currentPopup].getAlpha(SBarInfoScript->huds[popbar].alpha)); + doCommands(SBarInfoScript->huds[popbar], SBarInfoScript->popups[currentPopup-1].getXOffset(), SBarInfoScript->popups[currentPopup-1].getYOffset(), + SBarInfoScript->popups[currentPopup-1].getAlpha(SBarInfoScript->huds[popbar].alpha)); } } @@ -321,12 +321,12 @@ void DSBarInfo::Tick () MugShot.Tick(CPlayer); if(currentPopup != POP_None) { - SBarInfoScript->popups[currentPopup].tick(); - if(SBarInfoScript->popups[currentPopup].opened == false && SBarInfoScript->popups[currentPopup].isDoneMoving()) + SBarInfoScript->popups[currentPopup-1].tick(); + if(SBarInfoScript->popups[currentPopup-1].opened == false && SBarInfoScript->popups[currentPopup-1].isDoneMoving()) { currentPopup = pendingPopup; if(currentPopup != POP_None) - SBarInfoScript->popups[currentPopup].open(); + SBarInfoScript->popups[currentPopup-1].open(); } } } @@ -351,13 +351,13 @@ void DSBarInfo::ShowPop(int popnum) else pendingPopup = POP_None; if(currentPopup != POP_None) - SBarInfoScript->popups[currentPopup].close(); + SBarInfoScript->popups[currentPopup-1].close(); else { currentPopup = pendingPopup; pendingPopup = POP_None; if(currentPopup != POP_None) - SBarInfoScript->popups[currentPopup].open(); + SBarInfoScript->popups[currentPopup-1].open(); } }