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

UPak.ExplosiveBullet


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
//=============================================================================
// ExplosiveBullet.uc
// $Date: 4/28/99 2:18p $
// $Revision: 3 $
//=============================================================================

class ExplosiveBullet expands Projectile;

#exec MESH IMPORT MESH=CARbullet ANIVFILE=MODELS\CARifle\CARbullet_a.3d DATAFILE=MODELS\CARifle\CARbullet_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=CARbullet X=0 Y=0 Z=0 YAW=385

#exec MESH SEQUENCE MESH=CARbullet SEQ=All       STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=CARbullet SEQ=CARBULLET STARTFRAME=0 NUMFRAMES=1

#exec TEXTURE IMPORT NAME=JCARammo1 FILE=MODELS\CARifle\ammo01.PCX GROUP=Skins FLAGS=2 // SKIN

#exec MESHMAP NEW   MESHMAP=CARbullet MESH=CARbullet
#exec MESHMAP SCALE MESHMAP=CARbullet X=0.1 Y=0.1 Z=0.2

#exec MESHMAP SETTEXTURE MESHMAP=CARbullet NUM=0 TEXTURE=JCARammo1


// ================================================================================================
// Flying State
// ================================================================================================

auto state Flying
{
    
    function BeginState()
    {
        Velocity = Vector( Rotation ) * speed;
        PlaySound( SpawnSound );
    }
    
    
    
    
    simulated function ProcessTouch( Actor Other, Vector HitLocation )
    {
        if( !Other.IsA( 'Pawn' ) )
        {
            Other.TakeDamage(30, instigator,HitLocation, vect( 0, 0, 0 ), 'Exploded');
        }
        else
        {
            BlowUp( HitLocation );
        }
    }
    
    
    
    
    simulated function HitWall( Vector HitLocation, Actor Wall )
    {
        if ( Role == ROLE_Authority )
        {
            if ( (Mover(Wall) != None) && Mover(Wall).bDamageTriggered )
                Wall.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), '');
    
            MakeNoise(1.0);
        }

        BlowUp( Location );
    }
    
    
    
    
    simulated function BlowUp( Vector HitLocation )
    {
        local UPakBurst UPBurst;
        local vector HitNormal;
        
        HitNormal = Normal( HitLocation - Location );
        Spawn( class'UPakExplosion2',,, HitLocation, Rotation );
        if( Instigator.IsA( 'SpaceMarine' ) )
        {
            HurtRadius( 2, 100, 'exploded', 25000, HitLocation );
        }
        else
        {
            HurtRadius( 55, 100, 'exploded', 25000, HitLocation );
        }
        Destroy();
    }   
}   

defaultproperties
{
     speed=50000.000000
     MaxSpeed=50000.000000
     Damage=15.000000
     RemoteRole=ROLE_SimulatedProxy
     Mesh=LodMesh'UPak.CARbullet'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:27:50.000 - Creation time: za 22-4-2006 13:29:27.906 - Created with UnCodeX