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

UnrealI.ShotShellCase


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
//=============================================================================
// ShotShellCase.
//=============================================================================
class ShotShellCase extends ShellCase;

#exec MESH IMPORT MESH=shotshellused ANIVFILE=Models\shotshellused_a.3d DATAFILE=Models\shotshellused_d.3d LODSTYLE=1 MLOD=1
// 122 Vertices, 120 Triangles
#exec MESH LODPARAMS MESH=shotshellused STRENGTH=0.3 MINVERTS=42 MORPH=0.6 ZDISP=500.0

#exec MESH ORIGIN MESH=shotshellused X=0 Y=0 Z=0 YAW=0 ROLL=64
#exec MESH SEQUENCE MESH=shotshellused SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESHMAP NEW MESHMAP=shotshellused MESH=shotshellused
#exec MESHMAP SCALE MESHMAP=shotshellused X=0.03 Y=0.03 Z=0.05
#exec MESHMAP SETTEXTURE MESHMAP=shotshellused NUM=0 TEXTURE=UnrealShare.Skins.Jshells1 TLOD=10



var bool bHasBounced;


simulated function HitWall( vector HitNormal, actor Wall )
{
	local vector RealHitNormal;

	if ( bHasBounced && ((FRand() < 0.85) || (Velocity.Z > -50)) )
		bBounce = false;
	if ( !Region.Zone.bWaterZone )
		PlaySound(sound 'shell2',SLOT_Misc,0.4,False,300.0,0.6+FRand()/20.0);
	RealHitNormal = HitNormal;
	HitNormal = Normal(HitNormal + 0.4 * VRand());
	if ( (HitNormal Dot RealHitNormal) < 0 )
		HitNormal *= -0.5;
	Velocity = 0.5 * (Velocity - 2 * HitNormal * (Velocity Dot HitNormal));
	RandSpin(100000);
	bHasBounced = True;
}// end simulated function ShotShellCase.HitWall


simulated function Landed( vector HitNormal )
{
	local rotator RandRot;

	if ( !Region.Zone.bWaterZone )
		PlaySound(sound 'shell2',SLOT_Misc,0.5,False,300.0,0.5+FRand()/20.0);
	SetPhysics(PHYS_None);
	RandRot = Rotation;
	RandRot.Pitch = 0;
	RandRot.Roll = 0;
	SetRotation(RandRot);
}// end simulated function ShotShellCase.Landed

defaultproperties
{
				LifeSpan=4.000000
				Mesh=None
				bMeshCurvy=True
				CollisionRadius=8.000000
				CollisionHeight=4.000000
				LightEffect=LE_None
				LightBrightness=0
				LightHue=0
				LightSaturation=0
				LightRadius=0
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: an 13-3-2018 20:51:14.000 - Creation time: sk 18-3-2018 09:43:55.164 - Created with UnCodeX