Skip to content
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

Fix recall again #6396

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Fix recall again #6396

wants to merge 16 commits into from

Conversation

Hdt80bro
Copy link
Contributor

@Hdt80bro Hdt80bro commented Aug 7, 2024

Adds better recall reporting in the log and handles defeated brains better.

Partially tested for now.

brain.LastRecallVoteTime = gametick
end
brain.RecallVote = nil -- make sure defeated players get reset too
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the critical line that fixes recall frequently failing? Previously the RecallVote wasn't cleared when a brain was defeated, so their vote from previous recalls remained locked in for the rest of the game?

The rest is refactoring for better logging and improving the UI behavior to work with 3 player votes when the third is defeated and it transforms into 2 players?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you take the conditions of the if statement into account, I guess, yeah.

@lL1l1
Copy link
Contributor

lL1l1 commented Oct 19, 2024

(Discord Thread)

You said it's partially tested, what needs to be tested?

Ideally, most of the interactions - but specifically, a team of 4 with one player being defeated before / during the vote, and probably again with a team of 3.
Oh, and there needs to have been a prior failed vote where the defeated player voted no.

Testing of recall:

Setup is 4v4 launched via the new script.

  1. Recall -> deny: recall failed
  2. Recall -> accept -> deny: recall failed
  • 1 and 2 are a Bug because we have 4 players and 3 are needed. The code should wait for the 2nd denying vote.
  1. Recall -> accept -> accept: recall succeeded
  2. Recall -> accept -> deny -> recall fail -> denier ctrl-k -> recall (tested that dead player can't recall) ->
  3. Recall -> accept -> recall failed (2-0, 1 abstained)
  4. Recall -> deny -> recall failed
  5. 3 players -> recall -> player who started recall ctrl-k -> UI breaks
    {AAE3E780-D43D-45DD-8E9F-5A004DB4D56B}

Other Notes:

  • It is confusing that the UI keeps the old votes visible, even though the logic always resets players to an abstaining state every vote. It also seems to not maintain the per-slot player vote regardless.
  • Sometimes the voting panel can stay extended for a while, not sure why.

teammates was not teamsize
@lL1l1
Copy link
Contributor

lL1l1 commented Oct 19, 2024

Test iteration 2:

  1. Recall -> deny: recall continues
  2. Recall -> accept -> deny: recall continues
  3. Recall -> accept -> accept: recall succeeded
  4. Recall -> accept -> deny -> recall fail -> denier ctrl-k -> recall (tested that dead player can't recall) ->
  5. Recall -> accept -> recall continues
  6. Recall -> deny -> recall failed (this is correct, as 3/3 is needed)
  7. 3 players -> recall -> player who started recall ctrl-k -> UI breaks
  8. 2 players -> recall -> player who did not start vote ctrl-k -> UI breaks too
  • seems like the UI breaks every time it has to update

Other notes:

  • "Not ready for recall" and "recalling" stay on the voting panel in a 2 player team.

Fixes two issues:
- defeated brains UI would show as if they could vote
- previous voters UI would show as if they could vote
- previous abstainers UI would show as if they could not vote
hides the "request recall" button in the UI after defeat
This reverts commit 33e5e86.
@lL1l1 lL1l1 marked this pull request as ready for review November 4, 2024 20:33
@lL1l1 lL1l1 requested a review from Garanas November 4, 2024 20:42
@lL1l1
Copy link
Contributor

lL1l1 commented Nov 4, 2024

I think all the issues I've highlighted are fixed. Opening 8 instances and voting in different ways along with 1 player dying during the middle of the vote all works as expected sim and UI wise.

This reverts commit ecf9ace.
@lL1l1 lL1l1 self-assigned this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants