Skip to content

Commit

Permalink
fix for endround sound
Browse files Browse the repository at this point in the history
  • Loading branch information
derkalle4 committed Aug 7, 2016
1 parent 0e3259c commit 4c63a8d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions conquest/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def __init__(self, db, rank, callbacks, sounds):
self.callbacks = callbacks
self.sounds = sounds
self.last_ontick = 0
self.is_endround = False
# register callbacks
self.callbacks.register('player_is_spawned', 'flags_info_menu', self.info_menu)

Expand Down Expand Up @@ -280,6 +281,7 @@ def reset_flags(self):

def reset_tickets(self):
self.tickets = {'t': self.num_tickets.get_int(), 'ct': self.num_tickets.get_int(), 'time': 0}
self.is_endround = False

def remove_flags(self):
for item in self.flags:
Expand Down Expand Up @@ -528,7 +530,9 @@ def endround(self, condition):
15 World "Game_Commencing"
16 World "UNKNOWN"
"""
info_map_parameters = Entity.find_or_create("info_map_parameters")
info_map_parameters.call_input('FireWinCondition', condition)
# play sound
self.sounds.play_random('endround')
if self.is_endround == False:
self.is_endround = True
info_map_parameters = Entity.find_or_create("info_map_parameters")
info_map_parameters.call_input('FireWinCondition', condition)
# play sound
self.sounds.play_random('endround')

0 comments on commit 4c63a8d

Please sign in to comment.