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

UTGameContent.UTProj_LeviathanBolt


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
/**
 * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
 */

class UTProj_LeviathanBolt extends UTProjectile;

var vector TargetLoc;
var vector InitialDir;

replication
{
    if( bNetInitial && (Role==ROLE_Authority) )
        TargetLoc, InitialDir;
}

/**
 * Clean up
 */
simulated function Shutdown()
{
	Super.ShutDown();
	SetTimer(0.0,false);
}
simulated function PostBeginPlay()
{
	Super.PostBeginPlay();
	SetTimer(0.1,true);
}

simulated function Timer()
{
    local vector ForceDir;
    local float VelMag;

    if ( InitialDir == vect(0,0,0) )
        InitialDir = Normal(Velocity);

	Acceleration = vect(0,0,0);

	ForceDir = Normal(TargetLoc - Location);

	if( (ForceDir Dot InitialDir) > 0 )
	{
		VelMag = VSize(Velocity);
		ForceDir = Normal(ForceDir * 0.9 * VelMag + Velocity);
		Velocity =  VelMag * ForceDir;
		Acceleration += 5 * ForceDir;
	}
	
	SetRotation( Rotator(Normal(Velocity)) );

	if ( LifeSpan < 3.5 )
	{
		ClearTimer();
	}	
}

defaultproperties
{
   ProjFlightTemplate=ParticleSystem'VH_Leviathan.Effects.P_VH_Leviathan_Bolt'
   ProjExplosionTemplate=ParticleSystem'VH_Leviathan.Effects.P_VH_Leviathan_BoltImpact'
   AccelRate=20000.000000
   CheckRadius=30.000000
   Speed=1200.000000
   MaxSpeed=3500.000000
   Damage=100.000000
   DamageRadius=300.000000
   MomentumTransfer=4000.000000
   MyDamageType=Class'UTGameContent.UTDmgType_LeviathanBolt'
   Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTProjectile:CollisionCylinder'
      ObjectArchetype=CylinderComponent'UTGame.Default__UTProjectile:CollisionCylinder'
   End Object
   CylinderComponent=CollisionCylinder
   Components(0)=CollisionCylinder
   LifeSpan=4.000000
   DrawScale=1.200000
   CollisionComponent=CollisionCylinder
   Name="Default__UTProj_LeviathanBolt"
   ObjectArchetype=UTProjectile'UTGame.Default__UTProjectile'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:58.000 - Creation time: sk 18-3-2018 10:01:24.031 - Created with UnCodeX