Skip to content

fix: clear checkingList when component is reseted#1152

Merged
ksenonadv merged 1 commit into
openmultiplayer:masterfrom
nidi21:master
Dec 6, 2025
Merged

fix: clear checkingList when component is reseted#1152
ksenonadv merged 1 commit into
openmultiplayer:masterfrom
nidi21:master

Conversation

@nidi21

@nidi21 nidi21 commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

if the server is restarted using gmx, the checkingList will remain intact and won't be cleared. this results in the entries becoming invalid after the restart, causing the server to crash but only when the size of checkingList is greater than 1.

cc: @zookyy for discovering the bug

#define MIXED_SPELLINGS

#include <open.mp>

main() {}

#define XYZ(%0) %0[0], %0[1], %0[2]


new Float: g_HunterFields[][4] = {
    { -1915.0, -2458.0, -1371.0, -1802.0 },
    { -697.0, -2133.0, -398.0, -1912.0 },
    { -1098.0, -2485.0, -834.0, -2170.0 }
};

new g_HunterZones[sizeof(g_HunterFields)];

public OnGameModeInit()
{

    for(new i = 0; i < sizeof(g_HunterFields); i++) {

        g_HunterZones[i] = GangZoneCreate(XYZ(g_HunterFields[i]), g_HunterFields[i][3]);

        UseGangZoneCheck(g_HunterZones[i], true);
    }

    return 1;
}

public OnPlayerConnect(playerid)
{
    
    TogglePlayerSpectating(playerid, true);    

    return 1;
}

@ksenonadv ksenonadv merged commit 0b33d49 into openmultiplayer:master Dec 6, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants