mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-07-04 16:46:45 +02:00
entt update to v3.11.1
This commit is contained in:
@ -85,8 +85,8 @@ private:
|
||||
|
||||
bool entityHasComponent(Registry& registry, EntityType& entity, ComponentTypeID type_id)
|
||||
{
|
||||
const auto storage_it = registry.storage(type_id);
|
||||
return storage_it != registry.storage().end() && storage_it->second.contains(entity);
|
||||
const auto* storage_ptr = registry.storage(type_id);
|
||||
return storage_ptr != nullptr && storage_ptr->contains(entity);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -243,11 +243,11 @@ public:
|
||||
}
|
||||
});
|
||||
} else {
|
||||
entt::basic_runtime_view<entt::basic_sparse_set<EntityType>> view{};
|
||||
entt::runtime_view view{};
|
||||
for (const auto type : comp_list) {
|
||||
auto storage_it = registry.storage(type);
|
||||
if (storage_it != registry.storage().end()) {
|
||||
view.iterate(registry.storage(type)->second);
|
||||
auto* storage_ptr = registry.storage(type);
|
||||
if (storage_ptr != nullptr) {
|
||||
view.iterate(*storage_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ void Camera3D(MM::Scene& scene) {
|
||||
ImGui::TextUnformatted("NO CAMERA!");
|
||||
return;
|
||||
}
|
||||
auto& camera = scene.ctx().at<MM::OpenGL::Camera3D>();
|
||||
auto& camera = scene.ctx().get<MM::OpenGL::Camera3D>();
|
||||
|
||||
static bool follow_entity = false;
|
||||
static MM::Entity tracking = entt::null;
|
||||
|
@ -157,7 +157,7 @@ namespace MM::Services {
|
||||
if (_show_time_delta_ctx) {
|
||||
if (ImGui::Begin("Scene TimeDelta Context", &_show_time_delta_ctx)) {
|
||||
if (scene.ctx().contains<MM::Components::TimeDelta>()) {
|
||||
auto& td = scene.ctx().at<MM::Components::TimeDelta>();
|
||||
auto& td = scene.ctx().get<MM::Components::TimeDelta>();
|
||||
ImGui::Value("tickDelta", td.tickDelta);
|
||||
ImGui::SliderFloat("deltaFactor", &td.deltaFactor, 0.f, 10.f, "%.5f", ImGuiSliderFlags_Logarithmic);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user