summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-06-08 21:55:16 -0600
committerJared Adams <jaxad0127@gmail.com>2010-06-09 00:00:53 -0600
commitec980b3c586fc64d02ad02f31497013908056d52 (patch)
treec8a5c573bf8fc5ed2151f32cb7f8468bba31d72a /src/net/tmwa
parent891d14807cd042aa90aed94558c2c8eda66d6859 (diff)
downloadmana-ec980b3c586fc64d02ad02f31497013908056d52.tar.gz
mana-ec980b3c586fc64d02ad02f31497013908056d52.tar.bz2
mana-ec980b3c586fc64d02ad02f31497013908056d52.tar.xz
mana-ec980b3c586fc64d02ad02f31497013908056d52.zip
Remove hard-coded frame counts from Being class
Also removes the Monster/Player difference in tmwAthena's Being::logic and moves the particle code from Being::setAttack to Being::Logic for tmwAthena. Reviewed-by: Chuck Miller
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp10
-rw-r--r--src/net/tmwa/playerhandler.cpp1
2 files changed, 2 insertions, 9 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 9eaca74c..d9caa719 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -143,10 +143,9 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
break;
}
- if (msg.getId() == 0x0078)
+ if (msg.getId() == SMSG_BEING_VISIBLE)
{
dstBeing->clearPath();
- dstBeing->setFrame(0);
dstBeing->setWalkTime(tick_time);
dstBeing->setAction(Being::STAND);
}
@@ -349,7 +348,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
case 0x02: // Sit
if (srcBeing)
{
- srcBeing->setFrame(0);
srcBeing->setAction(Being::SIT);
}
break;
@@ -357,7 +355,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
case 0x03: // Stand up
if (srcBeing)
{
- srcBeing->setFrame(0);
srcBeing->setAction(Being::STAND);
}
break;
@@ -619,7 +616,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
msg.readInt8(); // unknown
dstBeing->setWalkTime(tick_time);
- dstBeing->setFrame(0);
+ dstBeing->reset();
dstBeing->setStunMode(stunMode);
dstBeing->setStatusEffectBlock(0, (statusEffects >> 16) & 0xffff);
@@ -650,10 +647,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
y = msg.readInt16();
dstBeing->setTileCoords(x, y);
if (dstBeing->getCurrentAction() == Being::WALK)
- {
- dstBeing->setFrame(0);
dstBeing->setAction(Being::STAND);
- }
}
}
break;
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 84fcdeee..26c7e922 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -216,7 +216,6 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
}
player_node->setAction(Being::STAND);
- player_node->setFrame(0);
player_node->setTileCoords(x, y);
logger->log("Adjust scrolling by %d:%d", (int) scrollOffsetX,