rnd-19981026-3
authorHolger Schemel <info@artsoft.org>
Mon, 26 Oct 1998 00:39:37 +0000 (01:39 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:31:26 +0000 (10:31 +0200)
src/events.c
src/game.c
src/main.h

index 5fd56c0be23b556247a511e3621118d75428daec..f360abd68334142d390b151a8aac28f8eac1fff2 100644 (file)
@@ -409,14 +409,14 @@ void HandleKey(KeySym key, int key_status)
       if (key_status == KEY_PRESSED)
       {
        if (network_playing)
-         local_player->action |= key_action;
+         local_player->potential_action |= key_action;
        else
          stored_player[pnr].action |= key_action;
       }
       else
       {
        if (network_playing)
-         local_player->action &= ~key_action;
+         local_player->potential_action &= ~key_action;
        else
          stored_player[pnr].action &= ~key_action;
       }
@@ -935,16 +935,6 @@ void HandleJoystick()
        return;
       }
 
-      /*
-      if (tape.pausing || AllPlayersGone)
-      {
-       int i;
-
-       for (i=0; i<MAX_PLAYERS; i++)
-         stored_player[i].action = 0;
-      }
-      */
-
       HandleGameActions();
       break;
 
index d780d3529f9bf753468323a044770cd1c0e8244a..17cfd89753e98ec6c02a129aeebff47ab46f68ad 100644 (file)
@@ -68,6 +68,7 @@ void InitGame()
     player->active = FALSE;
 
     player->action = 0;
+    player->potential_action = 0;
 
     player->score = 0;
     player->gems_still_needed = level.edelsteine;
@@ -2949,7 +2950,7 @@ void GameActions()
   recorded_player_action = (tape.playing ? TapePlayAction() : NULL);
 
   if (network_playing)
-    SendToServer_MovePlayer(local_player->action);
+    SendToServer_MovePlayer(local_player->potential_action);
 
   for(i=0; i<MAX_PLAYERS; i++)
   {
index 81a67831e3e189d0c44f639f0b0b227f86df3d5d..a4ea04764b5d545e1a8586c8fb5dcf2e7f7e7966 100644 (file)
@@ -271,7 +271,8 @@ struct PlayerInfo
 
   int index_nr, client_nr, element_nr;
 
-  byte action;
+  byte action;                 /* action from server or for local playing */
+  byte potential_action;       /* must go to network server first */
 
   char login_name[MAX_NAMELEN];
   char alias_name[MAX_NAMELEN];