From e917400634a535c6c14afc4e37a759f7c777b73a Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 18 Dec 2022 20:17:16 +0100 Subject: server tick rate --- src/wall_item.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wall_item.c') diff --git a/src/wall_item.c b/src/wall_item.c index b1b7f5d..1812db7 100644 --- a/src/wall_item.c +++ b/src/wall_item.c @@ -46,14 +46,14 @@ void create_wallitem(vec3f position, wall_item_type type, wall_item_data data) { } } -void update_wallitems() { +void update_wallitems_server() { #define MAX_HEIGHT_DIFF_FOR_WALLITEM (0.1f) for (int i = 0; i < MAX_WALLITEMS; i++) { wall_item item = wallitems[i]; if (!item.active) continue; - wallitems[i].time_active += update_delta; + wallitems[i].time_active += SERVER_TICK_RATE; wallitems[i].position.z = MAX_HEIGHT_DIFF_FOR_WALLITEM * sin (2 * M_PI * 0.5f * (wallitems[i].time_active) + 0) + item.start_h; } } -- cgit v1.2.3-70-g09d2