add ENTITY_NONE, ENTITY_AUTO reserved entity id & update player.set_entity(...)
This commit is contained in:
@@ -229,7 +229,9 @@ static int l_set_entity(lua::State* L) {
|
||||
if (player == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
if (auto entity = get_entity(L, 2)) {
|
||||
if (lua::isnumber(L, 2)) {
|
||||
player->setEntity(lua::tointeger(L, 2));
|
||||
} else if (auto entity = get_entity(L, 2)) {
|
||||
player->setEntity(entity->getUID());
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user