summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-27 22:49:10 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-27 22:49:10 +0000
commitaf61e1e7df91b97c3f7516e9eb2b37b621f069ad (patch)
tree3123d2a6aed02c0c2938606bb99f087dd07836f1 /src/gui/gui.cpp
parent6f6d061b23c6c70c632fb3ec6aa3735325f701e0 (diff)
downloadmana-af61e1e7df91b97c3f7516e9eb2b37b621f069ad.tar.gz
mana-af61e1e7df91b97c3f7516e9eb2b37b621f069ad.tar.bz2
mana-af61e1e7df91b97c3f7516e9eb2b37b621f069ad.tar.xz
mana-af61e1e7df91b97c3f7516e9eb2b37b621f069ad.zip
Added support for entering monsters.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp6
1 files changed, 4 insertions, 2 deletions
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);