Skip to content

Commit 81a532a

Browse files
committed
Fix not respecting map scale for tooltips on radius
1 parent d987d77 commit 81a532a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Mappy/Classes/DrawHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private static void ProcessInteractions(MarkerInfo markerInfo) {
163163
}
164164
}
165165

166-
private static void DrawTooltip(MarkerInfo markerInfo) {
166+
private static unsafe void DrawTooltip(MarkerInfo markerInfo) {
167167
if (System.IconConfig.IconSettingMap[markerInfo.IconId] is { AllowTooltip: false } && !DebugMode) {
168168
return;
169169
}
@@ -172,7 +172,7 @@ private static void DrawTooltip(MarkerInfo markerInfo) {
172172

173173
if (markerInfo is { Radius: { } sameRadius and > 1.0f }) {
174174
var center = markerInfo.Position + markerInfo.Offset + ImGui.GetWindowPos();
175-
var radius = sameRadius * markerInfo.Scale;
175+
var radius = sameRadius * markerInfo.Scale * AgentMap.Instance()->CurrentMapSizeFactorFloat;;
176176

177177
if (Vector2.Distance(ImGui.GetMousePos() - System.MapWindow.MapDrawOffset + ImGui.GetWindowPos(), center) <= radius && System.MapWindow.IsMapHovered) {
178178
isActivatedViaRadius = true;

0 commit comments

Comments
 (0)