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

UTGame.UTVehicle_Hoverboard


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
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976
00977
00978
00979
00980
00981
00982
00983
00984
00985
00986
00987
00988
00989
00990
00991
00992
00993
00994
00995
00996
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051
01052
01053
01054
01055
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196
01197
01198
01199
01200
01201
01202
01203
01204
01205
01206
01207
01208
01209
01210
01211
01212
01213
01214
01215
01216
01217
01218
01219
01220
01221
01222
01223
01224
01225
01226
01227
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263
01264
01265
01266
01267
01268
01269
01270
01271
01272
01273
01274
01275
01276
01277
01278
01279
01280
01281
01282
01283
01284
01285
01286
01287
01288
01289
01290
01291
01292
01293
01294
01295
01296
01297
01298
01299
01300
01301
01302
01303
01304
01305
01306
01307
01308
01309
01310
01311
01312
01313
01314
01315
01316
01317
01318
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340
01341
01342
01343
01344
01345
01346
01347
01348
01349
01350
01351
01352
01353
01354
01355
01356
01357
01358
01359
01360
01361
01362
01363
01364
01365
01366
01367
01368
01369
01370
01371
01372
01373
01374
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384
01385
01386
01387
01388
01389
01390
01391
01392
01393
01394
01395
01396
01397
01398
01399
01400
01401
01402
01403
01404
01405
01406
01407
01408
01409
01410
01411
01412
01413
01414
01415
01416
01417
01418
01419
01420
01421
01422
01423
01424
01425
01426
01427
01428
01429
01430
01431
01432
01433
01434
01435
01436
01437
01438
01439
01440
01441
01442
01443
01444
01445
01446
01447
01448
01449
01450
01451
01452
01453
01454
01455
01456
01457
01458
01459
01460
01461
01462
01463
01464
01465
01466
01467
01468
01469
01470
01471
01472
01473
01474
01475
01476
01477
01478
01479
01480
01481
01482
01483
01484
01485
01486
01487
01488
01489
01490
01491
01492
01493
01494
01495
01496
01497
01498
01499
01500
01501
01502
01503
01504
01505
01506
01507
01508
01509
01510
01511
01512
01513
01514
01515
01516
01517
01518
01519
01520
01521
01522
01523
01524
01525
01526
01527
01528
01529
01530
01531
01532
01533
01534
01535
01536
01537
01538
01539
01540
01541
01542
01543
01544
01545
01546
01547
01548
01549
01550
01551
01552
01553
01554
01555
01556
01557
01558
01559
01560
01561
01562
01563
01564
01565
01566
01567
01568
01569
01570
01571
01572
01573
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584
01585
01586
01587
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598
01599
01600
01601
01602
01603
01604
01605
01606
01607
01608
01609
01610
01611
01612
01613
01614
01615
01616
01617
01618
01619
01620
01621
01622
01623
01624
01625
01626
01627
01628
01629
01630
01631
01632
01633
01634
01635
01636
01637
01638
01639
01640
01641
01642
01643
01644
01645
01646
01647
01648
01649
01650
01651
01652
01653
01654
01655
01656
01657
01658
01659
01660
01661
01662
01663
01664
01665
01666
01667
01668
01669
01670
01671
01672
01673
01674
01675
01676
01677
01678
01679
01680
01681
01682
01683
01684
01685
01686
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696
01697
01698
01699
01700
01701
01702
01703
01704
01705
01706
01707
01708
01709
01710
01711
01712
01713
01714
01715
01716
01717
01718
01719
01720
01721
01722
01723
01724
01725
01726
01727
01728
01729
01730
01731
01732
01733
01734
01735
01736
01737
01738
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748
01749
01750
01751
01752
01753
01754
01755
01756
01757
01758
01759
01760
01761
01762
01763
01764
01765
01766
01767
01768
01769
01770
01771
01772
01773
01774
01775
01776
01777
01778
01779
01780
01781
01782
01783
01784
01785
01786
01787
01788
01789
01790
01791
01792
01793
01794
01795
01796
01797
01798
01799
01800
01801
01802
01803
01804
01805
01806
01807
01808
01809
01810
01811
01812
01813
01814
01815
01816
01817
01818
01819
01820
01821
01822
01823
01824
01825
01826
01827
01828
01829
01830
01831
01832
01833
01834
01835
01836
01837
01838
01839
01840
01841
01842
01843
01844
01845
01846
01847
01848
01849
01850
01851
01852
01853
01854
01855
01856
01857
01858
01859
01860
01861
01862
01863
01864
01865
01866
01867
01868
01869
01870
01871
01872
01873
01874
01875
01876
01877
01878
01879
01880
01881
01882
01883
01884
01885
01886
01887
01888
01889
01890
01891
01892
01893
01894
01895
01896
01897
01898
01899
01900
01901
01902
01903
01904
01905
01906
01907
01908
01909
01910
01911
01912
01913
01914
01915
01916
01917
01918
01919
01920
01921
01922
01923
01924
01925
01926
01927
01928
01929
01930
01931
01932
01933
01934
01935
01936
01937
01938
01939
01940
01941
01942
01943
01944
01945
01946
01947
01948
01949
01950
01951
01952
01953
01954
01955
01956
01957
01958
01959
01960
01961
01962
/**
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */

class UTVehicle_Hoverboard extends UTHoverVehicle
	native(Vehicle);

/** Hoverboard mesh visible attachment */
var     UTSkeletalMeshComponent HoverboardMesh;
var()   vector                  MeshLocationOffset;
var()   rotator                 MeshRotationOffset;

var()	float	JumpForceMag;

/** Sideways force when dodging (added to JumpForceMag * 0.8) */
var()	float	DodgeForceMag;

var()	float	TrickJumpWarmupMax;
var()   float   JumpCheckTraceDist;
var		float	TrickJumpWarmup;
var		float	TrickSpinWarmup;
var     float	JumpDelay, LastJumpTime;
var		bool	bInAJump; // True when in-air as the result of a jump
var		bool	bLeftGround;

var		float	TakeoffYaw;
var		float	AutoSpin;
var		float	SpinHeadingOffset;
var()	float	SpinSpeed;

var		float	LandedCountdown;

var repnotify bool bDoHoverboardJump;

/** True when requesting dodge */
var bool bIsDodging;

/** Dodge force to apply (has direction) */
var vector DodgeForce;

var		bool	bTrickJumping;
var		bool	bGrabbingBoard;
var		bool	bGrab1;
var		bool	bGrab2;
var		bool	bForceSpinWarmup;

/** Special StayUpright system based on lean */
/** Angle at which the vehicle will resist rolling */
var()      float    LeanUprightStiffness;
var()      float    LeanUprightDamping;

var editinline export	    RB_StayUprightSetup     LeanUprightConstraintSetup;
var editinline export	    RB_ConstraintInstance   LeanUprightConstraintInstance;

var editinline export		RB_ConstraintSetup		FootBoardConstraintSetup;
var editinline export		RB_ConstraintInstance	LeftFootBoardConstraintInstance;
var editinline export		RB_ConstraintInstance	RightFootBoardConstraintInstance;

var	transient vector GroundNormal;

/** The current angle (in radians) between the way the board is pointing and the way the player is looking. */
var transient float	CurrentLookYaw;

/** Controller used to turn the spine. */
var SkelControlSingleBone	SpineTurnControl;

/** Controller used to point arm at vehicle you are towed behind. */
var SkelControlLookAt		TowControl;

/** Max yaw applied to have head/spine track looking direction. */
var(HeadTracking)	float	MaxTrackYaw;

/** Used internally for limiting how quickly the head tracks. */
var	transient float	CurrentHeadYaw;

/** disable repulsors if the vehicle has negative Z velocity exceeds the Driver's MaxFallSpeed */
var bool bDisableRepulsorsAtMaxFallSpeed;

/** Using strafe keys adds this offset to current look direction. */
var() float	HoverboardSlalomMaxAngle;

/** How quickly the 'slalom' offset can change (controlled by strafe) */
var() float	SlalomSpeed;

/** Current offset applied to look direction for board */
var	float CurrentSteerOffset;

// TurnLeanFactor adjusts how much the hoverboard leans when turning
// MaxTurnLean is the maximum amount the hoverboard can lean in unreal angular units
// StrafeLean is the amount the hoverboard will lean when strafing in unreal angular units

var()   float   TurnLeanFactor;
var()	float	MaxLeanPitchSpeed;
var		transient float TargetPitch;
var()	float	DownhillDownForce;

// WaterCheckLevel is the distance to trace down to determine if water is too deep to travel over
var()   float           WaterCheckLevel;

var editinline export	    RB_DistanceJointSetup   DistanceJointSetup;
var editinline export	    RB_ConstraintInstance   DistanceJointInstance;

/** Tow Cable */
var     bool					bInTow;
var()   float                   MaxTowDistance;

struct native TowInfoData
{
	/** The vehicle we are attached to */
	var UTVehicle 	TowTruck;
	var Name		TowAttachPoint;
};

var repnotify TowInfoData TowInfo;

/** Location for towing constraint in vehicle space. */
var vector	TowLocalAttachPos;

/** When being towed, using strafe keys adds this offset to current look direction. */
var() float	HoverboardTowSlalomMaxAngle;

/** Used internally - current length of tow 'rope'. */
var	const float	CurrentTowDistance;

/** Controls how quickly length of tow rope changes when holding throttle. */
var float	TowDistanceChangeSpeed;

/** Time that tow line has to be blocked before it breaks. */
var float	TowLineBlockedBreakTime;

/** How long the tow line has been blocked for so far. */
var	float	TowLineBlockedFor;

/** The emitter that shows the attachment */
var ParticleSystemComponent TowBeamEmitter;

/** The emitter on the end point of the towbeam*/
var ParticleSystemComponent TowBeamEndPointEffect;

/** This is the name to use to control the intensity of the tow beam **/
var name TowBeamIntensityName;

/** Emitter under the board making dust. */
var ParticleSystemComponent HoverboardDust;
var ParticleSystem			RedDustEffect;
var ParticleSystem			BlueDustEffect;

var name					DustVelMagParamName;
var name					DustBoardHeightParamName;
var name					DustVelParamName;

var	ParticleSystemComponent	ThrusterEffect;
var name					ThrusterEffectSocket;
var ParticleSystem			RedThrusterEffect;
var ParticleSystem			BlueThrusterEffect;

/** The reference particle systems for the beam emitter (per team) */
var ParticleSystem TowBeamTeamEmitters[2];

/** The reference particle systems for the end point emitter (per team) */
var ParticleSystem TowBeamTeamEndPoints[2];
/** parameter for tow beam endpoint */
var name TowBeamEndParameterName;

/** Effect when moving quickly over water. */
var ParticleSystemComponent	RoosterEffect;
var ParticleSystem RoosterEffectTemplate;
/** How much to turn effect to side based on steering. */
var float					RoosterTurnScale;
/** Noise to play when rooster tail is active. */
var	AudioComponent			RoosterNoise;
var SoundCue RoosterSoundCue;

/** Sounds */
var AudioComponent  CurveSound;
var SoundCue        EngineThrustSound;
var SoundCue        TurnSound;
var SoundCue        JumpSound;

/** Cue played when over water. */
var SoundCue		OverWaterSound;

var AudioComponent TowLoopComponent;
var SoundCue TowLoopCue;
var SoundCue TowStartedSound;
var SoundCue TowEndedSound;
/** camera smooth out */
var float CameraInitialOut;

var(HoverboardCam)	vector	HoverCamOffset;
var(HoverboardCam)	rotator	HoverCamRotOffset;
var(HoverboardCam)	vector	VelLookAtOffset;
var(HoverboardCam)	vector	VelBasedCamOffset;
var(HoverboardCam)	float	VelRollFactor;
var(HoverboardCam)	float	HoverCamMaxVelUsed;
var(HoverboardCam)	float	ViewRollRate;
var					int		CurrentViewRoll;

var float	TargetPhysicsWeight;
var float	PhysWeightBlendTimeToGo;

var() float	PhysWeightBlendTime;

/** Save Doubleclick move from player */
var eDoubleClickDir	DoubleClickMove;

/** hoverboard handle mesh, attached separately to driver */
var StaticMeshComponent HandleMesh;

/** How much falling damage player can take on hoverboard without ragdolling */
var int FallingDamageRagdollThreshold;

/** set when ragdolling, so DriverLeave() doesn't try to stick driver in another vehicle */
var bool bNoVehicleEntry;

/** If we hit the ground harder than this, reset the physics of the rider to the animated pose, to avoid weird psoes. */
var() float	ImpactGroundResetPhysRiderThresh;

/** If we do hit the ground harder than ImpactGroundResetPhysRiderThresh - set the rider Z vel to be this instead. */
var() float BigImpactPhysRiderZVel;

/** AI property for tow cable use */
var float LastTryTowCableTime;
/** If bot's speed is less than this for a while, it leaves the hoverboard to go on foot fot a bit instead */
var float DesiredSpeedSquared;
/** last time bot's speed was at or above DesiredSpeedSquared */
var float LastDesiredSpeedTime;

// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

replication
{
	if(Role == ROLE_Authority)
		bTrickJumping;
	if (bNetDirty)
		TowInfo, bGrab1, bGrab2;
	if (!bNetOwner)
		bDoHoverboardJump, bForceSpinWarmup;
}

/** Used by PlayerController.FindGoodView() in RoundEnded State */
simulated function FindGoodEndView(PlayerController InPC, out Rotator GoodRotation)
{
	if ( UTPawn(Driver) != None )
	{
		Driver.FindGoodEndView(InPC, GoodRotation);
	}
	else
	{
		super.FindGoodEndView(InPC, GoodRotation);
	}
}

simulated function bool CoversScreenSpace(vector ScreenLoc, Canvas Canvas)
{
	return ( (ScreenLoc.X > 0.5*Canvas.ClipX) &&  (ScreenLoc.X < 0.7*Canvas.ClipX)
		&& (ScreenLoc.Y > 0.5*Canvas.ClipY) );
}

function PlayHorn() {}

simulated function float GetDisplayedHealth()
{
	return (Driver != None) ? Driver.Health : Health;
}

simulated function DisplayHud(UTHud Hud, Canvas Canvas, vector2D HudPOS, optional int SeatIndex)
{
}

/**
  * returns the camera focus position (without camera lag)
  */
simulated function vector GetCameraFocus(int SeatIndex)
{
	return (Driver != None) ? Driver.Mesh.GetBoneLocation(Seats[SeatIndex].CameraTag) : Location;
}

function bool AnySeatAvailable()
{
	return (Driver != none) ? false : super.AnySeatAvailable();
}

/**
  * returns TRUE if vehicle is useable (can be entered)
  */
simulated function bool ShouldShowUseable(PlayerController PC, float Dist)
{
	return false;
}

/**
  * Can't kick out bots from their hoverboard
  */
function bool KickOutBot()
{
	return false;
}

/**
  * Called from TickSpecial().  Doubleclick detected, so pick dodge direction
  */
event RequestDodge()
{
	if (DoubleClickMove == DCLICK_Right)
	{
		Rise = 1.0;
		bIsDodging = TRUE;
		ServerRequestDodge(false);
	}
	else if (DoubleClickMove == DCLICK_Left)
	{
		Rise = 1.0;
		bIsDodging = TRUE;
		ServerRequestDodge(true);
	}
}

/**
  * Server adds dodge force
  * @PARAM bDodgeLeft is true if dodging left, false if dodging right
  */
unreliable server function ServerRequestDodge(bool bDodgeLeft)
{
	local vector X,Y,Z;

	bIsDodging = true;

	GetAxes(Rotation, X, Y, Z);
	Y.Z = 0.0;
	Rise = 1.0;
	DodgeForce = DodgeForceMag * Normal(Y);
	if ( bDodgeLeft )
	{
		DodgeForce *= -1;
	}
	if ( Velocity dot X > 0 )
	{
		DodgeForce -= 0.5 * DodgeForceMag * X;
	}
	DodgeForce.Z = -0.3f * JumpForceMag;
}

/** Creates a physics attachment to */
native final function AttachTowCable();

/**
  * Get double click status from playercontroller
  */
simulated function Tick(float deltatime)
{
	Super.Tick(deltatime);

	if ( (PlayerController(Controller) != None) && (PlayerController(Controller).PlayerInput != None) )
	{
		DoubleClickMove = PlayerController(Controller).PlayerInput.CheckForDoubleClickMove(DeltaTime);
	}
}

simulated function WeaponRotationChanged(int SeatIndex)
{
	return;
}

function DriverDied()
{
	// to get more dual enforcer opportunities, throw out enforcer when kill player on hoverboard
	if ( Driver != None )
	{
		Driver.Weapon = None;
		Driver.ThrowActiveWeapon();
	}
	Super.DriverDied();
}

simulated function InitializeEffects()
{
	local ParticleSystem TeamThrusterEffect;
	local ParticleSystem TeamDustEffect;

	if (WorldInfo.NetMode != NM_DedicatedServer && !bInitializedVehicleEffects)
	{
		if(Team == 1)
		{
			TeamThrusterEffect = BlueThrusterEffect;
			TeamDustEffect = BlueDustEffect;
		}
		else
		{
			TeamThrusterEffect = RedThrusterEffect;
			TeamDustEffect = RedDustEffect;
		}

		ThrusterEffect.SetTemplate(TeamThrusterEffect);
		HoverboardDust.SetTemplate(TeamDustEffect);

		AttachHoverboardEffects();
	}

	Super.InitializeEffects();
}

simulated function AttachHoverboardEffects()
{
	if (WorldInfo.NetMode != NM_DedicatedServer)
	{
		if (bGrabbingBoard)
		{
			if(HoverboardMesh != None)
			{
				HoverboardMesh.AttachComponentToSocket(ThrusterEffect, ThrusterEffectSocket);
			}
		}
		else
		{
			Mesh.AttachComponentToSocket(ThrusterEffect, ThrusterEffectSocket);
		}
	}
}

/**
 * Called when a pawn enters the vehicle
 *
 * @Param P		The Pawn entering the vehicle
 */
function bool DriverEnter(Pawn P)
{
	local int i;
	local RB_BodyInstance BodyInstance;
	local vehicle OldDrivenVehicle;

	// set AI desired speed based on speed of driver
	DesiredSpeedSquared = P.GroundSpeed * 0.25;
	DesiredSpeedSquared *= DesiredSpeedSquared;

	// keep player from getting super jump while getting onto hoverboard
	if ( P.Velocity.Z > 0 )
	{
		LastJumpTime = WorldInfo.TimeSeconds - 0.75;
	}

	// give impulse to physics to match velocity player had before
	Mesh.AddImpulse(P.Velocity,,, true);
	// immediately set BodyInstance velocity properties so if we're already colliding with something RigidBodyCollision() has the correct values
	BodyInstance = Mesh.GetRootBodyInstance();

	// if we fail to spawn the bodyInstance, physics failed here, so just disallow the player to get on hoverboard
	// zero out the pawn's velocity in case his velocity is what caused the physics object to fail
	if (BodyInstance == None)
	{
		P.Velocity = vect(0, 0, 0);
		return false;
	}

	BodyInstance.Velocity = P.Velocity;
	BodyInstance.PreviousVelocity = P.Velocity;

	if (bDisableRepulsorsAtMaxFallSpeed && P.Velocity.Z <= -P.MaxFallSpeed)
	{
		for (i = 0; i < Wheels.length; i++)
		{
			SetWheelCollision(i, false);
		}
	}

	CameraInitialOut = 0.1/SeatCameraScale;

	// temporarily set drivenvehicle so any loaded weapon fires don't hit me.
	OldDrivenVehicle = P.DrivenVehicle;
	P.DrivenVehicle = self;

	if ( BodyInstance == none || !super.DriverEnter(P) )
	{
		P.DrivenVehicle = OldDrivenVehicle;
		return false;
	}

	SetOnlyControllableByTilt( TRUE );

	return true;
}

simulated function vector GetCameraStart(int SeatIndex)
{
	local vector NewStart, UseVel;

	UseVel = ClampLength(Velocity, HoverCamMaxVelUsed);
	NewStart = super.GetCameraStart(SeatIndex);
	return NewStart + (UseVel * VelLookAtOffset);
}

simulated function VehicleCalcCamera(float DeltaTime, int SeatIndex, out vector out_CamLoc, out rotator out_CamRot, out vector CamStart, optional bool bPivotOnly)
{
	local float RealCameraScale;
	local float VelSize;
	local vector AngVel, NewPos, HitLocation, HitNormal;
	local int TargetRoll, DeltaRoll;
	local actor HitActor;

	RealCameraScale = SeatCameraScale;
	if ( CameraInitialOut < 1.0 )
	{
		CameraInitialOut = FMin(1.0, CameraInitialOut + 3*DeltaTime);
		SeatCameraScale *= CameraInitialOut;
	}
	Super.VehicleCalcCamera(DeltaTime, SeatIndex, out_CamLoc, out_CamRot, CamStart, bPivotOnly);
	SeatCameraScale = RealCameraScale;

	VelSize = FMin(VSize(Velocity), HoverCamMaxVelUsed);

	out_CamRot += HoverCamRotOffset;
	out_CamRot = Normalize(out_CamRot);

	// Apply extra translation
	NewPos = out_CamLoc + ((HoverCamOffset + (VelSize * VelBasedCamOffset)) >> out_CamRot);

	// Line check to see we can do that.
	HitActor = Trace(HitLocation, HitNormal, NewPos, out_CamLoc, FALSE, vect(12,12,12));
	if( HitActor != None )
	{
		out_CamLoc = HitLocation;
	}
	else
	{
		out_CamLoc = NewPos;
	}

	TargetRoll = 0;
	if(!bInAJump && Mesh.BodyInstance != None)
	{
		AngVel = Mesh.BodyInstance.GetUnrealWorldAngularVelocity();
		TargetRoll = VelRollFactor * AngVel.Z * VelSize;
	}

	DeltaRoll = Clamp(TargetRoll - CurrentViewRoll, -ViewRollRate*DeltaTime, ViewRollRate*DeltaTime);
	CurrentViewRoll += DeltaRoll;
	out_CamRot.Roll = CurrentViewRoll;
}

simulated function AttachDriver( Pawn P )
{
	local UTPawn UTP;

	UTP = UTPawn(P);
	if (UTP != None)
	{
        //Disable foot placement controls
		UTP.bEnableFootPlacement = FALSE;
		if ( UTP.LeftLegControl != None )
		{
		UTP.LeftLegControl.SetSkelControlActive(false);
		UTP.LeftLegControl.SetSkelControlStrength(0.0, 0.0);
		}
		if ( UTP.RightLegControl != None )
		{
		UTP.RightLegControl.SetSkelControlActive(false);
		UTP.RightLegControl.SetSkelControlStrength(0.0, 0.0);
	}
	}

	Super.AttachDriver(P);

	if (UTP != None && UTP.Mesh.SkeletalMesh != None)
	{
		HandleMesh.SetShadowParent(UTP.Mesh);
		HandleMesh.SetLightEnvironment( UTP.LightEnvironment );
		UTP.Mesh.AttachComponentToSocket(HandleMesh, UTP.WeaponSocket);
		if (TowBeamEmitter != None)
		{
			UTP.Mesh.AttachComponentToSocket(TowBeamEmitter, UTP.WeaponSocket);
		}

		// Disable possible blending-out of hit reactions.
		UTP.bBlendOutTakeHitPhysics = FALSE;

		UTP.Mesh.PhysicsWeight = 0.0;
		UTP.Mesh.MinDistFactorForKinematicUpdate = 0.0;
		UTP.Mesh.bUpdateKinematicBonesFromAnimation = TRUE;

		UTP.RootRotControl.BoneRotation.Yaw = 0;
		UTP.DrivingNode.UpdateDrivingState();
		UTP.VehicleNode.UpdateVehicleState();
		UTP.HoverboardingNode.SetActiveChild(0, 0.0);

		UTP.FullBodyAnimSlot.StopCustomAnim(0.0);
		UTP.TopHalfAnimSlot.StopCustomAnim(0.0);

		UTP.Mesh.ForceSkelUpdate();
		UTP.Mesh.UpdateRBBonesFromSpaceBases(TRUE, TRUE);
		InitPhysicsAnimPawn();
	}
}

simulated function SitDriver(UTPawn UTP, int SeatIndex)
{
	UTP.SetLocation(Location + vect(0,0,100));

	Super.SitDriver(UTP, SeatIndex);

	// Force the driver skelmeshcomp to be in the right place before trying to
	//UTP.ForceUpdateComponents(FALSE,TRUE);
	UTP.Mesh.ForceUpdate(true);

	// don't reduce pawn culldistance as it's the most visible part of the hoverboard
	UTP.Mesh.SetCullDistance(UTP.default.Mesh.CachedCullDistance);
}

/** Set whether the flag is attached directly to kinematic bodies on the rider. */
simulated static function SetFlagAttachToBody(UTPawn UTP, bool bAttached)
{
	local int i;
	local UTCTFFlag Flag;

	for (i = 0; i < UTP.Attached.length; i++)
	{
		Flag = UTCTFFlag(UTP.Attached[i]);
		if(Flag != None)
		{
			Flag.SetBase(UTP,,UTP.Mesh,Flag.GameObjBone3P);
			Flag.SetRelativeRotation(Flag.GameObjRot3P);
			Flag.SetRelativeLocation(Flag.GameObjOffset3P);
			Flag.SkelMesh.ResetClothVertsToRefPose();
			if (Flag.BaseSkelComponent != None)
			{
				Flag.SkelMesh.SetAttachClothVertsToBaseBody(FALSE);
				if(bAttached)
				{
					Flag.SkelMesh.SetAttachClothVertsToBaseBody(TRUE);
				}
			}
		}
	}
}

simulated function DisplayDebug(HUD HUD, out float out_YL, out float out_YPos)
{
	local UTPawn UTP;
	local Canvas	Canvas;

	super.DisplayDebug(HUD, out_YL, out_YPos);

	UTP = UTPawn(Driver);
	Canvas = HUD.Canvas;

	Canvas.SetDrawColor(128,128,255);
	Canvas.DrawText("UTP PhysicsWeight "$UTP.Mesh.PhysicsWeight);
	out_YPos += out_YL;
	Canvas.SetPos(4,out_YPos);
}

/** Set up the rider with physics for riding. */
simulated function SetHoverboardRiderPhysics(UTPawn UTP)
{
	local array<name> SpringBodies;
	local int i;
	local vector WorldConPos, LocalConPos;
	local rotator WorldConRot, LocalConRot;

	// Turn off driver's collision with rigid bodies so it doesn't collide with hoverboard
	UTP.SetPawnRBChannels(FALSE);

	// Use kinematic actor method for bone springs. Makes damping relative to animated pose rather than 'world',
	// so we don't tend to lag behind the hoverboard when moving quickly.
	for( i=0; i<UTP.Mesh.PhysicsAssetInstance.Bodies.Length; i++)
	{
		UTP.Mesh.PhysicsAssetInstance.Bodies[i].bMakeSpringToBaseCollisionComponent = TRUE;
	}

	// Set rider state based on kinematic update state.
	UTP.Mesh.PhysicsWeight = 1.f;
	UTP.Mesh.PhysicsAssetInstance.SetAllBodiesFixed(FALSE);

	// Make physics interaction with hoverboard one-way
	UTP.Mesh.SetRBDominanceGroup(Mesh.RBDominanceGroup+1);

	SetFlagAttachToBody(UTP, TRUE);

	WorldConPos = UTP.Mesh.GetBoneLocation(UTP.LeftFootBone, 0);
	WorldConRot = QuatToRotator( UTP.Mesh.GetBoneQuaternion(UTP.LeftFootBone, 0) );
	Mesh.TransformToBoneSpace('UpperBody', WorldConPos, WorldConRot, LocalConPos, LocalConRot);
	FootBoardConstraintSetup.ConstraintBone1 = UTP.LeftFootBone;
	FootBoardConstraintSetup.ConstraintBone2 = 'UpperBody';
	FootBoardConstraintSetup.Pos2 = 0.02f * LocalConPos;
	FootBoardConstraintSetup.PriAxis2 = vect(1,0,0) >> LocalConRot;
	FootBoardConstraintSetup.SecAxis2 = vect(0,1,0) >> LocalConRot;
	LeftFootBoardConstraintInstance.InitConstraint(UTP.Mesh, Mesh, FootBoardConstraintSetup, 1.f, self, None, false);

	WorldConPos = UTP.Mesh.GetBoneLocation(UTP.RightFootBone, 0);
	WorldConRot = QuatToRotator( UTP.Mesh.GetBoneQuaternion(UTP.RightFootBone, 0) );
	Mesh.TransformToBoneSpace('UpperBody', WorldConPos, WorldConRot, LocalConPos, LocalConRot);
	FootBoardConstraintSetup.ConstraintBone1 = UTP.RightFootBone;
	FootBoardConstraintSetup.ConstraintBone2 = 'UpperBody';
	FootBoardConstraintSetup.Pos2 = 0.02f * LocalConPos;
	FootBoardConstraintSetup.PriAxis2 = vect(1,0,0) >> LocalConRot;
	FootBoardConstraintSetup.SecAxis2 = vect(0,1,0) >> LocalConRot;
	RightFootBoardConstraintInstance.InitConstraint(UTP.Mesh, Mesh, FootBoardConstraintSetup, 1.f, self, None, false);

	SpringBodies.AddItem('b_Spine2');
	SpringBodies.AddItem('b_RightHand');
	SpringBodies.AddItem('b_LeftHand');
	UTP.Mesh.PhysicsAssetInstance.SetNamedRBBoneSprings(TRUE, SpringBodies, 10.f, 0.5f, UTP.Mesh);

	UTP.Mesh.bUpdateJointsFromAnimation = TRUE;
	// Set the global linear and angular drive scale that is applied to all bones to be 1.0f so it uses the values setup in UnrealEd
	UTP.Mesh.PhysicsAssetInstance.SetNamedMotorsAngularPositionDrive(false, false, UTP.NoDriveBodies, UTP.Mesh, true);
	UTP.Mesh.PhysicsAssetInstance.SetAngularDriveScale(1.0f, 4.0f, 0.0f);

	UTP.BackSpring(10.0);
	UTP.BackDamp(0.25);
	UTP.HandSpring(2.0);
	UTP.HandDamp(0.005);

	UTP.bIsHoverboardAnimPawn=TRUE;
}

exec function BackSpring(float LinSpring)
{
	local UTPawn UTP;
	UTP = UTPawn(Driver);
	UTP.BackSpring(LinSpring);
}

exec function BackDamp(float LinDamp)
{
	local UTPawn UTP;
	UTP = UTPawn(Driver);
	UTP.BackDamp(LinDamp);
}

exec function HandSpring(float LinSpring)
{
	local UTPawn UTP;
	UTP = UTPawn(Driver);
	UTP.HandSpring(LinSpring);
}

exec function HandDamp(float LinDamp)
{
	local UTPawn UTP;
	UTP = UTPawn(Driver);
	UTP.HandDamp(LinDamp);
}

simulated exec function TestResetPhys()
{
	LogInternal("Reset Char Phys");
	UTPawn(Driver).ResetCharPhysState();
}

static function bool IsHumanDriver(UTVehicle_Hoverboard HB, Pawn P)
{
	if(HB.IsLocallyControlled() && HB.IsHumanControlled())
	{
		return TRUE;
	}

	if(P != None && P.IsLocallyControlled() && P.IsHumanControlled())
	{
		return TRUE;
	}

	return FALSE;
}

simulated function OnDriverPhysicsAssetChanged(UTPawn UTP)
{
	if(IsHumanDriver(self, UTP))
	{
		if(!UTP.bIsHoverboardAnimPawn)
		{
			SetHoverboardRiderPhysics(UTP);
		}
	}
	else
	{
		UTP.Mesh.PhysicsAssetInstance.SetAllBodiesFixed(TRUE);
		UTP.Mesh.bUpdateKinematicBonesFromAnimation = FALSE;
	}

	UTP.SetHandIKEnabled(FALSE);
}

simulated function InitPhysicsAnimPawn()
{
	local UTPawn UTP;

	UTP = UTPawn(Driver);
	if (UTP != None && UTP.Mesh != None && UTP.Mesh.PhysicsAssetInstance != None)
	{
		// Switch over to physics representation of pawn
		Driver.CollisionComponent = Driver.Mesh;

		// If its us, or another player who is close enough to have kinematics updated, blend from animated to physics.
		if(IsHumanDriver(self, UTP))
		{
			if(!UTP.bIsHoverboardAnimPawn)
			{
				SetHoverboardRiderPhysics(UTP);
			}

			// Animation should be entirely physics driven
			UTP.Mesh.PhysicsWeight = 0.0;
			TargetPhysicsWeight = 1.0;
			PhysWeightBlendTimeToGo = PhysWeightBlendTime;
		}
		else
		{
			UTP.Mesh.PhysicsAssetInstance.SetAllBodiesFixed(TRUE);
			UTP.Mesh.bUpdateKinematicBonesFromAnimation = FALSE;
			UTP.Mesh.PhysicsWeight = 0.0;
			PhysWeightBlendTimeToGo = 0.0;
		}

		SpineTurnControl = SkelControlSingleBone(UTP.Mesh.FindSkelControl('SpineTurn'));
		if(SpineTurnControl != None)
		{
			SpineTurnControl.BoneRotation = rot(0,0,0);
			SpineTurnControl.SetSkelControlStrength(1.0, 0.5);
		}

		TowControl = SkelControlLookAt(UTP.Mesh.FindSkelControl('TowControl'));
	}
}


simulated function DetachDriver( Pawn P )
{
	local array<name> SpringBodies;
	local UTPawn UTP;

	if(SpineTurnControl != None)
	{
		SpineTurnControl.SetSkelControlStrength(0.0, 0.0);
		SpineTurnControl = None;
	}

	if(TowControl != None)
	{
		// Make sure tow control is turned off.
		TowControl.SetSkelControlStrength(0.0, 0.0);
		TowControl = None;
	}

	// Make sure bones are in correct position when falling off board.
	P.Mesh.UpdateRBBonesFromSpaceBases(TRUE,TRUE);

	if(HoverboardMesh != None)
	{
		P.Mesh.DetachComponent(HoverboardMesh);
	}
	P.Mesh.DetachComponent(HandleMesh);
	HandleMesh.SetShadowParent(None);
	HandleMesh.SetLightEnvironment( None );
	if (TowBeamEmitter != None)
	{
		P.Mesh.DetachComponent(TowBeamEmitter);
	}
	if(TowBeamEndPointEffect != none)
	{
		TowBeamEndPointEffect.SetHidden(true);
	}

	if (P.Mesh != None && P.Mesh.PhysicsAssetInstance != None)
	{
		P.CollisionComponent = P.CylinderComponent;
		P.Mesh.PhysicsWeight = 0.0;
		P.Mesh.bUpdateJointsFromAnimation = FALSE;

		P.Mesh.SetRBDominanceGroup(P.default.Mesh.RBDominanceGroup);

		// Turn off bone springs and drive
		SpringBodies.AddItem('b_Spine2');
		SpringBodies.AddItem('b_RightHand');
		SpringBodies.AddItem('b_LeftHand');
		P.Mesh.PhysicsAssetInstance.SetNamedRBBoneSprings(FALSE, SpringBodies, 10.f, 0.5f, P.Mesh);
		P.Mesh.PhysicsAssetInstance.SetAllMotorsAngularPositionDrive(false, false);

		P.Mesh.PhysicsAssetInstance.SetAllBodiesFixed(TRUE);
		P.Mesh.PhysicsAssetInstance.SetFullAnimWeightBonesFixed(FALSE, P.Mesh);

		P.Mesh.MinDistFactorForKinematicUpdate = P.default.Mesh.MinDistFactorForKinematicUpdate;
		P.Mesh.bUpdateKinematicBonesFromAnimation = P.default.Mesh.bUpdateKinematicBonesFromAnimation;
	}
	P.SetTickGroup(P.default.TickGroup);
	P.Mesh.SetTickGroup(P.default.Mesh.TickGroup);

	UTP = UTPawn(Driver);
	if(UTP != None)
	{
		UTP.bIsHoverboardAnimPawn = false;
		//Enable foot placement controls
        UTP.bEnableFootPlacement = true;
		UTP.LeftLegControl.SetSkelControlActive(true);
		UTP.RightLegControl.SetSkelControlActive(true);
	}

	Super.DetachDriver(P);
}

function PossessedBy(Controller C, bool bVehicleTransition)
{
	super.PossessedBy(C, bVehicleTransition);

	// reset jump/duck properties
	bDoHoverboardJump = false;
	bIsDodging = false;
	bGrab1 = false;
	bGrab2 = false;
}

reliable server function ServerChangeSeat(int RequestedSeat)
{
	// if pressed hoverboard weapon key again, leave hoverboard
	if ( RequestedSeat == -1 )
	{
		bNoVehicleEntry = true;
		DriverLeave(false);
	}
}

simulated event BoardJumpEffect()
{
	PlaySound(JumpSound, true);
	VehicleEvent('BoostStart');
}

simulated function SetInputs(float InForward, float InStrafe, float InUp)
{
	Super.SetInputs(InForward, InStrafe, InUp);
}

// Force a spin jump
function ForceSpinJump()
{
	bForceSpinWarmup = false;
	TrickJumpWarmup = TrickJumpWarmupMax;
}

reliable server function ServerSpin(float Direction)
{

}

reliable client function ClientForceSpinWarmup()
{
	bForceSpinWarmup = true;
}

function OnHoverboardSpinJump(UTSeqAct_HoverboardSpinJump Action)
{
	bForceSpinWarmup = true;
	ClientForceSpinWarmup();
	SetTimer(Action.WarmupTime, false, 'ForceSpinJump');
}

simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
	if ( Role < ROLE_Authority )
		return;

	bForceNetUpdate = TRUE; // force quick net update

	// pass damage to driver
	if (Driver != None)
	{
		Driver.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
	}

	// if the driver wasn't killed from the hit, keep going
	if (Driver != None && Driver.Health > 0 && !bDeleteMe)
	{
		// take momentum from hit, but not damage
		Super.TakeDamage(0, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
	}
}

function bool Died(Controller Killer, class<DamageType> DamageType, vector HitLocation)
{
	if (Driver != None && !Driver.Died(Killer, DamageType, HitLocation))
	{
		RagdollDriver();
	}

	Destroy();

	return true;
}

// DriverRadiusDamage() ignored, since our TakeDamage() already passes damage to driver
function DriverRadiusDamage(float DamageAmount, float DamageRadius, Controller EventInstigator, class<DamageType> DamageType, float Momentum, vector HitLocation, Actor DamageCauser);

function NotifyDriverTakeHit(Controller InstigatedBy, vector HitLocation, int Damage, class<DamageType> DamageType, vector Momentum)
{
	local class<UTDamageType> UTDmgType;

	// if we take enemy weapons fire, toss driver into ragdoll
	if (Damage > 0 && InstigatedBy != None && !WorldInfo.GRI.OnSameTeam(InstigatedBy, self))
	{
		UTDmgType = class<UTDamageType>(DamageType);
		if (UTDmgType != None && UTDmgType.default.DamageWeaponClass != None)
		{
			// might be in physics tick and can't send things to ragdoll during that, so delay one tick
			SetTimer(0.01, false, 'RagdollDriver');
		}
	}
}

simulated function float GetChargePower()
{
	return FClamp( (WorldInfo.TimeSeconds - LastJumpTime), 0, JumpDelay)/JumpDelay;
}

//========================================
// AI Interface

function byte ChooseFireMode()
{
	return 0;
}

function bool Dodge(eDoubleClickDir InDoubleClickMove)
{
	Rise = 1;
	return true;
}

function IncomingMissile(Projectile P)
{
	local UTBot B;

	B = UTBot(Controller);
	if (B != None && B.Skill > 2.0 + 2.0 * FRand())
	{
		DriverLeave(false);
	}
}

// AI hint
function bool FastVehicle()
{
	return true;
}

event bool DriverLeave(bool bForceLeave)
{
	local Pawn SavedDriver;
	local Vehicle SavedTowTruck;

	SavedDriver = Driver;
	// Check to see if we should try to get in towing vehicle
	if (bInTow && TowInfo.TowTruck != None && VSize(TowInfo.TowTruck.Location - Driver.Location) < Driver.VehicleCheckRadius + TowInfo.TowTruck.CylinderComponent.CollisionRadius)
	{
		SavedTowTruck = TowInfo.TowTruck;
	}

	// turn off collision so that we can place the driver exactly where it is on the hoverboard
	SetCollision(false, false);
	ExitPositions[0] = Driver.Location - Location;
	SetOnlyControllableByTilt( FALSE );

	if (Super.DriverLeave(bForceLeave))
	{
		if (!bNoVehicleEntry)
		{
			// Get into towing vehicle if close enough
			if ( SavedTowTruck != None )
			{
				SavedTowTruck.TryToDrive(SavedDriver);
			}
			else if ( PlayerController(SavedDriver.Controller) != None )
			{
				// try to get into any vehicle if close enough and looking at it
				PlayerController(SavedDriver.Controller).FindVehicleToDrive();
			}
		}
		return true;
	}
	else
	{
		// failed to exit, turn collision back on
		SetCollision(default.bCollideActors, default.bBlockActors);
		return false;
	}
}

function DriverLeft()
{
	Driver.Velocity = Velocity;
	if ( UTPawn(Driver) != None )
	{
		UTPawn(Driver).LastHoverboardTime = WorldInfo.TimeSeconds;
	}

	SetOnlyControllableByTilt(false);

	Super.DriverLeft();
	Destroy();
}

simulated function DrivingStatusChanged()
{
	bGrab1 = false;
	bGrab2 = false;

	Super.DrivingStatusChanged();
}

/** Used to turn on or off the functionality of the controller only accepting input from the tilt aspect (if it has it) **/
reliable client function SetOnlyControllableByTilt( bool bActive )
{
	local PlayerController PC;

	PC = PlayerController(Controller);

	if( (PC == none) && (Driver != None) )
	{
		PC = PlayerController(Driver.Controller);
	}

	if( PC != none )
	{
		PC.SetOnlyUseControllerTiltInput( bActive );
		PC.SetUseTiltForwardAndBack( !bActive );  // we do not want to have the tilt forward/back be on
		PC.SetControllerTiltActive( bActive );
	}
}


simulated function CauseMuzzleFlashLight(int SeatIndex)
{
	Super.CauseMuzzleFlashLight(SeatIndex);

	VehicleEvent('FireTowCable');
}

function LinkUp(UTVehicle NewTowTruck)
{
	if ( NewTowTruck != none && !NewTowTruck.bDeleteMe && NewTowTruck.Health>0 )
	{
		bInTow = true;
		TowInfo.TowTruck = NewTowTruck;
		TowInfo.TowAttachPoint = NewTowTruck.GetHoverBoardAttachPoint(Location);
		NewTowTruck.SetHoverBoardAttachPointInUse(TowInfo.TowAttachPoint, true);
		SpawnTowCableEffects();
		AttachTowCable();
		PlaySound(TowStartedSound);
		if(TowLoopComponent == none)
		{
			TowLoopComponent = CreateAudioComponent(TowLoopCue, false, true);
		}
		if(TowLoopComponent != none)
		{
			TowLoopComponent.Play();
		}
		// if we connected to a bot, have it re-eval now so it can start towing us
		if (UTBot(NewTowTruck.Controller) != None)
		{
			UTBot(NewTowTruck.Controller).WhatToDoNext();
		}
	}
}

simulated event BreakTowLink()
{
	if(bInTow)
	{
		if(TowLoopComponent != none)
		{
			TowLoopComponent.Stop();
			TowLoopComponent = None;
		}
		PlaySound(TowEndedSound);
	}
	bInTow = false;
	DistanceJointInstance.TermConstraint();
	if ( TowInfo.TowTruck != None )
	{
		TowInfo.TowTruck.SetHoverBoardAttachPointInUse(TowInfo.TowAttachPoint, false);
	}
	TowInfo.TowAttachPoint='';
	TowInfo.TowTruck = none;
}

simulated function ReplicatedEvent(name VarName)
{
	if (VarName == 'TowInfo' )
	{
		if (TowInfo.TowTruck != none)
		{
			bInTow = true;
			SpawnTowCableEffects();
			AttachTowCable();
		}
		else
		{
			BreakTowLink();
		}
	}
	else if (VarName == 'bDoHoverboardJump')
	{
		BoardJumpEffect();
	}
	else
	{
		if (VarName == 'Driver')
		{
			if ( (Driver != None) && (UTPlayerController(Controller) != None) && (Driver.DrivenVehicle == None) )
			{
				Driver.DrivenVehicle = self;
				Driver.StartDriving(self);
			}
		}
		Super.ReplicatedEvent(VarName);
	}
}

simulated function bool DisableVehicle()
{
	RagdollDriver();
	return true;
}

/** kick the driver out and throw him into ragdoll because we ran into something */
function RagdollDriver()
{
	local UTPawn OldDriver;

	bNoVehicleEntry = true;
	OldDriver = UTPawn(Driver);
	if (OldDriver != None)
	{
		DriverLeave(true);
		OldDriver.SoundGroupClass.static.PlayFallingDamageLandSound(OldDriver);
		OldDriver.Velocity = Velocity;
		OldDriver.ForceRagdoll();
		if (OldDriver.Physics == PHYS_RigidBody)
		{
			// apply a small impulse towards the top of the player so the body pitches forward a bit
			OldDriver.Mesh.AddImpulse(Normal(Velocity) * 100.0, OldDriver.Location + vect(0,0,0.75) * OldDriver.GetCollisionHeight());
		}
	}
}

event bool EncroachingOn(Actor Other)
{
	RanInto(Other);
	return bDeleteMe; // return true if we were destroyed (driver kicked out) so the other thing doesn't think it got run over
}

event RanInto(Actor Other)
{
	if (Role == ROLE_Authority && Pawn(Other) != None && (!WorldInfo.GRI.OnSameTeam(self, Other) || (UTPawn(Other) != None && UTPawn(Other).IsHero())) )
	{
		if (Driver == None)
		{
			if (Controller == None)
			{
				// encroached while spawning, driver isn't in yet
				Destroy();
			}
		}
		else
		{
			RagdollDriver();
		}
	}
}

simulated event RigidBodyCollision( PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent,
					const out CollisionImpactData RigidCollisionData, int ContactIndex )
{
	local RB_BodyInstance BodyInstance;
	local Vehicle OtherVehicle;
	local int OldHealth;

	if (Role == ROLE_Authority)
	{
		BodyInstance = Mesh.GetRootBodyInstance();
		OtherVehicle = (OtherComponent != None) ? Vehicle(OtherComponent.Owner) : None;

		if ( (OtherVehicle != None) && !WorldInfo.GRI.OnSameTeam(self, OtherVehicle)
			&& OtherVehicle.bDriving )
		{
			if ( UTVehicle_Hoverboard(OtherVehicle) != None )
			{
				RagdollDriver();
				Super(SVehicle).RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
				return;
			}
			else
			{
				OtherVehicle.RanInto(self);
			}
		}
		if ( !IsTimerActive('RagdollDriver') && Driver != None )
		{
			if (BodyInstance.PreviousVelocity.Z < -Driver.MaxFallSpeed)
			{
				// only check fall damage for Z axis collisions
				if (Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) > 0.5f)
				{
					Driver.Velocity = BodyInstance.PreviousVelocity;
					OldHealth = Driver.Health;
					Driver.TakeFallingDamage();
					// zero our velocity so that the ragdoll'ed driver won't take falling damage again
					// unless it gets into another long fall
					Velocity.Z = 0.0;
					if ( (Driver.Health < 0) || (OldHealth - Driver.Health > FallingDamageRagdollThreshold) )
					{
						RagdollDriver();
					}
					Super(SVehicle).RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
					return;
				}
			}
			else if (OtherComponent != None && bTrickJumping && (bGrab1 || bGrab2))
			{
				RagdollDriver();
				Super(SVehicle).RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
				return;
			}
		}

		Super.RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
	}
}

// ignore penetration for hoverboard
event RBPenetrationDestroy();

simulated function StopVehicleSounds()
{
	super.StopVehicleSounds();
	CurveSound.Stop();
}

simulated event ToggleAnimBoard(bool bAnimBoard, float Delay)
{
	local UTPawn UTP;

	UTP = UTPawn(Driver);

	if (bAnimBoard)
	{
		bGrabbingBoard = TRUE;

		// Create trick board mesh now
		if(HoverboardMesh == None)
		{
			HoverboardMesh = new(self) class'UTSkeletalMeshComponent';
			HoverboardMesh.SetSkeletalMesh(Mesh.SkeletalMesh);
			HoverboardMesh.SetLightEnvironment(Mesh.LightEnvironment);
			HoverboardMesh.CastShadow = TRUE;
		}

		Mesh.SetHidden(TRUE);

		if(UTP != None)
		{
			UTP.Mesh.AttachComponent(HoverboardMesh, UTP.LeftFootBone, MeshLocationOffset, MeshRotationOffset);
			HoverboardMesh.SetShadowParent(UTP.Mesh);
		}

		AttachHoverboardEffects();

		if(IsHumanDriver(self, Driver))
		{
			TargetPhysicsWeight = 0.0;
			PhysWeightBlendTimeToGo = 0.1;
		}
    }
    else
    {
		bGrabbingBoard = FALSE;
		if(Delay > 0.0)
		{
			SetTimer(Delay, false, 'HideBoard');
		}
		else
		{
			HideBoard();
		}

		if(IsHumanDriver(self, Driver))
		{
			TargetPhysicsWeight = 1.0;
			PhysWeightBlendTimeToGo = 0.1;
		}
	}
}

simulated event HideBoard()
{
	AttachHoverboardEffects();

	Mesh.SetHidden(FALSE);

	if(Driver != None)
	{
		Driver.Mesh.SetShadowParent(Mesh);

		if(HoverboardMesh != None)
		{
			HoverboardMesh.SetShadowParent(None);
			Driver.Mesh.DetachComponent(HoverboardMesh);
		}
	}
}

simulated event HoverboardLanded()
{
	local vector NewVel;

	if((-1.0 * Velocity.Z) > ImpactGroundResetPhysRiderThresh)
	{
		Driver.Mesh.UpdateRBBonesFromSpaceBases(TRUE, TRUE);

		NewVel.X = Velocity.X;
		NewVel.Y = Velocity.Y;
		NewVel.Z = BigImpactPhysRiderZVel;
		Driver.Mesh.SetRBLinearVelocity(NewVel, FALSE);
	}

	if(bTrickJumping && (bGrab1 || bGrab2) && Role == ROLE_Authority)
	{
		SetTimer(0.01, false, 'RagdollDriver');
	}
}

/** Check the bIgnoreHoverboards flag. */
function bool OnTouchForcedDirVolume(ForcedDirVolume Vol)
{
	if(Vol.bIgnoreHoverboards)
	{
		return FALSE;
	}
	else
	{
		return TRUE;
	}
}

/** spawn and attach effects for moving over water - called from C++ if RoosterEffect is None when over water */
simulated event SpawnRoosterEffect()
{
	local Vector RoosterEffectOffset;

	// Offset the RoosterEffect to be at the base of the collision cylinder, so it appears at the water's surface
	RoosterEffectOffset.Z = (-CylinderComponent.Translation.Z - CylinderComponent.CollisionHeight*0.5f);

	RoosterEffect = new(self) class'ParticleSystemComponent';
	RoosterEffect.bAutoActivate = false;
	RoosterEffect.SetTemplate(RoosterEffectTemplate);
	RoosterEffect.SetTranslation(RoosterEffectOffset);
	Mesh.AttachComponentToSocket(RoosterEffect, 'RearCenterThrusterSocket');

	RoosterNoise = new(self) class'AudioComponent';
	RoosterNoise.SoundCue = RoosterSoundCue;
	RoosterNoise.VolumeMultiplier = 5.0;
}

/** spawn and attach tow cable effects if they don't already exist */
simulated event SpawnTowCableEffects()
{
	local byte TeamNum;
	local UTPawn P;

	TeamNum = GetTeamNum();
	if (TowBeamEmitter == None)
	{
		TowBeamEmitter = new(self) class'UTParticleSystemComponent';
		TowBeamEmitter.SetTickGroup(TG_PostAsyncWork); // so endpoint gets updated after the target vehicle has finished movement
		TowBeamEmitter.SetTranslation(vect(0.0, 8.0, 0.0));
		TowBeamEmitter.SecondsBeforeInactive = 1.0;
		TowBeamEmitter.bDeferredBeamUpdate = true;
		TowBeamEmitter.SetTemplate((TeamNum == 1) ? TowBeamTeamEmitters[1] : TowBeamTeamEmitters[0]);
		P = UTPawn(Driver);
		if (P != None && P.Mesh != None)
		{
			P.Mesh.AttachComponentToSocket(TowBeamEmitter, P.WeaponSocket);
		}
	}

	if (TowBeamEndPointEffect == None)
	{
		TowBeamEndPointEffect = new(self) class'UTParticleSystemComponent';
		TowBeamEndPointEffect.SetAbsolute(true, true, false);
		TowBeamEndPointEffect.SecondsBeforeInactive = 1.0;
		TowBeamEndPointEffect.bDeferredBeamUpdate = true;
		TowBeamEndPointEffect.SetTemplate((TeamNum == 1) ? TowBeamTeamEndPoints[1] : TowBeamTeamEndPoints[0]);
		AttachComponent(TowBeamEndPointEffect);
	}
}

/** Kismet hook to use the tow cable in scripted sequences */
function OnAttachTowCable(UTSeqAct_AttachTowCable InAction)
{
	local UTVWeap_TowCable TowCable;

	TowCable = UTVWeap_TowCable(Weapon);
	if (TowCable != None)
	{
		TowCable.PotentialTowTruck = InAction.AttachTo;
		StartFire(0);
	}
}

function UTVehicle GetTowingVehicle()
{
	return TowInfo.TowTruck;
}

function bool CanAttachTo(UTVehicle TowingVehicle, UTVWeap_TowCable TowCable)
{
	return ( TowingVehicle.HoverboardSocketInUse.Find(false) != INDEX_NONE &&
		VSize(TowingVehicle.Location - Location) < TowCable.MaxAttachRange &&
		FastTrace(TowingVehicle.Location, Location) );
}

/** hooked to bot's custom action interface to tell them to attach tow cable */
function bool AIAttachTowCable(UTBot B)
{
	local UTVehicle TowingVehicle;
	local UTVWeap_TowCable TowCable;
	local vector Dir;

	if (B.Focus == B.Enemy)
	{
		// got distracted
		return false;
	}
	else
	{
		TowCable = UTVWeap_TowCable(Weapon);
		TowingVehicle = UTVehicle(B.Focus);
		if (TowCable == None || TowingVehicle == None || TowingVehicle.Controller == None || !CanAttachTo(TowingVehicle, TowCable))
		{
			// failed
			return true;
		}
		else if (TowCable.PotentialTowTruck == TowingVehicle)
		{
			// success, fire the tow cable
			StartFire(0);
			return true;
		}
		else
		{
			// still turning
			if (WorldInfo.TimeSeconds - LastTryTowCableTime < 2.0)
			{
				return false;
			}
			else
			{
				Dir = TowingVehicle.Location - Location;
				Dir.Z = 0.0;
				return (vector(Rotation) dot Normal(Dir) < 0.9);
			}
		}
	}
}

function bool TryAttachingTowCable(UTBot B, UTVehicle TowingVehicle)
{
	local UTVWeap_TowCable TowCable;
	local UTBot OtherB;

	TowCable = UTVWeap_TowCable(Weapon);
	if (TowCable == None)
	{
		bHasTowCable = false;
		return false;
	}
	else if (WorldInfo.TimeSeconds - LastTryTowCableTime > 10.0 && CanAttachTo(TowingVehicle, TowCable))
	{
		B.GoalString = "Attach tow cable to" @ TowingVehicle.GetHumanReadableName();
		B.Focus = TowingVehicle;
		B.PerformCustomAction(AIAttachTowCable);
		LastTryTowCableTime = WorldInfo.TimeSeconds;
		// if other is a bot, ask it to turn around and wait for us
		OtherB = UTBot(TowingVehicle.Controller);
		if (OtherB != None)
		{
			OtherB.CampTime = 2.0;
			OtherB.Focus = None;
			OtherB.FocalPoint = TowingVehicle.Location + vector(Rotation) * 1000.0;
			OtherB.GotoState('Defending', 'Pausing');
		}
		return true;
	}
	else
	{
		return false;
	}
}

function DetachTowCable()
{
	if (TowInfo.TowTruck != None)
	{
		BreakTowLink();
	}
}

function bool ShouldLeaveForCombat(UTBot B)
{
	// if being towed and carrying flag, sometimes push our luck and stay on
	// never if would fall very far
	if (TowInfo.TowTruck != None && ((B.PlayerReplicationInfo.bHasFlag && FRand() >= 0.1) || FastTrace(Location - vect(0,0,1000), Location)))
	{
		return false;
	}
	else
	{
		return Super.ShouldLeaveForCombat(B);
	}
}

function bool TooCloseToAttack(Actor Other)
{
	return false;
}

/** called when AI controlled and the hoverboard is moving too slow so the AI wants to bail */
event BelowSpeedThreshold()
{
	local UTBot B;

	B = UTBot(Instigator.Controller);
	if (B != None)
	{
		B.LeaveVehicle(false);
	}
	else
	{
		DriverLeave(false);
	}
}

event bool ContinueOnFoot()
{
	local UTBot B;

	if (Super.ContinueOnFoot())
	{
		// make sure bot doesn't immediately get back on
		B = UTBot(Controller);
		if (B != None)
		{
			B.LastTryHoverboardTime = WorldInfo.TimeSeconds + 4.0;
		}
		return true;
	}
	else
	{
		return false;
	}
}

defaultproperties
{
   MeshLocationOffset=(X=5.000000,Y=5.000000,Z=15.000000)
   MeshRotationOffset=(Pitch=10012,Yaw=18204,Roll=16382)
   JumpForceMag=5000.000000
   DodgeForceMag=5000.000000
   TrickJumpWarmupMax=0.500000
   JumpCheckTraceDist=90.000000
   JumpDelay=1.000000
   bDisableRepulsorsAtMaxFallSpeed=True
   SpinSpeed=11.000000
   LeanUprightStiffness=1000.000000
   LeanUprightDamping=100.000000
   Begin Object Class=RB_StayUprightSetup Name=MyLeanUprightSetup ObjName=MyLeanUprightSetup Archetype=RB_StayUprightSetup'Engine.Default__RB_StayUprightSetup'
      bSwingLimited=False
      Name="MyLeanUprightSetup"
      ObjectArchetype=RB_StayUprightSetup'Engine.Default__RB_StayUprightSetup'
   End Object
   LeanUprightConstraintSetup=RB_StayUprightSetup'UTGame.Default__UTVehicle_Hoverboard:MyLeanUprightSetup'
   Begin Object Class=RB_ConstraintInstance Name=MyLeanUprightConstraintInstance ObjName=MyLeanUprightConstraintInstance Archetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
      bSwingPositionDrive=True
      Name="MyLeanUprightConstraintInstance"
      ObjectArchetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
   End Object
   LeanUprightConstraintInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Hoverboard:MyLeanUprightConstraintInstance'
   Begin Object Class=RB_ConstraintSetup Name=MyFootBoardConstraintSetup ObjName=MyFootBoardConstraintSetup Archetype=RB_ConstraintSetup'Engine.Default__RB_ConstraintSetup'
      bSwingLimited=True
      bTwistLimited=True
      Name="MyFootBoardConstraintSetup"
      ObjectArchetype=RB_ConstraintSetup'Engine.Default__RB_ConstraintSetup'
   End Object
   FootBoardConstraintSetup=RB_ConstraintSetup'UTGame.Default__UTVehicle_Hoverboard:MyFootBoardConstraintSetup'
   Begin Object Class=RB_ConstraintInstance Name=MyLeftFootBoardConstraintInstance ObjName=MyLeftFootBoardConstraintInstance Archetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
      Name="MyLeftFootBoardConstraintInstance"
      ObjectArchetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
   End Object
   LeftFootBoardConstraintInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Hoverboard:MyLeftFootBoardConstraintInstance'
   Begin Object Class=RB_ConstraintInstance Name=MyRightFootBoardConstraintInstance ObjName=MyRightFootBoardConstraintInstance Archetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
      Name="MyRightFootBoardConstraintInstance"
      ObjectArchetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
   End Object
   RightFootBoardConstraintInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Hoverboard:MyRightFootBoardConstraintInstance'
   MaxTrackYaw=1.000000
   HoverboardSlalomMaxAngle=45.000000
   SlalomSpeed=5.000000
   TurnLeanFactor=0.001300
   MaxLeanPitchSpeed=10000.000000
   WaterCheckLevel=110.000000
   Begin Object Class=RB_DistanceJointSetup Name=MyDistanceJointSetup ObjName=MyDistanceJointSetup Archetype=RB_DistanceJointSetup'Engine.Default__RB_DistanceJointSetup'
      Name="MyDistanceJointSetup"
      ObjectArchetype=RB_DistanceJointSetup'Engine.Default__RB_DistanceJointSetup'
   End Object
   DistanceJointSetup=RB_DistanceJointSetup'UTGame.Default__UTVehicle_Hoverboard:MyDistanceJointSetup'
   Begin Object Class=RB_ConstraintInstance Name=MyDistanceJointInstance ObjName=MyDistanceJointInstance Archetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
      Name="MyDistanceJointInstance"
      ObjectArchetype=RB_ConstraintInstance'Engine.Default__RB_ConstraintInstance'
   End Object
   DistanceJointInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Hoverboard:MyDistanceJointInstance'
   MaxTowDistance=1000.000000
   TowLocalAttachPos=(X=50.000000,Y=0.000000,Z=50.000000)
   HoverboardTowSlalomMaxAngle=30.000000
   TowDistanceChangeSpeed=300.000000
   TowLineBlockedBreakTime=0.250000
   TowBeamIntensityName="Grow"
   Begin Object Class=UTParticleSystemComponent Name=HoverboardDust0 ObjName=HoverboardDust0 Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
      bAutoActivate=False
      AbsoluteTranslation=True
      AbsoluteRotation=True
      Name="HoverboardDust0"
      ObjectArchetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
   End Object
   HoverboardDust=HoverboardDust0
   RedDustEffect=ParticleSystem'Envy_Effects.Smoke.P_HoverBoard_Ground_Dust'
   BlueDustEffect=ParticleSystem'Envy_Effects.Smoke.P_HoverBoard_Ground_Dust_Blue'
   DustVelMagParamName="BoardVelMag"
   DustBoardHeightParamName="BoardHeight"
   DustVelParamName="BoardVel"
   Begin Object Class=ParticleSystemComponent Name=ThrusterEffect0 ObjName=ThrusterEffect0 Archetype=ParticleSystemComponent'Engine.Default__ParticleSystemComponent'
      SecondsBeforeInactive=1.000000
      Name="ThrusterEffect0"
      ObjectArchetype=ParticleSystemComponent'Engine.Default__ParticleSystemComponent'
   End Object
   ThrusterEffect=ThrusterEffect0
   ThrusterEffectSocket="RearCenterThrusterSocket"
   RedThrusterEffect=ParticleSystem'VH_Hoverboard.Effects.P_VH_Hoverboard_Jet_Red01'
   BlueThrusterEffect=ParticleSystem'VH_Hoverboard.Effects.P_VH_Hoverboard_Jet_Blue01'
   TowBeamTeamEmitters(0)=ParticleSystem'VH_Hoverboard.Effects.P_VH_Hoverboard_TetherBeam_Red'
   TowBeamTeamEmitters(1)=ParticleSystem'VH_Hoverboard.Effects.P_VH_Hoverboard_TetherBeam_Blue'
   TowBeamTeamEndPoints(0)=ParticleSystem'VH_Hoverboard.Effects.P_VH_Hoverboard_TetherBeam_RedEnd'
   TowBeamTeamEndPoints(1)=ParticleSystem'VH_Hoverboard.Effects.P_VH_Hoverboard_TetherBeam_BlueEnd'
   TowBeamEndParameterName="TetherEnd"
   RoosterEffectTemplate=ParticleSystem'Envy_Level_Effects_2.Vehicle_Water_Effects.P_Hoverboard_Water_Towed'
   RoosterTurnScale=1.000000
   RoosterSoundCue=SoundCue'VH_Hoverboard.Hoverboard_Water_Sound'
   Begin Object Class=AudioComponent Name=CarveSound ObjName=CarveSound Archetype=AudioComponent'Engine.Default__AudioComponent'
      SoundCue=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_CurveCue'
      Name="CarveSound"
      ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
   End Object
   CurveSound=CarveSound
   EngineThrustSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_EngineThrustCue'
   TurnSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_TurnCue'
   JumpSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_JumpCue'
   OverWaterSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_WaterDisruptCue'
   TowLoopCue=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_GrappleLoopCue'
   TowStartedSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_GrappleReleaseCue'
   TowEndedSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_GrappleRetractCue'
   HoverCamOffset=(X=60.000000,Y=-20.000000,Z=-15.000000)
   HoverCamRotOffset=(Pitch=728,Yaw=0,Roll=0)
   VelLookAtOffset=(X=-0.070000,Y=-0.070000,Z=-0.030000)
   VelBasedCamOffset=(X=0.000000,Y=0.000000,Z=-0.020000)
   VelRollFactor=0.400000
   HoverCamMaxVelUsed=800.000000
   ViewRollRate=100.000000
   PhysWeightBlendTime=1.000000
   Begin Object Class=StaticMeshComponent Name=Handle ObjName=Handle Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
      StaticMesh=StaticMesh'VH_Hoverboard.Mesh.S_Hoverboard_Handle'
      bUseAsOccluder=False
      CollideActors=False
      Translation=(X=0.000000,Y=0.000000,Z=-1.000000)
      Rotation=(Pitch=0,Yaw=16384,Roll=-16384)
      Scale=0.500000
      Name="Handle"
      ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
   End Object
   HandleMesh=Handle
   FallingDamageRagdollThreshold=10
   ImpactGroundResetPhysRiderThresh=400.000000
   BigImpactPhysRiderZVel=-400.000000
   GroundEffectIndices(0)=0
   bDriverHoldsFlag=True
   bCanCarryFlag=True
   bTeamLocked=False
   bValidLinkTarget=False
   bHasTowCable=True
   bStickDeflectionThrottle=True
   bEjectKilledBodies=True
   bLightArmor=True
   bShouldLeaveForCombat=True
   bDrawHealthOnHUD=False
   bDriverCastsShadow=True
   bRotateCameraUnderVehicle=True
   bNoFollowJumpZ=True
   bDisplayHealthBar=False
   AIPurpose=AIP_Any
   Team=255
   Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment ObjName=MyLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTHoverVehicle:MyLightEnvironment'
      ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTHoverVehicle:MyLightEnvironment'
   End Object
   LightEnvironment=MyLightEnvironment
   MaxDesireability=0.600000
   ObjectiveGetOutDist=750.000000
   VehiclePositionString="in a Hoverboard"
   VehicleNameString="Hoverboard"
   TeamBeaconMaxDist=3000.000000
   WaterDamage=0.000000
   Seats(0)=(GunClass=Class'UTGame.UTVWeap_TowCable',GunSocket=("FireSocket"),CameraTag="b_Hips",CameraOffset=-200.000000,bSeatVisible=True,SeatBone="UpperBody",SeatOffset=(X=0.000000,Y=0.000000,Z=51.000000),DriverDamageMult=1.000000)
   BurnOutTime=2.000000
   Begin Object Class=AudioComponent Name=BaseScrapeSound ObjName=BaseScrapeSound Archetype=AudioComponent'Engine.Default__AudioComponent'
      SoundCue=SoundCue'A_Gameplay.A_Gameplay_Onslaught_MetalScrape01Cue'
      Name="BaseScrapeSound"
      ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
   End Object
   ScrapeSound=BaseScrapeSound
   SpawnRadius=125.000000
   BoostPadSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_JumpBoostCue'
   IconCoords=(U=0.000000,V=0.000000,UL=0.000000,VL=0.000000)
   CollisionDamageMult=0.001300
   SeatCameraScale=0.800000
   DefaultFOV=90.000000
   CameraLag=0.000000
   MinCameraDistSq=144.000000
   Begin Object Class=UTVehicleSimHoverboard Name=SimObject ObjName=SimObject Archetype=UTVehicleSimHoverboard'UTGame.Default__UTVehicleSimHoverboard'
      MaxThrustForce=200.000000
      UphillHelpThrust=150.000000
      MaxUphillHelpThrust=100.000000
      MaxReverseForce=40.000000
      MaxReverseVelocity=200.000000
      LongDamping=0.300000
      MaxStrafeForce=150.000000
      LatDamping=0.300000
      TurnTorqueFactor=800.000000
      SpinTurnTorqueScale=3.500000
      MaxTurnTorque=1000.000000
      TurnDampingSpeedFunc=(Points=((OutVal=0.050000),(InVal=300.000000,OutVal=0.110000),(InVal=800.000000,OutVal=0.120000)))
      FlyingTowTurnDamping=0.200000
      FlyingTowRelVelDamping=0.200000
      TowRelVelDamping=0.010000
      WheelSuspensionStiffness=200.000000
      WheelSuspensionDamping=20.000000
      WheelLatExtremumValue=0.700000
      Name="SimObject"
      ObjectArchetype=UTVehicleSimHoverboard'UTGame.Default__UTVehicleSimHoverboard'
   End Object
   SimObj=SimObject
   Begin Object Class=UTHoverWheel Name=HoverWheelFL ObjName=HoverWheelFL Archetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
      bPoweredWheel=True
      bHoverWheel=True
      SteerFactor=1.000000
      BoneName="Front_Wheel"
      BoneOffset=(X=25.000000,Y=0.000000,Z=-50.000000)
      WheelRadius=10.000000
      SuspensionTravel=50.000000
      Side=SIDE_Left
      LongSlipFactor=0.000000
      LatSlipFactor=100.000000
      HandbrakeLongSlipFactor=0.000000
      HandbrakeLatSlipFactor=150.000000
      Name="HoverWheelFL"
      ObjectArchetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
   End Object
   Wheels(0)=HoverWheelFL
   Begin Object Class=UTHoverWheel Name=HoverWheelRL ObjName=HoverWheelRL Archetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
      bPoweredWheel=True
      bHoverWheel=True
      SkelControlName="BoardTire"
      BoneName="Rear_Wheel"
      BoneOffset=(X=0.000000,Y=0.000000,Z=-50.000000)
      WheelRadius=10.000000
      SuspensionTravel=50.000000
      Side=SIDE_Left
      LongSlipFactor=0.000000
      LatSlipFactor=100.000000
      HandbrakeLongSlipFactor=0.000000
      HandbrakeLatSlipFactor=150.000000
      Name="HoverWheelRL"
      ObjectArchetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
   End Object
   Wheels(1)=HoverWheelRL
   COMOffset=(X=10.000000,Y=0.000000,Z=-35.000000)
   bUseSuspensionAxis=True
   Begin Object Class=RB_StayUprightSetup Name=MyStayUprightSetup_3 ObjName=MyStayUprightSetup_3 Archetype=RB_StayUprightSetup'UTGame.Default__UTHoverVehicle:MyStayUprightSetup'
      Name="MyStayUprightSetup_3"
      ObjectArchetype=RB_StayUprightSetup'UTGame.Default__UTHoverVehicle:MyStayUprightSetup'
   End Object
   StayUprightConstraintSetup=RB_StayUprightSetup'UTGame.Default__UTVehicle_Hoverboard:MyStayUprightSetup_3'
   Begin Object Class=RB_ConstraintInstance Name=MyStayUprightConstraintInstance_3 ObjName=MyStayUprightConstraintInstance_3 Archetype=RB_ConstraintInstance'UTGame.Default__UTHoverVehicle:MyStayUprightConstraintInstance'
      Name="MyStayUprightConstraintInstance_3"
      ObjectArchetype=RB_ConstraintInstance'UTGame.Default__UTHoverVehicle:MyStayUprightConstraintInstance'
   End Object
   StayUprightConstraintInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Hoverboard:MyStayUprightConstraintInstance_3'
   MaxSpeed=3500.000000
   MaxAngularVelocity=110000.000000
   Begin Object Class=AudioComponent Name=HoverboardEngineSound ObjName=HoverboardEngineSound Archetype=AudioComponent'Engine.Default__AudioComponent'
      SoundCue=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_EngineCue'
      Name="HoverboardEngineSound"
      ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
   End Object
   EngineSound=HoverboardEngineSound
   CollisionSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_CollideCue'
   EnterVehicleSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_EngineStartCue'
   ExitVehicleSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_HoverBoard_EngineStopCue'
   EngineStartOffsetSecs=0.300000
   bDriverIsVisible=True
   bTurnInPlace=True
   bFollowLookDir=True
   bScriptedRise=True
   bDoExtraNetRelevancyTraces=False
   bPathfindsAsVehicle=False
   MeleeRange=-100.000000
   GroundSpeed=900.000000
   AirSpeed=900.000000
   BaseEyeHeight=35.000000
   EyeHeight=35.000000
   Begin Object Class=SkeletalMeshComponent Name=SVehicleMesh ObjName=SVehicleMesh Archetype=SkeletalMeshComponent'UTGame.Default__UTHoverVehicle:SVehicleMesh'
      SkeletalMesh=SkeletalMesh'VH_Hoverboard.Mesh.SK_VH_Hoverboard'
      AnimTreeTemplate=AnimTree'VH_Hoverboard.Anims.AT_Hoverboard'
      PhysicsAsset=PhysicsAsset'VH_Hoverboard.Mesh.SK_VH_Hoverboard_Physics'
      bUseAsOccluder=False
      RBDominanceGroup=16
      ObjectArchetype=SkeletalMeshComponent'UTGame.Default__UTHoverVehicle:SVehicleMesh'
   End Object
   Mesh=SVehicleMesh
   Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTHoverVehicle:CollisionCylinder'
      CollisionHeight=44.000000
      CollisionRadius=40.000000
      Translation=(X=0.000000,Y=0.000000,Z=25.000000)
      ObjectArchetype=CylinderComponent'UTGame.Default__UTHoverVehicle:CollisionCylinder'
   End Object
   CylinderComponent=CollisionCylinder
   Components(0)=CollisionCylinder
   Components(1)=SVehicleMesh
   Components(2)=MyLightEnvironment
   Components(3)=SimObject
   Components(4)=HoverboardEngineSound
   Components(5)=BaseScrapeSound
   Components(6)=CarveSound
   Components(7)=HoverboardDust0
   bAlwaysRelevant=False
   CollisionComponent=SVehicleMesh
   Name="Default__UTVehicle_Hoverboard"
   ObjectArchetype=UTHoverVehicle'UTGame.Default__UTHoverVehicle'
}

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