Pathing stuck detection, and logic to go with it

This commit is contained in:
KimLS
2017-08-30 19:55:35 -07:00
parent 0ba9b3fedc
commit c52ff4249a
10 changed files with 81 additions and 41 deletions
+4 -10
View File
@@ -5737,17 +5737,11 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
glm::vec3 Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION);
glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION);
auto pathlist = zone->pathing->FindRoute(Start, End);
bool partial = false;
bool error = false;
auto pathlist = zone->pathing->FindRoute(Start, End, partial, error);
if (pathlist.empty())
{
EQApplicationPacket outapp(OP_FindPersonReply, 0);
QueuePacket(&outapp);
return;
}
//the client seems to have issues with packets larger than this
if (pathlist.size() > 36)
if (pathlist.empty() || error || partial)
{
EQApplicationPacket outapp(OP_FindPersonReply, 0);
QueuePacket(&outapp);