summaryrefslogtreecommitdiff
path: root/src/game.c
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 /src/game.c
parent544f338b8e9ea010eccedbfa24bee5c97b7d3621 (diff)
improve pathfinding
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game.c b/src/game.c
index aa4d91d..fab513a 100644
--- a/src/game.c
+++ b/src/game.c
@@ -108,12 +108,11 @@ void load_map() {
pathfinding_init();
// TODO: only need this on server?
- thread t1 = thread_start(pathfinding_thread, 0);
- thread_detach(&t1);
- thread t2 = thread_start(pathfinding_thread, 0);
- thread_detach(&t2);
- thread t3 = thread_start(pathfinding_thread, 0);
- thread_detach(&t3);
+ for (int i = 0; i < SERVER_PATHFINDING_THREADS; i++)
+ {
+ thread t1 = thread_start(pathfinding_thread, 0);
+ thread_detach(&t1);
+ }
log_info("STATE: GAMESTATE_LOADING_ASSETS");
global_state.state = GAMESTATE_LOADING_ASSETS;
@@ -182,6 +181,7 @@ void fill_game_structs()
{0,(vec3f){0, 0, 0},{1,1,1},OBJECT_METAL_WALL9, 1},
{0,(vec3f){0, 0, 0},{1,1,1},OBJECT_METAL_WALL10, 1},
};
+ // @NEWOBJECT
memcpy(object_dict, _localobject_dict, sizeof(_localobject_dict));
vec2 _local_available_resolutions[] = {