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

Engine.WeaponAttachment


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
// Unreal third person weapon.
// This actor is both spawned and destroyed by engine whenever needed.
Class WeaponAttachment extends InventoryAttachment
	Native;

var() bool bCopyDisplay; // This attachment should constantly copy display properties from weapon itself (animation, textures etc...).
var Weapon WeaponOwner;
var WeaponMuzzleFlash MyMuzzleFlash;
var float LastUpdateTime;

// Called by engine once actor has been spawned to notify which weapon is owning this actor.
simulated event SetWeaponOwner( Weapon Other )
{
	local byte i;

	WeaponOwner = Other;
	Mesh = WeaponOwner.ThirdPersonMesh;
	DrawScale = WeaponOwner.ThirdPersonScale;
	Texture = WeaponOwner.Texture;
	bMeshEnviroMap = WeaponOwner.bMeshEnviroMap;
	Style = WeaponOwner.Style;
	bParticles = WeaponOwner.bParticles;
	for( i=0; i<ArrayCount(MultiSkins); i++ )
		MultiSkins[i] = WeaponOwner.MultiSkins[i];
	if( WeaponOwner.MuzzleFlashMesh!=None && WeaponOwner.MuzzleFlashTexture!=None )
	{
		MyMuzzleFlash = Spawn(Class'WeaponMuzzleFlash',Self);
		MyMuzzleFlash.Style = WeaponOwner.MuzzleFlashStyle;
		MyMuzzleFlash.Mesh = WeaponOwner.MuzzleFlashMesh;
		MyMuzzleFlash.Texture = WeaponOwner.MuzzleFlashTexture;
		MyMuzzleFlash.DrawScale = WeaponOwner.MuzzleFlashScale;
		MyMuzzleFlash.bStrobeMuzzle = WeaponOwner.bToggleSteadyFlash;
		MyMuzzleFlash.bParticles = WeaponOwner.bMuzzleFlashParticles;
	}
}
// Called by engine when Weapon 'FlashCount' has changed
simulated event PlayMuzzleFlash()
{
	if( MyMuzzleFlash!=None && (Level.TimeSeconds-LastRenderedTime)<0.25f )
		MyMuzzleFlash.FlashMuzzle();
}
// Called by engine when Weapon 'bSteadyFlash3rd' has been toggled
simulated event LoopMuzzleFlash( bool bEnable )
{
	if( MyMuzzleFlash!=None )
		MyMuzzleFlash.SetMuzzleLoop(bEnable);
}
simulated function Destroyed()
{
	if( MyMuzzleFlash!=None )
	{
		MyMuzzleFlash.Destroy();
		MyMuzzleFlash = None;
	}
}

defaultproperties
{
				bCopyDisplay=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:26.000 - Creation time: zo 11-11-2012 21:14:23.022 - Created with UnCodeX