Another attempt to fix wind
fixes #2592
There will be 3 types of wind:
- legacy - original behaviour
- wind - assumes that the object is in air
- current - assumes that the object is in water
Currently, I'm trying to implement the "wind" wind ^.^
/supertux/src/object/wind.cpp:139:23: error: implicit conversion loses floating-point precision: 'double' to 'const float' [-Werror,-Wimplicit-float-conversion]
const float coef = 1/28.8;
I made a demo version of the improved wind. Please, test if:
- The old wind can be fully replaced by the new wind. If not, can a speed multiplier help?
- The new wind resolves #2592 at least partially.
To full fix that bug, I would need to do a major overhaul of the player physics, which would be a breaking change. Currently, the player controls may override the wind force, so Tux can glitch through pretty strong wind.
Water currents are going to be added later.
If it turns out that this new wind is too much different from the original wind, then they may exist side-by-side, if the new wind is still a good improvement.
If it turns out that the new wind isn't that much better, so it's not worth implementing without making a physics overhaul as well, then this should be postponed to 0.8.0+. The water bouble variant can be still implemented in 0.7.0, but without any change to the wind physics.