This commit is contained in:
MihailRis 2026-10-15 23:20:47 +03:00
parent c64659e06d
commit 08d9c843f8

View file

@ -70,10 +70,7 @@ static int l_get_def(lua::State* L) {
static int l_spawn(lua::State* L) {
auto level = controller->getLevel();
auto defname = lua::tostring(L, 1);
if (defname == nullptr) {
throw std::runtime_error("string expected, got nil");
}
auto defname = lua::require_string(L, 1);
auto& def = content->entities.require(defname);
auto pos = lua::tovec3(L, 2);
dv::value args = nullptr;