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

OnslaughtBP.ONSShockTank


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
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class ONSShockTank extends ONSWheeledCraft;


function bool ImportantVehicle()
{
	return true;
}

function ShouldTargetMissile(Projectile P)
{
	local AIController C;

	C = AIController(Controller);
	if ( (C != None) && (C.Skill >= 2.0) )
		ONSShockTankCannon(Weapons[0]).ShieldAgainstIncoming(P);
}

function bool Dodge(eDoubleClickDir DoubleClickMove)
{
	ONSShockTankCannon(Weapons[0]).ShieldAgainstIncoming();
	return false;
}

function VehicleCeaseFire(bool bWasAltFire)
{
    Super.VehicleCeaseFire(bWasAltFire);

    if (bWasAltFire && ONSShockTankCannon(Weapons[ActiveWeapon]) != None)
        ONSShockTankCannon(Weapons[ActiveWeapon]).CeaseAltFire();
}

event TakeDamage(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType)
{
	local vector ShieldHitLocation, ShieldHitNormal;

	// don't take damage if should have been blocked by shield
	if ( (Weapons.Length > 0) && ONSShockTankCannon(Weapons[0]).bShieldActive && (ONSShockTankCannon(Weapons[0]).ShockShield != None) && (Momentum != vect(0,0,0))
		&& (HitLocation != Location) && (DamageType != None) && (ClassIsChildOf(DamageType,class'WeaponDamageType') || ClassIsChildOf(DamageType,class'VehicleDamageType')) 
		&& !ONSShockTankCannon(Weapons[0]).ShockShield.TraceThisActor(ShieldHitLocation,ShieldHitNormal,HitLocation,HitLocation - 2000*Normal(Momentum)) )
		return;

    // Don't take self inflicated damage from proximity explosion
    if (DamageType == class'DamTypeShockTankProximityExplosion' && EventInstigator != None && EventInstigator == self)
        return;

    Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType);
}


simulated function vector GetTargetLocation()
{
	return Location + vect(0,0,1)*CollisionHeight;
}

static function StaticPrecache(LevelInfo L)
{
    Super.StaticPrecache(L);

    L.AddPrecacheMaterial(Material'ONSBPTextures.Skins.PaladinGreen');
    L.AddPrecacheMaterial(Material'ONSBPTextures.Skins.PaladinTan');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Fire.SmokeFragment');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Fire.NapalmSpot');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Energy.ElecPanelsP');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Energy.ElecPanels');
    L.AddPrecacheMaterial(Material'ExplosionTex.Framed.exp2_framesP');
    L.AddPrecacheMaterial(Material'ONSInterface-TX.tankBarrelAligned');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectCore2');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectSwirl');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockBallTrail');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectCore2a');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockRingTex');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectCore');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Energy.SmoothRing');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Fire.Ripples1P');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Fire.Ripples2P');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.BoloBlob');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ElectricShockTexG');
    L.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ElectricShockTexG2');
    L.AddPrecacheMaterial(Material'VehicleFX.Particles.DustyCloud2');
    L.AddPrecacheMaterial(Material'VMParticleTextures.DirtKICKGROUP.dirtKICKTEX');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SoftFade');
    L.AddPrecacheMaterial(Material'AbaddonArchitecture.Base.bas27go');
}

simulated function UpdatePrecacheStaticMeshes()
{
    Super.UpdatePrecacheStaticMeshes();
}

simulated function UpdatePrecacheMaterials()
{
    Level.AddPrecacheMaterial(Material'ONSBPTextures.Skins.PaladinGreen');
    Level.AddPrecacheMaterial(Material'ONSBPTextures.Skins.PaladinTan');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Fire.SmokeFragment');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Fire.NapalmSpot');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Energy.ElecPanelsP');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Energy.ElecPanels');
    Level.AddPrecacheMaterial(Material'ExplosionTex.Framed.exp2_framesP');
    Level.AddPrecacheMaterial(Material'ONSInterface-TX.tankBarrelAligned');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectCore2');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectSwirl');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockBallTrail');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectCore2a');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockRingTex');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ShockTankEffectCore');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Energy.SmoothRing');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Fire.Ripples1P');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Fire.Ripples2P');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.BoloBlob');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ElectricShockTexG');
    Level.AddPrecacheMaterial(Material'AW-2k4XP.Weapons.ElectricShockTexG2');
    Level.AddPrecacheMaterial(Material'VehicleFX.Particles.DustyCloud2');
    Level.AddPrecacheMaterial(Material'VMParticleTextures.DirtKICKGROUP.dirtKICKTEX');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SoftFade');
    Level.AddPrecacheMaterial(Material'AbaddonArchitecture.Base.bas27go');

	Super.UpdatePrecacheMaterials();
}

DefaultProperties
{
	Mesh=Mesh'ONSBPAnimations.ShockTankMesh'
	VehiclePositionString="in a Paladin"
	VehicleNameString="Paladin"
	bReplicateAnimations=True

    RedSkin=Texture'ONSBPTextures.Skins.PaladinTan'
    BlueSkin=Texture'ONSBPTextures.Skins.PaladinGreen'

	DriverWeapons(0)=(WeaponClass=class'OnslaughtBP.ONSShockTankCannon',WeaponBone=CannonAttach);

    DestroyedVehicleMesh=StaticMesh'ONSBP_DestroyedVehicles.Paladin.DestroyedPaladin'
	DestructionEffectClass=class'Onslaught.ONSSmallVehicleExplosionEffect'
	DisintegrationEffectClass=class'OnslaughtBP.ONSShockTankDeathExp'
    DestructionLinearMomentum=(Min=200000,Max=300000)
    DestructionAngularMomentum=(Min=100,Max=150)
    DisintegrationHealth=-25
	ImpactDamageMult=0.0010

	Health=800
	HealthMax=800
	CollisionHeight=+40.0
	CollisionRadius=+260.0
	DriverDamageMult=0.01
	bHasAltFire=True
	bSeparateTurretFocus=True
	RanOverDamageType=class'DamTypeRVRoadkill'
	CrushedDamageType=class'DamTypeRVPancake'

	DrawScale=1.0
	DrawScale3D=(X=1.0,Y=1.0,Z=1.0)

	FPCamPos=(X=-45,Y=0,Z=250)
	FPCamViewOffset=(X=-30,Y=0,Z=0)
	TPCamLookat=(X=0,Y=0,Z=0)
	TPCamWorldOffset=(X=0,Y=0,Z=375)
	TPCamDistance=375

	bDrawDriverInTP=False
	bDrawMeshInFP=True
	bHasHandbrake=False
	bAllowBigWheels=True

	MaxViewYaw=16000
	MaxViewPitch=16000

	FlipTorque=400

	IdleSound=sound'ONSBPSounds.ShockTank.EngineCruise'
	StartUpSound=sound'ONSBPSounds.ShockTank.EngineRampUp'
	ShutDownSound=sound'ONSBPSounds.ShockTank.EngineRampDown'
	EngineRPMSoundRange=9000
	SoundVolume=255
	AmbientSoundScaling=2.0
	IdleRPM=500
	RevMeterScale=4000

	StartUpForce="RVStartUp"

	SteerBoneName="SteeringWheel"
	SteerBoneAxis=AXIS_Z
	SteerBoneMaxAngle=90

	EntryPosition=(X=0,Y=0,Z=0)
	EntryRadius=300.0

	ExitPositions(0)=(X=0,Y=-265,Z=100)
	ExitPositions(1)=(X=0,Y=265,Z=100)
	ExitPositions(2)=(X=0,Y=-265,Z=-100)
	ExitPositions(3)=(X=0,Y=265,Z=-100)

	AirPitchDamping=25.0

//	HeadlightCoronaOffset(0)=(X=86,Y=30,Z=7)
//	HeadlightCoronaOffset(1)=(X=86,Y=-30,Z=7)
//	HeadlightCoronaMaterial=Material'EpicParticles.flashflare1'
//	HeadlightCoronaMaxSize=65

//	bMakeBrakeLights=true
//	BrakeLightOffset(0)=(X=-100,Y=23,Z=7)
//	BrakeLightOffset(1)=(X=-100,Y=-23,Z=7)
//	BrakeLightMaterial=Material'EpicParticles.flashflare1'

//	HeadlightProjectorOffset=(X=90,Y=0,Z=7)
//	HeadlightProjectorRotation=(Yaw=0,Pitch=-1000,Roll=0)
//	HeadlightProjectorMaterial=Texture'VMVehicles-TX.RVGroup.RVProjector'
//	HeadlightProjectorScale=0.3

	DamagedEffectOffset=(X=60,Y=10,Z=10)
	DamagedEffectScale=1.0

	WheelPenScale=1.2
	WheelPenOffset=0.01
	WheelSoftness=0.1
	WheelRestitution=0.1
	WheelAdhesion=0.0
	WheelLongFrictionFunc=(Points=((InVal=0,OutVal=0.0),(InVal=100.0,OutVal=1.0),(InVal=200.0,OutVal=0.9),(InVal=10000000000.0,OutVal=0.9)))
	WheelLongFrictionScale=2.0
	WheelLatFrictionScale=1.5
	WheelLongSlip=0.001
	WheelLatSlipFunc=(Points=((InVal=0.0,OutVal=0.0),(InVal=30.0,OutVal=0.010),(InVal=45.0,OutVal=0.00),(InVal=10000000000.0,OutVal=0.00)))
	WheelHandbrakeSlip=0.01
	WheelHandbrakeFriction=0.1
	WheelSuspensionTravel=45.0
	WheelSuspensionOffset=-12.0
	WheelSuspensionMaxRenderTravel=45.0
	TurnDamping=35

	HandbrakeThresh=200
	FTScale=0.02
	ChassisTorqueScale=0.2

	MinBrakeFriction=4.0
	MaxBrakeTorque=20.0
	MaxSteerAngleCurve=(Points=((InVal=0,OutVal=35.0),(InVal=450.0,OutVal=35.0),(InVal=550.0,OutVal=11.0),(InVal=1000000000.0,OutVal=11.0)))
	SteerSpeed=80
	StopThreshold=100
	TorqueCurve=(Points=((InVal=0,OutVal=27.0),(InVal=200,OutVal=30.0),(InVal=1500,OutVal=33.0),(InVal=2800,OutVal=0.0)))
	EngineBrakeFactor=0.0001
	EngineBrakeRPMScale=0.1
	EngineInertia=0.1
	WheelInertia=0.1

	TransRatio=0.03
	GearRatios[0]=-0.5
	GearRatios[1]=0.4
	GearRatios[2]=0.65
	GearRatios[3]=0.85
	GearRatios[4]=1.1
	ChangeUpPoint=2000
	ChangeDownPoint=1000
	LSDFactor=1.0

	VehicleMass=6.0
	MomentumMult=0.8

    Begin Object Class=KarmaParamsRBFull Name=KParams0
		KStartEnabled=True
		KFriction=0.5
		KLinearDamping=0.05
		KAngularDamping=0.05
		KImpactThreshold=700
		bKNonSphericalInertia=True
        bHighDetailOnly=False
        bClientOnly=False
		bKDoubleTickRate=True
		KInertiaTensor(0)=1.0
		KInertiaTensor(1)=0.0
		KInertiaTensor(2)=0.0
		KInertiaTensor(3)=3.0
		KInertiaTensor(4)=0.0
		KInertiaTensor(5)=3.0
		KCOMOffset=(X=-0.25,Y=0.0,Z=-1.35)
		bDestroyOnWorldPenetrate=True
		bDoSafetime=True
        Name="KParams0"
    End Object
    KParams=KarmaParams'KParams0'

	Begin Object Class=SVehicleWheel Name=RWheel1
		BoneName="8WheelerWheel01"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Steered
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Right1"
	End Object
	Wheels(0)=SVehicleWheel'RWheel1'

	Begin Object Class=SVehicleWheel Name=RWheel2
		BoneName="8WheelerWheel03"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Fixed
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Right2"
	End Object
	Wheels(1)=SVehicleWheel'RWheel2'

	Begin Object Class=SVehicleWheel Name=RWheel3
		BoneName="8WheelerWheel05"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Fixed
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Right3"
	End Object
	Wheels(2)=SVehicleWheel'RWheel3'

	Begin Object Class=SVehicleWheel Name=RWheel4
		BoneName="8WheelerWheel07"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Inverted
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Right4"
	End Object
	Wheels(3)=SVehicleWheel'RWheel4'

	Begin Object Class=SVehicleWheel Name=LWheel1
		BoneName="8WheelerWheel02"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Steered
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Left1"
	End Object
	Wheels(4)=SVehicleWheel'LWheel1'

	Begin Object Class=SVehicleWheel Name=LWheel2
		BoneName="8WheelerWheel04"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Fixed
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Left2"
	End Object
	Wheels(5)=SVehicleWheel'LWheel2'

	Begin Object Class=SVehicleWheel Name=LWheel3
		BoneName="8WheelerWheel06"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Fixed
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Left3"
	End Object
	Wheels(6)=SVehicleWheel'LWheel3'

	Begin Object Class=SVehicleWheel Name=LWheel4
		BoneName="8WheelerWheel08"
		BoneRollAxis=AXIS_Y
		BoneSteerAxis=AXIS_Z
		BoneOffset=(X=0.0,Y=7.0,Z=0.0)
		WheelRadius=44
		bPoweredWheel=True
		SteerType=VST_Inverted
		SupportBoneAxis=AXIS_X
		SupportBoneName="Suspension_Left4"
	End Object
	Wheels(7)=SVehicleWheel'LWheel4'

	GroundSpeed=940
	CenterSpringForce="SpringONSSRV"

	HornSounds(0)=sound'ONSBPSounds.ShockTank.PaladinHorn'
	HornSounds(1)=sound'ONSVehicleSounds-S.Dixie_Horn'

	MaxDesireability=0.6
	ObjectiveGetOutDist=1500.0
	bDriverHoldsFlag=false
	FlagOffset=(Z=50.0)
	FlagBone=CannonAttach
	FlagRotation=(Yaw=32768)
}

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