fix: player entity body is active before player flight state applied

This commit is contained in:
MihailRis 2026-01-09 02:59:38 +03:00
parent 3282f5f8ae
commit 5785060ffb

View file

@ -58,7 +58,15 @@ local function process_player_inputs(pid, rot, delta)
end
end
local prepared = false
body:set_enabled(false)
function on_physics_update(delta)
if not prepared then
prepared = true
body:set_enabled(true)
end
local pid = entity:get_player()
if pid == -1 then
return