summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-07 10:37:54 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-07 10:37:54 +0000
commitac08acd4b4029a2519c81eecf938e1c03b51233c (patch)
tree78405d149cff52b310343a1e557062345b784d41 /src/net/messagein.cpp
parentc395103a0f190598e234b2c5f373d3fde25f77cf (diff)
downloadmana-ac08acd4b4029a2519c81eecf938e1c03b51233c.tar.gz
mana-ac08acd4b4029a2519c81eecf938e1c03b51233c.tar.bz2
mana-ac08acd4b4029a2519c81eecf938e1c03b51233c.tar.xz
mana-ac08acd4b4029a2519c81eecf938e1c03b51233c.zip
Made the being directions being stored in a bitfield.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 9f2b38f7..9abe4a2d 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -87,6 +87,38 @@ MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction)
direction = data[2] & 0x000f;
+ // Translate from eAthena format
+ switch (direction)
+ {
+ case 0:
+ direction = 1;
+ break;
+ case 1:
+ direction = 3;
+ break;
+ case 2:
+ direction = 2;
+ break;
+ case 3:
+ direction = 6;
+ break;
+ case 4:
+ direction = 4;
+ break;
+ case 5:
+ direction = 12;
+ break;
+ case 6:
+ direction = 8;
+ break;
+ case 7:
+ direction = 9;
+ break;
+ default:
+ // OOPSIE! Impossible or unknown
+ direction = 0;
+ }
+
mPos += 3;
}