[Minimal] Issue solve.

This commit is contained in:
Alan Alexander Cerna 2021-11-06 01:59:39 +02:00
parent 6cca4b2ba2
commit b18873a12f
2 changed files with 5 additions and 0 deletions

Binary file not shown.

View File

@ -48,6 +48,7 @@ var velocityVDIR = Vector2(0,0)
var characterStates = {"onGround": false, "jumped": false, "faceDirection": true} var characterStates = {"onGround": false, "jumped": false, "faceDirection": true}
var reverseControls = false var reverseControls = false
var awaitingCollision = false
func _ready(): func _ready():
get_tree().connect("network_peer_connected", self, "_network_peer_connected") get_tree().connect("network_peer_connected", self, "_network_peer_connected")
@ -149,6 +150,10 @@ func _physics_process(delta) -> void:
reverseControls = false reverseControls = false
if VDIR["1"]["0"]["ray"]["collided"]: if VDIR["1"]["0"]["ray"]["collided"]:
rotationalHolder = rotation rotationalHolder = rotation
if awaitingCollision and velocityVDIR.y < 0:
velocityVDIR.y = 0
awaitingCollision = false
else: awaitingCollision = true
if user_input["boost"] and not characterStates["jumped"]: if user_input["boost"] and not characterStates["jumped"]:
maxMovementSpeed.x = move_toward(maxMovementSpeed.x, 350, accelerationSpeed) maxMovementSpeed.x = move_toward(maxMovementSpeed.x, 350, accelerationSpeed)
else: else: