01.01.2019, 14:27
Version 1.2.0 has been released!
- Fixed the pathfinding algorithm - node comparison was completely broken and it most likely returned the first path it found, not the shortest one. It also improved the performance a lot. Using non-threaded pathfinding, finding a path from the top-leftmost node on the map to the bottom-rightmost node takes just 3 milliseconds on my testing server - that is around 30 times faster than before! Threaded (and asynchronous) pathfinding should be just as fast in real life situations, my test script spammed out so many pathfinding function calls that std::mutex became the "bottleneck".
- Refactored some more code, node connections are now the only thing that need to be refactored, but this will happen when I implement runtime node management.
- Updated the GPS.dat distributed with the plugin, thanks NaS!
- New native (requested by Kar):
Code:native GetPathNodeIndex(Path:pathid, MapNode:nodeid, &index);