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;
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);
/* 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));
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 */
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?");
}