mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 03:11:28 +00:00
Fix fleeing when zones have map files
This commit is contained in:
parent
a9b98ed057
commit
03bc245318
@ -16,7 +16,7 @@
|
|||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define PATHDEBUG
|
//#define PATHDEBUG
|
||||||
|
|
||||||
extern Zone *zone;
|
extern Zone *zone;
|
||||||
|
|
||||||
@ -205,10 +205,10 @@ glm::vec3 PathManager::GetPathNodeCoordinates(int NodeNumber, bool BestZ)
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::deque<int> PathManager::FindRoute(int startID, int endID)
|
std::deque<int> PathManager::FindRoute(int startID, int endID)
|
||||||
{
|
{
|
||||||
Log.Out(Logs::Detail, Logs::None, "FindRoute from node %i to %i", startID, endID);
|
Log.Out(Logs::Detail, Logs::None, "FindRoute from node %i to %i", startID, endID);
|
||||||
|
|
||||||
memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount);
|
memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount);
|
||||||
|
|
||||||
std::deque<AStarNode> OpenList, ClosedList;
|
std::deque<AStarNode> OpenList, ClosedList;
|
||||||
|
|
||||||
@ -665,6 +665,9 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
|
|||||||
|
|
||||||
bool SameDestination = (To == PathingDestination);
|
bool SameDestination = (To == PathingDestination);
|
||||||
|
|
||||||
|
if (Speed <= 0) // our speed is 0, we cant move so lets return the dest
|
||||||
|
return To; // this will also avoid the teleports cleanly
|
||||||
|
|
||||||
int NextNode;
|
int NextNode;
|
||||||
|
|
||||||
if(To == From)
|
if(To == From)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user