diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-21 01:05:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-21 01:05:46 +0300 |
commit | 9a53f1a15bec5cf6559c3c78761424081a73c50e (patch) | |
tree | f8415d9443164e1d533630d3dd67b37aad52ac51 /src/localplayer.cpp | |
parent | 71d0606a0356e8f9a5fb605190aef7330b630b9e (diff) | |
download | mv-9a53f1a15bec5cf6559c3c78761424081a73c50e.tar.gz mv-9a53f1a15bec5cf6559c3c78761424081a73c50e.tar.bz2 mv-9a53f1a15bec5cf6559c3c78761424081a73c50e.tar.xz mv-9a53f1a15bec5cf6559c3c78761424081a73c50e.zip |
Fix removing home position from mouse and saving map objects/home position.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 2a3048a3d..544c67f97 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -3856,6 +3856,18 @@ unsigned char LocalPlayer::getWalkMask() const return Map::BLOCKMASK_WALL | Map::BLOCKMASK_AIR | Map::BLOCKMASK_WATER; } +void LocalPlayer::removeHome() +{ + if (!mMap) + return; + + std::string key = mMap->getProperty("_realfilename"); + std::map<std::string, Vector>::iterator iter = mHomes.find(key); + + if (iter != mHomes.end()) + mHomes.erase(key); +} + void AwayListener::action(const gcn::ActionEvent &event) { if (event.getId() == "ok" && player_node && player_node->getAwayMode()) |