summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-28 13:25:35 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-29 00:49:52 +0300
commit46696c84bad31e35e003b5c09998503119b128eb (patch)
tree7449b98a62fa7ff520d995b27511878d2605c7d4 /src/being.cpp
parentc79403e1341ac533df1771b866d1f5cee15e12b5 (diff)
downloadplus-46696c84bad31e35e003b5c09998503119b128eb.tar.gz
plus-46696c84bad31e35e003b5c09998503119b128eb.tar.bz2
plus-46696c84bad31e35e003b5c09998503119b128eb.tar.xz
plus-46696c84bad31e35e003b5c09998503119b128eb.zip
Add to replace/reorder sprites pseudo direction "died"
It allow change sprites in dead players.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/being.cpp b/src/being.cpp
index d24ba1374..baf9ae651 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2176,6 +2176,9 @@ void Being::recalcSpritesOrder()
int dir = mSpriteDirection;
if (dir < 0 || dir >= 9)
dir = 0;
+ // hack for allow different logic in dead player
+ if (mAction == DEAD)
+ dir = 9;
for (unsigned slot = 0; slot < sz; slot ++)
{
@@ -2199,7 +2202,7 @@ void Being::recalcSpritesOrder()
if (info.isRemoveSprites())
{
SpriteToItemMap *const spriteToItems
- = info.getSpriteToItemReplaceMap(mSpriteDirection);
+ = info.getSpriteToItemReplaceMap(dir);
if (spriteToItems)
{