ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
331 stars 89 forks source link

initial camera distance #130

Closed ryzom-pipeline closed 10 years ago

ryzom-pipeline commented 10 years ago

Original report by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


At lease for linux client, initial camera disance is reset to 0 after login.

CView class seems to be initiated before client cfg file is read, so the 'ClientCfg.CameraMaxDist' that CView relies on, is 0

this little patch will fix it.

--- a/code/ryzom/client/src/client_cfg.cpp
+++ b/code/ryzom/client/src/client_cfg.cpp
@@ -1726,6 +1726,7 @@
        }

        // Initialize the camera distance (after camera dist max)
+       View.setCameraDistanceMaxForPlayer();
        if (!ClientCfg.FPV)
        {
                View.cameraDistance(ClientCfg.CameraDistance);
ryzom-pipeline commented 10 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Ah !! This a bug we had for a long time :) Well done and thank you so much !

ryzom-pipeline commented 10 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Merged, thanks a lot :)