mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
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
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user