polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit 4387c15d2d54a3bc1be16dd02b8fe157f91d5b86
parent fdf03948a1c605b7d74ebf2a0dc7dafe6b7e6610
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  6 Nov 2018 13:32:08 -0800

dt movement

Diffstat:
Msrc/update.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/update.c b/src/update.c @@ -13,8 +13,8 @@ #include <math.h> static void movement(struct game *game, struct node *node, float speed_mult) { - float amt = 0.03; - static const float turn = 0.01; + float amt = 3.0 * game->dt; + float turn = 1.0 * game->dt; amt *= speed_mult; @@ -173,7 +173,7 @@ static void player_terrain_collision(struct terrain *terrain, struct entity *pla } static void player_movement(struct game *game, struct entity *player) { - movement(game, &player->node, 2.0); + movement(game, &player->node, 2.0); /* vec3 *camera_world = node_world(&res->camera); */ /* float cam_terrain_z = */