mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
update entity.spawn(...): now returns an Entity instead of id
This commit is contained in:
parent
fc3994446a
commit
d22948f45c
4 changed files with 8 additions and 6 deletions
|
|
@ -31,8 +31,8 @@ static int l_spawn(lua::State* L) {
|
|||
auto defname = lua::tostring(L, 1);
|
||||
auto& def = content->entities.require(defname);
|
||||
auto pos = lua::tovec3(L, 2);
|
||||
auto id = level->entities->spawn(def, pos);
|
||||
return lua::pushinteger(L, id);
|
||||
level->entities->spawn(def, pos);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_despawn(lua::State* L) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue