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

2 replies [Last post]
Wuzzy
Wuzzy's picture
User offline. Last seen 26 weeks 6 days ago. Offline
Joined: 2012-06-20
Posts: 1304

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 21 weeks 1 day 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 21 weeks 1 day ago. Offline
Joined: 2009-01-28
Posts: 1861

http://hg.hedgewars.org/hedgewars/rev/c93f204a5a00

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]