From 99aa64bda4695ca704a2902d3c6b6bd705204043 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 Feb 2015 14:59:43 -0500 Subject: XEEN: Fix crash on shooting --- engines/xeen/interface_map.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'engines/xeen') diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index de19a9957a..a9e71d4e9c 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -572,18 +572,15 @@ void InterfaceMap::drawMap() { } } } else if (_charsShooting) { - for (int idx = 0; idx < 96; ++idx) { - if (_indoorList[162 + idx]._sprites != nullptr) { - _indoorList[162 + idx]._frame = 0; - } - else if (_indoorList[135 + idx]._sprites != nullptr) { - _indoorList[135 + idx]._frame = 1; - } - else if (_indoorList[111 + idx]._sprites != nullptr) { - _indoorList[111 + idx]._frame = 2; - } - else if (_indoorList[79 + idx]._sprites != nullptr) { - _indoorList[79 + idx]._frame = 0; + for (int idx = 0; idx < 8; ++idx) { + if (_indoorList._attackImgs1[idx]._sprites != nullptr) { + _indoorList._attackImgs1[idx]._frame = 0; + } else if (_indoorList._attackImgs2[idx]._sprites != nullptr) { + _indoorList._attackImgs2[idx]._frame = 1; + } else if (_indoorList._attackImgs3[idx]._sprites != nullptr) { + _indoorList._attackImgs3[idx]._frame = 2; + } else if (_indoorList._attackImgs4[idx]._sprites != nullptr) { + _indoorList._attackImgs4[idx]._frame = 0; } } } -- cgit v1.2.3