Skip to content

Commit

Permalink
fix a small bug related to moving in the air
Browse files Browse the repository at this point in the history
  • Loading branch information
default-username-852 committed Jul 21, 2024
1 parent 8aceaba commit 77ef0ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/model/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export class GameInstance {
break;
case ObstacleType.WagonStart:
// allows the player to go from a wagon or ramp to a wagon
if(!this.terrainInLane(this.player.lane)) {
// also let player go from nothing to a wagon, if they are high enough
if(!this.terrainInLane(this.player.lane) && this.player.height < 4) {
this.gameOver = true;
return;
}
Expand Down

0 comments on commit 77ef0ed

Please sign in to comment.