//=============================================================================
// sgPRI.
// * Revised by nOs*Badger
//=============================================================================
class sgPRI extends PlayerReplicationInfo;

var int choice;

var float	sgInfoCoreKiller, 
		sgInfoCoreRepair, 
		sgInfoBuildingHurt,
		sgInfoUpgradeRepair,
		sgInfoTeamPlayer;
var int		sgInfoKiller,
		sgInfoBuildingMaker,
		sgInfoWarheadMaker,
		sgInfoWarheadKiller;
		

var float           RU,
                    MaxRU;
var sgBaseCore      Cores[4];
var int		    sgBuilt[40];
var int		    iStatus;
var WildcardsOrbs Orb;


replication
{
	reliable if ( Role == ROLE_Authority )
		RU, MaxRU, Cores, sgBuilt, Orb, sgInfoCoreKiller, sgInfoBuildingHurt, sgInfoCoreRepair, sgInfoUpgradeRepair, sgInfoTeamPlayer, sgInfoKiller, sgInfoBuildingMaker,sgInfoWarheadMaker, sgInfoWarheadKiller, iStatus;
}

event PostBeginPlay()
{
	Super.PostBeginPlay();
	RU = SiegeGI(Level.Game).StartingRU;
	sgInfoTeamPlayer = 1.0;
}

function AddRU(float amount)
{
	RU += amount;
    if ( SiegeGI(Level.Game) != None )
	    RU = FMax(FMin(RU, SiegeGI(Level.Game).MaxRUs[Team]), 0);
}

function Tick(float deltaTime)
{
    local sgBaseCore core;
    local int I;

	if ( SiegeGI(Level.Game) != None )
		{
			RU = FMax(FMin(RU, SiegeGI(Level.Game).MaxRUs[Team]), 0);
			MaxRU = SiegeGI(Level.Game).MaxRUs[Team];
			for (I=0;I<4;I++)
				Cores[I] = SiegeGI(Level.Game).Cores[I];
    	}

}

defaultproperties
{
}
