Physics optional

This commit is contained in:
2025-07-12 17:26:23 +02:00
parent 9dd12a55bf
commit 602dd870df
5 changed files with 66 additions and 23 deletions

View File

@@ -78,18 +78,19 @@ Entity :: struct {
renderable: Renderable;
animator: Animator; @DontSerialize
// Physics
physx_handle: PhysX_Handle;
velocity: Vector3;
#if PHYSICS {
// Physics
physx_handle: PhysX_Handle;
velocity: Vector3;
// End physics
}
// End physics
#if NETWORKING {
remote_id: Entity_Id; @DontSerialize
client_id: Client_Id; @DontSerialize
is_proxy: bool; @DontSerialize
last_replication_time: float; @DontSerialize
}
#if NETWORKING {
remote_id: Entity_Id; @DontSerialize
client_id: Client_Id; @DontSerialize
is_proxy: bool; @DontSerialize
last_replication_time: float; @DontSerialize
}
_locator: Bucket_Locator; @DontSerialize
scene: *Scene; @DontSerialize

View File

@@ -40,4 +40,4 @@ find_all_mesh_entities :: () {
path := "../assets/models/level_design/";
visit_files(path, true, *mesh_entity_files, mesh_entity_visitor);
}
}

View File

@@ -22,7 +22,9 @@ Scene :: struct {
mode: Engine_Mode;
physx_scene: PhysX_Scene;
#if PHYSICS {
physx_scene: PhysX_Scene;
}
using custom_fields: _Custom_Scene_Fields;
}