Now you can zoom out to your heart's content

This commit is contained in:
mathusummut 2018-09-04 16:09:11 +02:00
parent 87912ff56c
commit b03ad32cdd
3 changed files with 10 additions and 9 deletions

View File

@ -60,8 +60,6 @@ namespace Glest {
// ===================== PUBLIC ========================
const float PHOTO_MODE_MAXHEIGHT = 500.0;
const int CREATE_NEW_TEAM = -100;
const int CANCEL_SWITCH_TEAM = -1;
@ -6302,7 +6300,7 @@ namespace Glest {
this->gameSettings.isNetworkGame() == false) {
gameCamera.setMaxHeight(PHOTO_MODE_MAXHEIGHT);
} else if (photoModeEnabled == false) {
gameCamera.setMaxHeight(-1);
gameCamera.setMaxHeight(/*-1*/PHOTO_MODE_MAXHEIGHT);
}
}

View File

@ -94,7 +94,7 @@ namespace
shakeOffset = Vec2f(0.f);
//maxRenderDistance = Config::getInstance().getFloat("RenderDistanceMax","64");
maxHeight = Config::getInstance().getFloat("CameraMaxDistance", "20");
setMaxHeight(-1);
minHeight = Config::getInstance().getFloat("CameraMinDistance", "7");
//maxCameraDist = maxHeight;
//minCameraDist = minHeight;
@ -126,8 +126,9 @@ namespace
void
GameCamera::setMaxHeight(float value) {
if (value < 0) {
maxHeight =
Config::getInstance().getFloat("CameraMaxDistance", "20");
maxHeight = Config::getInstance().getFloat("CameraMaxDistance", "0");
if (maxHeight == 0.0f)
maxHeight = PHOTO_MODE_MAXHEIGHT;
} else {
maxHeight = value;
}
@ -136,9 +137,9 @@ namespace
void
GameCamera::setCalculatedDefault(float calculatedDefault) {
this->calculatedDefault = calculatedDefault;
if (maxHeight > 0 && maxHeight < calculatedDefault) {
setMaxHeight(calculatedDefault);
}
//if (maxHeight > 0 && maxHeight < calculatedDefault) {
setMaxHeight(PHOTO_MODE_MAXHEIGHT);
//}
resetPosition();
}

View File

@ -39,6 +39,8 @@ namespace Glest {
class Config;
const float PHOTO_MODE_MAXHEIGHT = 200.0;
// =====================================================
// class GameCamera
//