mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
This commit is contained in:
parent
3c48671076
commit
526a2f7b8c
79 changed files with 242 additions and 172 deletions
|
@ -2693,11 +2693,11 @@ int ObjectRef::l_respawn(lua_State *L)
|
|||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
ObjectRef *ref = checkObject<ObjectRef>(L, 1);
|
||||
RemotePlayer *player = getplayer(ref);
|
||||
if (player == nullptr)
|
||||
auto *psao = getplayersao(ref);
|
||||
if (psao == nullptr)
|
||||
return 0;
|
||||
|
||||
getServer(L)->RespawnPlayer(player->getPeerId());
|
||||
psao->respawn();
|
||||
lua_pushboolean(L, true);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue