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

UnrealShare.StingerProjectile


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
00135
00136
00137
00138
00139
00140
//=============================================================================
// StingerProjectile.
//=============================================================================
class StingerProjectile extends Projectile;

#exec MESH IMPORT MESH=TarydiumProjectile ANIVFILE=MODELS\aniv52.3D DATAFILE=MODELS\data52.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=TarydiumProjectile X=0 Y=0 Z=0 YAW=64
#exec MESH SEQUENCE MESH=TarydiumProjectile SEQ=All  STARTFRAME=0  NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Tarydium1 FILE=MODELS\shells.PCX 
#exec MESHMAP SCALE MESHMAP=TarydiumProjectile X=0.015 Y=0.015 Z=0.03
#exec MESHMAP SETTEXTURE MESHMAP=TarydiumProjectile NUM=4 TEXTURE=Tarydium1

#exec TEXTURE IMPORT NAME=ExplosionPal3 FILE=textures\expal2.pcx GROUP=Effects

#exec MESH IMPORT MESH=burst ANIVFILE=MODELS\burst_a.3D DATAFILE=MODELS\burst_d.3D X=0 Y=0 Z=0 ZEROTEX=1
#exec MESH ORIGIN MESH=burst X=0 Y=0 Z=0 YAW=-64
#exec MESH SEQUENCE MESH=burst SEQ=All       STARTFRAME=0   NUMFRAMES=6
#exec MESH SEQUENCE MESH=burst SEQ=Explo     STARTFRAME=0   NUMFRAMES=6
#exec TEXTURE IMPORT NAME=Jburst1 FILE=MODELS\burst.PCX GROUP=Skin
#exec MESHMAP SCALE MESHMAP=burst X=0.2 Y=0.2 Z=0.4 YAW=128
#exec MESHMAP SETTEXTURE MESHMAP=burst NUM=0 TEXTURE=Jburst1

#exec AUDIO IMPORT FILE="Sounds\stinger\Ricochet.WAV" NAME="Ricochet" GROUP="Stinger"
#exec AUDIO IMPORT FILE="..\Unreali\Sounds\Razor\bladehit.wav" NAME="BladeHit" GROUP="RazorJack"

var bool bLighting;
var float DelayTime;

/////////////////////////////////////////////////////
auto state Flying
{
    simulated function ProcessTouch( Actor Other, Vector HitLocation )
    {
        local int hitdamage;
        local vector hitDir;
        
        if (Other != instigator && StingerProjectile(Other) == none)
        {
            if ( Role == ROLE_Authority )
            {
                hitDir = Normal(Velocity);
                if ( FRand() < 0.2 )
                    hitDir *= 5;
                Other.TakeDamage(damage, instigator,HitLocation,
                    (MomentumTransfer * hitDir), 'shot');
            }
            Destroy();          
        }
    }

    simulated function HitWall( vector HitNormal, actor Wall )
    {
        Super.HitWall(HitNormal, Wall); 
        if (FRand()<0.3) 
            PlaySound(ImpactSound, SLOT_Misc, 0.5,,, 0.5+FRand());
        else  
            PlaySound(MiscSound, SLOT_Misc, 0.6,,,1.0);
        
        MakeNoise(0.3);
        SetPhysics(PHYS_None);
        SetCollision(false,false,false);
        RemoteRole = ROLE_None;
        Mesh = mesh'Burst';
        SetRotation( RotRand() );
        PlayAnim   ( 'Explo', 0.9 );
    }

    simulated function Timer()
    {
        local bubble1 b;
        if (Level.NetMode!=NM_DedicatedServer)
        {
            b=spawn(class'Bubble1'); 
            b.DrawScale= 0.1 + FRand()*0.2;
            b.SetLocation(Location+FRand()*vect(2,0,0)+FRand()*Vect(0,2,0)+FRand()*Vect(0,0,2));
            b.buoyancy = b.mass+(FRand()*0.4+0.1);
        }
        DelayTime+=FRand()*0.1+0.1;
        SetTimer(DelayTime,False);  
    }

    simulated function ZoneChange( Zoneinfo NewZone )
    {
        if (NewZone.bWaterZone) 
        {
            Velocity=0.7*Velocity;  
            DelayTime=0.03;     
            SetTimer(DelayTime,False);
        }
    }

    function BeginState()
    {
        local rotator RandRot;

        Velocity = Vector(Rotation) * speed;
        RandRot.Pitch = FRand() * 200 - 100;
        RandRot.Yaw = FRand() * 200 - 100;
        RandRot.Roll = FRand() * 200 - 100;
        Velocity = Velocity >> RandRot;
        if( Region.zone.bWaterZone )
            Velocity=0.7*Velocity;
    }
}

///////////////////////////////////////////////////////
simulated function Explode(vector HitLocation, vector HitNormal)
{
}

simulated function AnimEnd()
{
    Destroy();
}

defaultproperties
{
     speed=1600.000000
     Damage=14.000000
     MomentumTransfer=4000
     ImpactSound=Sound'UnrealShare.Stinger.Ricochet'
     MiscSound=Sound'UnrealShare.Razorjack.BladeHit'
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=6.000000
     AnimRate=1.000000
     Mesh=LodMesh'UnrealShare.TarydiumProjectile'
     AmbientGlow=215
     bUnlit=True
     bNoSmooth=True
     LightType=LT_Steady
     LightEffect=LE_NonIncidence
     LightBrightness=80
     LightHue=152
     LightSaturation=32
     LightRadius=5
     LightPeriod=50
     bBounce=True
     Mass=2.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:00:12.000 - Creation time: za 22-4-2006 13:01:34.109 - Created with UnCodeX