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

Botpack.SuperShockRifle


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
//=============================================================================
// SuperShockRifle.
//=============================================================================
class SuperShockRifle extends ShockRifle;

#exec MESH IMPORT MESH=sshockm ANIVFILE=MODELS\ASMD2_a.3D DATAFILE=MODELS\ASMD2_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=sshockm X=0 Y=0 Z=0 YAW=64 PITCH=0
#exec MESH SEQUENCE MESH=sshockm SEQ=All       STARTFRAME=0  NUMFRAMES=52
#exec MESH SEQUENCE MESH=sshockm SEQ=Select    STARTFRAME=0  NUMFRAMES=15 RATE=30 GROUP=Select
#exec MESH SEQUENCE MESH=sshockm SEQ=Still     STARTFRAME=15 NUMFRAMES=1
#exec MESH SEQUENCE MESH=sshockm SEQ=Down      STARTFRAME=17 NUMFRAMES=7  RATE=27
#exec MESH SEQUENCE MESH=sshockm SEQ=Still2    STARTFRAME=28 NUMFRAMES=2
#exec MESH SEQUENCE MESH=sshockm SEQ=Fire1     STARTFRAME=30 NUMFRAMES=10  RATE=22
#exec MESH SEQUENCE MESH=sshockm SEQ=Fire2     STARTFRAME=40 NUMFRAMES=10  RATE=24
#exec TEXTURE IMPORT NAME=SASMD_t FILE=MODELS\ASMDS.PCX GROUP="Skins" LODSET=2
#exec TEXTURE IMPORT NAME=SASMD_t1 FILE=MODELS\ASMDS1.PCX GROUP="Skins" LODSET=2
#exec TEXTURE IMPORT NAME=SASMD_t2 FILE=MODELS\ASMD2.PCX GROUP="Skins" LODSET=2
#exec TEXTURE IMPORT NAME=SASMD_t3 FILE=MODELS\ASMDS3.PCX GROUP="Skins" LODSET=2
#exec TEXTURE IMPORT NAME=SASMD_t4 FILE=MODELS\ASMDS4.PCX GROUP="Skins" LODSET=2
#exec MESHMAP SCALE MESHMAP=sshockm X=0.004 Y=0.003 Z=0.008
#exec MESHMAP SETTEXTURE MESHMAP=sshockm NUM=0 TEXTURE=SASMD_t1
#exec MESHMAP SETTEXTURE MESHMAP=sshockm NUM=1 TEXTURE=SASMD_t2
#exec MESHMAP SETTEXTURE MESHMAP=sshockm NUM=2 TEXTURE=SASMD_t3
#exec MESHMAP SETTEXTURE MESHMAP=sshockm NUM=3 TEXTURE=SASMD_t4

#exec MESH IMPORT MESH=SASMD2hand ANIVFILE=MODELS\ASMDhand_a.3D DATAFILE=MODELS\asmdhand_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=SASMD2hand X=25 Y=600 Z=-40 YAW=64 PITCH=0
#exec MESH SEQUENCE MESH=SASMD2hand SEQ=All   STARTFRAME=0  NUMFRAMES=10
#exec MESH SEQUENCE MESH=SASMD2hand SEQ=Still STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=SASMD2hand SEQ=Fire1 STARTFRAME=1  NUMFRAMES=9  RATE=24
#exec MESH SEQUENCE MESH=SASMD2hand SEQ=Fire2 STARTFRAME=1  NUMFRAMES=9  RATE=24
#exec MESHMAP SCALE MESHMAP=SASMD2hand X=0.05 Y=0.05 Z=0.1
#exec MESHMAP SETTEXTURE MESHMAP=SASMD2hand NUM=1 TEXTURE=SASMD_t


function Fire( float Value )
{
    GotoState('NormalFire');
    bCanClientFire = true;
    bPointing=True;
    ClientFire(value);
    if ( bRapidFire || (FiringSpeed > 0) )
        Pawn(Owner).PlayRecoil(FiringSpeed);
    if ( bInstantHit )
        TraceFire(0.0);
    else
        ProjectileFire(ProjectileClass, ProjectileSpeed, bWarnTarget);
}

function AltFire( float Value )
{
    local actor HitActor;
    local vector HitLocation, HitNormal, Start; 

    if ( Owner == None )
        return;

    GotoState('AltFiring');
    Pawn(Owner).PlayRecoil(FiringSpeed);
    bCanClientFire = true;
    bPointing=True;
    TraceFire(0.0);
    ClientAltFire(value);
}

function float RateSelf( out int bUseAltMode )
{
    local Pawn P;
    local bool bNovice;

    if ( AmmoType.AmmoAmount <=0 )
        return -2;

    P = Pawn(Owner);

    bUseAltMode = 0;
    return AIRating;
}

simulated function PlayFiring()
{
    PlayOwnedSound(FireSound, SLOT_None, Pawn(Owner).SoundDampening*4.0);
    LoopAnim('Fire1', 0.20 + 0.20 * FireAdjust,0.05);
}

simulated function PlayAltFiring()
{
    PlayOwnedSound(FireSound, SLOT_None, Pawn(Owner).SoundDampening*4.0);
    LoopAnim('Fire1', 0.20 + 0.20 * FireAdjust,0.05);
}

function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
    if (Other==None)
    {
        HitNormal = -X;
        HitLocation = Owner.Location + X*10000.0;
    }

    SpawnEffect(HitLocation, Owner.Location + CalcDrawOffset() + (FireOffset.X + 20) * X + FireOffset.Y * Y + FireOffset.Z * Z);

    Spawn(class'ut_SuperRing2',,, HitLocation+HitNormal*8,rotator(HitNormal));

    if ( (Other != self) && (Other != Owner) && (Other != None) ) 
        Other.TakeDamage(HitDamage, Pawn(Owner), HitLocation, 60000.0*X, MyDamageType);
}


function SpawnEffect(vector HitLocation, vector SmokeLocation)
{
    local SuperShockBeam Smoke,shock;
    local Vector DVector;
    local int NumPoints;
    local rotator SmokeRotation;

    DVector = HitLocation - SmokeLocation;
    NumPoints = VSize(DVector)/135.0;
    if ( NumPoints < 1 )
        return;
    SmokeRotation = rotator(DVector);
    SmokeRotation.roll = Rand(65535);
    
    Smoke = Spawn(class'SuperShockBeam',,,SmokeLocation,SmokeRotation);
    Smoke.MoveAmount = DVector/NumPoints;
    Smoke.NumPuffs = NumPoints - 1; 
}

defaultproperties
{
     hitdamage=1000
     InstFog=(X=800.000000,Z=0.000000)
     AmmoName=Class'Botpack.SuperShockCore'
     aimerror=650.000000
     DeathMessage="%k electrified %o with the %w."
     PickupMessage="You got the enhanced Shock Rifle."
     ItemName="Enhanced Shock Rifle"
     PlayerViewMesh=LodMesh'Botpack.sshockm'
     ThirdPersonMesh=LodMesh'Botpack.SASMD2hand'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Do 19.5.2005 19:42:14.000 - Creation time: Fr 7.6.2013 13:16:01.295 - Created with UnCodeX