New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue/#730 ignore score results #731
Issue/#730 ignore score results #731
Conversation
We can now distinguish between results in their various stages: 1. Results reported by an individual for a specific army 2. Accepted result for an army based on the individual reports 3. Accepted result for the whole team based on the accepted army results For instance, it doesn't make sense for a player's game to report the status of a particular result as "conflicting" since conflicts only arise when multiple players report different results for the same army. The Enum's now reflect that, and you can no longer report a "conflicting" or "unknown" result directly (as you could have before). As a consequence, any result string that is not present in the ArmyReportedOutcome will be ignored. Hence, the ACU kills reported via "score" results will no longer affect the army score calculation (previously these could turn a -10 score from a defeat into a positive number if the player got any acu kills).
90a31a7
to
20cadcc
Compare
Codecov Report
|
Ok I did some testing, and it looks like the "Draw Bug" is actually worse than just the score reports interfering with the rating code. It turns out that the person who ctrl-k's doesn't even get a result reported for them at all, by either client. So in the end all the server sees is that one player was defeated, and the other has unknown status. In which case we currently just assume victory for the unknown result. Here's an example ladder game where my opponent ctrl-k'd me with his commander. You can see that no result was reported for him (army 2) other than the "score":
However, it does seem like the scores are reported in custom 1v1's, but still not by the player who ctrl-k's. Here's a custom 1v1 where I ctrl-k'd my opponent:
|
The
score
results that the game sends to report ACU kills are messing with the legacy rating code for ladder. This allows people to kill their opponent with a ctrl-k and still receive a win instead of a draw. Strangely, because of when results are written, it seems that the outcomes recorded in thegame_player_stats
table are still correct. At least that's what happened in my integration test: the results were determined correctly by the new rating code and those got written to the gps table, then the outcome override triggers and causes the rating code to use different results.I went ahead and refactored the
GameOutcome
enum into 3 separate enums:ArmyReportedOutcome
- the outcome for an army as reported by FA.ArmyOutcome
- the outcome for an army after the reported outcomes have been resolved.GameOutcome
- the outcome for a team based on the resolved army outcomes.This helps prevent us from skipping steps in the rating process and also prevents clients from explicitly reporting "unknown" or "conflicting" in their result string (this would have been previously allowed).
Closes #730