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 --- include/drops.h | 2 +- include/game.h | 2 ++ include/map.h | 2 +- include/wall_item.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/drops.h b/include/drops.h index aa48e24..91ec03e 100644 --- a/include/drops.h +++ b/include/drops.h @@ -28,7 +28,7 @@ drop drops[MAX_DROPS] = {0}; #define DROP_MAX_DURATION (4.0f) #define DROP_FADE_TIME (2.0f) -void update_drops(); +void update_drops_server(); void draw_drops(platform_window* window); void spawn_drop(vec3f pos); diff --git a/include/game.h b/include/game.h index faf2bc9..cc9d0cd 100644 --- a/include/game.h +++ b/include/game.h @@ -7,6 +7,8 @@ #include "../include/players.h" #include "../include/game.h" +#define SERVER_TICK_RATE (1.0f/60.0f) + typedef enum t_game_state { GAMESTATE_IDLE, GAMESTATE_LOADING_MAP, diff --git a/include/map.h b/include/map.h index 3bc8273..26bc749 100644 --- a/include/map.h +++ b/include/map.h @@ -22,7 +22,7 @@ typedef struct t_tile { vec2f br; } tile; -#define MAP_SIZE_X 20 +#define MAP_SIZE_X 40 #define MAP_SIZE_Y 20 tile map_loaded[MAP_SIZE_Y][MAP_SIZE_X]; diff --git a/include/wall_item.h b/include/wall_item.h index 3b896bd..4d437e0 100644 --- a/include/wall_item.h +++ b/include/wall_item.h @@ -27,7 +27,7 @@ typedef struct t_wall_item { #define MAX_WALLITEMS (20) wall_item wallitems[MAX_WALLITEMS] = {0}; -void update_wallitems(); +void update_wallitems_server(); void draw_wallitems(platform_window* window); void create_wallitem(vec3f position, wall_item_type item, wall_item_data data); -- cgit v1.2.3-70-g09d2