X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=09faa8b1b8024245067841ef2d57618de41d5cd2;hb=439b24a7e57f7af4081ef917fabe6b3cb78d902d;hp=0468be7fa87a4be79be812213f84ecf3a8e9fd0b;hpb=ae1359da280d87576ff65d7cb5c407cd35983472;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 0468be7f..09faa8b1 100644 --- a/src/game.c +++ b/src/game.c @@ -11872,7 +11872,6 @@ static void CheckSingleStepMode(struct PlayerInfo *player) static byte PlayerActions(struct PlayerInfo *player, byte player_action) { - boolean moved = FALSE, snapped = FALSE, dropped = FALSE; int left = player_action & JOY_LEFT; int right = player_action & JOY_RIGHT; int up = player_action & JOY_UP; @@ -11888,13 +11887,13 @@ static byte PlayerActions(struct PlayerInfo *player, byte player_action) if (player_action) { if (button1) - snapped = SnapField(player, dx, dy); + SnapField(player, dx, dy); else { if (button2) - dropped = DropElement(player); + DropElement(player); - moved = MovePlayer(player, dx, dy); + MovePlayer(player, dx, dy); } CheckSingleStepMode(player); @@ -12127,9 +12126,9 @@ void GameActions() /* detect endless loops, caused by custom element programming */ if (recursion_loop_detected && recursion_loop_depth == 0) { - char *message = getStringCat3("Internal Error ! Element ", + char *message = getStringCat3("Internal Error! Element ", EL_NAME(recursion_loop_element), - " caused endless loop ! Quit the game ?"); + " caused endless loop! Quit the game?"); Error(ERR_WARN, "element '%s' caused endless loop in game engine", EL_NAME(recursion_loop_element)); @@ -15803,14 +15802,19 @@ static boolean DropElement(struct PlayerInfo *player) if (IS_CUSTOM_ELEMENT(new_element) && CAN_MOVE(new_element) && element_info[new_element].move_pattern == MV_WHEN_DROPPED) { - int move_direction, nextx, nexty; +#if 0 + int move_direction; + int nextx, nexty; +#endif if (element_info[new_element].move_direction_initial == MV_START_AUTOMATIC) MovDir[dropx][dropy] = drop_direction; +#if 0 move_direction = MovDir[dropx][dropy]; nextx = dropx + GET_DX_FROM_DIR(move_direction); nexty = dropy + GET_DY_FROM_DIR(move_direction); +#endif ChangeCount[dropx][dropy] = 0; /* allow at least one more change */ @@ -16282,7 +16286,7 @@ void RequestQuitGame(boolean ask_if_really_quit) boolean skip_request = AllPlayersGone || quick_quit; RequestQuitGameExt(skip_request, quick_quit, - "Do you really want to quit the game ?"); + "Do you really want to quit the game?"); }