diff --git a/Source/player.cpp b/Source/player.cpp index 8829e3377..e4d248101 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -401,7 +401,7 @@ void InitLevelChange(Player &player) /** * @brief Continue movement towards new tile */ -bool DoWalk(Player &player, int variant) +bool DoWalk(Player &player) { // Play walking sound effect on certain animation frames if (*sgOptions.Audio.walkingSound && (leveltype != DTYPE_TOWN || sgGameInitInfo.bRunInTown == 0)) { @@ -418,20 +418,10 @@ bool DoWalk(Player &player, int variant) } // We reached the new tile -> update the player's tile position - switch (variant) { - case PM_WALK_NORTHWARDS: - case PM_WALK_SOUTHWARDS: - dPlayer[player.position.tile.x][player.position.tile.y] = 0; - player.position.tile = player.position.temp; - player.occupyTile(player.position.tile, false); - break; - case PM_WALK_SIDEWAYS: - dPlayer[player.position.tile.x][player.position.tile.y] = 0; - player.position.tile = player.position.temp; - // dPlayer is set here for backwards comparability, without it the player would be invisible if loaded from a vanilla save. - player.occupyTile(player.position.tile, false); - break; - } + dPlayer[player.position.tile.x][player.position.tile.y] = 0; + player.position.tile = player.position.temp; + // dPlayer is set here for backwards compatibility; without it, the player would be invisible if loaded from a vanilla save. + player.occupyTile(player.position.tile, false); // Update the coordinates for lighting and vision entries for the player if (leveltype != DTYPE_TOWN) { @@ -3018,7 +3008,7 @@ void ProcessPlayers() case PM_WALK_NORTHWARDS: case PM_WALK_SOUTHWARDS: case PM_WALK_SIDEWAYS: - tplayer = DoWalk(player, player._pmode); + tplayer = DoWalk(player); break; case PM_ATTACK: tplayer = DoAttack(player);