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

UT2004RPG.FriendlyMonsterEffect


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
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
class FriendlyMonsterEffect extends Emitter;

var PlayerReplicationInfo MasterPRI;

replication
{
    reliable if (bNetDirty && Role == ROLE_Authority)
        MasterPRI;
}

simulated function PostBeginPlay()
{
    Super.PostBeginPlay();

    //force default rotation
    SetRotation(default.Rotation);
}

simulated function PostNetReceive()
{
    if (Base != None)
    {
        Initialize();
    }
}

simulated function Initialize()
{
    local float Modifier, Height, StartSize;
    local Pawn P;
    local PlayerController PC;

    Modifier = Base.CollisionRadius / CollisionRadius;
    Height = -Base.CollisionHeight * 1.25;
    Emitters[0].StartLocationOffset.Y = Height;
    StartSize = default.Emitters[0].StartSizeRange.Z.Min * Modifier;
    Emitters[0].StartSizeRange.Z.Min = StartSize;
    Emitters[0].StartSizeRange.Z.Max = StartSize;
    Emitters[0].StartSizeRange.X.Min = StartSize;
    Emitters[0].StartSizeRange.X.Max = StartSize;
    StartSize = FMax(default.Emitters[0].StartSizeRange.Y.Min, StartSize * 0.5);
    Emitters[0].StartSizeRange.Y.Min = StartSize;
    Emitters[0].StartSizeRange.Y.Max = StartSize;
    Emitters[0].Disabled = false;
    Emitters[1].StartLocationOffset.Y = Height;
    Emitters[1].StartLocationPolarRange.Z.Max = default.Emitters[1].StartLocationPolarRange.Z.Max * Modifier;
    Emitters[1].StartLocationPolarRange.Z.Min = default.Emitters[1].StartLocationPolarRange.Z.Min * Modifier;
    Emitters[1].Disabled = false;

    PC = Level.GetLocalPlayerController();
    if (PC != None && PC.PlayerReplicationInfo != None && PC.PlayerReplicationInfo == MasterPRI)
    {
        Emitters[0].ColorScale[0].Color.R = 0;
        Emitters[0].ColorScale[0].Color.G = 255;
        Emitters[0].ColorScale[1].Color.R = 0;
        Emitters[0].ColorScale[1].Color.G = 255;
        Emitters[1].ColorScale[0].Color.R = 64;
        Emitters[1].ColorScale[0].Color.G = 255;
    }
    else
    {
        P = Pawn(Base);
        if (P.GetTeamNum() == 1)
        {
            Emitters[0].ColorScale[0].Color.R = 0;
            Emitters[0].ColorScale[0].Color.B = 255;
            Emitters[0].ColorScale[1].Color.R = 0;
            Emitters[0].ColorScale[1].Color.B = 255;
            Emitters[1].ColorScale[0].Color.R = 64;
            Emitters[1].ColorScale[0].Color.B = 255;
        }
    }
}

//In Assault, the begin round reset happens after we've been spawned
//since we don't need Assault screwing with us anyway, just disable the function
function Reset();

defaultproperties
{
     Begin Object Class=MeshEmitter Name=MeshEmitter0
         StaticMesh=StaticMesh'UTRPGStatics2.Effects.Halo'
         UseMeshBlendMode=False
         UseParticleColor=True
         UseColorScale=True
         Disabled=True
         Backup_Disabled=True
         ColorScale(0)=(Color=(R=255,A=128))
         ColorScale(1)=(RelativeTime=1.000000,Color=(R=255,A=128))
         CoordinateSystem=PTCS_Relative
         MaxParticles=1
         UseRotationFrom=PTRS_Offset
         StartSizeRange=(Y=(Min=1.500000,Max=1.500000))
         LifetimeRange=(Min=0.001000,Max=0.001000)
     End Object
     Emitters(0)=MeshEmitter'UT2004RPG.FriendlyMonsterEffect.MeshEmitter0'

     Begin Object Class=SpriteEmitter Name=SpriteEmitter1
         UseColorScale=True
         FadeOut=True
         Disabled=True
         Backup_Disabled=True
         UniformMeshScale=False
         UseRegularSizeScale=False
         UniformSize=True
         ColorScale(0)=(Color=(B=64,G=64,R=255,A=255))
         ColorScale(1)=(RelativeTime=1.000000,Color=(A=255))
         FadeOutStartTime=1.005000
         CoordinateSystem=PTCS_Relative
         MaxParticles=25
         StartLocationRange=(X=(Min=-25.000000,Max=25.000000),Y=(Min=-25.000000,Max=25.000000))
         StartLocationShape=PTLS_Polar
         StartLocationPolarRange=(Y=(Max=65536.000000),Z=(Min=12.000000,Max=12.000000))
         RevolutionsPerSecondRange=(Z=(Min=0.200000,Max=0.200000))
         UseRotationFrom=PTRS_Offset
         StartSizeRange=(X=(Min=5.000000,Max=5.000000),Y=(Min=5.000000,Max=5.000000),Z=(Min=5.000000,Max=5.000000))
         InitialParticlesPerSecond=200.000000
         Texture=Texture'EpicParticles.Flares.Sharpstreaks2'
         SecondsBeforeInactive=0.000000
         LifetimeRange=(Min=1.500000,Max=1.750000)
         StartVelocityRange=(Y=(Min=25.000000,Max=25.000000))
     End Object
     Emitters(1)=SpriteEmitter'UT2004RPG.FriendlyMonsterEffect.SpriteEmitter1'

     bNoDelete=False
     RemoteRole=ROLE_SimulatedProxy
     Rotation=(Roll=16384)
     bHardAttach=True
     CollisionRadius=25.000000
     bBlockZeroExtentTraces=False
     bBlockNonZeroExtentTraces=False
     bNetNotify=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sat 15/7/2006 17:15:16.000 - Creation time: Wed 7/2/2007 19:16:39.609 - Created with UnCodeX