Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Onslaught.ONSPowerNodeEnergySphere


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class ONSPowerNodeEnergySphere extends Actor;

var()   float           InducerRotationSpeed;
var     rotator         InducerRotation;
var     ONSPowerNode    PowerNode;
var     array<Material> RedConstructingSkins;
var     array<Material> BlueConstructingSkins;
var     array<Material> RedActiveSkins;
var     array<Material> BlueActiveSkins;

simulated function UpdatePrecacheMaterials()
{
    local int i;

    for ( i=0; i<RedConstructingSkins.Length; i++ )
        Level.AddPrecacheMaterial(RedConstructingSkins[i]);

    for ( i=0; i<BlueConstructingSkins.Length; i++ )
        Level.AddPrecacheMaterial(BlueConstructingSkins[i]);

    for ( i=0; i<RedActiveSkins.Length; i++ )
        Level.AddPrecacheMaterial(RedActiveSkins[i]);

    for ( i=0; i<BlueActiveSkins.Length; i++ )
        Level.AddPrecacheMaterial(BlueActiveSkins[i]);

    Super.UpdatePrecacheMaterials();
}

function PostBeginPlay()
{
    PowerNode = ONSPowerNode(Owner);
    SetBoneLocation('EnergyDome', vect(-15,0,0));
}

function SetInitialState()
{
    Super.SetInitialState();

    if (Level.NetMode == NM_DedicatedServer)
        disable('Tick');
}

function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType)
{
    if (PowerNode != None)
        PowerNode.TakeDamage(Damage, instigatedBy, hitlocation, momentum, damageType);
}


simulated function bool TeamLink(int TeamNum)
{
    return ( (PowerNode != None) && PowerNode.TeamLink(TeamNum) );
}

simulated event Tick(float DT)
{
    local PlayerController P;
    local Rotator FacePlayerRotation, YawRot;

    if ((PowerNode != None) && (PowerNode.CoreStage != 4))
    {
        InducerRotation.Yaw += InducerRotationSpeed * 65535 * DT;
        InducerRotation.Yaw = InducerRotation.Yaw & 65535;
        SetBoneRotation('EnergyInducers', InducerRotation, 0);

        P = Level.GetLocalPlayerController();
        if ((P != None) && (P.Pawn != None))
        {
            FacePlayerRotation = Rotator((P.Pawn.Location - Location) << Rotation);
            FacePlayerRotation *= -1;
            YawRot.Yaw = FacePlayerRotation.Yaw;
            SetBoneRotation('EnergyDome', YawRot, 0);
        }
    }
}

defaultproperties
{
     InducerRotationSpeed=0.500000
     RedConstructingSkins(0)=FinalBlend'ONSstructureTextures.CoreConstructionRed'
     RedConstructingSkins(1)=FinalBlend'ONSstructureTextures.CoreGroup.InvisibleFinal'
     RedConstructingSkins(2)=FinalBlend'ONSstructureTextures.CoreGroup.InvisibleFinal'
     RedConstructingSkins(3)=FinalBlend'ONSstructureTextures.CoreGroup.InvisibleFinal'
     BlueConstructingSkins(0)=FinalBlend'ONSstructureTextures.CoreConstructionBlue'
     BlueConstructingSkins(1)=FinalBlend'ONSstructureTextures.CoreGroup.InvisibleFinal'
     BlueConstructingSkins(2)=FinalBlend'ONSstructureTextures.CoreGroup.InvisibleFinal'
     BlueConstructingSkins(3)=FinalBlend'ONSstructureTextures.CoreGroup.InvisibleFinal'
     RedActiveSkins(0)=Texture'ONSstructureTextures.CoreGroup.PowerNodeTEX'
     RedActiveSkins(1)=FinalBlend'ONSstructureTextures.CoreGroup.powerNodeUpperFLAREredFinal'
     RedActiveSkins(2)=FinalBlend'ONSstructureTextures.CoreBreachGroup.powerNodeBeamREDfb'
     RedActiveSkins(3)=FinalBlend'ONSstructureTextures.CoreBreachGroup.PowerNodeREDfb'
     BlueActiveSkins(0)=Texture'ONSstructureTextures.CoreGroup.PowerNodeTEX'
     BlueActiveSkins(1)=FinalBlend'ONSstructureTextures.CoreGroup.powerNodeUpperFLAREblueFinal'
     BlueActiveSkins(2)=FinalBlend'ONSstructureTextures.CoreBreachGroup.PowerNodeBeamBLUEfb'
     BlueActiveSkins(3)=FinalBlend'ONSstructureTextures.CoreBreachGroup.PowerNodeBlueFB'
     DrawType=DT_Mesh
     bHidden=Wahr
     bIgnoreEncroachers=Wahr
     RemoteRole=ROLE_None
     Mesh=SkeletalMesh'ONSWeapons-A.PowerNode'
     CollisionRadius=90.000000
     CollisionHeight=75.000000
     bCollideActors=Wahr
     bCollideWorld=Wahr
     bBlockActors=Wahr
     bProjTarget=Wahr
     bUseCylinderCollision=Wahr
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:52.000 - Creation time: Mo 16.4.2007 11:20:51.359 - Created with UnCodeX