diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-09-02 14:12:20 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-09-02 14:12:20 +0000 |
commit | 21866bc51f75ebc1550a225dbe45d0bdca570b01 (patch) | |
tree | df8776459b1460edb2632e3333eaa844e8aeee0a /src/accounthandler.cpp | |
parent | 475cebc96ee8ce31171e105382db549a364e0f0e (diff) | |
download | manaserv-21866bc51f75ebc1550a225dbe45d0bdca570b01.tar.gz manaserv-21866bc51f75ebc1550a225dbe45d0bdca570b01.tar.bz2 manaserv-21866bc51f75ebc1550a225dbe45d0bdca570b01.tar.xz manaserv-21866bc51f75ebc1550a225dbe45d0bdca570b01.zip |
Simplified server algorithm for moving objects; it now matches the one in the client.
Diffstat (limited to 'src/accounthandler.cpp')
-rw-r--r-- | src/accounthandler.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/accounthandler.cpp b/src/accounthandler.cpp index 9e35505c..717f5581 100644 --- a/src/accounthandler.cpp +++ b/src/accounthandler.cpp @@ -181,9 +181,8 @@ AccountHandler::processMessage(NetComputer *comp, MessageIn &message) PlayerPtr selectedChar = computer.getCharacter(); result.writeByte(ERRMSG_OK); - selectedChar->setDestination(selectedChar->getX(), - selectedChar->getY()); - selectedChar->setSpeed(21); // TODO + selectedChar->setDestination(selectedChar->getPosition()); + selectedChar->setSpeed(150); // TODO LOG_INFO(selectedChar->getName() << " is trying to enter the servers.", 1); @@ -663,9 +662,9 @@ AccountHandler::handleCharacterCreateMessage(AccountClient &computer, newCharacter->setHairStyle(hairStyle); newCharacter->setHairColor(hairColor); newCharacter->setMapId((int) config.getValue("defaultMap", 1)); - newCharacter->setXY(Point( - (int) config.getValue("startX", 0), - (int) config.getValue("startY", 0))); + Point startingPos = { (int) config.getValue("startX", 0), + (int) config.getValue("startY", 0) }; + newCharacter->setPosition(startingPos); computer.getAccount()->addCharacter(newCharacter); LOG_INFO("Character " << name << " was created for " |