[Bug] Air mines + Crazy wind → Turn may never end (FIXED)

2 replies [Last post]
Wuzzy
Wuzzy's picture
User offline. Last seen 3 days 17 hours ago. Offline
Joined: 2012-06-20
Posts: 1301
In Hedgewars 0.9.22, the game can get stuck when crazy wind and air mines are enabled. If you have crazy wind (Wind influences almost everything) enabled, the air mines will be affected by the wind as well. This is problematic for open maps. If just one air mine manages to excape the island, it will be blown away all the way out of the visible part of the land/Sea and will fly forever away. The problem is, the mine is never destroyed, yet it still moves and the turn never ends. Another funny thing: As soon as the air mine is outside of the visible area, it routinely makes an collision sound. Similar problems happen with the other world edge types (ocean, wrap-around, bouncy walls). Proposed partial bugfix: Maybe air mines should just self-destruct when they got too far away from the main land and they aren't following anything. However, this bugfix won't work for the “bouncy walls” and “wrap-around” world edge types since the air mines never escape the visible area.
Hi, I am a Hedgewars developer. Smile
nemo
nemo's picture
User offline. Last seen 14 hours 13 min ago. Offline
Joined: 2009-01-28
Posts: 1861
Probably should just make air mines be uninfluenced by wind to ensure they stop eventually. Or else include some timer like the gravity lua has. The collision sound is because collision is triggered when a shot flies far enough out. But that doesn't work for things that don't explode on collision. Should probably change that to flagging for destruction.
-- Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
nemo
nemo's picture
User offline. Last seen 14 hours 13 min ago. Offline
Joined: 2009-01-28
Posts: 1861
http://hg.hedgewars.org/hedgewars/rev/c93f204a5a00
-- Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Copyright © 2004-2023 Hedgewars Project. All rights reserved. [ contact ]