mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-10 12:22:12 -04:00
Fix minimap "don't render" code not always working due to rounding errors
Significant performance boost in some areas like Gerudo Desert when map isn't visible.
This commit is contained in:
@@ -596,7 +596,8 @@ void dMeterMap_c::_draw() {
|
||||
#if TARGET_PC
|
||||
// Optimization: don't draw map if it's off-screen/invisible.
|
||||
// Especially useful in debug builds on Hyrule field etc., it's slow!
|
||||
if ((!mMapIsInside && mSlidePositionOffset == getDispPosOutSide_OffsetX()) || mMapAlpha == 0) {
|
||||
// That +3 is an arbitrary bias to avoid rounding issues causing this to fail.
|
||||
if ((!mMapIsInside && mSlidePositionOffset <= getDispPosOutSide_OffsetX() + 3) || mMapAlpha == 0) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user