X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame.c;h=b96fa7addac29c8901251469c1216ddda9f8111e;hb=57562a0f29074feea1dc01ddf1b1d5e4e6d59730;hp=67db98a9aefcb34b8842b27143a7dd9a90be0cb7;hpb=e557b2b5d9951a4e692fd4e32a5cf45c84252c64;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 67db98a9..b96fa7ad 100644 --- a/src/game.c +++ b/src/game.c @@ -21,6 +21,7 @@ #include "files.h" #include "tape.h" #include "joystick.h" +#include "network.h" void GetPlayerConfig() { @@ -2764,9 +2765,9 @@ void CheckForDragon(int x, int y) } } -void PlayerActions(struct PlayerInfo *player, int player_action) +void PlayerActions(struct PlayerInfo *player, byte player_action) { - static int stored_player_action[MAX_PLAYERS]; + static byte stored_player_action[MAX_PLAYERS]; static int num_stored_actions = 0; BOOL moved = FALSE, snapped = FALSE, bombed = FALSE; int jx = player->jx, jy = player->jy; @@ -2849,7 +2850,7 @@ void PlayerActions(struct PlayerInfo *player, int player_action) } } -void GameActions(int player_action) +void GameActions(byte player_action) { static long action_delay = 0; long action_delay_value; @@ -2876,6 +2877,8 @@ void GameActions(int player_action) else recorded_player_action = NULL; + SendToServer_MovePlayer(player_action); + for(i=0; i