scripts/3_Game/Entities/EntityAI.c
// !Called on PARENT when a child is detached from it.
Called on PARENT when a child is detached from it.
Called on PARENT when a child is detached from it .
void EEItemDetached(EntityAI item, string slot_name)
	{
		if ( m_ComponentsBank != NULL )
		{
			for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
			{
				if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
				{
					m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
				}
			}
		}
		if ( GetGame().IsServer() )
		{
			if ( this.HasEnergyManager()  &&  item.HasEnergyManager() )
			{
				GetCompEM().OnAttachmentRemoved(item);
			}
		}
		item.OnWasDetached(this, slot_name);
	}
void EEItemDetached ( EntityAI item , string slot_name ) { if ( m_ComponentsBank != NULL ) { for ( int comp_key = 0 ; comp_key < COMP_TYPE_COUNT ; ++ comp_key ) { if ( m_ComponentsBank . IsComponentAlreadyExist ( comp_key ) ) { m_ComponentsBank . GetComponent ( comp_key ) . Event_OnItemDetached ( item , slot_name ) ; } } } if ( GetGame ( ) . IsServer ( ) ) { if ( this . HasEnergyManager ( ) && item . HasEnergyManager ( ) ) { GetCompEM ( ) . OnAttachmentRemoved ( item ) ; } } item . OnWasDetached ( this , slot_name ) ; }
Called on PARENT when a child is detached from it.
Called on PARENT when a child is detached from it .
// Energy Manager //SwitchItemSelectionTexture(item, slot_name);