summaryrefslogtreecommitdiff
path: root/src/wall_item.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-18 20:17:16 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-18 20:17:16 +0100
commite917400634a535c6c14afc4e37a759f7c777b73a (patch)
tree5c8a5de1c6c09985395fbfb660a27500a65d1de0 /src/wall_item.c
parent3e825971102a33dfbb82a20a365684d413bc1ba8 (diff)
server tick rate
Diffstat (limited to 'src/wall_item.c')
-rw-r--r--src/wall_item.c4
1 files changed, 2 insertions, 2 deletions
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;
}
}