VedalAI / neuro-amongus

Among Us Plugin for Neuro-sama
GNU General Public License v3.0
540 stars 49 forks source link

Add parameter to control node grid density #27

Closed ScrubN closed 1 year ago

ScrubN commented 1 year ago

This fixes all issues on Skeld and Polus, as well as all issues on Mira except for the garden at the cost of slightly more CPU time.

Be warned that due to Airship still lacking ladder and electrical mappings, it will lag spike harder due to the increase in total nodes. The lag spikes are a result of no path being found, thus resulting in every node on the map being checked.

Alexejhero commented 1 year ago

assuming it is a pure operation. Yeah I had to check for that in my IDE 😝

On Sun, Apr 2, 2023 at 4:10 AM Scrub @.***> wrote:

@.**** commented on this pull request.

In Neuro/Pathfinding/PathfindingHandler.cs https://github.com/VedalAI/neuro-amongus/pull/27#discussion_r1155220961:

  • Array.Reverse(waypoints);
  • new Span(waypoints).Reverse();

Heck, I didn't even know about this method

Yeah, that's fair. I ran into it when trying to optimize another project and my profiler noted ~3% of the time was spent reversing arrays, so I switched to Span.Reverse() and the code got even faster.

but I hope that won't confuse other contributors

I hope not either. To me it seems pretty straightforward, but I can see how it can be confusing to someone assuming it is a pure operation.

— Reply to this email directly, view it on GitHub https://github.com/VedalAI/neuro-amongus/pull/27#discussion_r1155220961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHV6XKFTJQK2EAFEWFMKC5TW7DGYNANCNFSM6AAAAAAWP4KS2I . You are receiving this because you modified the open/close state.Message ID: @.***>