From 27dcb2fdf200257eece17cbbd9240752bd05a46e Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Thu, 3 Sep 2026 05:32:10 +0700 Subject: [PATCH] De-inline `CNetGame::DisableMapIcon` to restore `ScrUnk90`; hand-expand it at both map-icon call sites instead --- saco/net/netgame.cpp | 22 ++++++++++++++++++++-- saco/net/netgame.h | 6 +----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/saco/net/netgame.cpp b/saco/net/netgame.cpp index 2f24192..fbe98c9 100644 --- a/saco/net/netgame.cpp +++ b/saco/net/netgame.cpp @@ -118,7 +118,11 @@ DWORD CNetGame::GetTime() void CNetGame::SetMapIcon(BYTE byteIndex, float fX, float fY, float fZ, BYTE byteIcon, DWORD dwColor, int iStyle) { if (byteIndex >= 100) return; - if (m_dwMapIcon[byteIndex] != NULL) DisableMapIcon(byteIndex); + if (m_dwMapIcon[byteIndex] != NULL) { + if (byteIndex >= 100) return; + ScriptCommand(&disable_marker, m_dwMapIcon[byteIndex]); + m_dwMapIcon[byteIndex] = NULL; + } //ScriptCommand(&create_radar_marker_without_sphere, fX, fY, fZ, byteIcon, &m_dwMapIcon); m_dwMapIcon[byteIndex] = pGame->CreateRadarMarkerIcon(byteIcon, fX, fY, fZ, dwColor, iStyle); } @@ -135,12 +139,26 @@ void CNetGame::ResetMapIcons() BYTE i; for (i = 0; i < 100; i++) { - if (m_dwMapIcon[i] != NULL) DisableMapIcon(i); + if (m_dwMapIcon[i] != NULL) { + if (i >= 100) return; + ScriptCommand(&disable_marker, m_dwMapIcon[i]); + m_dwMapIcon[i] = NULL; + } } } //---------------------------------------------------- +// MATCH +void CNetGame::DisableMapIcon(BYTE byteIndex) +{ + if (byteIndex >= 100) return; + ScriptCommand(&disable_marker, m_dwMapIcon[byteIndex]); + m_dwMapIcon[byteIndex] = NULL; +} + +//---------------------------------------------------- + //---------------------------------------------------- // MATCH diff --git a/saco/net/netgame.h b/saco/net/netgame.h index 96ea591..709344f 100644 --- a/saco/net/netgame.h +++ b/saco/net/netgame.h @@ -106,11 +106,7 @@ public: void ResetMapIcons(); void SetMapIcon(BYTE byteIndex, float fX, float fY, float fZ, BYTE byteIcon, DWORD dwColor, int iStyle); // MATCH - inline void DisableMapIcon(BYTE byteIndex) { // .text:10008FB0 - if (byteIndex >= 100) return; - ScriptCommand(&disable_marker, m_dwMapIcon[byteIndex]); - m_dwMapIcon[byteIndex] = NULL; - }; + void DisableMapIcon(BYTE byteIndex); // .text:10008FB0 CMenuPool * GetMenuPool() { return m_pPools->pMenuPool; }; // .text:100084F0 void AttemptConnect(); // .text:10008940