16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 14:39:18 +02:00

field of view setting, t3d loader fix

This commit is contained in:
tmj-fstate
2017-02-20 16:17:04 +01:00
parent 6c35276427
commit 1ea207b60f
4 changed files with 14 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ HWND Global::hWnd = NULL; // uchwyt okna
int Global::ScreenWidth = 1;
int Global::ScreenHeight = 1;
float Global::ZoomFactor = 1.0f;
float Global::FieldOfView = 45.0f;
int Global::iCameraLast = -1;
std::string Global::asRelease = "16.0.1172.482";
std::string Global::asVersion =
@@ -261,6 +262,14 @@ void Global::ConfigParse(cParser &Parser)
Parser.getTokens();
Parser >> Global::asHumanCtrlVehicle;
}
else if( token == "fieldofview" ) {
Parser.getTokens( 1, false );
Parser >> Global::FieldOfView;
// guard against incorrect values
Global::FieldOfView = std::min( 75.0f, Global::FieldOfView );
Global::FieldOfView = std::max( 15.0f, Global::FieldOfView );
}
else if (token == "width")
{