4x11 / build69

64 stars 66 forks source link

Fix game crash when SA-MP Object Loaded #9

Closed qqwrv-f10eq closed 5 years ago

soly-olf commented 5 years ago

This is an incorrect fix.

qqwrv-f10eq commented 5 years ago

But it works. Anyway Thanks !

qqwrv-f10eq commented 5 years ago

Maybe I can prevent on this:

bool CObjectPool::New(uint16_t ObjectID, int iModel, VECTOR vecPos, VECTOR vecRot, float fDrawDistance)
{
    if(m_pObjects[ObjectID] != 0)
        Delete(ObjectID);

    m_pObjects[ObjectID] = pGame->NewObject(iModel, vecPos.X, vecPos.Y, vecPos.Z, vecRot, fDrawDistance);

    if(m_pObjects[ObjectID])
    {
        m_bObjectSlotState[ObjectID] = true;

        return true;
    }

    return false;
}