mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[saco] Match CMenuPool::GetSlotState; ScrInitMenu reaches the slot array through it, not by direct indexing
This commit is contained in:
@@ -13,6 +13,8 @@ public:
|
||||
BYTE m_byteExited;
|
||||
|
||||
public:
|
||||
int GetSlotState(BYTE byteMenuID) { if(byteMenuID > MAX_MENUS) return 0; return m_bMenuSlotState[byteMenuID]; }
|
||||
|
||||
CMenuPool();
|
||||
~CMenuPool();
|
||||
|
||||
|
||||
@@ -707,7 +707,7 @@ void ScrInitMenu(RPCParameters *rpcParams)
|
||||
bsData.Read(MenuInteraction.bMenu);
|
||||
for(i = 0; i < MAX_MENU_ITEMS; i++) bsData.Read(MenuInteraction.bRow[i]);
|
||||
|
||||
if(byteMenuID <= MAX_MENUS && pMenuPool->m_bMenuSlotState[byteMenuID]) pMenuPool->Delete(byteMenuID);
|
||||
if(pMenuPool->GetSlotState(byteMenuID)) pMenuPool->Delete(byteMenuID);
|
||||
|
||||
CMenu *pMenu = pMenuPool->New(byteMenuID, fX, fY, iColumns + 1, fCol1Width, fCol2Width, &MenuInteraction);
|
||||
if(!pMenu) return;
|
||||
|
||||
Reference in New Issue
Block a user