summaryrefslogtreecommitdiffhomepage
path: root/editor/vobj-editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/vobj-editor.cpp')
-rw-r--r--editor/vobj-editor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/vobj-editor.cpp b/editor/vobj-editor.cpp
index 533f797a..8687e107 100644
--- a/editor/vobj-editor.cpp
+++ b/editor/vobj-editor.cpp
@@ -29,12 +29,13 @@ struct light_factory final : vobj_factory
constexpr auto NAME = "light"_s;
static const vobj_info& ret = loader.vobj(NAME);
fm_debug_assert(ret.name == NAME);
+ fm_debug_assert(ret.atlas != nullptr);
return ret;
}
std::shared_ptr<entity> make(world& w, object_id id, global_coords pos) const override
{
- auto ret = w.make_entity<light>(id, pos, light_proto{});
+ auto ret = w.make_entity<light>(id, {pos.chunk(), pos.local(), 0}, light_proto{});
return ret;
}
};
@@ -60,7 +61,7 @@ const vobj_factory* vobj_editor::get_factory(entity_type type)
if (!ptr)
{
fm_warn_once("invalid vobj type '%zu'", idx);
- return {};
+ return nullptr;
}
else
return ptr;