11.03.2015, 06:09
Kurta there is no point in a GetObjectType function.
if objectid 1 is a player object its always gonna return a player object even if theres a global objectid 1..
What might be more fitting is a GetObjectTypes(objectid, &playerObject, &globalObject); to check if the objectid is in any of the 2 pools and pass the value by reference.
Код:
if(pNetGame->pObjectPool->m_bObjectSlotState[objectid] && pNetGame->pObjectPool->m_bPlayerObjectSlotState[playerid][objectid]) + ret = SELECT_OBJECT_PLAYER_OBJECT; + else + ret = SELECT_OBJECT_GLOBAL_OBJECT;
What might be more fitting is a GetObjectTypes(objectid, &playerObject, &globalObject); to check if the objectid is in any of the 2 pools and pass the value by reference.