mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
allow flying karl as notplayer, dont tether instantly if you/host was notplayer then revived
This commit is contained in:
parent
ed4ba25283
commit
7e1c264c3d
2 changed files with 8 additions and 2 deletions
|
@ -56,7 +56,9 @@ edit_component( entity_id, "VelocityComponent", function(comp,vars)
|
|||
local vx = 0
|
||||
local vy = 0
|
||||
local controls_comp = EntityGetFirstComponent(player, "ControlsComponent")
|
||||
local is_thrusting = controls_comp ~= nil and ComponentGetValue2( controls_comp, "mButtonDownFly")
|
||||
local is_dead = EntityHasTag(player, "ew_notplayer")
|
||||
local is_thrusting = (not is_dead and controls_comp ~= nil and ComponentGetValue2( controls_comp, "mButtonDownFly"))
|
||||
or (is_dead and (InputIsKeyJustDown(44) or InputIsJoystickButtonJustDown(0, 23)))
|
||||
if is_thrusting then
|
||||
vx = speed
|
||||
vx, vy = vec_rotate(vx, vy, dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue