summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-06 15:09:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-06 15:09:21 +0300
commit3acedd2fadd68550798a5eec0550a855dbc05d85 (patch)
tree6a31377c2babf6b1225ff9352f497cdb13067a2b /src/being.cpp
parent3910b94e502787e552a360d290c54ad26b3e6c5a (diff)
downloadmanaverse-3acedd2fadd68550798a5eec0550a855dbc05d85.tar.gz
manaverse-3acedd2fadd68550798a5eec0550a855dbc05d85.tar.bz2
manaverse-3acedd2fadd68550798a5eec0550a855dbc05d85.tar.xz
manaverse-3acedd2fadd68550798a5eec0550a855dbc05d85.zip
Allow use replacement item with any id.
Example: <replace to="5"/>
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 6041b7123..af3b14419 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2183,6 +2183,12 @@ void Being::recalcSpritesOrder()
{
std::map<int, int>::const_iterator repIt
= itemReplacer.find(mSpriteIDs[remSprite]);
+ if (repIt == itemReplacer.end())
+ {
+ repIt = itemReplacer.find(0);
+ if (repIt->second == 0)
+ repIt = itemReplacer.end();
+ }
if (repIt != itemReplacer.end())
{
mSpriteHide[remSprite] = repIt->second;