summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/game.h1
-rw-r--r--include/pathfinding.h1
-rw-r--r--include/protocol.h2
-rw-r--r--include/zombies.h5
4 files changed, 5 insertions, 4 deletions
diff --git a/include/game.h b/include/game.h
index d2461b2..f2fd0cb 100644
--- a/include/game.h
+++ b/include/game.h
@@ -9,6 +9,7 @@
#define SERVER_TICK_RATE (1.0f/60.0f)
#define SERVER_MAX_PLAYERS (10)
+#define SERVER_PATHFINDING_INTERVAL (0.25f)
typedef enum t_game_state {
GAMESTATE_IDLE,
diff --git a/include/pathfinding.h b/include/pathfinding.h
index 9dcaab3..e648f2c 100644
--- a/include/pathfinding.h
+++ b/include/pathfinding.h
@@ -15,6 +15,7 @@ typedef struct t_pathfinding_request
array *to_fill;
uint64_t timestamp;
mutex mutex;
+ bool active;
} pathfinding_request;
array global_pathfinding_queue;
diff --git a/include/protocol.h b/include/protocol.h
index 8fd33b9..9750d62 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -53,7 +53,7 @@ typedef struct t_protocol_user_list
typedef struct t_protocol_zombie_list
{
network_message_type type;
- zombie zombies[MAX_ZOMBIES];
+ zombie zombies[SERVER_MAX_ZOMBIES];
} protocol_zombie_list;
#include "drops.h"
diff --git a/include/zombies.h b/include/zombies.h
index 72836ea..0c18bef 100644
--- a/include/zombies.h
+++ b/include/zombies.h
@@ -28,11 +28,10 @@ typedef struct t_spawner {
} spawner;
#define MAX_SPAWNERS (5)
-// data data that is stored on disk
spawner spawner_tiles[MAX_SPAWNERS] = {0};
-#define MAX_ZOMBIES (50)
-zombie zombies[MAX_ZOMBIES] = {0};
+#define SERVER_MAX_ZOMBIES (50)
+zombie zombies[SERVER_MAX_ZOMBIES] = {0};
void create_spawner(vec2 position);
void draw_spawners(platform_window* window);