From 92311e7692174257d76efe052eab042f85eae8e4 Mon Sep 17 00:00:00 2001 From: opencode Date: Tue, 1 Dec 2026 16:48:34 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20precise=20minimap=20visibility=20?= =?UTF-8?q?=E2=80=94=20waypoint=20id=20+=20contact=20markers,=20not=20all?= =?UTF-8?q?=20coords=20(playtest=20round=202)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/Camera.cpp | 3 +++ src/renderer/Hud.cpp | 19 ++++++++++++------- src/rw/VisibilityPlugins.cpp | 7 ++++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 90dc4131..86b7abe6 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -728,6 +728,9 @@ CCamera::Process(void) #if GTA_VERSION > GTA3_PS2_160 GenerationDistMultiplier = LODDistMultiplier; #ifdef EXTENDED_DRAW + // Consumed by VEHICLE_LODDIST_MULTIPLIER in VisibilityPlugins.cpp, which + // divides this scale back out so vehicle LOD stays vanilla. Keep the two in + // sync and don't move this past the ms_lodDistScale multiply below. GenerationDistMultiplier *= EXTENDED_DRAW_GENERATION_SCALE; #endif LODDistMultiplier *= CRenderer::ms_lodDistScale; diff --git a/src/renderer/Hud.cpp b/src/renderer/Hud.cpp index 96b7a0cb..cfead703 100644 --- a/src/renderer/Hud.cpp +++ b/src/renderer/Hud.cpp @@ -177,23 +177,28 @@ HUD_TrackMoney(int32 money) } // The minimap is a driving aid: it only shows while the player is in a vehicle, -// and F10 toggles that in-vehicle display on or off. It is forced on only while -// a waypoint (BLIP_COORD) or a mission contact marker (BLIP_CONTACT_POINT) is -// set, so navigation is never hidden. Entity blips (BLIP_CAR/CHAR/OBJECT) don't -// force it on: scripts leave persistent ones behind (mission targets, parked -// mission vehicles), which kept the minimap on permanently. +// and F10 toggles that in-vehicle display on or off. It is forced on only by +// navigation aids: the user waypoint (CRadar::TargetMarkerId, MENU_MAP builds) +// or an in-use mission contact marker (BLIP_CONTACT_POINT). Other coordinate +// blips (save house, weapon, bomb, spray icons) are never cleared, so they must +// not force it on; entity blips behave the same, which is also why they don't +// count. static bool HUD_RadarShouldBeVisible() { int32 i; sRadarTrace *pTrace; +#ifdef MENU_MAP + if (CRadar::TargetMarkerId != -1) + return true; +#endif + for (i = 0; i < NUMRADARBLIPS; i++) { pTrace = &CRadar::ms_RadarTrace[i]; if (pTrace->m_bInUse && pTrace->m_eBlipDisplay != BLIP_DISPLAY_NEITHER - && (pTrace->m_eBlipType == BLIP_COORD - || pTrace->m_eBlipType == BLIP_CONTACT_POINT)) + && pTrace->m_eBlipType == BLIP_CONTACT_POINT) return true; } diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 8c343a63..ec4d471f 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -232,9 +232,10 @@ CVisibilityPlugins::InsertAtomicIntoSortedList(RpAtomic *a, float dist) #ifdef EXTENDED_DRAW // EXTENDED_DRAW inflates GenerationDistMultiplier to widen the ped/vehicle // creation and removal radius. Vehicle LOD is decoupled from that: dividing the -// scale back out keeps the LOD bands (and the wheel-atomic LOD ratio below) -// exactly where vanilla puts them, so low-detail car bodies don't stay visible -// well past vanilla's switch/cull distance. +// scale back out restores the five body/cull bands exactly, so low-detail car +// bodies don't stay visible well past vanilla's switch/cull distance. The +// wheel-atomic LOD ratio below still follows the draw-distance slider (vanilla +// formula), so distant wheel detail moves with the slider by design. #define VEHICLE_LODDIST_MULTIPLIER (TheCamera.GenerationDistMultiplier / EXTENDED_DRAW_GENERATION_SCALE) #else #define VEHICLE_LODDIST_MULTIPLIER (TheCamera.GenerationDistMultiplier)