diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-18 16:03:05 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-18 16:03:05 +0200 |
commit | 4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79 (patch) | |
tree | 548911d4e341fd5717acff3b5bc752c7b5650bf4 /code/Field.cpp | |
parent | 2017-05-13 (diff) | |
download | AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.gz AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.bz2 AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.lz AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.xz AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.zst AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.zip |
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; |