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."""
|
||||
if not self.isActive:
|
||||
return
|
||||
|
||||
|
||||
# Check if player has entered range
|
||||
inRange = self.xRange[0] <= player.xPos <= self.xRange[1]
|
||||
if inRange and not self.playerInRange:
|
||||
@@ -41,10 +41,16 @@ class SkullStorm(Object):
|
||||
# Player just left range
|
||||
self.playerInRange = False
|
||||
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:
|
||||
return
|
||||
|
||||
|
||||
# Update existing skulls
|
||||
for skull in self.activeSkulls[:]: # Copy list to allow removal
|
||||
if currentTime >= skull['land_time']:
|
||||
|
Reference in New Issue
Block a user