fixed player leaving bounds check
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
extends Area3D
|
||||
|
||||
var player_exit = false
|
||||
|
||||
func _ready() -> void:
|
||||
SignalBus.player_exiting_tree.connect(player_exit_check)
|
||||
|
||||
func player_exit_check():
|
||||
player_exit = true
|
||||
|
||||
func _on_body_exited(body: Node3D) -> void:
|
||||
if !player_exit:
|
||||
get_tree().current_scene.die()
|
||||
print("PLAYER OUT OF BOUNDS")
|
||||
get_tree().current_scene.die()
|
||||
|
||||
@@ -528,14 +528,14 @@ func punch():
|
||||
|
||||
func crouch(delta):
|
||||
if crouched:
|
||||
crouching_collision.disabled = false
|
||||
#crouching_collision.disabled = false
|
||||
standing_collision.disabled = true
|
||||
if head.position != CROUCHED_POS:
|
||||
head.position = lerp(head.position, CROUCHED_POS, delta * 8)
|
||||
speed = CROUCH_SPEED
|
||||
else:
|
||||
standing_collision.disabled = false
|
||||
crouching_collision.disabled = true
|
||||
#crouching_collision.disabled = true
|
||||
if head.position != STAND_POS:
|
||||
head.position = lerp(head.position, STAND_POS, delta * 8)
|
||||
speed = level_control.gamemode.walk_speed
|
||||
|
||||
Reference in New Issue
Block a user