From 88e59e72c48e2eb2463bef682e8dc14ba7a436aa Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 13 Nov 2022 14:35:47 +0900 Subject: [PATCH] [scene] Make nullentity's id nullent While an entity with a null registry is null regardless of the id, setting the id to nullent is useful for other purposes. Fixes the disappearing brush models in the vulkan renderer (it uses entity id + 1 for indexing), and prevents similar issues in the future. --- include/QF/scene/entity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/QF/scene/entity.h b/include/QF/scene/entity.h index 48bc8a36d..950c8b322 100644 --- a/include/QF/scene/entity.h +++ b/include/QF/scene/entity.h @@ -50,7 +50,7 @@ typedef struct entity_s { uint32_t id; } entity_t; -#define nullentity ((entity_t) {}) +#define nullentity ((entity_t) { .id = nullent }) typedef struct animation_s { int frame;