Added timeout ID check

This commit is contained in:
2025-06-24 10:16:13 +01:00
parent 647d230fe0
commit 2e59e718e6

View File

@ -119,7 +119,7 @@ class Game(gameUtils.Game):
self.timeout("FireDelay",randint(750,2000)/1000) self.timeout("FireDelay",randint(750,2000)/1000)
self.playSound(self.gunCyclinderStop) self.playSound(self.gunCyclinderStop)
elif event.type == gameUtils.Timeout: elif event.type == gameUtils.Timeout and event.timeoutID == 'FireDelay':
self.shockScale += self.fire() #check if the user gets shot self.shockScale += self.fire() #check if the user gets shot
self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds