else
{
Player *current;
- for (current = localPlayer; current != NULL; current = current->next)
+ for (current = localPlayer->next; current != NULL; current = current->next)
{
- if (current != playerA && !current->dead && predictionHandler->RockPaperScissorsPosition(playerA, current) == 1)
+ if (!current->dead && predictionHandler->RockPaperScissorsPosition(playerA, current) == 1)
{
srand((unsigned)time(0));
int rps = rand() % 3;
current->RPSReceivedAck++;
msgBoard->setCaption("You challenged Player " + StringConverter::toString(current->id) + " to play 'rock-paper-scissors' ");
gettimeofday(&msgTime, NULL);
- registerScore(playerA, playerB, RPS);
+ registerScore(playerA, current, RPS);
Vector3 moveCamera = cameraPos;