a-game

2D platformer written from scratch.
git clone git://git.amin.space/a-game.git
Log | Files | Refs | README | LICENSE

commit b926bc3f91fda9865dcd634506da57d86f58e77a
parent 45ccc3fb2925663632edc8b671ffdd4cf5f2f211
Author: amin <dev@aminmesbah.com>
Date:   Sat, 23 Nov 2019 20:10:26 +0000

Don't zero vertical v when sliding off ledge

FossilOrigin-Name: f0bb956d306cb4528859702926b25633f828c6cf3bcbd33b8da220d666c0b86b
Diffstat:
Msrc/game.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/game.c b/src/game.c @@ -355,9 +355,9 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga { player->velocity.x = -3.0f; } + player->acceleration.y = 0.0f; + player->velocity.y = 0.0f; } - player->acceleration.y = 0.0f; - player->velocity.y = 0.0f; player->move_mode = MOVE_MODE_FALLING; } }