mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(object): add CMoveSpline
This commit is contained in:
parent
c59d0de8b5
commit
1cc8c3ce40
@ -1,6 +1,7 @@
|
||||
file(GLOB PRIVATE_SOURCES
|
||||
"*.cpp"
|
||||
"client/*.cpp"
|
||||
"movement/*.cpp"
|
||||
)
|
||||
|
||||
add_library(object STATIC
|
||||
|
||||
32
src/object/movement/CMoveSpline.cpp
Normal file
32
src/object/movement/CMoveSpline.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
#include "object/movement/CMoveSpline.hpp"
|
||||
#include "util/DataStore.hpp"
|
||||
#include <common/Time.hpp>
|
||||
|
||||
CDataStore& operator>>(CDataStore& msg, CMoveSpline& spline) {
|
||||
msg.Get(spline.flags);
|
||||
|
||||
if (spline.flags & 0x20000) {
|
||||
msg.Get(spline.face.facing);
|
||||
} else if (spline.flags & 0x10000) {
|
||||
msg.Get(spline.face.guid);
|
||||
} else {
|
||||
msg >> spline.face.spot;
|
||||
}
|
||||
|
||||
uint32_t val;
|
||||
msg.Get(val);
|
||||
spline.start = OsGetAsyncTimeMsPrecise() - val;
|
||||
|
||||
msg.Get(spline.uint2C);
|
||||
msg.Get(spline.uint30);
|
||||
msg.Get(spline.float204);
|
||||
msg.Get(spline.float208);
|
||||
msg.Get(spline.float20C);
|
||||
msg.Get(spline.uint210);
|
||||
|
||||
msg >> spline.spline;
|
||||
|
||||
msg >> spline.vector1F8;
|
||||
|
||||
return msg;
|
||||
}
|
||||
32
src/object/movement/CMoveSpline.hpp
Normal file
32
src/object/movement/CMoveSpline.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef OBJECT_MOVEMENT_C_MOVE_SPLINE_HPP
|
||||
#define OBJECT_MOVEMENT_C_MOVE_SPLINE_HPP
|
||||
|
||||
#include "util/C3Spline.hpp"
|
||||
#include "util/GUID.hpp"
|
||||
#include <common/DataStore.hpp>
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
struct CMoveSpline {
|
||||
// TODO
|
||||
union {
|
||||
C3Vector spot = {};
|
||||
WOWGUID guid;
|
||||
float facing;
|
||||
} face;
|
||||
uint32_t flags;
|
||||
uint32_t start;
|
||||
// TODO
|
||||
uint32_t uint2C;
|
||||
uint32_t uint30;
|
||||
C3Spline_CatmullRom spline;
|
||||
C3Vector vector1F8;
|
||||
float float204;
|
||||
float float208;
|
||||
float float20C;
|
||||
uint32_t uint210;
|
||||
// TODO
|
||||
};
|
||||
|
||||
CDataStore& operator>>(CDataStore& msg, CMoveSpline& spline);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user