From fa2828673ea52a8b0419eb8e57b95df6c8ff29b2 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 18 May 2018 10:39:00 +0200 Subject: [PATCH] fixed network games, part 3: enabled mapping input to reassigned players Before this change, player input from connected network players was only allowed for active players. However, the old code did not take into account that players may have been reassigned to other players in the level playfield, so their input actions have to be mapped to that different player. This change accepts input actions for all players, and later maps them to the finally assigned player in the game. --- src/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index afce7998..b51402eb 100644 --- a/src/network.c +++ b/src/network.c @@ -508,7 +508,7 @@ static void Handle_OP_MOVE_PLAYER(unsigned int len) /* copy valid player actions */ for (i = 0; i < MAX_PLAYERS; i++) stored_player[i].effective_action = - (i < len - 6 && stored_player[i].active ? buffer[6 + i] : 0); + (i < len - 6 ? buffer[6 + i] : 0); network_player_action_received = TRUE; } -- 2.34.1