Heightmap editor + saving

This commit is contained in:
2025-12-07 01:31:25 +03:00
parent e0db570581
commit 44896ed0d9
13 changed files with 1901 additions and 172 deletions

View File

@@ -145,7 +145,6 @@ PhysicsModule::PhysicsModule(flecs::world &ecs)
PhysicsShape &s = e.ensure<PhysicsShape>();
s.shape = shape;
e.modified<PhysicsShape>();
delete hfd.samples;
e.remove<PhysicsHeightfieldData>();
});
#if 1
@@ -341,6 +340,16 @@ PhysicsModule::PhysicsModule(flecs::world &ecs)
.each([this](const EngineData &eng) {
ECS::get().set<WaterBody>({});
});
#if 0
ecs.system<const EngineData>("DebugData")
.kind(PhysicsPostUpdate)
.each([this](const EngineData &eng) {
std::cout << "TerrainReady: "
<< ECS::get().has<TerrainReady>();
std::cout << " WaterReady: "
<< ECS::get().has<WaterReady>() << std::endl;
});
#endif
ecs.system<const EngineData, WaterBody>("update_water")
.kind(PhysicsPostUpdate)
.with<TerrainReady>()