forked from Mirrorlandia_minetest/minetest
Fix issue #2279. ok @zeno-
This commit is contained in:
parent
10b208f5c1
commit
8252e1ecd0
@ -3218,10 +3218,13 @@ void Game::updateCamera(VolatileRunFlags *flags, u32 busy_time,
|
|||||||
v3s16 old_camera_offset = camera->getOffset();
|
v3s16 old_camera_offset = camera->getOffset();
|
||||||
|
|
||||||
if (input->wasKeyDown(keycache.key[KeyCache::KEYMAP_ID_CAMERA_MODE])) {
|
if (input->wasKeyDown(keycache.key[KeyCache::KEYMAP_ID_CAMERA_MODE])) {
|
||||||
camera->toggleCameraMode();
|
|
||||||
GenericCAO *playercao = player->getCAO();
|
GenericCAO *playercao = player->getCAO();
|
||||||
|
|
||||||
assert(playercao != NULL);
|
// If playercao not loaded, don't change camera
|
||||||
|
if (playercao == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
camera->toggleCameraMode();
|
||||||
|
|
||||||
playercao->setVisible(camera->getCameraMode() > CAMERA_MODE_FIRST);
|
playercao->setVisible(camera->getCameraMode() > CAMERA_MODE_FIRST);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user