diff options
| author | skylar <[email protected]> | 2022-09-04 11:48:33 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-04 11:48:33 +0200 |
| commit | ee5a87826d22ba14f0ad3d3938c92ca42d217146 (patch) | |
| tree | d00634a66ee5cdd2f2fd008a273c065d1a442d32 /examples | |
| parent | f4b4054de570742845fb9a7b80c579ba37d98fbd (diff) | |
| download | raylib-ee5a87826d22ba14f0ad3d3938c92ca42d217146.tar.gz raylib-ee5a87826d22ba14f0ad3d3938c92ca42d217146.zip | |
Fixed a bug in the 2d camera platformer example (#2687)
canJump used to alternate between true and false when on ground
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/core/core_2d_camera_platformer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/core/core_2d_camera_platformer.c b/examples/core/core_2d_camera_platformer.c index 59e7b318..5750e7a8 100644 --- a/examples/core/core_2d_camera_platformer.c +++ b/examples/core/core_2d_camera_platformer.c @@ -177,7 +177,7 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d ei->rect.x <= p->x && ei->rect.x + ei->rect.width >= p->x && ei->rect.y >= p->y && - ei->rect.y < p->y + player->speed*delta) + ei->rect.y <= p->y + player->speed*delta) { hitObstacle = 1; player->speed = 0.0f; |
