Merge branch 'dev' into update-platform-new-engine-instance

This commit is contained in:
MihailRis 2026-04-06 00:54:21 +03:00
commit 7070993051
19 changed files with 76 additions and 46 deletions

View file

@ -108,13 +108,13 @@ static int l_set_skeleton(lua::State* L) {
}
if (auto entity = get_entity(L, 1)) {
std::string skeletonName = lua::require_string(L, 2);
auto rigConfig = assets->get<rigging::SkeletonConfig>(skeletonName);
auto rigConfig = assets->getShared<rigging::SkeletonConfig>(skeletonName);
if (rigConfig == nullptr) {
throw std::runtime_error(
"skeleton not found '" + skeletonName + "'"
);
}
entity->setRig(rigConfig);
entity->setRig(std::move(rigConfig));
}
return 0;
}

View file

@ -294,14 +294,14 @@ static int l_set_camera(lua::State* L) {
static int l_get_name(lua::State* L) {
if (auto player = get_player(L, 1)) {
return lua::pushstring(L, player->getName());
return lua::pushwstring(L, player->getName());
}
return 0;
}
static int l_set_name(lua::State* L) {
if (auto player = get_player(L, 1)) {
player->setName(lua::require_string(L, 2));
player->setName(lua::require_wstring(L, 2));
}
return 0;
}
@ -313,7 +313,7 @@ static int l_create(lua::State* L) {
}
auto& level = require_level();
auto player = level.players->create(playerId);
player->setName(lua::require_string(L, 1));
player->setName(lua::require_wstring(L, 1));
return lua::pushinteger(L, player->getId());
}

View file

@ -402,7 +402,7 @@ namespace lua {
pop(L);
pop(L);
return glm::quat(x, y, z, w);
return glm::quat(w, x, y, z);
}
inline glm::vec3 tovec3_stack(lua::State* L, int idx) {