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

SkaarjPack.KrallBolt


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
class KrallBolt extends Projectile;

var xEmitter Trail;
var texture TrailTex;

simulated function Destroyed()
{
    if (Trail != None)
        Trail.Destroy();
    Super.Destroyed();
}

simulated function PostBeginPlay()
{
    local Rotator R;

    Super.PostBeginPlay();

    if ( EffectIsRelevant(vect(0,0,0),false) )
    {
        Trail = Spawn(class'LinkProjEffect',self);
        if ( Trail != None ) 
            Trail.Skins[0] = TrailTex;
    }
    
    Velocity = Speed * Vector(Rotation);

    R = Rotation;
    R.Roll = Rand(65536);
    SetRotation(R);
    
    if ( Level.bDropDetail || Level.DetailMode == DM_Low )
    {
        bDynamicLight = false;
        LightType = LT_None;
    }
} 

simulated function Explode(vector HitLocation, vector HitNormal)
{
    if ( EffectIsRelevant(Location,false) )
        Spawn(class'LinkProjSparksYellow',,, HitLocation, rotator(HitNormal));
    PlaySound(Sound'WeaponSounds.BioRifle.BioRifleGoo2');
    Destroy();
}

simulated function ProcessTouch (Actor Other, vector HitLocation)
{
    local Vector X, RefNormal, RefDir;

    if (Other == Instigator) return;
    if (Other == Owner) return;
    
    if (Other.IsA('xPawn') && xPawn(Other).CheckReflect(HitLocation, RefNormal, Damage*0.25))
    {
        if (Role == ROLE_Authority)
        {
            X = Normal(Velocity);
            RefDir = X - 2.0*RefNormal*(X dot RefNormal);
            Spawn(Class, Other,, HitLocation+RefDir*20, Rotator(RefDir));
        }
        Destroy();
    }
    else if ( Other.bProjTarget )
    {
        if ( Role == ROLE_Authority )
            Other.TakeDamage(Damage,Instigator,HitLocation,MomentumTransfer * Normal(Velocity),MyDamageType);
        Explode(HitLocation, vect(0,0,1));
    }
}

defaultproperties
{
     TrailTex=Texture'XEffectMat.Link.link_muz_yellow'
     Speed=1500.000000
     MaxSpeed=1500.000000
     Damage=17.000000
     MomentumTransfer=25000.000000
     MyDamageType=Class'SkaarjPack.DamTypeKrallBolt'
     ExplosionDecal=Class'XEffects.LinkBoltScorch'
     LightType=LT_Steady
     LightEffect=LE_QuadraticNonIncidence
     LightHue=40
     LightSaturation=100
     LightBrightness=255.000000
     LightRadius=3.000000
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'WeaponStaticMesh.LinkProjectile'
     bDynamicLight=True
     AmbientSound=Sound'WeaponSounds.LinkGun.LinkGunProjectile'
     LifeSpan=4.000000
     DrawScale3D=(X=2.550000,Y=1.700000,Z=1.700000)
     PrePivot=(X=10.000000)
     Skins(0)=FinalBlend'XEffectMat.Link.LinkProjYellowFB'
     AmbientGlow=217
     Style=STY_Additive
     SoundVolume=255
     SoundRadius=50.000000
     bFixedRotationDir=True
     RotationRate=(Roll=80000)
     ForceType=FT_Constant
     ForceRadius=30.000000
     ForceScale=5.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Tue 24/10/2006 17:11:02.000 - Creation time: Wed 7/2/2007 19:16:42.937 - Created with UnCodeX