Skulls no longer pause in mid fall when you leave a storm but instead reset. No more surprise splats.
This commit is contained in:
		| @@ -30,7 +30,7 @@ class SkullStorm(Object): | |||||||
|         """Update all active skulls and potentially spawn new ones.""" |         """Update all active skulls and potentially spawn new ones.""" | ||||||
|         if not self.isActive: |         if not self.isActive: | ||||||
|             return |             return | ||||||
|          |      | ||||||
|         # Check if player has entered range |         # Check if player has entered range | ||||||
|         inRange = self.xRange[0] <= player.xPos <= self.xRange[1] |         inRange = self.xRange[0] <= player.xPos <= self.xRange[1] | ||||||
|         if inRange and not self.playerInRange: |         if inRange and not self.playerInRange: | ||||||
| @@ -41,10 +41,16 @@ class SkullStorm(Object): | |||||||
|             # Player just left range |             # Player just left range | ||||||
|             self.playerInRange = False |             self.playerInRange = False | ||||||
|             speak("Skull storm ended.") |             speak("Skull storm ended.") | ||||||
|              |          | ||||||
|  |             # Clear any active skulls when player leaves the range | ||||||
|  |             for skull in self.activeSkulls[:]: | ||||||
|  |                 if skull['channel']: | ||||||
|  |                     obj_stop(skull['channel']) | ||||||
|  |             self.activeSkulls = []  # Reset the list of active skulls | ||||||
|  |          | ||||||
|         if not inRange: |         if not inRange: | ||||||
|             return |             return | ||||||
|              |      | ||||||
|         # Update existing skulls |         # Update existing skulls | ||||||
|         for skull in self.activeSkulls[:]:  # Copy list to allow removal |         for skull in self.activeSkulls[:]:  # Copy list to allow removal | ||||||
|             if currentTime >= skull['land_time']: |             if currentTime >= skull['land_time']: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user