Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirKhil committed May 1, 2024
2 parents 572b6f2 + 341058a commit fc44401
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SICore/SICore/Clients/Game/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2066,9 +2066,12 @@ private void OnAnswer(Message message, string[] args)

for (var i = 0; i < ClientData.Players.Count; i++)
{
if (ClientData.Players[i].Name == message.Sender && ClientData.QuestionPlayState.AnswererIndicies.Contains(i) && ClientData.Players[i].Answer == "")
if (ClientData.Players[i].Name == message.Sender
&& ClientData.QuestionPlayState.AnswererIndicies.Contains(i)
&& ClientData.Players[i].Flag)
{
ClientData.AnswererIndex = i;
ClientData.Players[i].Flag = false;
_gameActions.SendMessageWithArgs(Messages.PersonFinalAnswer, i);
break;
}
Expand Down
1 change: 1 addition & 0 deletions src/SICore/SICore/Clients/Game/GameLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,7 @@ private void AskAnswer()
if (_data.QuestionPlayState.AnswererIndicies.Contains(i))
{
_data.Players[i].Answer = "";
_data.Players[i].Flag = true;
_gameActions.SendMessage(Messages.Answer, _data.Players[i].Name);
}
}
Expand Down

0 comments on commit fc44401

Please sign in to comment.