From c7f5f8cd30232000e0235b8e4ec9cbd0c2f3292d Mon Sep 17 00:00:00 2001 From: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com> Date: Thu, 4 Nov 2021 18:49:49 +0300 Subject: [PATCH] Merge from master: fixed bug with mission accept scores. Ref issue #81. --- SpaceCadetPinball/control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpaceCadetPinball/control.cpp b/SpaceCadetPinball/control.cpp index 21b2a80..9c2bba5 100644 --- a/SpaceCadetPinball/control.cpp +++ b/SpaceCadetPinball/control.cpp @@ -3772,9 +3772,9 @@ void control::SelectMissionController(int code, TPinballComponent* caller) if (light_on(&control_lite319_tag)) control_lite319_tag.Component->Message(20, 0.0); control_lite198_tag.Component->MessageField = control_lite56_tag.Component->MessageField; + auto scoreId = control_lite56_tag.Component->MessageField - 2; MissionControl(66, nullptr); - int addedScore = SpecialAddScore( - mission_select_scores[control_lite56_tag.Component->MessageField - 2]); + int addedScore = SpecialAddScore(mission_select_scores[scoreId]); wsprintfW(Buffer, pinball::get_rc_Wstring(77, 0), addedScore); control_mission_text_box_tag.Component->Display(Buffer, 4.0); }