Renamed function, need to fix bots, some combat bug fixes.

This commit is contained in:
KimLS
2018-09-21 23:54:07 -07:00
parent 4815cabb63
commit 1aa97957d8
9 changed files with 103 additions and 60 deletions
+6 -2
View File
@@ -427,7 +427,7 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) {
}
void NPC::NextGuardPosition() {
CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed());
NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed());
if ((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))
{
if (moved)
@@ -442,10 +442,14 @@ float Mob::CalculateDistance(float x, float y, float z) {
return (float)sqrtf(((m_Position.x - x)*(m_Position.x - x)) + ((m_Position.y - y)*(m_Position.y - y)) + ((m_Position.z - z)*(m_Position.z - z)));
}
void Mob::CalculateNewPosition(float x, float y, float z, float speed, bool check_z, bool calculate_heading) {
void Mob::NavigateTo(float x, float y, float z, float speed) {
mMovementManager->NavigateTo(this, x, y, z, speed);
}
void Mob::StopNavigation() {
mMovementManager->StopNavigation(this);
}
void NPC::AssignWaypoints(int32 grid)
{
if (grid == 0)