summaryrefslogtreecommitdiffstats
path: root/code/Field.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/packet/Field.cpp (renamed from code/Field.cpp)9
1 files changed, 3 insertions, 6 deletions
diff --git a/code/Field.cpp b/src/packet/Field.cpp
index c95c32d..69402f1 100644
--- a/code/Field.cpp
+++ b/src/packet/Field.cpp
@@ -200,7 +200,7 @@ void Field::SetFloat(float value) {
*p = value;
}
-PositionI Field::GetPosition() {
+Vector Field::GetPosition() {
unsigned long long t = *reinterpret_cast<unsigned long long *>(m_data);
endswap(&t);
int x = t >> 38;
@@ -215,14 +215,11 @@ PositionI Field::GetPosition() {
if (z >= pow(2, 25)) {
z -= pow(2, 26);
}
- PositionI val;
- val.SetX(x);
- val.setZ(z);
- val.SetY(y);
+ Vector val(x,y,z);
return val;
}
-void Field::SetPosition(PositionI value) {
+void Field::SetPosition(Vector value) {
Clear();
m_type = Position;
m_dataLength = 8;