From b56ca9ab4751dbbdb31e624249a43e75f078bb97 Mon Sep 17 00:00:00 2001 From: Zughy <4279489-marco_a@users.noreply.gitlab.com> Date: Sat, 22 Jan 2022 13:19:01 +0100 Subject: [PATCH] Bugfix: avoid spectators falling down when entering (regression from the entity detach commit) --- src/api/in_game.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/in_game.lua b/src/api/in_game.lua index 6213da3..26f6408 100755 --- a/src/api/in_game.lua +++ b/src/api/in_game.lua @@ -699,9 +699,6 @@ function operations_before_entering_arena(mod_ref, mod, arena, arena_ID, p_name) player:set_nametag_attributes({color = {a = 0, r = 255, g = 255, b = 255}}) end - -- li sgancio da eventuali entità - player:set_detach() - -- disattivo eventualmente la minimappa if not mod_ref.show_minimap then player:hud_set_flags({minimap = false}) @@ -789,6 +786,10 @@ function operations_before_playing_arena(mod_ref, arena, p_name) player:set_physics_override(mod_ref.in_game_physics) end + -- li sgancio da eventuali entità (non lo faccio agli spettatori perché sono già + -- agganciati al giocatore, sennò cadono nel vuoto) + player:set_detach() + -- assegno eventuali proprietà giocatori for k, v in pairs(mod_ref.player_properties) do if type(v) == "table" then