mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
fix: player entity body is active before player flight state applied
This commit is contained in:
parent
3282f5f8ae
commit
5785060ffb
1 changed files with 8 additions and 0 deletions
|
|
@ -58,7 +58,15 @@ local function process_player_inputs(pid, rot, delta)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local prepared = false
|
||||||
|
body:set_enabled(false)
|
||||||
|
|
||||||
function on_physics_update(delta)
|
function on_physics_update(delta)
|
||||||
|
if not prepared then
|
||||||
|
prepared = true
|
||||||
|
body:set_enabled(true)
|
||||||
|
end
|
||||||
|
|
||||||
local pid = entity:get_player()
|
local pid = entity:get_player()
|
||||||
if pid == -1 then
|
if pid == -1 then
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue