소스 검색

Prevent liners from turning while not running

Fix bugs wthen turning during level transitions.

Prevent players from turning before round start, even if they have
reached their own spawn point already.
DricomDragon 5 년 전
부모
커밋
26d04068d6
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      Player.gd

+ 3 - 0
Player.gd

@@ -90,6 +90,9 @@ func generate_wall():
 	grid.set_cell(posix - dirx, posiy - diry, 1)
 
 func prepare_turn(left_or_right:int):
+	if !running:
+		return
+
 	var current_angle = (dire + dire_delta) * 90
 
 	dire_delta += left_or_right