mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 12:02:36 +02:00
Now you can zoom out to your heart's content
This commit is contained in:
@@ -60,8 +60,6 @@ namespace Glest {
|
|||||||
|
|
||||||
// ===================== PUBLIC ========================
|
// ===================== PUBLIC ========================
|
||||||
|
|
||||||
const float PHOTO_MODE_MAXHEIGHT = 500.0;
|
|
||||||
|
|
||||||
const int CREATE_NEW_TEAM = -100;
|
const int CREATE_NEW_TEAM = -100;
|
||||||
const int CANCEL_SWITCH_TEAM = -1;
|
const int CANCEL_SWITCH_TEAM = -1;
|
||||||
|
|
||||||
@@ -6302,7 +6300,7 @@ namespace Glest {
|
|||||||
this->gameSettings.isNetworkGame() == false) {
|
this->gameSettings.isNetworkGame() == false) {
|
||||||
gameCamera.setMaxHeight(PHOTO_MODE_MAXHEIGHT);
|
gameCamera.setMaxHeight(PHOTO_MODE_MAXHEIGHT);
|
||||||
} else if (photoModeEnabled == false) {
|
} else if (photoModeEnabled == false) {
|
||||||
gameCamera.setMaxHeight(-1);
|
gameCamera.setMaxHeight(/*-1*/PHOTO_MODE_MAXHEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -94,7 +94,7 @@ namespace
|
|||||||
shakeOffset = Vec2f(0.f);
|
shakeOffset = Vec2f(0.f);
|
||||||
|
|
||||||
//maxRenderDistance = Config::getInstance().getFloat("RenderDistanceMax","64");
|
//maxRenderDistance = Config::getInstance().getFloat("RenderDistanceMax","64");
|
||||||
maxHeight = Config::getInstance().getFloat("CameraMaxDistance", "20");
|
setMaxHeight(-1);
|
||||||
minHeight = Config::getInstance().getFloat("CameraMinDistance", "7");
|
minHeight = Config::getInstance().getFloat("CameraMinDistance", "7");
|
||||||
//maxCameraDist = maxHeight;
|
//maxCameraDist = maxHeight;
|
||||||
//minCameraDist = minHeight;
|
//minCameraDist = minHeight;
|
||||||
@@ -126,8 +126,9 @@ namespace
|
|||||||
void
|
void
|
||||||
GameCamera::setMaxHeight(float value) {
|
GameCamera::setMaxHeight(float value) {
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
maxHeight =
|
maxHeight = Config::getInstance().getFloat("CameraMaxDistance", "0");
|
||||||
Config::getInstance().getFloat("CameraMaxDistance", "20");
|
if (maxHeight == 0.0f)
|
||||||
|
maxHeight = PHOTO_MODE_MAXHEIGHT;
|
||||||
} else {
|
} else {
|
||||||
maxHeight = value;
|
maxHeight = value;
|
||||||
}
|
}
|
||||||
@@ -136,9 +137,9 @@ namespace
|
|||||||
void
|
void
|
||||||
GameCamera::setCalculatedDefault(float calculatedDefault) {
|
GameCamera::setCalculatedDefault(float calculatedDefault) {
|
||||||
this->calculatedDefault = calculatedDefault;
|
this->calculatedDefault = calculatedDefault;
|
||||||
if (maxHeight > 0 && maxHeight < calculatedDefault) {
|
//if (maxHeight > 0 && maxHeight < calculatedDefault) {
|
||||||
setMaxHeight(calculatedDefault);
|
setMaxHeight(PHOTO_MODE_MAXHEIGHT);
|
||||||
}
|
//}
|
||||||
resetPosition();
|
resetPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,6 +39,8 @@ namespace Glest {
|
|||||||
|
|
||||||
class Config;
|
class Config;
|
||||||
|
|
||||||
|
const float PHOTO_MODE_MAXHEIGHT = 200.0;
|
||||||
|
|
||||||
// =====================================================
|
// =====================================================
|
||||||
// class GameCamera
|
// class GameCamera
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user