//=============================================================================
// sgMeshFX.
// * Revised by 7DS'Lust
//=============================================================================
class sgMeshFX extends Effects;

var sgMeshFX NextFX;

function PostBeginPlay()
{
	if ( sgBuilding(Owner) != None )
        switch ( sgBuilding(Owner).Team )
        {
        case 1:
            Texture = texture'SiegeUltimateRC7UB01Media.sgEnvSkinT1';
            break;

        case 2:
            Texture = texture'SiegeUltimateRC7UB01Media.sgEnvSkinT2';
            break;

        case 3:
            Texture = texture'SiegeUltimateRC7UB01Media.sgEnvSkinT3';
            break;

        default:
		    Texture = texture'SiegeUltimateRC7UB01Media.sgEnvSkinT0';
        }
}

simulated function PostNetBeginPlay()
{
	if ( sgBuilding(Owner) != None && sgBuilding(Owner).Team == 0 )
		Texture = texture'SiegeUltimateRC7UB01Media.sgEnvSkinT0';		
	else
		Texture = texture'SiegeUltimateRC7UB01Media.sgEnvSkinT1';
}

simulated function Tick(float deltaTime)
{
	if ( sgBuilding(Owner) == None )
        Destroy();
}

simulated function Destroyed()
{
    Super.Destroyed();
    if ( NextFX != None )
    {
        NextFX.Destroy();
        NextFX = None;
    }
}

simulated function SetSize(float size)
{
    DrawScale = size;
    if ( NextFX != None )
        NextFX.SetSize(size);
}

defaultproperties
{
    Physics=PHYS_Rotating
    RemoteRole=ROLE_None
    LODBias=0.50
    DrawType=DT_Mesh
    Style=STY_Translucent
    AmbientGlow=255
    bUnlit=True
    bMeshEnviroMap=True
    bFixedRotationDir=True
}
