mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Additional record types
This commit is contained in:
@@ -630,7 +630,23 @@ void BaseCombatAIComponent::ClearThreat() {
|
||||
m_DirtyThreat = true;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::SetStartPosition(const NiPoint3& position) {
|
||||
m_StartPosition = position;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::Wander() {
|
||||
if (m_FocusPosition != NiPoint3Constant::ZERO) {
|
||||
m_MovementAI->SetHaltDistance(m_FocusRadius);
|
||||
|
||||
m_MovementAI->SetDestination(m_FocusPosition);
|
||||
|
||||
m_MovementAI->SetMaxSpeed(m_TetherSpeed);
|
||||
|
||||
m_Timer += 0.5f;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_MovementAI->AtFinalWaypoint()) {
|
||||
return;
|
||||
}
|
||||
@@ -781,6 +797,38 @@ void BaseCombatAIComponent::SetAggroRadius(const float value) {
|
||||
m_AggroRadius = value;
|
||||
}
|
||||
|
||||
float BaseCombatAIComponent::GetSoftTetherRadius() const {
|
||||
return m_SoftTetherRadius;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::SetSoftTetherRadius(const float value) {
|
||||
m_SoftTetherRadius = value;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::SetHardTetherRadius(const float value) {
|
||||
m_HardTetherRadius = value;
|
||||
}
|
||||
|
||||
const NiPoint3& BaseCombatAIComponent::GetFocusPosition() const {
|
||||
return m_FocusPosition;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::SetFocusPosition(const NiPoint3& value) {
|
||||
m_FocusPosition = value;
|
||||
}
|
||||
|
||||
float BaseCombatAIComponent::GetFocusRadius() const {
|
||||
return m_FocusRadius;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::SetFocusRadius(const float value) {
|
||||
m_FocusRadius = value;
|
||||
}
|
||||
|
||||
float BaseCombatAIComponent::GetHardTetherRadius() const {
|
||||
return m_HardTetherRadius;
|
||||
}
|
||||
|
||||
void BaseCombatAIComponent::LookAt(const NiPoint3& point) {
|
||||
if (m_Stunned) {
|
||||
return;
|
||||
|
@@ -120,6 +120,12 @@ public:
|
||||
*/
|
||||
const NiPoint3& GetStartPosition() const;
|
||||
|
||||
/**
|
||||
* Sets the position where the entity spawned
|
||||
* @param position the position where the entity spawned
|
||||
*/
|
||||
void SetStartPosition(const NiPoint3& position);
|
||||
|
||||
/**
|
||||
* Removes all threats for this entities, and thus chances for it attacking other entities
|
||||
*/
|
||||
@@ -196,6 +202,54 @@ public:
|
||||
*/
|
||||
void SetAggroRadius(float value);
|
||||
|
||||
/**
|
||||
* Gets the soft tether radius
|
||||
* @return the soft tether radius
|
||||
*/
|
||||
float GetSoftTetherRadius() const;
|
||||
|
||||
/**
|
||||
* Sets the soft tether radius
|
||||
* @param value the soft tether radius
|
||||
*/
|
||||
void SetSoftTetherRadius(float value);
|
||||
|
||||
/**
|
||||
* Gets the hard tether radius
|
||||
* @return the hard tether radius
|
||||
*/
|
||||
float GetHardTetherRadius() const;
|
||||
|
||||
/**
|
||||
* Sets the hard tether radius
|
||||
* @param value the hard tether radius
|
||||
*/
|
||||
void SetHardTetherRadius(float value);
|
||||
|
||||
/**
|
||||
* Get the position that the entity should stay around
|
||||
* @return the focus position
|
||||
*/
|
||||
const NiPoint3& GetFocusPosition() const;
|
||||
|
||||
/**
|
||||
* Set the position that the entity should stay around
|
||||
* @param position the focus position
|
||||
*/
|
||||
void SetFocusPosition(const NiPoint3& position);
|
||||
|
||||
/**
|
||||
* Get the radius that the entity should stay around the focus position
|
||||
* @return the focus radius
|
||||
*/
|
||||
float GetFocusRadius() const;
|
||||
|
||||
/**
|
||||
* Set the radius that the entity should stay around the focus position
|
||||
* @param radius the focus radius
|
||||
*/
|
||||
void SetFocusRadius(float radius);
|
||||
|
||||
/**
|
||||
* Makes the entity look at a certain point in space
|
||||
* @param point the point to look at
|
||||
@@ -382,6 +436,16 @@ private:
|
||||
*/
|
||||
bool m_DirtyStateOrTarget = false;
|
||||
|
||||
/**
|
||||
* A position that the entity should stay around
|
||||
*/
|
||||
NiPoint3 m_FocusPosition;
|
||||
|
||||
/**
|
||||
* How far the entity should stay from the focus position
|
||||
*/
|
||||
float m_FocusRadius = 0;
|
||||
|
||||
/**
|
||||
* Whether the current entity is a mech enemy, needed as mechs tether radius works differently
|
||||
* @return whether this entity is a mech
|
||||
|
@@ -182,6 +182,10 @@ const MovementAIInfo& MovementAIComponent::GetInfo() const {
|
||||
return m_Info;
|
||||
}
|
||||
|
||||
MovementAIInfo& MovementAIComponent::GetInfo() {
|
||||
return m_Info;
|
||||
}
|
||||
|
||||
bool MovementAIComponent::AdvanceWaypointIndex() {
|
||||
if (m_PathIndex >= m_InterpolatedWaypoints.size()) {
|
||||
return false;
|
||||
|
@@ -74,6 +74,12 @@ public:
|
||||
*/
|
||||
const MovementAIInfo& GetInfo() const;
|
||||
|
||||
/**
|
||||
* Returns a mutable reference to the basic settings that this entity uses to move around
|
||||
* @return a mutable reference to the basic settings that this entity uses to move around
|
||||
*/
|
||||
MovementAIInfo& GetInfo();
|
||||
|
||||
/**
|
||||
* Set a destination point for the entity to move towards
|
||||
* @param value the destination point to move towards
|
||||
|
Reference in New Issue
Block a user