added new change action "move player new" to CE change actions
[rocksndiamonds.git] / src / game.c
index fd1bdc53d936c6a821c8639b66a331d09ccd6750..d73efcfba0f89ab7495599b0eba0636e1777d1e9 100644 (file)
@@ -9880,11 +9880,14 @@ static void ExecuteCustomElementAction(int x, int y, int element, int page)
     // ---------- player actions  ---------------------------------------------
 
     case CA_MOVE_PLAYER:
+    case CA_MOVE_PLAYER_NEW:
     {
       // automatically move to the next field in specified direction
       for (i = 0; i < MAX_PLAYERS; i++)
        if (trigger_player_bits & (1 << i))
-         stored_player[i].programmed_action = action_arg_direction;
+         if (action_type == CA_MOVE_PLAYER ||
+             stored_player[i].MovPos == 0)
+           stored_player[i].programmed_action = action_arg_direction;
 
       break;
     }