Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Zoom: Add 'disabled by game or mod' message
  • Loading branch information
paramat committed Dec 14, 2017
1 parent 8a99c8c commit f1d2bc0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/game.cpp
Expand Up @@ -1280,6 +1280,7 @@ class Game {
void increaseViewRange();
void decreaseViewRange();
void toggleFullViewRange();
void checkZoomEnabled();

void updateCameraDirection(CameraOrientation *cam, float dtime);
void updateCameraOrientation(CameraOrientation *cam, float dtime);
Expand Down Expand Up @@ -2579,6 +2580,8 @@ void Game::processKeyInput()
decreaseViewRange();
} else if (wasKeyDown(KeyType::RANGESELECT)) {
toggleFullViewRange();
} else if (wasKeyDown(KeyType::ZOOM)) {
checkZoomEnabled();
} else if (wasKeyDown(KeyType::QUICKTUNE_NEXT)) {
quicktune->next();
} else if (wasKeyDown(KeyType::QUICKTUNE_PREV)) {
Expand Down Expand Up @@ -3018,6 +3021,14 @@ void Game::toggleFullViewRange()
}


void Game::checkZoomEnabled()
{
LocalPlayer *player = client->getEnv().getLocalPlayer();
if (player->getZoomFOV() < 0.001f)
showStatusTextSimple("Zoom currently disabled by game or mod");
}


void Game::updateCameraDirection(CameraOrientation *cam, float dtime)
{
if ((device->isWindowActive() && device->isWindowFocused()
Expand Down

0 comments on commit f1d2bc0

Please sign in to comment.