Skip to content

Commit

Permalink
Merge pull request #139 from FugitiveTheGame/task130
Browse files Browse the repository at this point in the history
#130 Hiders are now visible when in safe zone
  • Loading branch information
Wavesonics authored May 2, 2020
2 parents 20cb0b9 + 505e36d commit 2608b0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common/game/mode/fugitive/FugitiveGame.gd
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func process_hiders():
var hiders = get_tree().get_nodes_in_group(Hider.GROUP)
var lights = get_tree().get_nodes_in_group(Groups.LIGHTS)
var cars = get_tree().get_nodes_in_group(Groups.CARS)
var winZones := map.get_win_zones()

var curPlayerType = GameData.get_current_player_type()

Expand Down Expand Up @@ -252,7 +253,11 @@ func process_hiders():

for car in cars:
car.process_hider(hider)


for winZone in winZones:
# Now, check if this hider is in the win zone.
if winZone.overlaps_body(hider.playerBody):
hider.set_current_visibility(1.0)

func check_win_conditions():
# Only the server will end the game
Expand Down

0 comments on commit 2608b0c

Please sign in to comment.