summaryrefslogtreecommitdiff
path: root/include/game.h
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-05-16 20:33:22 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-05-16 20:33:22 +0200
commit250361975fc81ca01d96f615ed1226641887c305 (patch)
treee11c9cf7ad6cf7d5d363286fc462de02c9a8e9d2 /include/game.h
parent544f338b8e9ea010eccedbfa24bee5c97b7d3621 (diff)
improve pathfinding
Diffstat (limited to 'include/game.h')
-rw-r--r--include/game.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/game.h b/include/game.h
index 20a7437..333f076 100644
--- a/include/game.h
+++ b/include/game.h
@@ -9,7 +9,9 @@
#define SERVER_TICK_RATE (1.0f/60.0f)
#define SERVER_MAX_PLAYERS (5)
-#define SERVER_PATHFINDING_INTERVAL (0.25f)
+#define SERVER_CLOSE_PATHFINDING_INTERVAL (0.25f)
+#define SERVER_FAR_PATHFINDING_INTERVAL (1.0f)
+#define SERVER_PATHFINDING_THREADS 3
typedef enum t_game_state {
GAMESTATE_IDLE,
@@ -37,6 +39,8 @@ typedef struct t_game {
scene_state global_scene_state = SCENE_MAIN_MENU;
game global_state = {GAMESTATE_IDLE,DISCONNECTED,0,0};
+pathfinding_request active_requests[SERVER_PATHFINDING_THREADS] = {0};
+
void init_game();
void start_solo_game();
bool connect_to_game(char* ip, char* port);