mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 14:58:27 +00:00
feat: Movement behaviors (#1815)
* Move in all directions is functional * feat: add movement behaviors the following behaviors will function MoveRight MoveLeft FlyUp FlyDown MoveForward MoveBackward The behavior of the behaviors is once a move in an axis is active, that behavior must finish its movement before another one on that axis can do another movement on it.
This commit is contained in:
@@ -124,6 +124,8 @@ public:
|
||||
// then return the collision group from that.
|
||||
int32_t GetCollisionGroup() const;
|
||||
|
||||
const NiPoint3& GetVelocity() const;
|
||||
|
||||
/**
|
||||
* Setters
|
||||
*/
|
||||
@@ -148,6 +150,8 @@ public:
|
||||
|
||||
void SetRespawnRot(const NiQuaternion& rotation);
|
||||
|
||||
void SetVelocity(const NiPoint3& velocity);
|
||||
|
||||
/**
|
||||
* Component management
|
||||
*/
|
||||
@@ -329,7 +333,7 @@ public:
|
||||
* @brief The observable for player entity position updates.
|
||||
*/
|
||||
static Observable<Entity*, const PositionUpdate&> OnPlayerPositionUpdate;
|
||||
|
||||
|
||||
protected:
|
||||
LWOOBJID m_ObjectID;
|
||||
|
||||
@@ -435,7 +439,7 @@ const T& Entity::GetVar(const std::u16string& name) const {
|
||||
template<typename T>
|
||||
T Entity::GetVarAs(const std::u16string& name) const {
|
||||
const auto data = GetVarAsString(name);
|
||||
|
||||
|
||||
return GeneralUtils::TryParse<T>(data).value_or(LDFData<T>::Default);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user