2006-Scape / 2006Scape

A 2006 Runescape Emulation Server
https://2006Scape.org
GNU General Public License v3.0
182 stars 158 forks source link

Improve NPC size > 1 pathing #658

Open ipkpjersi opened 2 weeks ago

ipkpjersi commented 2 weeks ago

Wow, this was a ton of effort to clean up this PR but I think I did it properly. I tried many things, but ultimately I had to interactive rebase and just drop the commits I didn't want that were from other branches. My old PR I closed was 7 files changed and this new PR is 7 files changed, so it's extremely likely I did clean up this branch properly.

Anyway, onto this feature:

This is probably fine to merge. It doesn't fix all pathing bugs that currently exist (it doesn't fix player clipping when moving/attacking/clicking on objects etc), that would likely be a ton of work, but this does address not handling NPC size > 1 pathing, and it doesn't seem to introduce any new bugs.

With that said, I'll go ahead and mark this as draft for now so we can make sure it gets tested more first since I don't really consider it completely fully tested.

ipkpjersi commented 2 weeks ago

Tested this after cleaning the branch, it seems to test well, it looks like I did clean up the branch properly and it is still showing 7 files changed.

This could probably use further testing but I also think it's still technically an improvement over the pathfinding we have on live, and it does actually fix instances of not being able to attack NPCs - I haven't run into that issue once on this branch (torag, cows on certain tiles, etc). Still, further testing is likely a good idea.

ipkpjersi commented 2 weeks ago

Note: I should probably comment out the print messages (but leave them in the codebase for helpful debugging)

ipkpjersi commented 2 weeks ago

This is ready for review/testing now.