fp: Rejig the mob spawner to use a fixed-waypoint path

This commit is contained in:
2023-09-24 19:11:44 +10:00
parent bff3fc759d
commit 30a69e40e9
5 changed files with 111 additions and 30 deletions
+10
View File
@@ -13,6 +13,7 @@ enum FP_GameEntityFlag
FP_GameEntityFlag_DeriveHitBoxFromChildrenBoundingBox = 1 << 5,
FP_GameEntityFlag_NonTraversable = 1 << 6,
FP_GameEntityFlag_MobSpawner = 1 << 7,
FP_GameEntityFlag_MobSpawnerWaypoint = 1 << 8,
};
enum FP_GameShapeType
@@ -52,6 +53,13 @@ struct FP_GameWaypoint
FP_GameWaypoint *prev;
};
struct FP_GameEntitySpawnList
{
FP_GameEntityHandle entity;
FP_GameEntitySpawnList *next;
FP_GameEntitySpawnList *prev;
};
enum FP_GameEntityActionFlag
{
FP_GameEntityActionFlag_StateTransition = 1 << 0,
@@ -112,6 +120,8 @@ struct FP_GameEntity
Dqn_V2 attack_box_size;
Dqn_V2 attack_box_offset;
Dqn_FArray<Dqn_V2, 8> spawner_waypoints;
FP_GameEntitySpawnList *spawn_list;
uint64_t next_spawn_timestamp_s;
uint64_t spawn_count;
uint64_t spawn_cap;