diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-06 15:09:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-06 15:09:21 +0300 |
commit | 3acedd2fadd68550798a5eec0550a855dbc05d85 (patch) | |
tree | 6a31377c2babf6b1225ff9352f497cdb13067a2b /src/being.cpp | |
parent | 3910b94e502787e552a360d290c54ad26b3e6c5a (diff) | |
download | manaverse-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.cpp | 6 |
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; |