feat(object): add CMoveSpline

This commit is contained in:
fallenoak 2026-01-12 19:59:53 -06:00
parent c59d0de8b5
commit 1cc8c3ce40
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 65 additions and 0 deletions

View File

@ -1,6 +1,7 @@
file(GLOB PRIVATE_SOURCES
"*.cpp"
"client/*.cpp"
"movement/*.cpp"
)
add_library(object STATIC

View 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;
}

View 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