NS2CDT / NS2Plus

NS2+ mod for Natural Selection 2
5 stars 7 forks source link

Fix HiveSkillGraph #35

Closed peblpebl closed 4 years ago

peblpebl commented 4 years ago

Old hiveskill algo had some assumptions that turned out false. 1) It assumed - apart from game time 0 - no events would be on same game time. This happens a lot. 2) It assumed that join+leaves where logical. This is not true; the same stream Id can join multiple times without any leaves. 3) It assumed all joins were real players. It seems there are bots joining too.

Because of 1) the algo is rewritten to handle all events at the same game time, before drawing next part of the graph, and moving on to a higher game time. Game time 0 is no longer special. 2) requires that we at all times know who is on which team to check if a join is "valid. e.i. the stream id is not already in that team. 3) just ignore players without hiveskill (which is different from having hive skill 0).

GhoulofGSG9 commented 4 years ago

Thank you for taking the time to look into this issue. I'll review the changes later today and merge it into beta afterwards.

peblpebl commented 4 years ago

Another fix for spectator joining team 2. Fix squashed and forced commit.

GhoulofGSG9 commented 4 years ago

I did already merge your pervious commit.

Also I did fix the issue with spectator entries in a slightly different way. My fix is not working for match reports captured with a previous version of ns2 but I hope that won't be a problem.

Thanks again for taking the time to make this pull request.