2021-11-01 18:55:13 +00:00
|
|
|
#pragma once
|
2022-09-27 12:56:48 +00:00
|
|
|
#include "platform/system.h"
|
2021-11-01 18:55:13 +00:00
|
|
|
|
2022-10-05 14:21:43 +00:00
|
|
|
#define ENTITY_ACTION_VELOCITY_THRESHOLD 0.001f
|
2022-08-01 09:19:52 +00:00
|
|
|
|
2021-11-01 18:55:13 +00:00
|
|
|
uint64_t entity_spawn(uint16_t class_id /* 0 = no streaming */);
|
2022-09-15 20:50:48 +00:00
|
|
|
uint64_t entity_spawn_id(uint16_t id);
|
2022-09-29 17:28:56 +00:00
|
|
|
uint64_t entity_spawn_id_with_data(uint16_t id, void* udata);
|
2023-01-15 15:59:33 +00:00
|
|
|
bool entity_spawn_provided(uint16_t id);
|
2021-11-01 18:55:13 +00:00
|
|
|
void entity_batch_despawn(uint64_t *ids, size_t num_ids);
|
|
|
|
void entity_despawn(uint64_t ent_id);
|
2022-08-01 09:28:54 +00:00
|
|
|
void entity_set_position(uint64_t ent_id, float x, float y);
|
2022-08-01 09:19:52 +00:00
|
|
|
|
2022-08-13 06:43:15 +00:00
|
|
|
|
2022-08-01 09:19:52 +00:00
|
|
|
// NOTE(zaklaus): action-based entity stream throttling
|
|
|
|
void entity_wake(uint64_t ent_id);
|
|
|
|
void entity_update_action_timers();
|
|
|
|
bool entity_can_stream(uint64_t ent_id);
|
2022-08-09 14:46:23 +00:00
|
|
|
|