projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
878e9f7
)
Fix issue #2279. ok @zeno-
author
Loic Blot
<loic.blot@unix-experience.fr>
Wed, 11 Feb 2015 08:57:35 +0000
(09:57 +0100)
committer
Craig Robbins
<kde.psych@gmail.com>
Sat, 14 Feb 2015 11:02:19 +0000
(21:02 +1000)
src/game.cpp
patch
|
blob
|
history
diff --git
a/src/game.cpp
b/src/game.cpp
index ba28aa7897935ee949f67ee560801708f1b88461..a1e2b807a28ce86aecfa1956d0f727491f7864ee 100644
(file)
--- a/
src/game.cpp
+++ b/
src/game.cpp
@@
-3218,10
+3218,13
@@
void Game::updateCamera(VolatileRunFlags *flags, u32 busy_time,
v3s16 old_camera_offset = camera->getOffset();
if (input->wasKeyDown(keycache.key[KeyCache::KEYMAP_ID_CAMERA_MODE])) {
- camera->toggleCameraMode();
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);
}