//=============================================================================
// Originally sgPlatform.
// Writen by Dim4 and nOs*Badger
// Lamely Copied but Tweaked to bypass lame siege rule.
// WildcardsPlatform.
//=============================================================================
class WildcardsPlatform expands sgBuilding;

var WildcardsSgPlatformCH ICH;

simulated event PostBeginPlay()
{
	super.PostBeginPlay();
	SetLocation(Location-vect(0,0,15));
}


simulated function FinishBuilding()
{
	Super.FinishBuilding();
	
	if(Role != ROLE_Authority){return;}
	if (ICH == None)
	{
		ICH=Spawn(class'WildcardsSgPlatformCH',Self,'',Location-vect(0,0,7.5),Rotation);
		ICH.MyP=Self;
		Texture=None;

		if (myFX!=None)
		{
			myFX.AmbientGlow=5;
			myFX.ScaleGlow=1.5;
		}
	}
}

simulated event Destruct()
{
	local Pawn p;
		foreach RadiusActors(class'Pawn', p, 78)
			if ( p.bIsPlayer && p.Health > 0 &&
        			p.PlayerReplicationInfo != None)
				if (p != None) 
					p.TakeDamage((Grade/2)+1 , instigator, vect(10,10,0), vect(10,10,0), 'sgSpecial');
	ICH.MyP=None;
	ICH.Destroy();
	Super.Destruct();
}

defaultproperties
{
    BuildingName="Platform"
    BuildCost=200
    UpgradeCost=20
    BuildTime=5.00
    MaxEnergy=2000.00
    SpriteScale=1.00
    Model=LodMesh'Botpack.DiscStud'
    SkinRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSkinT0'
    SkinBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSkinT1'
    SkinGreenTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSkinT2'
    SkinYellowTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSkinT3'
    SpriteRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSpriteT0'
    SpriteBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSpriteT1'
    SpriteGreenTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSpriteT2'
    SpriteYellowTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PlatformSpriteT3'
    DSofMFX=4.00
    MFXrotX=(Pitch=0,Yaw=10000,Roll=0),
    MultiSkins(0)=Texture'SiegeUltimateRC7UB01Media.GFX.sgContSpriteT0'
    MultiSkins(1)=Texture'SiegeUltimateRC7UB01Media.GFX.sgContSpriteT1'
    MultiSkins(2)=Texture'SiegeUltimateRC7UB01Media.GFX.sgContSpriteT2'
    MultiSkins(3)=Texture'SiegeUltimateRC7UB01Media.GFX.sgContSpriteT3'
    CollisionRadius=61.00
    CollisionHeight=16.00
    
    bNoUpgrade=True
}
