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

XEffects.NewTracer


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
class NewTracer extends Emitter;

#exec OBJ LOAD FILE=..\Textures\AW-2004Particles.utx

simulated function SpawnParticle( int Amount )
{
	local PlayerController PC;
	local vector Dir, LineDir, LinePos, RealLocation;
	
	Super.SpawnParticle(Amount);
	
    if ( (Instigator == None) || Instigator.IsFirstPerson() )
		return;
   
	// see if local player controller near bullet, but missed
	PC = Level.GetLocalPlayerController();
	if ( (PC != None) && (PC.Pawn != None) )
	{
		Dir.X = Emitters[0].StartVelocityRange.X.Min;
		Dir.Y = Emitters[0].StartVelocityRange.Y.Min;
		Dir.Z = Emitters[0].StartVelocityRange.Z.Min;
		Dir = Normal(Dir);
		LinePos = (Location + (Dir dot (PC.Pawn.Location - Location)) * Dir);
		LineDir = PC.Pawn.Location - LinePos;
		if ( VSize(LineDir) < 150 )
		{
			RealLocation = Location;
			SetLocation(LinePos);
			if ( FRand() < 0.5 )
				PlaySound(sound'Impact3Snd',,,,80);
			else
				PlaySound(sound'Impact7Snd',,,,80);
			SetLocation(RealLocation);
		}
	}
}

defaultproperties
{
	Begin Object Class=SpriteEmitter Name=SpriteEmitter13
		UseDirectionAs=PTDU_Right
		UseSizeScale=True
		UseRegularSizeScale=False
		ScaleSizeXByVelocity=True
		ExtentMultiplier=(X=0.200000)
		ColorMultiplierRange=(Y=(Min=0.800000,Max=0.800000),Z=(Min=0.500000,Max=0.500000))
		MaxParticles=100
		UseRotationFrom=PTRS_None
		UseAbsoluteTimeForSizeScale=True
		SizeScale(1)=(RelativeTime=0.0300000,RelativeSize=1.000000)
		StartSizeRange=(X=(Min=20.000000,Max=20.000000),Y=(Min=10.000000,Max=10.000000))
		ScaleSizeByVelocityMultiplier=(X=0.002000)
		InitialParticlesPerSecond=0.000000
		ParticlesPerSecond=0.0
		RespawnDeadParticles=False
		AutomaticInitialSpawning=False
		Texture=AW-2004Particles.Weapons.TracerShot
		LifetimeRange=(Min=0.100000,Max=0.100000)
		StartVelocityRange=(X=(Min=10000.000000,Max=10000.000000),Y=(Min=0.000000,Max=0.000000),Z=(Min=0.000000,Max=0.000000))
		Name="SpriteEmitter13"
	End Object
	Emitters(0)=SpriteEmitter'SpriteEmitter13'

	bNoDelete=false
	bBlockActors=false
	bCollideActors=false
	RemoteRole=ROLE_None
	Physics=PHYS_None
	bHardAttach=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:22.000 - Creation time: Do 14.8.2014 09:58:45.606 - Created with UnCodeX