Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2014, 08:56 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default no LOS to end path node?

I'm having some pathing issues with a new NPC, and am puzzled by what I am seeing. I sure hope someone familiar with pathing can set me straight.

PathManager::FindRoute(Vertex,Vertex) checks for LOS to the starting path node. OK, this succeeds and makes sense.

But then it checks for LOS on the end path node, and fails.

Code:
    if(ClosestPathNodeToEnd < 0) {
        _log(PATHING__DEBUG, "No LOS to any end Path Node within range.");
        return noderoute;
    }
At this point, noderoute is an empty list.

I was kind of hoping that pathfinding would allow me to find a route to a distant node out of sight. I could have swore that it did so. Am I
misunderstanding this?

The particular case in question is a large outdoor zone (moors) with the NPC starting in a low area. The target vertex is out of LOS. Most of the zone
is LOS.

The reason I am looking into this particular code is that my NPC is moving
forward and then warping back to its original position. I believe that the
server is sending it underground, and the client moves it back. In any
event CalculateNewPosition2 is called with the destination vertex
rather than a path node. (Since no route was found, since the destination
is not in LOS).

If I had LOS and there were no hazards, I would not need pathfinding.
Reply With Quote
  #2  
Old 01-14-2014, 09:08 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

A quick update. Sometimes just writing the question out helps.
I believe I misunderstood the message, and it was saying that there was no LOS from the end vertex to any path node. On further inspection, the Z coord of the destination vertex had been set to -999999.

This was due to FindBestZ not finding a point above ground. FindClosestZ did the trick. Z-fixup was needed to keep the NPC from bouncing around when it neared the waypoint. I used #loc to get the coords of the waypoint, and that might not agree exactly with the terrain.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:15 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3