aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-07-08 00:45:24 -0400
committerkwolekr <kwolekr@minetest.net>2015-07-08 01:50:31 -0400
commite234d8b3786d5adfbdf3d1a2123c3e8d91c21880 (patch)
tree2775448749ab7616a9b1e69b4bb4988aa0253539 /src/game.cpp
parentba15c98e4d5d7f4bc515e351d6af1a084d46092e (diff)
downloadminetest-e234d8b3786d5adfbdf3d1a2123c3e8d91c21880.tar.gz
minetest-e234d8b3786d5adfbdf3d1a2123c3e8d91c21880.tar.bz2
minetest-e234d8b3786d5adfbdf3d1a2123c3e8d91c21880.zip
Clean-up Minimap code
- Fixed race conditions - Fixed null dereference - Fixed out-of-bounds array access - MinimapMapblock is now allocated and added to update queue only when enabled - Removed dependency on LocalPlayer - Fixed code style - Simplified expressions and program logic - Cleaned minimap object interfaces
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 94fb41852..0189143b8 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -4045,10 +4045,11 @@ void Game::updateFrame(std::vector<aabb3f> &highlight_boxes,
}
/*
- Update minimap pos
+ Update minimap pos and rotation
*/
if (flags.show_minimap && flags.show_hud) {
mapper->setPos(floatToInt(player->getPosition(), BS));
+ mapper->setAngle(player->getYaw());
}
/*