summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
commit3dc311a652d1fda1252903a974920395e56e5668 (patch)
tree7098d55015d28a4d973c5073d7c9e45ae03ec400 /src/being.cpp
parent78771718bf7af14273d7bb0090dccff97b00b397 (diff)
downloadmana-3dc311a652d1fda1252903a974920395e56e5668.tar.gz
mana-3dc311a652d1fda1252903a974920395e56e5668.tar.bz2
mana-3dc311a652d1fda1252903a974920395e56e5668.tar.xz
mana-3dc311a652d1fda1252903a974920395e56e5668.zip
Merged with SDL_NET_TEST branch.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 2bb0beff..3fdc2f2b 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -64,10 +64,11 @@ Being* createBeing(unsigned int id, unsigned short job, Map *map)
beings.push_back(being);
// If the being is a player, request the name
- if (being->getType() == Being::PLAYER) {
- WFIFOW(0) = net_w_value(0x0094);
- WFIFOL(2) = net_l_value(RFIFOL(2));
- WFIFOSET(6);
+ if (being->getType() == Being::PLAYER)
+ {
+ writeWord(0, 0x0094);
+ writeLong(2, being->getId());//readLong(2));
+ writeSet(6);
}
// If the being is a monster then load the monsterset
else if (being->job >= 1002 &&
@@ -100,7 +101,7 @@ void remove_node(Being *being)
Being *findNode(unsigned int id)
{
std::list<Being*>::iterator i;
- for (i = beings.begin(); i != beings.end(); i++) {
+ for (i = beings.begin(); i != beings.end(); i++) {
Being *being = (*i);
if (being->getId() == id) {
return being;
@@ -166,7 +167,6 @@ Being::Being():
damage_time(0),
showSpeech(false), showDamage(false)
{
- strcpy(name, "");
}
Being::~Being()
@@ -245,11 +245,6 @@ void Being::setMap(Map *map)
this->map = map;
}
-void Being::setName(char *text)
-{
- strcpy(name, text);
-}
-
void Being::nextStep()
{
if (!path.empty())