Fix tracker timing

isolation_bkp/dynres
Dominik Madarász 2021-11-04 16:00:39 +01:00
parent 682b8f5d8f
commit 970334aa7a
2 changed files with 9 additions and 9 deletions

View File

@ -255,7 +255,7 @@ int32_t world_destroy(void) {
#define WORLD_LIBRG_BUFSIZ 2000000
static void world_tracker_update(uint8_t ticker, uint32_t freq, uint8_t radius) {
static void world_tracker_update(uint8_t ticker, float freq, uint8_t radius) {
if (world.tracker_update[ticker] > (float)zpl_time_rel()) return;
world.tracker_update[ticker] = (float)zpl_time_rel() + freq;
@ -301,9 +301,9 @@ int32_t world_update() {
ecs_progress(world.ecs, 0.0f);
}
uint32_t fast_ms = WORLD_TRACKER_UPDATE_FAST_MS;
uint32_t normal_ms = WORLD_TRACKER_UPDATE_NORMAL_MS;
uint32_t slow_ms = WORLD_TRACKER_UPDATE_SLOW_MS;
float fast_ms = WORLD_TRACKER_UPDATE_FAST_MS;
float normal_ms = WORLD_TRACKER_UPDATE_NORMAL_MS;
float slow_ms = WORLD_TRACKER_UPDATE_SLOW_MS;
if (game_get_kind() != GAMEKIND_SINGLE) {
fast_ms = WORLD_TRACKER_UPDATE_MP_FAST_MS;

View File

@ -17,11 +17,11 @@
#define WORLD_LAYERING 0
#define WORLD_TRACKER_LAYERS 3
#define WORLD_TRACKER_UPDATE_FAST_MS 0
#define WORLD_TRACKER_UPDATE_NORMAL_MS 50
#define WORLD_TRACKER_UPDATE_SLOW_MS 100
#define WORLD_TRACKER_UPDATE_MP_FAST_MS 50
#define WORLD_TRACKER_UPDATE_MP_NORMAL_MS 150
#define WORLD_TRACKER_UPDATE_MP_SLOW_MS 300
#define WORLD_TRACKER_UPDATE_NORMAL_MS 0.05f
#define WORLD_TRACKER_UPDATE_SLOW_MS 0.1f
#define WORLD_TRACKER_UPDATE_MP_FAST_MS 0.05f
#define WORLD_TRACKER_UPDATE_MP_NORMAL_MS 0.15f
#define WORLD_TRACKER_UPDATE_MP_SLOW_MS 0.3f
#define WORLD_BLOCK_SIZE 64
#define WORLD_PKT_READER(name) int32_t name(void* data, uint32_t datalen, void *udata)