//=============================================================================
// sgItemShrinkerSuit
// by SK
//=============================================================================
class sgItemShrinkerSuit extends sgItem;

function Inventory GiveItem(Pawn target)
{

local Inventory OtherSuits;

Super.GiveItem(target);

OtherSuits = Pawn(Owner).FindInventoryType(class'sgSpeed');
if ( OtherSuits != none )
	{
	OtherSuits.destroy();
	target.GroundSpeed = target.default.GroundSpeed;
	}
	
OtherSuits = Pawn(Owner).FindInventoryType(class'Jetpack');
if ( OtherSuits != none )
	OtherSuits.destroy();

target.DrawScale = 0.4 * target.default.DrawScale;

target.SetCollisionSize(0.4 * target.default.CollisionRadius, 0.375 * target.default.CollisionHeight);

ResizeWeapons(true);

Self.Destroy();
}

function ResizeWeapons( bool bShrink)
{
local Inventory Inv;
local Pawn P;

	P = Pawn(Owner);
	if (P != None)
	{
		for( Inv=P.Inventory; Inv!=None; Inv=Inv.Inventory )
		{
			if (Weapon(Inv) != None)
			{
				if (bShrink)
					Inv.ThirdPersonScale = P.DrawScale;
				else
					Inv.ThirdPersonScale = Inv.default.ThirdPersonScale;
			}
		}
	}
}

defaultproperties
{
    InventoryClass=Class'sgShrinkerTimer'
    BuildingName="Shrinker Suit"
    BuildCost=800
    MaxEnergy=1000.00
    SpriteScale=0.13
    Model=LodMesh'UnrealShare.Suit'
    SkinRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.SuperProtectorSkinT0'
    SkinBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.SuperProtectorSkinT1'
    SpriteRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.MotionAlarmSpriteT0'
    SpriteBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.MotionAlarmSpriteT1'
    DSofMFX=0.40
    CollisionRadius=4.00
    CollisionHeight=16.00
}
