This commit is contained in:
Thomas 2022-01-03 16:48:40 +01:00
parent c7f0edd513
commit ccdb001b9d
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7

View File

@ -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) {