From 7ecd3333d7821aa69fa3df4ebbffb33228f43171 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 27 Jun 2016 20:29:22 +0200 Subject: DM: Fix and simplify commandProcessType80ClickInDungeonViewTouchFrontWall() --- engines/dm/eventman.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'engines/dm') diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index 4e5a59cb91..6d39a12ef8 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -508,14 +508,9 @@ void EventManager::commandSetLeader(ChampionIndex champIndex) { void EventManager::commandProcessType80ClickInDungeonViewTouchFrontWall() { DungeonMan &dunMan = *_vm->_dungeonMan; CurrMapData &currMap = dunMan._currMap; - uint16 mapX = currMap._partyPosX; - uint16 mapY = currMap._partyPosY; - mapX += gDirIntoStepCountEast[currMap._partyDir]; - mapY += gDirIntoStepCountNorth[currMap._partyDir]; - if ((mapX >= 0) - && (mapX < currMap._width) - && (mapY >= 0) - && (mapY < currMap._height)) { + int16 mapX = currMap._partyPosX + gDirIntoStepCountEast[currMap._partyDir]; + int16 mapY = currMap._partyPosY + gDirIntoStepCountNorth[currMap._partyDir]; + if ((mapX >= 0) && (mapX < currMap._width) && (mapY >= 0) && (mapY < currMap._height)) { _vm->_stopWaitingForPlayerInput = _vm->_movsens->sensorIsTriggeredByClickOnWall(mapX, mapY, returnOppositeDir(currMap._partyDir)); } } @@ -528,7 +523,6 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY int16 mapX; int16 mapY; - if (dunMan._squareAheadElement == kElementTypeDoorFront) { if (champMan._leaderIndex == kChampionNone) { return; -- cgit v1.2.3