Nothing entered.
[http://sourceforge.net/p/ufoai/patches/429 Item 429] imported from sourceforge.net tracker on 2013-01-28 20:39:33
As I reported in a bug earlier, the 3-D geoscape could not zoom out, but would rather continue to zoom in when the zoom-out button was pressed. At first I thought the bug was in MAP_Zoom_f, but it was instead in the MAP3D_SmoothRotate function. Basically the changes are minor, involving the removal of a multiplication by 1 (the same variable was both multiplying and dividing a result), and moving an f-abs call from line 1177 to line 1176. (If diff_zoom were negative, the argument of the sin function would also be negative, leading to an overall positive rotation speed. This is bad, as it means you have no way of decrementing ccs.zoom (meaning that you can't zoom out!). The file below fixes that.
===== Comments Ported from Sourceforge =====
====== yoshi121212 (2009-07-28 17:03:48) ======
The better version of cp_map.c
====== tlh2000 (2009-07-30 13:52:31) ======
please upload patches, not full files.
====== tlh2000 (2009-07-30 13:54:13) ======
thanks for the patch - we will check it asap
====== yoshi121212 (2009-07-30 19:31:46) ======
The only problem is that part of the code is no longer used. Something else changed in the meantime to make the transition choppy...
====== tlh2000 (2009-07-31 16:15:12) ======
if you find the time, please remove those parts from the code that are no longer needed.
====== bayo-fr (2009-08-01 13:37:37) ======
yes, now the code is anyway (mouse, key, button...) caught by the "map" node.
You can take a look at /client/menu/node/m_node_map.c MN_MapNodeZoom
I dont really understand your change, but no more the old code, then i dont think i will fix something soon. But some people ask to have a smooth transition, then there is something to do.
====== yoshi121212 (2009-08-02 18:53:03) ======
A diff file showing how to make the geoscape zoom smoothly
====== yoshi121212 (2009-08-02 18:55:18) ======
Well I happen to be one of the people who like smooth transitions, so in the new .diff below I've incorporated the changes so that it does transition smoothly from one zoom to the next.
====== bayo-fr (2009-08-02 19:01:46) ======
Arg... i just commit something too :/
i will take a look at your diff
====== bayo-fr (2009-08-02 19:19:18) ======
Well, i think it is better when its done now. With your fix mousewheel don't have a good reactivity and then it is not very easy to use. IMO map node should catch that, but we should first clean up the code.
Then I revert the catching by the map node, and the code look like your last patch.
====== yoshi121212 (2009-08-02 21:03:23) ======
Meh. The mousewheel had always been messed up, although I had always thought that my mouse was registering the mousewheel turn as a click, leading to all sorts of weirdness.
====== bayo-fr (2009-08-04 21:04:30) ======
*first patch half-accepted in r25539
*second patch not accepted, mouse behaviour is hard to use