mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
fix: player name 3d text not updating by Decorator
This commit is contained in:
parent
a9d185256a
commit
33db2633a2
5 changed files with 23 additions and 20 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue