topaz-next / topaz

💎 A server emulator for Final Fantasy XI.
GNU General Public License v3.0
55 stars 80 forks source link

Raycast should find closest point to end-polygon if off-mesh, not start-polygon #2691

Closed InoUno closed 3 years ago

InoUno commented 3 years ago

If the end position is off-mesh, it should look for the closest on-mesh point to it. This should be done on the polygon that is closest to the end position (endRef), not the start position (startRef).

Currently monsters can aggro through walls if the player is off-mesh (i.e. close to a wall), since it finds a point on the start polygon where the monster itself is.

I affirm:

kaincenteno commented 3 years ago

Once in Canary I'll test the Promathia Maze as scheletons there were aggroing through walls =)