mirror of
https://github.com/glest/glest-source.git
synced 2025-02-23 03:02:34 +01:00
Now you can zoom out to your heart's content
This commit is contained in:
parent
87912ff56c
commit
b03ad32cdd
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,8 @@ namespace Glest {
|
||||
|
||||
class Config;
|
||||
|
||||
const float PHOTO_MODE_MAXHEIGHT = 200.0;
|
||||
|
||||
// =====================================================
|
||||
// class GameCamera
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user