From af61e1e7df91b97c3f7516e9eb2b37b621f069ad Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 27 Aug 2006 22:49:10 +0000 Subject: Added support for entering monsters. --- src/gui/gui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 5df26d63..69563dc1 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -254,7 +254,8 @@ Gui::mousePress(int mx, int my, int button) Being *being; FloorItem *floorItem; - if ((being = beingManager->findBeing(tilex, tiley)) && being->getType() != Being::LOCALPLAYER) + if ((being = beingManager->findBeing(tilex, tiley)) && + being->getType() != Being::LOCALPLAYER) { showPopup(mx, my, being); return; @@ -307,7 +308,8 @@ Gui::mousePress(int mx, int my, int button) player_node->pickUp(item); } // Just walk around - else if (engine->getCurrentMap()->getWalk(tilex, tiley)) + else if (engine->getCurrentMap() && + engine->getCurrentMap()->getWalk(tilex, tiley)) { // XXX XXX XXX REALLY UGLY! Uint8 *keys = SDL_GetKeyState(NULL); -- cgit v1.2.3-70-g09d2