debug(minimap): add /qdrift slash command and throttled PIN debug for drift diagnosis
- /qdrift: one-shot diagnostic that traces the full player-position chain (GetCurrentPlayerPosition -> GetWorldCoordinatesFromZone), checks mapIdToUiMapId entries, shows pin world coords vs player world coords, and verifies zone center bounds - Throttled [QD] PIN debug in drawMinimapPin (1/sec) showing pinWorld, playerWorld, distance, mapRadius, and diff values - Enhanced [QD] CONV/CONV2 debug in GetCurrentPlayerPosition showing raw coords, world coords after conversion, and zone coords after back-conversion Purpose: diagnose why minimap pins follow the player after the areaId fix
This commit is contained in:
@@ -424,6 +424,17 @@ local lastZoom, lastFacing, lastXY, lastYY
|
||||
local function drawMinimapPin(pin, data)
|
||||
local xDist, yDist = lastXY - data.x, lastYY - data.y
|
||||
|
||||
-- Throttled debug: print once per second max
|
||||
if _G.QuestieDebugPins and data.uiMapID and (not _G._QDPinDebugTime or (GetTime() - _G._QDPinDebugTime) > 1) then
|
||||
_G._QDPinDebugTime = GetTime()
|
||||
print(string.format(
|
||||
"[QD] PIN uiMap=%s pinW=(%.2f,%.2f) playerW=(%.2f,%.2f) dist=(%.2f,%.2f) mapRad=%.1f diff=(%.4f,%.4f)",
|
||||
tostring(data.uiMapID),
|
||||
data.x, data.y, lastXY, lastYY,
|
||||
xDist, yDist, mapRadius or -1,
|
||||
xDist / (mapRadius or 1), yDist / (mapRadius or 1)))
|
||||
end
|
||||
|
||||
-- handle rotation
|
||||
if rotateMinimap then
|
||||
local dx, dy = xDist, yDist
|
||||
|
||||
Reference in New Issue
Block a user