Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Wavesonics committed Nov 6, 2019
1 parent 29e53d9 commit 8a6b552
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions actors/car/Car.gd
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,15 @@ remotesync func stop_horn():
hornAudio.playing = false

func _on_EnterArea_body_entered(body):
if not is_network_master():
if not get_tree().is_network_server():
return

# If the car is being driven by a Hider, and hits a Cop
if self.driver != null and self.driver._get_player_node_type() == Network.PlayerType.Hider and body is Seeker:
call_deferred('do_it')
# lock it, and kick the hider out
rpc('lock_the_car')
self.driver.force_car_exit()

func do_it():
velocity = Vector2.ZERO
rpc('lock_the_car')
self.driver.force_car_exit()

0 comments on commit 8a6b552

Please sign in to comment.