diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-13 13:14:24 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-13 13:14:24 +0000 |
commit | 4736ec595c1ed46f8b076f89bc31660ae21e9231 (patch) | |
tree | 5c337bb372d40fb94594f57ac975d85ade98104f | |
parent | f8d2860462c0b22cfc53c3b5c5aa271150f158cd (diff) | |
download | manaserv-4736ec595c1ed46f8b076f89bc31660ae21e9231.tar.gz manaserv-4736ec595c1ed46f8b076f89bc31660ae21e9231.tar.bz2 manaserv-4736ec595c1ed46f8b076f89bc31660ae21e9231.tar.xz manaserv-4736ec595c1ed46f8b076f89bc31660ae21e9231.zip |
Sending destination of beings when the client comes on-screen to fix a bug which showed moving monsters as standing in this situation.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/game-server/state.cpp | 9 |
2 files changed, 8 insertions, 4 deletions
@@ -10,6 +10,9 @@ pathblocking. Monsters are blocked by player characters and other monsters, player characters only by monsters. * src/game-server/being.cpp: Omitted some superficial hit point updates. + * src/game-server/state.cpp: Sending destination of beings when the + client comes on-screen to fix a bug which showed moving monsters as + standing in this situation. 2008-03-09 Philipp Sehmisch <tmw@crushnet.org> diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index 21305c01..2d6e4a04 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -249,15 +249,16 @@ static void informPlayer(MapComposite *map, Character *p) { // o is now visible by p. Send enter message. flags |= MOVING_POSITION; + flags |= MOVING_DESTINATION; MessageOut enterMsg(GPMSG_BEING_ENTER); enterMsg.writeByte(otype); enterMsg.writeShort(oid); enterMsg.writeByte(static_cast< Being *>(o)->getAction()); - enterMsg.writeShort(opos.x); - enterMsg.writeShort(opos.y); - switch (otype) { - + enterMsg.writeShort(opos.x); // aren't these two lines redundand considering + enterMsg.writeShort(opos.y); // that a MOVING_POSITION message is following? + switch (otype) + { case OBJECT_CHARACTER: { Character *q = static_cast< Character * >(o); |