diff --git a/src/gameManagers.cpp b/src/gameManagers.cpp index 2631b8e..4e1994e 100644 --- a/src/gameManagers.cpp +++ b/src/gameManagers.cpp @@ -7,7 +7,7 @@ void Game::manageOnePlayer(unsigned id){ else players[id].x -= confData.playersSpeed; } if (ISPRESSED(id, right)){ - if(players[id].x + confData.playersSpeed >= pm.getScreenWidth()) players[id].x = pm.getScreenWidth() - 1; + if(players[id].x + confData.playersWidth + confData.playersSpeed >= pm.getScreenWidth()) players[id].x = pm.getScreenWidth() - confData.playersWidth - 1; else players[id].x += confData.playersSpeed; } if(players[id].fireCooldown==0) {