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

UTGame.UTDummyPawn


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
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
/**
 * used by SeqAct_DummyWeaponFire to hold the weapon 
 *
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */

class UTDummyPawn extends UTPawn;

/** pointer back to the Kismet action that created us */
var UTSeqAct_DummyWeaponFire FireAction;

simulated function PostBeginPlay()
{
	Super(Pawn).PostBeginPlay();

	UTInventoryManager(InvManager).bInfiniteAmmo = true;
}

simulated function WeaponFired( bool bViaReplication, optional vector HitLocation)
{
	// force update LastRenderTime so attachment doesn't cull effects due to its mesh being hidden
	LastRenderTime = WorldInfo.TimeSeconds;

	Super.WeaponFired(bViaReplication, HitLocation);

	FireAction.NotifyDummyFire();
}

simulated function SetPawnAmbientSound(SoundCue NewAmbientSound)
{
	if (!FireAction.bSuppressSounds)
	{
		Super.SetPawnAmbientSound(NewAmbientSound);
	}
}

simulated function SetWeaponAmbientSound(SoundCue NewAmbientSound)
{
	if (!FireAction.bSuppressSounds)
	{
		Super.SetWeaponAmbientSound(NewAmbientSound);
	}
}

simulated function rotator GetAdjustedAimFor(Weapon InWeapon, vector ProjStart)
{
	local rotator BaseRotation;

	if (FireAction.Target != None)
	{
		BaseRotation = rotator(FireAction.Target.Location - ProjStart);
	}
	else
	{
		BaseRotation = Rotation;
	}
	return (BaseRotation + (FireAction.MaxSpread * (1.0 - 2.0 * FRand())));
}

simulated function WeaponAttachmentChanged()
{
	if ((CurrentWeaponAttachment == None || CurrentWeaponAttachment.Class != CurrentWeaponAttachmentClass))
	{
		// Detach/Destroy the current attachment if we have one
		if (CurrentWeaponAttachment!=None)
		{
			CurrentWeaponAttachment.DetachFrom(Mesh);
			CurrentWeaponAttachment.Destroy();
		}

		// Create the new Attachment.
		if (CurrentWeaponAttachmentClass!=None)
		{
			CurrentWeaponAttachment = Spawn(CurrentWeaponAttachmentClass,self);
			CurrentWeaponAttachment.Instigator = self;
		}
		else
			CurrentWeaponAttachment = none;

		// If all is good, attach it to the Pawn's Mesh.
		if (CurrentWeaponAttachment != None)
		{
			CurrentWeaponAttachment.bSuppressSounds = FireAction.bSuppressSounds;
			CurrentWeaponAttachment.AttachTo(self);
			CurrentWeaponAttachment.SetDualWielding(bDualWielding);

			// hide the weapon attachment mesh, but leave effects visible
			CurrentWeaponAttachment.SetHidden(false);
			CurrentWeaponAttachment.Mesh.SetRotation(rot(0, -16384, 0)); // all are weapon attachments are sideways
			CurrentWeaponAttachment.AttachComponent(CurrentWeaponAttachment.Mesh);
			CurrentWeaponAttachment.Mesh.SetHidden(true);
		}
	}
}

simulated function vector GetWeaponStartTraceLocation(optional Weapon CurrentWeapon)
{
	return GetPawnViewLocation();
}

simulated function vector GetPawnViewLocation()
{
	if (CurrentWeaponAttachment != None && CurrentWeaponAttachment.MuzzleFlashPSC != None)
	{
		return CurrentWeaponAttachment.MuzzleFlashPSC.GetPosition();
	}
	else
	{
		return Super.GetPawnViewLocation();
	}
}

simulated event Tick(float DeltaTime)
{
	// move the weapon attachment to the right location each frame
	if (CurrentWeaponAttachment != None && FireAction.Origin != None && FireAction.Target != None)
	{
		CurrentWeaponAttachment.SetLocation(FireAction.Origin.Location);
		CurrentWeaponAttachment.SetRotation(rotator(FireAction.Target.Location - FireAction.Origin.Location));
	}
}

defaultproperties
{
   Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment ObjName=MyLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTPawn:MyLightEnvironment'
      ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTPawn:MyLightEnvironment'
   End Object
   LightEnvironment=MyLightEnvironment
   Begin Object Class=ParticleSystemComponent Name=GooDeath ObjName=GooDeath Archetype=ParticleSystemComponent'UTGame.Default__UTPawn:GooDeath'
      ObjectArchetype=ParticleSystemComponent'UTGame.Default__UTPawn:GooDeath'
   End Object
   BioBurnAway=GooDeath
   Begin Object Class=DynamicLightEnvironmentComponent Name=DeathVisionLightEnv ObjName=DeathVisionLightEnv Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTPawn:DeathVisionLightEnv'
      ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTPawn:DeathVisionLightEnv'
   End Object
   FirstPersonDeathVisionLightEnvironment=DeathVisionLightEnv
   Begin Object Class=UTSkeletalMeshComponent Name=FirstPersonArms ObjName=FirstPersonArms Archetype=UTSkeletalMeshComponent'UTGame.Default__UTPawn:FirstPersonArms'
      Begin Object Class=AnimNodeSequence Name=MeshSequenceA ObjName=MeshSequenceA Archetype=AnimNodeSequence'UTGame.Default__UTPawn:MeshSequenceA'
         ObjectArchetype=AnimNodeSequence'UTGame.Default__UTPawn:MeshSequenceA'
      End Object
      Animations=AnimNodeSequence'UTGame.Default__UTDummyPawn:FirstPersonArms.MeshSequenceA'
      ObjectArchetype=UTSkeletalMeshComponent'UTGame.Default__UTPawn:FirstPersonArms'
   End Object
   ArmsMesh(0)=FirstPersonArms
   Begin Object Class=UTSkeletalMeshComponent Name=FirstPersonArms2 ObjName=FirstPersonArms2 Archetype=UTSkeletalMeshComponent'UTGame.Default__UTPawn:FirstPersonArms2'
      Begin Object Class=AnimNodeSequence Name=MeshSequenceB ObjName=MeshSequenceB Archetype=AnimNodeSequence'UTGame.Default__UTPawn:MeshSequenceB'
         ObjectArchetype=AnimNodeSequence'UTGame.Default__UTPawn:MeshSequenceB'
      End Object
      Animations=AnimNodeSequence'UTGame.Default__UTDummyPawn:FirstPersonArms2.MeshSequenceB'
      ObjectArchetype=UTSkeletalMeshComponent'UTGame.Default__UTPawn:FirstPersonArms2'
   End Object
   ArmsMesh(1)=FirstPersonArms2
   Begin Object Class=UTAmbientSoundComponent Name=AmbientSoundComponent ObjName=AmbientSoundComponent Archetype=UTAmbientSoundComponent'UTGame.Default__UTPawn:AmbientSoundComponent'
      ObjectArchetype=UTAmbientSoundComponent'UTGame.Default__UTPawn:AmbientSoundComponent'
   End Object
   PawnAmbientSound=AmbientSoundComponent
   Begin Object Class=UTAmbientSoundComponent Name=AmbientSoundComponent2 ObjName=AmbientSoundComponent2 Archetype=UTAmbientSoundComponent'UTGame.Default__UTPawn:AmbientSoundComponent2'
      ObjectArchetype=UTAmbientSoundComponent'UTGame.Default__UTPawn:AmbientSoundComponent2'
   End Object
   WeaponAmbientSound=AmbientSoundComponent2
   Begin Object Class=SkeletalMeshComponent Name=OverlayMeshComponent0 ObjName=OverlayMeshComponent0 Archetype=SkeletalMeshComponent'UTGame.Default__UTPawn:OverlayMeshComponent0'
      ObjectArchetype=SkeletalMeshComponent'UTGame.Default__UTPawn:OverlayMeshComponent0'
   End Object
   OverlayMesh=OverlayMeshComponent0
   Begin Object Class=DynamicLightEnvironmentComponent Name=XRayEffectLightEnv ObjName=XRayEffectLightEnv Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTPawn:XRayEffectLightEnv'
      ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTPawn:XRayEffectLightEnv'
   End Object
   XRayEffectLightEnvironment=XRayEffectLightEnv
   Mesh=None
   Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTPawn:CollisionCylinder'
      ObjectArchetype=CylinderComponent'UTGame.Default__UTPawn:CollisionCylinder'
   End Object
   CylinderComponent=CollisionCylinder
   RemoteRole=ROLE_None
   bGameRelevant=True
   bCollideActors=False
   CollisionComponent=None
   Name="Default__UTDummyPawn"
   ObjectArchetype=UTPawn'UTGame.Default__UTPawn'
}

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