ColAndreas dynamic objects
#2

CA_DestroyObject_DC -> check object type from ColAndreas Table -> DestroyObject/DestroyDynamicObject

PHP Code:
stock CA_DestroyObject_DC(index)
{
    
// Out of bounds
    
if(index || index >= MAX_CA_OBJECTS) return -1;
    
#if defined _Y_ITERATE_LOCAL_VERSION
        
if(Iter_Contains(CA_Objectsindex))
        {
            new 
next;
            
Iter_SafeRemove(CA_Objectsindexnext);
            if(
CA_ObjectList[index][ObjectType] == OBJECT_TYPE_OBJECTDestroyObject(CA_ObjectList[index][ObjectID]);
            
#if defined STREAMER_TYPE_OBJECT
            
else if(CA_ObjectList[index][ObjectType] == OBJECT_TYPE_DYNAMICDestroyDynamicObject(CA_ObjectList[index][ObjectID]);
            
#endif
            
CA_DestroyObject(CA_ObjectList[index][ColdAndreadsID]);
            return 
next;
        }
    
#else
    
if(CA_ObjectList[index][ObjectUsed])
    {
        if(
CA_ObjectList[index][ObjectType] == OBJECT_TYPE_OBJECTDestroyObject(CA_ObjectList[index][ObjectID]);
        
#if defined STREAMER_TYPE_OBJECT
        
else if(CA_ObjectList[index][ObjectType] == OBJECT_TYPE_DYNAMICDestroyDynamicObject(CA_ObjectList[index][ObjectID]);
        
#endif
        
CA_ObjectList[index][ObjectUsed] = false;
        
CA_DestroyObject(CA_ObjectList[index][ColdAndreadsID]);
        return 
1;
    }
    
#endif
    
return -1;

Reply


Messages In This Thread
ColAndreas dynamic objects - by Amads - 19.07.2017, 18:16
Re: ColAndreas dynamic objects - by AbyssMorgan - 19.07.2017, 18:21
Re: ColAndreas dynamic objects - by Amads - 19.07.2017, 18:28
Re: ColAndreas dynamic objects - by Amads - 19.07.2017, 21:37
Re: ColAndreas dynamic objects - by AbyssMorgan - 19.07.2017, 21:50
Re: ColAndreas dynamic objects - by Pottus - 20.07.2017, 01:04
Re: ColAndreas dynamic objects - by AbyssMorgan - 20.07.2017, 06:50
Re: ColAndreas dynamic objects - by Amads - 20.07.2017, 09:21
Re: ColAndreas dynamic objects - by AbyssMorgan - 20.07.2017, 09:47
Re: ColAndreas dynamic objects - by Pottus - 20.07.2017, 22:30

Forum Jump:


Users browsing this thread: 1 Guest(s)