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

UTGame.UTHUD


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
01963
01964
01965
01966
01967
01968
01969
01970
01971
01972
01973
01974
01975
01976
01977
01978
01979
01980
01981
01982
01983
01984
01985
01986
01987
01988
01989
01990
01991
01992
01993
01994
01995
01996
01997
01998
01999
02000
02001
02002
02003
02004
02005
02006
02007
02008
02009
02010
02011
02012
02013
02014
02015
02016
02017
02018
02019
02020
02021
02022
02023
02024
02025
02026
02027
02028
02029
02030
02031
02032
02033
02034
02035
02036
02037
02038
02039
02040
02041
02042
02043
02044
02045
02046
02047
02048
02049
02050
02051
02052
02053
02054
02055
02056
02057
02058
02059
02060
02061
02062
02063
02064
02065
02066
02067
02068
02069
02070
02071
02072
02073
02074
02075
02076
02077
02078
02079
02080
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090
02091
02092
02093
02094
02095
02096
02097
02098
02099
02100
02101
02102
02103
02104
02105
02106
02107
02108
02109
02110
02111
02112
02113
02114
02115
02116
02117
02118
02119
02120
02121
02122
02123
02124
02125
02126
02127
02128
02129
02130
02131
02132
02133
02134
02135
02136
02137
02138
02139
02140
02141
02142
02143
02144
02145
02146
02147
02148
02149
02150
02151
02152
02153
02154
02155
02156
02157
02158
02159
02160
02161
02162
02163
02164
02165
02166
02167
02168
02169
02170
02171
02172
02173
02174
02175
02176
02177
02178
02179
02180
02181
02182
02183
02184
02185
02186
02187
02188
02189
02190
02191
02192
02193
02194
02195
02196
02197
02198
02199
02200
02201
02202
02203
02204
02205
02206
02207
02208
02209
02210
02211
02212
02213
02214
02215
02216
02217
02218
02219
02220
02221
02222
02223
02224
02225
02226
02227
02228
02229
02230
02231
02232
02233
02234
02235
02236
02237
02238
02239
02240
02241
02242
02243
02244
02245
02246
02247
02248
02249
02250
02251
02252
02253
02254
02255
02256
02257
02258
02259
02260
02261
02262
02263
02264
02265
02266
02267
02268
02269
02270
02271
02272
02273
02274
02275
02276
02277
02278
02279
02280
02281
02282
02283
02284
02285
02286
02287
02288
02289
02290
02291
02292
02293
02294
02295
02296
02297
02298
02299
02300
02301
02302
02303
02304
02305
02306
02307
02308
02309
02310
02311
02312
02313
02314
02315
02316
02317
02318
02319
02320
02321
02322
02323
02324
02325
02326
02327
02328
02329
02330
02331
02332
02333
02334
02335
02336
02337
02338
02339
02340
02341
02342
02343
02344
02345
02346
02347
02348
02349
02350
02351
02352
02353
02354
02355
02356
02357
02358
02359
02360
02361
02362
02363
02364
02365
02366
02367
02368
02369
02370
02371
02372
02373
02374
02375
02376
02377
02378
02379
02380
02381
02382
02383
02384
02385
02386
02387
02388
02389
02390
02391
02392
02393
02394
02395
02396
02397
02398
02399
02400
02401
02402
02403
02404
02405
02406
02407
02408
02409
02410
02411
02412
02413
02414
02415
02416
02417
02418
02419
02420
02421
02422
02423
02424
02425
02426
02427
02428
02429
02430
02431
02432
02433
02434
02435
02436
02437
02438
02439
02440
02441
02442
02443
02444
02445
02446
02447
02448
02449
02450
02451
02452
02453
02454
02455
02456
02457
02458
02459
02460
02461
02462
02463
02464
02465
02466
02467
02468
02469
02470
02471
02472
02473
02474
02475
02476
02477
02478
02479
02480
02481
02482
02483
02484
02485
02486
02487
02488
02489
02490
02491
02492
02493
02494
02495
02496
02497
02498
02499
02500
02501
02502
02503
02504
02505
02506
02507
02508
02509
02510
02511
02512
02513
02514
02515
02516
02517
02518
02519
02520
02521
02522
02523
02524
02525
02526
02527
02528
02529
02530
02531
02532
02533
02534
02535
02536
02537
02538
02539
02540
02541
02542
02543
02544
02545
02546
02547
02548
02549
02550
02551
02552
02553
02554
02555
02556
02557
02558
02559
02560
02561
02562
02563
02564
02565
02566
02567
02568
02569
02570
02571
02572
02573
02574
02575
02576
02577
02578
02579
02580
02581
02582
02583
02584
02585
02586
02587
02588
02589
02590
02591
02592
02593
02594
02595
02596
02597
02598
02599
02600
02601
02602
02603
02604
02605
02606
02607
02608
02609
02610
02611
02612
02613
02614
02615
02616
02617
02618
02619
02620
02621
02622
02623
02624
02625
02626
02627
02628
02629
02630
02631
02632
02633
02634
02635
02636
02637
02638
02639
02640
02641
02642
02643
02644
02645
02646
02647
02648
02649
02650
02651
02652
02653
02654
02655
02656
02657
02658
02659
02660
02661
02662
02663
02664
02665
02666
02667
02668
02669
02670
02671
02672
02673
02674
02675
02676
02677
02678
02679
02680
02681
02682
02683
02684
02685
02686
02687
02688
02689
02690
02691
02692
02693
02694
02695
02696
02697
02698
02699
02700
02701
02702
02703
02704
02705
02706
02707
02708
02709
02710
02711
02712
02713
02714
02715
02716
02717
02718
02719
02720
02721
02722
02723
02724
02725
02726
02727
02728
02729
02730
02731
02732
02733
02734
02735
02736
02737
02738
02739
02740
02741
02742
02743
02744
02745
02746
02747
02748
02749
02750
02751
02752
02753
02754
02755
02756
02757
02758
02759
02760
02761
02762
02763
02764
02765
02766
02767
02768
02769
02770
02771
02772
02773
02774
02775
02776
02777
02778
02779
02780
02781
02782
02783
02784
02785
02786
02787
02788
02789
02790
02791
02792
02793
02794
02795
02796
02797
02798
02799
02800
02801
02802
02803
02804
02805
02806
02807
02808
02809
02810
02811
02812
02813
02814
02815
02816
02817
02818
02819
02820
02821
02822
02823
02824
02825
02826
02827
02828
02829
02830
02831
02832
02833
02834
02835
02836
02837
02838
02839
02840
02841
02842
02843
02844
02845
02846
02847
02848
02849
02850
02851
02852
02853
02854
02855
02856
02857
02858
02859
02860
02861
02862
02863
02864
02865
02866
02867
02868
02869
02870
02871
02872
02873
02874
02875
02876
02877
02878
02879
02880
02881
02882
02883
02884
02885
02886
02887
02888
02889
02890
02891
02892
02893
02894
02895
02896
02897
02898
02899
02900
02901
02902
02903
02904
02905
02906
02907
02908
02909
02910
02911
02912
02913
02914
02915
02916
02917
02918
02919
02920
02921
02922
02923
02924
02925
02926
02927
02928
02929
02930
02931
02932
02933
02934
02935
02936
02937
02938
02939
02940
02941
02942
02943
02944
02945
02946
02947
02948
02949
02950
02951
02952
02953
02954
02955
02956
02957
02958
02959
02960
02961
02962
02963
02964
02965
02966
02967
02968
02969
02970
02971
02972
02973
02974
02975
02976
02977
02978
02979
02980
02981
02982
02983
02984
02985
02986
02987
02988
02989
02990
02991
02992
02993
02994
02995
02996
02997
02998
02999
03000
03001
03002
03003
03004
03005
03006
03007
03008
03009
03010
03011
03012
03013
03014
03015
03016
03017
03018
03019
03020
03021
03022
03023
03024
03025
03026
03027
03028
03029
03030
03031
03032
03033
03034
03035
03036
03037
03038
03039
03040
03041
03042
03043
03044
03045
03046
03047
03048
03049
03050
03051
03052
03053
03054
03055
03056
03057
03058
03059
03060
03061
03062
03063
03064
03065
03066
03067
03068
03069
03070
03071
03072
03073
03074
03075
03076
03077
03078
03079
03080
03081
03082
03083
03084
03085
03086
03087
03088
03089
03090
03091
03092
03093
03094
03095
03096
03097
03098
03099
03100
03101
03102
03103
03104
03105
03106
03107
03108
03109
03110
03111
03112
03113
03114
03115
03116
03117
03118
03119
03120
03121
03122
03123
03124
03125
03126
03127
03128
03129
03130
03131
03132
03133
03134
03135
03136
03137
03138
03139
03140
03141
03142
03143
03144
03145
03146
03147
03148
03149
03150
03151
03152
03153
03154
03155
03156
03157
03158
03159
03160
03161
03162
03163
03164
03165
03166
03167
03168
03169
03170
03171
03172
03173
03174
03175
03176
03177
03178
03179
03180
03181
03182
03183
03184
03185
03186
03187
03188
03189
03190
03191
03192
03193
03194
03195
03196
03197
03198
03199
03200
03201
03202
03203
03204
03205
03206
03207
03208
03209
03210
03211
03212
03213
03214
03215
03216
03217
03218
03219
03220
03221
03222
03223
03224
03225
03226
03227
03228
03229
03230
03231
03232
03233
03234
03235
03236
03237
03238
03239
03240
03241
03242
03243
03244
03245
03246
03247
03248
03249
03250
03251
03252
03253
03254
03255
03256
03257
03258
03259
03260
03261
03262
03263
03264
03265
03266
03267
03268
03269
03270
03271
03272
03273
03274
03275
03276
03277
03278
03279
03280
03281
03282
03283
03284
03285
03286
03287
03288
03289
03290
03291
03292
03293
03294
03295
03296
03297
03298
03299
03300
03301
03302
03303
03304
03305
03306
03307
03308
03309
03310
03311
03312
03313
03314
03315
03316
03317
03318
03319
03320
03321
03322
03323
03324
03325
03326
03327
03328
03329
03330
03331
03332
03333
03334
03335
03336
03337
03338
03339
03340
03341
03342
03343
03344
03345
03346
03347
03348
03349
03350
03351
03352
03353
03354
03355
03356
03357
03358
03359
03360
03361
03362
03363
03364
03365
03366
03367
03368
03369
03370
03371
03372
03373
03374
03375
03376
03377
03378
03379
03380
03381
03382
03383
03384
03385
03386
03387
03388
03389
03390
03391
03392
03393
03394
03395
03396
03397
03398
03399
03400
03401
03402
03403
03404
03405
03406
03407
03408
03409
03410
03411
03412
03413
03414
03415
03416
03417
03418
03419
03420
03421
03422
03423
03424
03425
03426
03427
03428
03429
03430
03431
03432
03433
03434
03435
03436
03437
03438
03439
03440
03441
03442
03443
03444
03445
03446
03447
03448
03449
03450
03451
03452
03453
03454
03455
03456
03457
03458
03459
03460
03461
03462
03463
03464
03465
03466
03467
03468
03469
03470
03471
03472
03473
03474
03475
03476
03477
03478
03479
03480
03481
03482
03483
03484
03485
03486
03487
03488
03489
03490
03491
03492
03493
03494
03495
03496
03497
03498
03499
03500
03501
03502
03503
03504
/**
 * UTHUD
 * UT Heads Up Display
 *
 *
* Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */
class UTHUD extends GameHUD
	dependson(UTWeapon)
	native(UI)
	config(Game);

var class<UTLocalMessage> WeaponSwitchMessage;

/** Holds a list of Actors that need PostRender calls */
var array<Actor> PostRenderedActors;

/** Cached reference to the another hud texture */
var const Texture2D AltHudTexture;
var const Texture2D IconHudTexture;
var const Texture2D TalkingTexture;
var const Texture2D UT3GHudTexture;

/** Holds a reference to the font to use for a given console */
var config string ConsoleIconFontClassName;
var font ConsoleIconFont;

var TextureCoordinates ToolTipSepCoords;
var float LastTimeTooltipDrawn;

var const LinearColor LC_White;

var const color LightGoldColor, LightGreenColor;
var const color GrayColor;

/** used to pulse the scaled of several hud elements */
var float LastPickupTime, LastAmmoPickupTime, LastHealthPickupTime, LastArmorPickupTime;

/** The Pawn that is currently owning this hud */
var Pawn PawnOwner;

/** Points to the UT Pawn.  Will be resolved if in a vehicle */
var UTPawn UTPawnOwner;

/** Cached a typed Player controller.  Unlike PawnOwner we only set this once in PostBeginPlay */
var UTPlayerController UTPlayerOwner;

/** Cached typed reference to the PRI */
var UTPlayerReplicationInfo UTOwnerPRI;

/** If true, we will allow Weapons to show their crosshairs */
var bool bCrosshairShow;

/** Debug flag to show AI information */
var bool bShowAllAI;

/** Cached reference to the GRI */
var UTGameReplicationInfo UTGRI;

/** Holds the scaling factor given the current resolution.  This is calculated in PostRender() */
var float ResolutionScale, ResolutionScaleX;

var bool bHudMessageRendered;

/******************************************************************************************
  UI/SCENE data for the hud
 ******************************************************************************************/

/** The Scoreboard. */
var UTUIScene_Scoreboard ScoreboardSceneTemplate;

/** class of dynamic music manager used with this hud/gametype */
var class<UTMusicManager> MusicManagerClass;

/** A collection of fonts used in the hud */
var array<font> HudFonts;

/** If true, we will alter the crosshair when it's over a friendly */
var bool bCrosshairOnFriendly;

/** Make the crosshair green (found valid friendly */
var bool bGreenCrosshair;

/******************************************************************************************
 Character Portraits
 ******************************************************************************************/

/** The material used to display the portrait */
var material CharPortraitMaterial;

/** The MI that we will set */
var MaterialInstanceConstant CharPortraitMI;

/** How far down the screen will it be rendered */
var float CharPortraitYPerc;

/** When sliding in, where should this image stop */
var float CharPortraitXPerc;

/** How long until we are done */
var float CharPortraitTime;

/** Total Amount of time to display a portrait for */
var float CharPortraitSlideTime;

/** % of Total time to slide In/Out.  It will be used on both sides.  Ex.  If set to 0.25 then
    the slide in will be 25% of the total time as will the slide out leaving 50% of the time settled
    on screen. **/
var float CharPortraitSlideTransitionTime;

/** How big at 1024x768 should this be */
var vector2D CharPortraitSize;

/** Holds the PRI of the person speak */
var UTPlayerReplicationInfo CharPRI;

/** Holds the PRI of who we want to switch to */
var UTPlayerReplicationInfo CharPendingPRI;


/******************************************************************************************
 WEAPONBAR
 ******************************************************************************************/

/** If true, weapon bar is never displayed */
var config bool bShowWeaponbar;

/** If true, only show available weapons on weapon bar */
var config bool bShowOnlyAvailableWeapons;

/** If true, only weapon bar if have pendingweapon */
var config bool bOnlyShowWeaponBarIfChanging;

/** Scaling to apply to entire weapon bar */
var float WeaponBarScale;

var float WeaponBoxWidth, WeaponBoxHeight;

/** Resolution dependent HUD scaling factor */
var float HUDScaleX, HUDScaleY;
var linearcolor TeamHUDColor;
var color TeamColor;  //UNUSED BY ANYONE
var color TeamTextColor;

/** Weapon bar top left corner at 1024x768, normal scale */
var float WeaponBarY;

/** List of weapons to display in weapon bar */
var UTWeapon WeaponList[10];
var float CurrentWeaponScale[10];

var float SelectedWeaponScale;
var float BounceWeaponScale;
var float SelectedWeaponAlpha;
var float OffWeaponAlpha;
var float EmptyWeaponAlpha;
var float LastHUDUpdateTime;
var int BouncedWeapon;
var float WeaponScaleSpeed;
var float WeaponBarXOffset;
var float WeaponXOffset;
var float SelectedBoxScale;
var float WeaponYScale;
var float WeaponYOffset;
var float WeaponAmmoLength;
var float WeaponAmmoThickness;
var float WeaponAmmoOffsetX;
var float WeaponAmmoOffsetY;
var float SelectedWeaponAmmoOffsetX;
var bool bNoWeaponNumbers;
var float LastWeaponBarDrawnTime;

/******************************************************************************************
 MOTD
 ******************************************************************************************/

var UTUIScene_MOTD MOTDSceneTemplate;

/******************************************************************************************
 Messaging
 ******************************************************************************************/

/** Y offsets for local message areas - value above 1 = special position in right top corner of HUD */
var float MessageOffset[7];

/** Various colors */
var const color BlackColor, GoldColor;

/******************************************************************************************
 Map / Radar
 ******************************************************************************************/

/** The background texture for the map */
var Texture2D MapBackground;

/** Holds the default size in pixels at 1024x768 of the map */
var config float MapDefaultSize;

/** The orders to display when rendering the map */
var string DisplayedOrders;

/** last time at which displayedorders was updated */
var float OrderUpdateTime;

var Weapon LastSelectedWeapon;


/******************************************************************************************
 Glowing Fonts
 ******************************************************************************************/

var font GlowFonts[2];	// 0 = the Glow, 1 = Text

/******************************************************************************************
 Safe Regions
 ******************************************************************************************/

/** The percentage of the view that should be considered safe */
var config float SafeRegionPct;

/** Holds the full width and height of the viewport */
var float FullWidth, FullHeight;

/******************************************************************************************
 The damage direction indicators
 ******************************************************************************************/
/**
 * Holds the various data for each Damage Type
 */
struct native DamageInfo
{
	var	float	FadeTime;
	var float	FadeValue;
	var MaterialInstanceConstant MatConstant;
};

/** Holds the Max. # of indicators to be shown */
var int MaxNoOfIndicators;

/** List of DamageInfos. */
var array<DamageInfo> DamageData;

/** This holds the base material that will be displayed */
var Material BaseMaterial;

/** How fast should it fade out */
var float FadeTime;

/** Name of the material parameter that controls the position */
var name PositionalParamName;

/** Name of the material parameter that controls the fade */
var name FadeParamName;

/******************************************************************************************
 The Distortion Effect (Full Screen)
 ******************************************************************************************/

/** current hit effect intensity (default.HitEffectIntensity is max) */
var float HitEffectIntensity;

/** maximum hit effect color */
var LinearColor MaxHitEffectColor;

/** whether we're currently fading out the hit effect */
var bool bFadeOutHitEffect;

/** the amount the time it takes to fade the hit effect from the maximum values (default.HitEffectFadeTime is max) */
var float HitEffectFadeTime;

/** reference to the hit effect */
var MaterialEffect HitEffect;

/** material instance for the hit effect */
var transient MaterialInstanceConstant HitEffectMaterialInstance;


/******************************************************************************************
 QuickPick Menu
 ******************************************************************************************/
var bool bShowQuickPick;
var config bool bShowAllWeapons;
var array<utweapon> QuickPickClasses;
var pawn QuickPickTarget;

var int QuickPickNumCells;
var float QuickPickDeltaAngle;
var float QuickPickRadius;
var int	QuickPickCurrentSelection;
/** true when the player has made a new selection since bringing the menu up this time
 * (can't check QuickPickCurrentSelection for that since it defaults to current weapon)
 */
var bool bQuickPickMadeNewSelection;

var texture2D QuickPickBkgImage;
var textureCoordinates QuickPickBkgCoords;

var texture2D QuickPickSelImage;
var textureCoordinates QuickPickSelCoords;

var Texture2D QuickPickCircleImage;
var TextureCoordinates QuickPickCircleCoords;

/** controller rumble to play when switching weapons. */
var ForceFeedbackWaveform QuickPickWaveForm;

/******************************************************************************************
 Widget Locations / Visibility flags
 ******************************************************************************************/

var globalconfig bool bShowClock;
var vector2d ClockPosition;

var globalconfig bool bShowDoll;
var vector2d DollPosition;
var float LastDollUpdate;
var float DollVisibility;

var TextureCoordinates HealthBGCoords;
var float HealthOffsetX;
var float HealthBGOffsetX;   //position of the health bg relative to overall lower left position
var float HealthBGOffsetY;
var float HealthIconX;	   //position of the health + icon relative to the overall left position
var float HealthIconY;
var float HealthTextX;	  //position of the health text relative to the overall left position
var float HealthTextY;
var int LastHealth;
var float HealthPulseTime;

var TextureCoordinates ArmorBGCoords;
var float ArmorBGOffsetX;	//position of the armor bg relative to overall lower left position
var float ArmorBGOffsetY;
var float ArmorIconX;	   //position of the armor shield icon relative to the overall left position
var float ArmorIconY;
var float ArmorTextX;	   //position of the armor text relative to the overall left position
var float ArmorTextY;
var int LastArmorAmount;
var float ArmorPulseTime;

var globalconfig bool bShowAmmo;
var vector2d AmmoPosition;
var float AmmoBarOffsetY; //Padding beneath right side ammo/icon
var TextureCoordinates AmmoBGCoords;
var float AmmoTextOffsetX;
var float AmmoTextOffsetY;

var UTWeapon LastWeapon;
var int LastAmmoCount;
var float AmmoPulseTime;

var bool bHasMap;
var globalconfig bool bShowMap;
var vector2d MapPosition;

var globalconfig bool bShowPowerups;
var vector2d PowerupDims;
var float PowerupYPos;

/** How long to fade */
var float PowerupTransitionTime;

/** true while displaying powerups */
var bool bDisplayingPowerups;

var globalconfig bool bShowScoring;
var vector2d ScoringPosition;
var bool bShowFragCount;

var bool bHasLeaderboard;
var bool bShowLeaderboard;

var float FragPulseTime;
var int LastFragCount;

var globalconfig bool bShowVehicle;
var vector2d VehiclePosition;
var bool bShowVehicleArmorCount;

var globalconfig float DamageIndicatorSize;

/** width of background on either side of the nameplate */
var float NameplateWidth;
var float NameplateBubbleWidth;

/** Coordinates of the nameplate background*/
var TextureCoordinates NameplateLeft;
var TextureCoordinates NameplateCenter;
var TextureCoordinates NameplateBubble;
var TextureCoordinates NameplateRight;

var LinearColor BlackBackgroundColor;

/******************************************************************************************
 Pulses
 ******************************************************************************************/

/** How long should the pulse take total */
var float PulseDuration;
/** When should the pulse switch from Out to in */
var float PulseSplit;
/** How much should the text pulse - NOTE this will be added to 1.0 (so PulseMultipler 0.5 = 1.5) */
var float PulseMultiplier;


/******************************************************************************************
 Localize Strings -- TODO - Go through and make sure these are all localized
 ******************************************************************************************/

var localized string WarmupString;				// displayed when playing warmup round
var localized string WaitingForMatch;			// Waiting for the match to begin
var localized string PressFireToBegin;			// Press [Fire] to begin
var localized string SpectatorMessage;			// When you are a spectator
var localized string DeadMessage;				// When you are dead
var localized string FireToRespawnMessage;  	// Press [Fire] to Respawn
var localized string YouHaveWon;				// When you win the match
var localized string YouHaveLost;				// You have lost the match

var localized string PlaceMarks[4];

/************************************************************************/
/*  Pawndoll                                                            */
/************************************************************************/
var TextureCoordinates PawnDollBGCoords;
var float DollOffsetX;		//position of the armor bg relative to overall lower left position	
var float DollOffsetY;
var float DollWidth;
var float DollHeight;
var float VestX;			//Body armor position relative to doll
var float VestY;
var float VestWidth;
var float VestHeight;
var float ThighX;		    //Thigh armor position relative to doll
var float ThighY;
var float ThighWidth;
var float ThighHeight;
var float HelmetX;		    //Helmet armor position relative to doll
var float HelmetY;
var float HelmetWidth;
var float HelmetHeight;
var float BootX;			//Jump boot position relative to doll
var float BootY;
var float BootWidth;
var float BootHeight;

/******************************************************************************************
 Misc vars used for laying out the hud
 ******************************************************************************************/

var float THeight;
var float TX;
var float TY;

// Colors
var const linearcolor AmmoBarColor, RedLinearColor, BlueLinearColor, DMLinearColor, WhiteLinearColor, GoldLinearColor, SilverLinearColor;

/******************************************************************************************
 Splitscreen
 ******************************************************************************************/

/** This will be true if the hud is in splitscreen */
var bool bIsSplitscreen;

/** This will be true if this is the first player */
var bool bIsFirstPlayer;

/** Configurable crosshair scaling */
var float ConfiguredCrosshairScaling;

/** Hero meter display */
var float OldHeroScore;
var float LastHeroScoreBumpTime;
var int LastHeroBump;
var float HeroPointOffX; //offset of point count in X
var float HeroPointOffY; //offset of point count in Y
var float HeroMeterOffsetX; //offset from ammo count in X
var float HeroMeterOffsetY; //offset from ammo count in Y
var float HeroMeterVehicleOffsetX; //offset when in a vehicle
var float HeroMeterVehicleOffsetY; //offset when in a vehicle
var float HeroMeterWidth;	//width of the hero meter
var float HeroMeterHeight;  //height of the hero meter
var TextureCoordinates HeroMeterTexCoords;
var TextureCoordinates HeroMeterOverlayTexCoords;

/** Coordinates for the hero tooltip textures */
var UIRoot.TextureCoordinates HeroToolTipIconCoords;

/** Time when the tooltip started to display */
var float HeroTooltipTimeStamp;

/**
 * Draw a glowing string
 */
native function DrawGlowText(string Text, float X, float Y, optional float MaxHeightInPixels=0.0, optional float PulseTime=-100.0, optional bool bRightJustified);

/**
 * Draws a textured centered around the current position
 */
function DrawTileCentered(texture2D Tex, float xl, float yl, float u, float v, float ul, float vl, LinearColor C)
{
	local float x,y;

	x = Canvas.CurX - (xl * 0.5);
	y = Canvas.CurY - (yl * 0.5);

	Canvas.SetPos(x,y);
	Canvas.DrawColorizedTile(Tex, xl,yl,u,v,ul,vl,C);
}

function SetDisplayedOrders(string OrderText)
{
	DisplayedOrders = OrderText;
	OrderUpdateTime = WorldInfo.TimeSeconds;
}

/** Add missing elements to HUD */
exec function GrowHUD()
{
	if ( Class'WorldInfo'.Static.IsConsoleBuild() )
	{
		return;
	}

	if ( !bShowDoll )
	{
		bShowDoll = true;
	}
	else if ( !bShowAmmo || !bShowVehicle )
	{
		bShowAmmo = true;
		bShowVehicle = true;
	}
	else if ( !bShowScoring )
	{
		bShowScoring = true;
	}
	else if ( !bShowWeaponbar )
	{
		bShowWeaponBar = true;
	}
	else if ( bShowOnlyAvailableWeapons )
	{
		bShowOnlyAvailableWeapons = false;
	}
	else if ( !bShowVehicleArmorCount )
	{
		bShowVehicleArmorCount = true;
	}
	else if ( !bShowPowerups )
	{
		bShowPowerups = true;
	}
	else if ( !bShowMap || !bShowLeaderboard )
	{
		bShowMap = true;
		bShowLeaderboard = true;
	}
	else if ( !bShowClock )
	{
		bShowClock = true;
	}
}

/** Remove elements from HUD */
exec function ShrinkHUD()
{
	if ( Class'WorldInfo'.Static.IsConsoleBuild() )
	{
		return;
	}

	if ( bShowClock )
	{
		bShowClock = false;
	}
	else if ( bShowMap || bShowLeaderboard )
	{
		bShowMap = false;
		bShowLeaderboard = false;
	}
	else if ( bShowPowerups )
	{
		bShowPowerups = false;
	}
	else if ( bShowVehicleArmorCount )
	{
		bShowVehicleArmorCount = false;
	}
	else if ( !bShowOnlyAvailableWeapons )
	{
		bShowOnlyAvailableWeapons = true;
	}
	else if ( bShowWeaponbar )
	{
		bShowWeaponBar = false;
	}
	else if ( bShowScoring )
	{
		bShowScoring = false;
	}
	else if ( bShowAmmo || bShowVehicle )
	{
		bShowAmmo = false;
		bShowVehicle = false;
	}
	else if ( bShowDoll )
	{
		bShowDoll = false;
	}
}

/**
 * This function will attempt to auto-link up HudWidgets to their associated transient
 * property here in the hud.
 */
native function LinkToHudScene();

/**
 * Create a list of actors needing post renders for.  Also Create the Hud Scene
 */
simulated function PostBeginPlay()
{
	local Pawn P;
	local UTGameObjective O;
	local UTDeployableNodeLocker DNL;
	local UTOnslaughtFlag F;
	local UTOnslaughtNodeTeleporter NT;
	local LocalPlayer LP;
	local UTCTFFlag CTFFlag;
	local int i;
	local bool bFound;

	super.PostBeginPlay();
	SetTimer(1.0, true);

	UTPlayerOwner = UTPlayerController(PlayerOwner);

	// add actors to the PostRenderedActors array
	ForEach DynamicActors(class'Pawn', P)
	{
		if ( (UTPawn(P) != None) || (UTVehicle(P) != None) )
			AddPostRenderedActor(P);
	}

	foreach WorldInfo.AllNavigationPoints(class'UTGameObjective',O)
	{
		AddPostRenderedActor(O);
	}

	foreach WorldInfo.AllNavigationPoints(class'UTOnslaughtNodeTeleporter',NT)
	{
		AddPostRenderedActor(NT);
	}

	ForEach AllActors(class'UTDeployableNodeLocker',DNL)
	{
		AddPostRenderedActor(DNL);
	}

	ForEach AllActors(class'UTOnslaughtFlag',F)
	{
		AddPostRenderedActor(F);
		bFound = false;
		for ( i=0; i<UTPlayerOwner.PotentiallyHiddenActors.Length; i++ )
		{
			if ( UTPlayerOwner.PotentiallyHiddenActors[i] == F )
			{
				bFound = true;
				break;
			}
		}
		if ( !bFound )
		{
			UTPlayerOwner.PotentiallyHiddenActors[UTPlayerOwner.PotentiallyHiddenActors.Length] = F;
		}
	}

	if ( UTConsolePlayerController(PlayerOwner) != None )
	{
		bShowOnlyAvailableWeapons = true;
		bNoWeaponNumbers = true;
	}

	// Cache data that will be used a lot
	UTPlayerOwner = UTPlayerController(Owner);

	//Make sure the right team flag is excluded from being visible when you hold it
	if (UTPlayerOwner != None && class<UTCTFGame>(WorldInfo.GRI.GameClass) != none)
	{
		LP = LocalPlayer(UTPlayerOwner.Player);
		if (LP != None)
		{
			//Add flags for culling consideration based on distance
			ForEach AllActors(class'UTCTFFlag',CTFFlag)
			{
				UpdateCTFFlagVisibility(CTFFlag);
			}
		}
	}

	// Setup Damage indicators,etc.

	// Create the 3 Damage Constants
	DamageData.Length = MaxNoOfIndicators;

	for (i = 0; i < MaxNoOfIndicators; i++)
	{
		DamageData[i].FadeTime = 0.0f;
		DamageData[i].FadeValue = 0.0f;
		DamageData[i].MatConstant = new(self) class'MaterialInstanceConstant';
		if (DamageData[i].MatConstant != none && BaseMaterial != none)
		{
			DamageData[i].MatConstant.SetParent(BaseMaterial);
		}
	}

	// create hit effect material instance
	HitEffect = MaterialEffect(LocalPlayer(UTPlayerOwner.Player).PlayerPostProcess.FindPostProcessEffect('HitEffect'));
	if (HitEffect != None)
	{
		if (MaterialInstanceConstant(HitEffect.Material) != None && HitEffect.Material.GetPackageName() == 'Transient')
		{
			// the runtime material already exists; grab it
			HitEffectMaterialInstance = MaterialInstanceConstant(HitEffect.Material);
		}
		else
		{
			HitEffectMaterialInstance = new(HitEffect) class'MaterialInstanceConstant';
			HitEffectMaterialInstance.SetParent(HitEffect.Material);
			HitEffect.Material = HitEffectMaterialInstance;
		}
		HitEffect.bShowInGame = false;
	}

	// find the controller icons font
	ConsoleIconFont=Font(DynamicLoadObject(ConsoleIconFontClassName, class'font', true));
}

simulated function UpdateCTFFlagVisibility(UTCTFFlag CTFFlag)
{
	local UTPlayerController UTPC;
	local LocalPlayer LP;
	local int i;
	local bool bFound;

	UTPC = UTPlayerController(PlayerOwner);
	if (UTPC != None && class<UTCTFGame>(WorldInfo.GRI.GameClass) != none)
	{
		LP = LocalPlayer(UTPC.Player);
		if (LP != None)
		{
			//Is this flag already in the list?
			bFound = false;
			for ( i=0; i<UTPC.PotentiallyHiddenActors.Length; i++ )
			{
				if ( UTPC.PotentiallyHiddenActors[i] == CTFFlag )
				{
					bFound = true;
					if (WorldInfo.GRI.OnSameTeam(CTFFlag, UTPC))
					{
						//Never have your own flag in the list
						UTPC.PotentiallyHiddenActors.Remove(i, 1);
					}
					break;
				}
			}

			//Only the opposing flag is considered
			if (!bFound && WorldInfo.GRI.OnSameTeam(CTFFlag, UTPC) == false)
			{
				UTPC.PotentiallyHiddenActors[UTPC.PotentiallyHiddenActors.Length] = CTFFlag;
			}
		}
	}
}

simulated function NotifyLocalPlayerTeamReceived()
{
	local UTPlayerController UTPC;
	local LocalPlayer LP;
	local UTCTFFlag CTFFlag;

	//Make sure the right team flag is excluded from being visible when you hold it
	UTPC = UTPlayerController(PlayerOwner);
	if (UTPC != None && class<UTCTFGame>(WorldInfo.GRI.GameClass) != none)
	{
		LP = LocalPlayer(UTPC.Player);
		if (LP != None)
		{
			//Add flags for culling consideration based on distance
			ForEach AllActors(class'UTCTFFlag',CTFFlag)
			{
				UpdateCTFFlagVisibility(CTFFlag);
			}
		}
	}

	Super.NotifyLocalPlayerTeamReceived();
}

function Message( PlayerReplicationInfo PRI, coerce string Msg, name MsgType, optional float LifeTime )
{
	local class<LocalMessage> MsgClass;

	if ( bMessageBeep )
	{
		PlayerOwner.PlayBeepSound();
	}

	MsgClass = class'UTSayMsg';
	if (MsgType == 'Say' || MsgType == 'TeamSay')
	{
		Msg = PRI.GetPlayerAlias()$": "$Msg;
		if (MsgType == 'TeamSay')
		{
			MsgClass = class'UTTeamSayMsg';
		}
	}

	AddConsoleMessage(Msg, MsgClass, PRI, LifeTime);
}

/**
 * Given a default screen position (at 1024x768) this will return the hud position at the current resolution.
 * NOTE: If the default position value is < 0.0f then it will attempt to place the right/bottom face of
 * the "widget" at that offset from the ClipX/Y.
 *
 * @Param Position		The default position (in 1024x768 space)
 * @Param Width			How wide is this "widget" at 1024x768
 * @Param Height		How tall is this "widget" at 1024x768
 *
 * @returns the hud position
 */
function Vector2D ResolveHUDPosition(vector2D Position, float Width, float Height)
{
	local vector2D FinalPos;
	FinalPos.X = (Position.X < 0) ? Canvas.ClipX - (Position.X * ResolutionScale) - (Width * ResolutionScale)  : Position.X * ResolutionScale;
	FinalPos.Y = (Position.Y < 0) ? Canvas.ClipY - (Position.Y * ResolutionScale) - (Height * ResolutionScale) : Position.Y * ResolutionScale;

	return FinalPos;
}


/* toggles displaying scoreboard (used by console controller)
*/
exec function ReleaseShowScores()
{
	SetShowScores(false);
}

exec function SetShowScores(bool bNewValue)
{
	local UTGameReplicationInfo GRI;

	if (!bNewValue && WorldInfo.IsInSeamlessTravel() )
	{
		return;
	}

	GRI = UTGameReplicationInfo(WorldInfo.GRI);

	if ( GRI != none )
	{
		GRI.ShowScores(bNewValue, UTPlayerOwner, ScoreboardSceneTemplate);
	}
}

function GetScreenCoords(float PosY, out float ScreenX, out float ScreenY, out HudLocalizedMessage InMessage )
{
	local float Offset, MapSize;

	if ( PosY > 1.0 )
	{
		// position under minimap
		Offset = PosY - int(PosY);
		if ( Offset < 0 )
		{
			Offset = Offset + 1.0;
		}
		if ( bIsSplitScreen )
		{
			ScreenY = (0.15 + Offset) * Canvas.ClipY;
		}
		else
		{
		ScreenY = (0.38 + Offset) * Canvas.ClipY;
		}
		ScreenX = 0.98 * Canvas.ClipX - InMessage.DX;
		return;
	}

    ScreenX = 0.5 * Canvas.ClipX;
    ScreenY = (PosY * HudCanvasScale * Canvas.ClipY) + (((1.0f - HudCanvasScale) * 0.5f) * Canvas.ClipY);

    ScreenX -= InMessage.DX * 0.5;
    ScreenY -= InMessage.DY * 0.5;

	// make sure not behind minimap    
   	if ( bHasMap && bShowMap && !bIsSplitScreen )
   	{
		MapSize = MapDefaultSize * Canvas.ClipY/768;
		if ( (ScreenY < MapPosition.Y*Canvas.ClipY + MapSize)
			&& (ScreenX + InMessage.DX > MapPosition.X*Canvas.ClipX - MapSize) )
		{
			// adjust left from minimap
			ScreenX = FMax(1, MapPosition.X*Canvas.ClipX - MapSize - InMessage.DX);
		}
	}
}


function DrawMessageText(HudLocalizedMessage LocalMessage, float ScreenX, float ScreenY)
{
	local color CanvasColor;
	local string StringMessage;

	if ( Canvas.Font == none )
	{
		Canvas.Font = GetFontSizeIndex(0);
	}

	StringMessage = LocalMessage.StringMessage;
	if ( LocalMessage.Count > 0 )
	{
		if ( Right(StringMessage, 1) ~= "." )
		{
			StringMessage = Left(StringMessage, Len(StringMessage) -1);
		}
		StringMessage = StringMessage$" X "$LocalMessage.Count;
	}

	CanvasColor = Canvas.DrawColor;

	// first draw drop shadow string
	Canvas.DrawColor = BlackColor;
	Canvas.DrawColor.A = CanvasColor.A;
	Canvas.SetPos( ScreenX+2, ScreenY+2 );
	Canvas.DrawTextClipped( StringMessage, false );

	// now draw string with normal color
	Canvas.DrawColor = CanvasColor;
	Canvas.SetPos( ScreenX, ScreenY );
	Canvas.DrawTextClipped( StringMessage, false );
}

/**
 * Perform any value precaching, and set up various safe regions
 *
 * NOTE: NO DRAWING should ever occur in PostRender.  Put all drawing code in DrawHud().
 */
event PostRender()
{
	local int TeamIndex;
	local LocalPlayer Lp;

	//@debug: display giant "BROKEN DATA" message when the campaign bots aren't configured correctly


	if (WorldInfo.NetMode != NM_Client && UTGame(WorldInfo.Game) != None && UTGame(WorldInfo.Game).bBadSinglePlayerBotNames)
	{
		Canvas.Font = class'Engine'.static.GetLargeFont();
		Canvas.DrawColor = RedColor;
		Canvas.SetPos(0.0, Canvas.ClipY * 0.5);
		Canvas.DrawText("SOME CAMPAIGN BOTS WERE NOT FOUND! CHECK LOG FOR DETAILS");
	}



	bIsSplitscreen = class'Engine'.static.IsSplitScreen();
	LP = LocalPlayer(PlayerOwner.Player);
	bIsFirstPlayer = (LP != none) && (LP.ViewportClient.GamePlayers[0] == LP);

	// Clear the flag
	bHudMessageRendered = false;

	PawnOwner = Pawn(PlayerOwner.ViewTarget);
	if ( PawnOwner == None )
	{
		PawnOwner = PlayerOwner.Pawn;
	}

	UTPawnOwner = UTPawn(PawnOwner);
	if ( UTPawnOwner == none )
	{
		if ( UTVehicleBase(PawnOwner) != none )
		{
			UTPawnOwner = UTPawn( UTVehicleBase(PawnOwner).Driver);
		}
	}

	UTOwnerPRI = UTPlayerReplicationInfo(UTPlayerOwner.PlayerReplicationInfo);

	// Cache the current Team Index of this hud and the GRI
	TeamIndex = 2;
	if ( PawnOwner != None )
	{
		if ( (PawnOwner.PlayerReplicationInfo != None) && (PawnOwner.PlayerReplicationInfo.Team != None) )
		{
			TeamIndex = PawnOwner.PlayerReplicationInfo.Team.TeamIndex;
		}
	}
	else if ( (PlayerOwner.PlayerReplicationInfo != None) && (PlayerOwner.PlayerReplicationInfo.team != None) )
	{
		TeamIndex = PlayerOwner.PlayerReplicationInfo.Team.TeamIndex;
	}

	UTGRI = UTGameReplicationInfo(WorldInfo.GRI);

	HUDScaleX = Canvas.ClipX/1280;
	HUDScaleY = Canvas.ClipX/1280;

	ResolutionScaleX = Canvas.ClipX/1024;
	ResolutionScale = Canvas.ClipY / 768;
	if ( bIsSplitScreen )
		ResolutionScale *= 2.0;

	GetTeamColor(TeamIndex, TeamHUDColor, TeamTextColor);

	FullWidth = Canvas.ClipX;
	FullHeight = Canvas.ClipY;

	// Always update the Damage Indicator
	UpdateDamage();

	// Handle displaying the scoreboard.  Allow the Mid Game Menu to override displaying
	// it.
	if ( bShowScores || (UTGRI == None) || (UTGRI.CurrentMidGameMenu != none) )
		{
			return;
		}

	if ( UTPlayerOwner.bViewingMap )
		{
			return;
		}

	if ( bShowHud )
	{
		DrawHud();
	}

	// Draw the chapter title
	//if ( TitleDrawStartTime > 0.0f )
	//{
	//	UpdateChapterTitle();
	//}
}

/** We override this here so we do not have the copyright screen show up in envyentry or when you skip past a movie **/
function DrawEngineHUD();

/**
 * This is the main drawing pump.  It will determine which hud we need to draw (Game or PostGame).  Any drawing that should occur
 * regardless of the game state should go here.
 */
function DrawHUD()
{
	local float x,y,w,h,xl,yl;
	local vector ViewPoint;
	local rotator ViewRotation;

	// post render actors before creating safe region
	if (UTGRI != None && !UTGRI.bMatchIsOver && bShowHud && PawnOwner != none  )
	{
		Canvas.Font = GetFontSizeIndex(0);
		PlayerOwner.GetPlayerViewPoint(ViewPoint, ViewRotation);
		DrawActorOverlays(Viewpoint, ViewRotation);
	}

	// Create the safe region
	w = FullWidth * SafeRegionPct;
	X = Canvas.OrgX + (Canvas.ClipX - w) * 0.5;

	// We have some extra logic for figuring out how things should be displayed
	// in split screen.

	h = FullHeight * SafeRegionPct;

	if ( bIsSplitScreen )
	{
		if ( bIsFirstPlayer )
		{
			Y = Canvas.ClipY - H;
		}
		else
		{
			Y = 0.0f;
		}
	}
	else
	{
		Y = Canvas.OrgY + (Canvas.ClipY - h) * 0.5;
	}

	Canvas.OrgX = X;
	Canvas.OrgY = Y;
	Canvas.ClipX = w;
	Canvas.ClipY = h;
	Canvas.Reset(true);

	// Set up delta time
	RenderDelta = WorldInfo.TimeSeconds - LastHUDRenderTime;
	LastHUDRenderTime = WorldInfo.TimeSeconds;

	// If we are not over, draw the hud
	if (UTGRI != None && !UTGRI.bMatchIsOver)
	{
		PlayerOwner.DrawHud( Self );
		DrawGameHud();
	}
	else	// Match is over
	{
		DrawPostGameHud();

		// still draw pause message
		if ( WorldInfo.Pauser != None )
		{
			Canvas.Font = GetFontSizeIndex(2);
			Canvas.Strlen(class'UTGameViewportClient'.default.LevelActionMessages[1],xl,yl);
			Canvas.SetDrawColor(255,255,255,255);
			Canvas.SetPos(0.5*(Canvas.ClipX - XL), 0.44*Canvas.ClipY);
			Canvas.DrawText(class'UTGameViewportClient'.default.LevelActionMessages[1]);
		}
	}

	LastHUDUpdateTime = WorldInfo.TimeSeconds;
}

exec function ShowAllAI()
{
	bShowAllAI = !bShowAllAI;
}

exec function ShowSquadRoutes()
{
	local UTBot B;
	local int i, j;
	local byte Red, Green, Blue;

	if (PawnOwner != None)
	{
		B = UTBot(PawnOwner.Controller);
		if (B != None && B.Squad != None)
		{
			FlushPersistentDebugLines();
			for (i = 0; i < B.Squad.SquadRoutes.length; i++)
			{
				Red = Rand(255);
				Green = Rand(255);
				Blue = Rand(255);
				for (j = 0; j < B.Squad.SquadRoutes[i].RouteCache.length - 1; j++)
				{
					DrawDebugLine( B.Squad.SquadRoutes[i].RouteCache[j].Location,
							B.Squad.SquadRoutes[i].RouteCache[j + 1].Location,
							Red, Green, Blue, true );
				}
			}
		}
	}
}

/**
 * This function is called to draw the hud while the game is still in progress.  You should only draw items here
 * that are always displayed.  If you want to draw something that is displayed only when the player is alive
 * use DrawLivingHud().
 */
function DrawGameHud()
{
	local float xl, yl, ypos;
	local float TempResScale;
	local Pawn P;
	local int i, len;
	local UniqueNetId OtherPlayerNetId;

	// Draw any spectator information
	if (UTOwnerPRI != None)
	{
		if (UTOwnerPRI.bOnlySpectator || UTPlayerOwner.IsInState('Spectating'))
		{
			P = Pawn(UTPlayerOwner.ViewTarget);
			if (P != None && P.PlayerReplicationInfo != None && P.PlayerReplicationInfo != UTOwnerPRI )
			{
				if (  UTPlayerOwner.bBehindView )
				{
					DisplayHUDMessage(SpectatorMessage @ "-" @ P.PlayerReplicationInfo.GetPlayerAlias(), 0.05, 0.15);
				}
			}
			else
			{
				DisplayHUDMessage(SpectatorMessage, 0.05, 0.15);
			}
		}
		else if ( UTOwnerPRI.bIsSpectator )
		{
			if (UTGRI != None && UTGRI.bMatchHasBegun)
			{
				DisplayHUDMessage(PressFireToBegin);
			}
			else
			{
				DisplayHUDMessage(WaitingForMatch);
			}

		}
		else if ( UTPlayerOwner.IsDead() )
		{
		 	DisplayHUDMessage( UTPlayerOwner.bFrozen ? DeadMessage : FireToRespawnMessage );
		}
	}

	// Draw the Warmup if needed
	if (UTGRI != None && UTGRI.bWarmupRound)
	{
		Canvas.Font = GetFontSizeIndex(2);
		Canvas.DrawColor = WhiteColor;
		Canvas.StrLen(WarmupString, XL, YL);
		Canvas.SetPos((Canvas.ClipX - XL) * 0.5, Canvas.ClipY * 0.175);
		Canvas.DrawText(WarmupString);
	}

	if ( bCrosshairOnFriendly )
	{
		// verify that crosshair trace might hit friendly
		bGreenCrosshair = CheckCrosshairOnFriendly();
		bCrosshairOnFriendly = false;
	}
	else
	{
		bGreenCrosshair = false;
	}

	if ( bShowDebugInfo )
	{
		Canvas.Font = GetFontSizeIndex(0);
		Canvas.DrawColor = ConsoleColor;
		Canvas.StrLen("X", XL, YL);
		YPos = 0;
		PlayerOwner.ViewTarget.DisplayDebug(self, YL, YPos);

		if (ShouldDisplayDebug('AI') && (Pawn(PlayerOwner.ViewTarget) != None))
		{
			DrawRoute(Pawn(PlayerOwner.ViewTarget));
		}
		return;
	}

	if (bShowAllAI)
	{
		DrawAIOverlays();
	}

	if ( WorldInfo.Pauser != None )
	{
		Canvas.Font = GetFontSizeIndex(2);
		Canvas.Strlen(class'UTGameViewportClient'.default.LevelActionMessages[1],xl,yl);
		Canvas.SetDrawColor(255,255,255,255);
		Canvas.SetPos(0.5*(Canvas.ClipX - XL), 0.44*Canvas.ClipY);
		Canvas.DrawText(class'UTGameViewportClient'.default.LevelActionMessages[1]);
	}

	DisplayLocalMessages();
	DisplayConsoleMessages();

	Canvas.Font = GetFontSizeIndex(1);

	// Check if any remote players are using VOIP
	if ( (CharPRI == None) && (PlayerOwner.VoiceInterface != None) && (WorldInfo.NetMode != NM_Standalone) 
		&& (WorldInfo.GRI != None) )
	{
		len = WorldInfo.GRI.PRIArray.Length;
		for ( i=0; i<len; i++ )
		{
			OtherPlayerNetId = WorldInfo.GRI.PRIArray[i].UniqueID;
			if ( PlayerOwner.VoiceInterface.IsRemotePlayerTalking(OtherPlayerNetId) 
				&& (WorldInfo.GRI.PRIArray[i] != PlayerOwner.PlayerReplicationInfo) 
				&& (UTPlayerReplicationInfo(WorldInfo.GRI.PRIArray[i]) != None) 
				&& (PlayerOwner.GameplayVoiceMuteList.Find('Uid', OtherPlayerNetId.Uid) == INDEX_NONE) )
			{
				ShowPortrait(UTPlayerReplicationInfo(WorldInfo.GRI.PRIArray[i]));
				break;
			}
		}
	}

	// Draw the character portrait
	if ( CharPRI != None  )
	{
		DisplayPortrait(RenderDelta);
	}

	if ( bShowClock && !bIsSplitScreen )
	{
   		DisplayClock();
   	}

	if (bIsSplitScreen && bShowScoring)
	{
		DisplayScoring();
	}

	// If the player isn't dead, draw the living hud
	if ( !UTPlayerOwner.IsDead() )
	{
		DrawLivingHud();
	}

	if ( bHasMap && bShowMap )
	{
		TempResScale = ResolutionScale;
		if (bIsSplitScreen)
		{
			ResolutionScale *=2;
		}
		DisplayMap();
		ResolutionScale = TempResScale;
	}

	DisplayDamage();

	if (UTPlayerOwner.bIsTyping && WorldInfo.NetMode != NM_Standalone)
	{
		DrawMicIcon();
	}

	if ( bShowQuickPick )
	{
		DisplayQuickPickMenu();
	}
}

function DrawMicIcon()
{
	local vector2d Pos;
	Pos.X = 0.0;
	Pos.Y = Canvas.ClipY * (CharPortraitYPerc + 0.05) + CharPortraitSize.Y * (Canvas.ClipY/768.0) + 6;
	Canvas.SetPos(Pos.X,Pos.Y);
	Canvas.DrawTile(TalkingTexture, 64, 64, 0, 0, 64, 64);
}

function DisplayLocalMessages()
{
	if (!PlayerOwner.bCinematicMode)
	{
		MaxHUDAreaMessageCount = bIsSplitScreen ? 1 : 2;
		Super.DisplayLocalMessages();
	}
}

/**
 * Anything drawn in this function will be displayed ONLY when the player is living.
 */
function DrawLivingHud()
{
    local UTWeapon Weapon;
    local float Alpha;

	if ( !bIsSplitScreen && bShowScoring )
	{
		DisplayScoring();
	}

	// Pawn Doll
	if ( bShowDoll && UTPawnOwner != none )
	{
		DisplayPawnDoll();
	}

	// If we are driving a vehicle, give it hud time
	if ( bShowVehicle && UTVehicleBase(PawnOwner) != none )
	{
		UTVehicleBase(PawnOwner).DisplayHud(self, Canvas, VehiclePosition);
	}

	// Powerups
	if ( bShowPowerups && UTPawnOwner != none && UTPawnOwner.InvManager != none )
	{
		DisplayPowerups();
	}

	// Manage the weapon.  NOTE: Vehicle weapons are managed by the vehicle
	// since they are integrated in to the vehicle health bar
	if( PawnOwner != none )
	{
		Alpha = TeamHUDColor.A;
		if ( bShowWeaponBar )
    	{
			DisplayWeaponBar();
		}
		else if ( (Vehicle(PawnOwner) != None) && (PawnOwner.Weapon != LastSelectedWeapon) )
		{
			LastSelectedWeapon = PawnOwner.Weapon;
			PlayerOwner.ReceiveLocalizedMessage( class'UTWeaponSwitchMessage',,,, LastSelectedWeapon );
		}
		else if ( (PawnOwner.InvManager != None) && (PawnOwner.InvManager.PendingWeapon != None) && (PawnOwner.InvManager.PendingWeapon != LastSelectedWeapon) )
		{
			LastSelectedWeapon = PawnOwner.InvManager.PendingWeapon;
			PlayerOwner.ReceiveLocalizedMessage( class'UTWeaponSwitchMessage',,,, LastSelectedWeapon );
		}

		// The weaponbar potentially tweaks TeamHUDColor's Alpha.  Reset it here
		TeamHudColor.A = Alpha;

		if ( bShowAmmo )
		{
			Weapon = UTWeapon(PawnOwner.Weapon);
			if ( Weapon != none && UTVehicleWeapon(Weapon) == none )
			{
				DisplayAmmo(Weapon);
			}
		}

		if ( UTGameReplicationInfo(WorldInfo.GRI).bHeroesAllowed )
		{
			DisplayHeroMeter();
	}
	}
}

/**
 * This function is called when we are drawing the hud but the match is over.
 */
function DrawPostGameHud()
{
	local bool bWinner;

	if (WorldInfo.GRI != None 
		&& PlayerOwner.PlayerReplicationInfo != None 
		&& !PlayerOwner.PlayerReplicationInfo.bOnlySpectator
		&& !PlayerOwner.IsInState('InQueue') )
	{
		if ( UTPlayerReplicationInfo(WorldInfo.GRI.Winner) != none )
		{
			bWinner = UTPlayerReplicationInfo(WorldInfo.GRI.Winner) == UTOwnerPRI;
		}
		// automated testing will not have a valid winner
		else if( WorldInfo.GRI.Winner != none )
		{
			bWinner = WorldInfo.GRI.Winner.GetTeamNum() == UTPlayerOwner.GetTeamNum();
		}

		DisplayHUDMessage((bWinner ? YouHaveWon : YouHaveLost));
	}

	DisplayConsoleMessages();
}


function bool CheckCrosshairOnFriendly()
{
	local float Size;
	local vector HitLocation, HitNormal, StartTrace, EndTrace;
	local actor HitActor;
	local UTVehicle V, HitV;
	local UTWeapon W;
	local int SeatIndex;

	if ( PawnOwner == None )
	{
		return false;
	}

	V = UTVehicle(PawnOwner);
	if ( V != None )
	{
		for ( SeatIndex=0; SeatIndex<V.Seats.Length; SeatIndex++ )
		{
			if ( V.Seats[SeatIndex].SeatPawn == PawnOwner )
			{
				HitActor = V.Seats[SeatIndex].AimTarget;
				break;
			}
		}
	}
	else
	{
		W = UTWeapon(PawnOwner.Weapon);
		if ( W != None && W.EnableFriendlyWarningCrosshair())
		{
			StartTrace = W.InstantFireStartTrace();
			EndTrace = StartTrace + W.MaxRange() * vector(PlayerOwner.Rotation);
			HitActor = PawnOwner.Trace(HitLocation, HitNormal, EndTrace, StartTrace, true, vect(0,0,0),, TRACEFLAG_Bullet);

			if ( Pawn(HitActor) == None )
			{
				if ( UTWalkerBody(HitActor) != None )
				{
					HitActor = UTWalkerBody(HitActor).WalkerVehicle;
				}
				else
				{
					HitActor = (HitActor == None) ? None : Pawn(HitActor.Base);
				}
			}
		}
	}

	if ( (Pawn(HitActor) == None) || !Worldinfo.GRI.OnSameTeam(HitActor, PawnOwner) )
	{
		return false;
	}

	// if trace hits friendly, draw "no shoot" symbol
	Size = 28 * (Canvas.ClipY / 768);
	Canvas.SetPos( (Canvas.ClipX * 0.5) - (Size *0.5), (Canvas.ClipY * 0.5) - (Size * 0.5) );
	HitV = UTVehicle(HitActor);
	if ( (HitV != None) && (HitV.Health < HitV.default.Health) && ((V != None) ? (UTStealthVehicle(V) != None) : (UTWeap_Linkgun(W) != None)) )
	{
		Canvas.SetDrawColor(255,255,128,255);
		Canvas.DrawTile(AltHudTexture, Size, Size, 600, 262, 28, 27);
	}
	return true;
}

/*
*/
native function DisplayWeaponBar();

/**
 * Draw the Map
 */
function DisplayMap()
{
	local UTMapInfo MI;
	local float ScaleY, W,H,X,Y, ScreenX, ScreenY, XL, YL, OrdersScale, ScaleIn, ScaleAlpha;
	local color CanvasColor;
	local float AdjustedViewportHeight;


	if ( DisplayedOrders != "" )
	{
		// draw orders
		Canvas.Font = GetFontSizeIndex(2);
		Canvas.StrLen(DisplayedOrders, XL, YL);

		// reduce font size if too big
		if( XL > 0.0f )
		{
			OrdersScale = FMin(1.0, 0.3*Canvas.ClipX/XL);
		}

		// scale in initially
		ScaleIn = FMax(1.0, (0.6+OrderUpdateTime-WorldInfo.TimeSeconds)/0.15);
		ScaleAlpha = FMin(1.0, 4.5 - ScaleIn);
		OrdersScale *= ScaleIn;

		ScreenY = 0.01 * Canvas.ClipY;
		ScreenX = 0.98 * Canvas.ClipX - OrdersScale*XL;

		// first draw drop shadow string
		if ( ScaleIn < 1.1 )
		{
			Canvas.DrawColor = BlackColor;
			Canvas.SetPos( ScreenX+2, ScreenY+2 );
			Canvas.DrawTextClipped( DisplayedOrders, false, OrdersScale, OrdersScale );
		}

		// now draw string with normal color
		Canvas.DrawColor = LightGoldColor;
		Canvas.DrawColor.A = 255 * ScaleAlpha;
		Canvas.SetPos( ScreenX, ScreenY );
		Canvas.DrawTextClipped( DisplayedOrders, false, OrdersScale, OrdersScale );
		Canvas.DrawColor = CanvasColor;
	}

	// no minimap in splitscreen
	if ( bIsSplitScreen )
		return;

	// draw map
	MI = UTMapInfo( WorldInfo.GetMapInfo() );
	if ( MI != none )
	{
		AdjustedViewportHeight = bIsSplitScreen ? Canvas.ClipY * 2 : Canvas.ClipY;

		ScaleY = AdjustedViewportHeight/768;
		H = MapDefaultSize * ScaleY;
		W = MapDefaultSize * ScaleY;

		X = Canvas.ClipX - (Canvas.ClipX * (1.0 - MapPosition.X)) - W;
		Y = (AdjustedViewportHeight * MapPosition.Y);

		MI.DrawMap(Canvas, UTPlayerController(PlayerOwner), X, Y, W ,H, false, (Canvas.ClipX / AdjustedViewportHeight) );
	}
}

/** draws AI goal overlays over each AI pawn */
function DrawAIOverlays()
{
	local UTBot B;
	local vector Pos;
	local float XL, YL;
	local string Text;

	Canvas.Font = GetFontSizeIndex(0);

	foreach WorldInfo.AllControllers(class'UTBot', B)
	{
		if (B.Pawn != None)
		{
			// draw route
			DrawRoute(B.Pawn);
			// draw goal string
			if ((vector(PlayerOwner.Rotation) dot (B.Pawn.Location - PlayerOwner.ViewTarget.Location)) > 0.f)
			{
				Pos = Canvas.Project(B.Pawn.Location + B.Pawn.GetCollisionHeight() * vect(0,0,1.1));
				Text = B.GetHumanReadableName() $ ":" @ B.GoalString;
				Canvas.StrLen(Text, XL, YL);
				Pos.X = FClamp(Pos.X, 0.f, Canvas.ClipX - XL);
				Pos.Y = FClamp(Pos.Y, 0.f, Canvas.ClipY - YL);
				Canvas.SetPos(Pos.X, Pos.Y);
				if (B.PlayerReplicationInfo != None && B.PlayerReplicationInfo.Team != None)
				{
					Canvas.DrawColor = B.PlayerReplicationInfo.Team.GetHUDColor();
					// brighten the color a bit
					Canvas.DrawColor.R = Min(Canvas.DrawColor.R + 64, 255);
					Canvas.DrawColor.G = Min(Canvas.DrawColor.G + 64, 255);
					Canvas.DrawColor.B = Min(Canvas.DrawColor.B + 64, 255);
				}
				else
				{
					Canvas.DrawColor = ConsoleColor;
				}
				Canvas.DrawColor.A = LocalPlayer(PlayerOwner.Player).GetActorVisibility(B.Pawn) ? 255 : 128;
				Canvas.DrawText(Text);
			}
		}
	}
}

/* DrawActorOverlays()
draw overlays for actors that were rendered this tick
*/
native function DrawActorOverlays(vector Viewpoint, rotator ViewRotation);


/************************************************************************************************************
 * Accessors for the UI system for opening scenes (scoreboard/menus/etc)
 ***********************************************************************************************************/

function UIInteraction GetUIController(optional out LocalPlayer LP)
{
	LP = LocalPlayer(PlayerOwner.Player);
	if ( LP != none )
	{
		return LP.ViewportClient.UIController;
	}

	return none;
}

/**
 * OpenScene - Opens a UIScene
 *
 * @Param Template	The scene template to open
 */
function UTUIScene OpenScene(UTUIScene Template)
{
	return UTUIScene(UTPlayerOwner.OpenUIScene(Template));
}


/************************************************************************************************************
 Misc / Utility functions
************************************************************************************************************/

exec function ToggleHUD()
{
	bShowHUD = !bShowHUD;
}


function SpawnScoreBoard(class<Scoreboard> ScoringType)
{
	if (UTPlayerOwner.Announcer == None)
	{
		UTPlayerOwner.Announcer = Spawn(class'UTAnnouncer', UTPlayerOwner);
	}

	if (UTPlayerOwner.MusicManager == None)
	{
		UTPlayerOwner.MusicManager = Spawn(MusicManagerClass, UTPlayerOwner);
	}
}

exec function StartMusic()
{
	if (UTPlayerOwner.MusicManager == None)
	{
		UTPlayerOwner.MusicManager = Spawn(MusicManagerClass, UTPlayerOwner);
	}
}

static simulated function GetTeamColor(int TeamIndex, optional out LinearColor ImageColor, optional out Color TextColor)
{
	switch ( TeamIndex )
	{
		case 0 :
			ImageColor = Default.RedLinearColor;
			TextColor = Default.LightGoldColor;
			break;
		case 1 :
			ImageColor = Default.BlueLinearColor;
			TextColor = Default.LightGoldColor;
			break;
		default:
			ImageColor = Default.DMLinearColor;
			ImageColor.A = 1.0f;
			TextColor = Default.LightGoldColor;
			break;
	}
}


/************************************************************************************************************
 Damage Indicator
************************************************************************************************************/

/**
 * Called from various functions.  It allows the hud to track when a hit is scored
 * and display any indicators.
 *
 * @Param	HitDir		- The vector to which the hit came at
 * @Param	Damage		- How much damage was done
 * @Param	DamageType  - Type of damage
 */
function DisplayHit(vector HitDir, int Damage, class<DamageType> damageType)
{
	local Vector Loc;
	local Rotator Rot;
	local float DirOfHit_L;
	local vector AxisX, AxisY, AxisZ;
	local vector ShotDirection;
	local bool bIsInFront;
	local vector2D	AngularDist;
	local float PositionInQuadrant;
	local float Multiplier;
	local float DamageIntensity;
	local class<UTDamageType> UTDamage;
	local Pawn P;

	if ( (PawnOwner != None) && (PawnOwner.Health > 0) )
	{
		DamageIntensity = PawnOwner.InGodMode() ? 0.5 : (float(Damage)/100.0 + float(Damage)/float(PawnOwner.Health));
	}
	else
	{
		DamageIntensity = FMax(0.2, 0.02*float(Damage));
	}

	if ( damageType.default.bLocationalHit )
	{
		// Figure out the directional based on the victims current view
		PlayerOwner.GetPlayerViewPoint(Loc, Rot);
		GetAxes(Rot, AxisX, AxisY, AxisZ);

		ShotDirection = Normal(HitDir - Loc);
		bIsInFront = GetAngularDistance( AngularDist, ShotDirection, AxisX, AxisY, AxisZ);
		GetAngularDegreesFromRadians(AngularDist);

		Multiplier = 0.26f / 90.f;
		PositionInQuadrant = Abs(AngularDist.X) * Multiplier;

		// 0 - .25  UpperRight
		// .25 - .50 LowerRight
		// .50 - .75 LowerLeft
		// .75 - 1 UpperLeft
		if( bIsInFront )
		{
			DirOfHit_L = (AngularDist.X > 0) ? PositionInQuadrant : -1*PositionInQuadrant;
		}
		else
		{
			DirOfHit_L = (AngularDist.X > 0) ? 0.52+PositionInQuadrant : 0.52-PositionInQuadrant;
		}

		// Cause a damage indicator to appear
		DirOfHit_L = -1 * DirOfHit_L;
		FlashDamage(DirOfHit_L);
	}
	else
	{
		FlashDamage(0.1);
		FlashDamage(0.9);
	}

	// If the owner on the hoverboard, check against the owner health rather than vehicle health
	if (UTVehicle_Hoverboard(PawnOwner) != None)
	{
		P = UTVehicle_Hoverboard(PawnOwner).Driver;
	}
	else
	{
		P = PawnOwner;
	}

	if (DamageIntensity > 0 && HitEffect != None)
	{
		DamageIntensity = FClamp(DamageIntensity, 0.2, 1.0);
		if ( (P == None) || (P.Health <= 0) )
		{
			// long effect duration if killed by this damage
			HitEffectFadeTime = PlayerOwner.MinRespawnDelay * 2.0;
		}
		else
		{
			HitEffectFadeTime = default.HitEffectFadeTime * DamageIntensity;
		}
		HitEffectIntensity = default.HitEffectIntensity * DamageIntensity;
		UTDamage = class<UTDamageType>(DamageType);
		MaxHitEffectColor = (UTDamage != None && UTDamage.default.bOverrideHitEffectColor) ? UTDamage.default.HitEffectColor : default.MaxHitEffectColor;
		HitEffectMaterialInstance.SetScalarParameterValue('HitAmount', HitEffectIntensity);
		HitEffectMaterialInstance.SetVectorParameterValue('HitColor', MaxHitEffectColor);
		HitEffect.bShowInGame = true;
		bFadeOutHitEffect = true;
	}
}

/**
 * Configures a damage directional indicator and makes it appear
 *
 * @param	FlashPosition		Where it should appear
 */
function FlashDamage(float FlashPosition)
{
	local int i,MinIndex;
	local float Min;

	Min = 1.0;

	// Find an available slot

	for (i = 0; i < MaxNoOfIndicators; i++)
	{
		if (DamageData[i].FadeValue <= 0.0)
		{
			DamageData[i].FadeValue = 1.0;
			DamageData[i].FadeTime = FadeTime;
			DamageData[i].MatConstant.SetScalarParameterValue(PositionalParamName,FlashPosition);
			DamageData[i].MatConstant.SetScalarParameterValue(FadeParamName,1.0);

			return;
		}
		else if (DamageData[i].FadeValue < Min)
		{
			MinIndex = i;
			Min = DamageData[i].FadeValue;
		}
	}

	// Set the data

	DamageData[MinIndex].FadeValue = 1.0;
	DamageData[MinIndex].FadeTime = FadeTime;
	DamageData[MinIndex].MatConstant.SetScalarParameterValue(PositionalParamName,FlashPosition);
	DamageData[MinIndex].MatConstant.SetScalarParameterValue(FadeParamName,1.0);

}


/**
 * Update Damage always needs to be called
 */
function UpdateDamage()
{
	local int i;
	local float HitAmount;
	local LinearColor HitColor;

	for (i=0; i<MaxNoOfIndicators; i++)
	{
		if (DamageData[i].FadeTime > 0)
		{
			DamageData[i].FadeValue += ( 0 - DamageData[i].FadeValue) * (RenderDelta / DamageData[i].FadeTime);
			DamageData[i].FadeTime -= RenderDelta;
			DamageData[i].MatConstant.SetScalarParameterValue(FadeParamName,DamageData[i].FadeValue);
		}
	}

	// Update the color/fading on the full screen distortion
	if (bFadeOutHitEffect)
	{
		HitEffectMaterialInstance.GetScalarParameterValue('HitAmount', HitAmount);
		HitAmount -= HitEffectIntensity * RenderDelta / HitEffectFadeTime;

		if (HitAmount <= 0.0)
		{
			HitEffect.bShowInGame = false;
			bFadeOutHitEffect = false;
		}
		else
		{
			HitEffectMaterialInstance.SetScalarParameterValue('HitAmount', HitAmount);
			// now scale the color
			HitEffectMaterialInstance.GetVectorParameterValue('HitColor', HitColor);
			HitEffectMaterialInstance.SetVectorParameterValue('HitColor', HitColor - MaxHitEffectColor * (RenderDelta / HitEffectFadeTime));
		}
	}
}

function DisplayDamage()
{
	local int i;

	// Update the fading on the directional indicators.
	for (i=0; i<MaxNoOfIndicators; i++)
	{
		if (DamageData[i].FadeTime > 0)
		{

			Canvas.SetPos( ((Canvas.ClipX * 0.5) - (DamageIndicatorSize * 0.5 * ResolutionScale)),
						 	((Canvas.ClipY * 0.5) - (DamageIndicatorSize * 0.5 * ResolutionScale)));

			Canvas.DrawMaterialTile( DamageData[i].MatConstant, DamageIndicatorSize * ResolutionScale, DamageIndicatorSize * ResolutionScale, 0.0, 0.0, 1.0, 1.0);
		}
	}
}

/************************************************************************************************************
 Actor Render - These functions allow for actors in the world to gain access to the hud and render
 information on it.
************************************************************************************************************/


/** RemovePostRenderedActor()
remove an actor from the PostRenderedActors array
*/
function RemovePostRenderedActor(Actor A)
{
	local int i;

	for ( i=0; i<PostRenderedActors.Length; i++ )
	{
		if ( PostRenderedActors[i] == A )
		{
			PostRenderedActors[i] = None;
			return;
		}
	}
}

/** AddPostRenderedActor()
add an actor to the PostRenderedActors array
*/
function AddPostRenderedActor(Actor A)
{
	local int i;

	// make sure that A is not already in list
	for ( i=0; i<PostRenderedActors.Length; i++ )
	{
		if ( PostRenderedActors[i] == A )
		{
			return;
		}
	}

	// add A at first empty slot
	for ( i=0; i<PostRenderedActors.Length; i++ )
	{
		if ( PostRenderedActors[i] == None )
		{
			PostRenderedActors[i] = A;
			return;
		}
	}

	// no empty slot found, so grow array
	PostRenderedActors[PostRenderedActors.Length] = A;
}

/************************************************************************************************************
************************************************************************************************************/


static simulated function DrawBackground(float X, float Y, float Width, float Height, LinearColor DrawColor, Canvas DrawCanvas)
{
	DrawCanvas.SetPos(X,Y);
	DrawColor.R *= 0.25;
	DrawColor.G *= 0.25;
	DrawColor.B *= 0.25;
	DrawCanvas.DrawColorizedTile(Default.AltHudTexture, Width, Height, 631,202,98,48, DrawColor);
}

static simulated function DrawBeaconBackground(float X, float Y, float Width, float Height, LinearColor DrawColor, Canvas DrawCanvas)
{
	DrawCanvas.SetPos(X,Y);
	DrawColor.R *= 0.25;
	DrawColor.G *= 0.25;
	DrawColor.B *= 0.25;
	DrawCanvas.DrawColorizedTile(Default.UT3GHudTexture, Width, Height, 137,91,101,34, DrawColor);
}

/**
  * Draw a beacon healthbar
  * @PARAM Width is the actual health width
  * @PARAM MaxWidth corresponds to the max health
  */
static simulated function DrawHealth(float X, float Y, float Width, float MaxWidth, float Height, Canvas DrawCanvas, optional byte Alpha=255)
{
	local float HealthX;
	local color DrawColor, BackColor;

	// Bar color depends on health
	HealthX = Width/MaxWidth;

	DrawColor = Default.GrayColor;
	DrawColor.B = 16;
	if (HealthX > 0.8)
	{
		DrawColor.R = 112;
	}
	else if (HealthX < 0.4 )
	{
		DrawColor.G = 80;
	}
	DrawColor.A = Alpha;
	BackColor = default.GrayColor;
	BackColor.A = Alpha;
	DrawBarGraph(X,Y,Width,MaxWidth,Height,DrawCanvas,DrawColor,BackColor);
}

static simulated function DrawBarGraph(float X, float Y, float Width, float MaxWidth, float Height, Canvas DrawCanvas, Color BarColor, Color BackColor)
{
	// Draw health bar backdrop ticks
	if ( MaxWidth > 24.0 )
	{
		// determine size of health bar caps
		DrawCanvas.DrawColor = BackColor;
		DrawCanvas.SetPos(X,Y);
		DrawCanvas.DrawTile(default.AltHudTexture,MaxWidth,Height,407,479,FMin(MaxWidth,118),16);
	}

	DrawCanvas.DrawColor = BarColor;
	DrawCanvas.SetPos(X, Y);
	DrawCanvas.DrawTile(default.AltHudTexture,Width,Height,277,494,4,13);
}

simulated event Timer()
{
	Super.Timer();
	if ( WorldInfo.GRI != None )
	{
		WorldInfo.GRI.SortPRIArray();
	}
}

/**
 * Creates a string from the time
 */
static function string FormatTime(int Seconds)
{
	local int Hours, Mins;
	local string NewTimeString;

	Hours = Seconds / 3600;
	Seconds -= Hours * 3600;
	Mins = Seconds / 60;
	Seconds -= Mins * 60;
	NewTimeString = "" $ ( Hours > 9 ? String(Hours) : "0"$String(Hours)) $ ":";
	NewTimeString = NewTimeString $ ( Mins > 9 ? String(Mins) : "0"$String(Mins)) $ ":";
	NewTimeString = NewTimeString $ ( Seconds > 9 ? String(Seconds) : "0"$String(Seconds));

	return NewTimeString;
}

static function Font GetFontSizeIndex(int FontSize)
{
	return default.HudFonts[Clamp(FontSize,0,3)];
}

/**
 * Given a PRI, show the Character portrait on the screen.
 *
 * @Param ShowPRI					The PRI to show
 * @Param bOverrideCurrentSpeaker	If true, we will quickly slide off the current speaker and then bring on this guy
 */
simulated function ShowPortrait(UTPlayerReplicationInfo ShowPRI, optional float PortraitDuration, optional bool bOverrideCurrentSpeaker)
{
	if ( ShowPRI != none && ShowPRI.CharPortrait != none )
	{
		// See if there is a current speaker
		if ( CharPRI != none )  // See if we should override this speaker
		{
			if ( ShowPRI == CharPRI )
			{
				if ( CharPortraitTime >= CharPortraitSlideTime * CharPortraitSlideTransitionTime )
				{
					CharPortraitSlideTime += 2.0;
					CharPortraitTime = FMax(CharPortraitTime, CharPortraitSlideTime * CharPortraitSlideTransitionTime);
				}
			}
			else if ( bOverrideCurrentSpeaker )
			{
				CharPendingPRI = ShowPRI;
				HidePortrait();
    		}
			return;
		}

		// Noone is sliding in, set us up.
		// Make sure we have the Instance
		if ( CharPortraitMI == none )
		{
			CharPortraitMI = new(Outer) class'MaterialInstanceConstant';
			CharPortraitMI.SetParent(CharPortraitMaterial);
		}

		// Set the image
		CharPortraitMI.SetTextureParameterValue('PortraitTexture',ShowPRI.CharPortrait);
		CharPRI = ShowPRI;
		CharPortraitTime = 0.0;
		CharPortraitSlideTime = FMax(2.0, PortraitDuration);
	}
}

/** If the portrait is visible, this will immediately try and hide it */
simulated function HidePortrait()
{
	local float CurrentPos;

	// Figure out the slide.

	CurrentPos = CharPortraitTime / CharPortraitSlideTime;

	// Slide it back out the equal percentage

	if (CurrentPos < CharPortraitSlideTransitionTime)
	{
		CharPortraitTime = CharPortraitSlideTime * (1.0 - CurrentPos);
	}

	// If we aren't sliding out, do it now

	else if ( CurrentPos < (1.0 - CharPortraitSlideTransitionTime ) )
	{
		CharPortraitTime = CharPortraitSlideTime * (1.0 - CharPortraitSlideTransitionTime);
	}
}

/**
 * Render the character portrait on the screen.
 *
 * @Param	RenderDelta		How long since the last render
 */
simulated function DisplayPortrait(float DeltaTime)
{
	local float CurrentPos, LocalPos, XPos, YPos, W, H;

	H = CharPortraitSize.Y * (Canvas.ClipY/768.0);
	W = CharPortraitSize.X * (Canvas.ClipY/768.0);

	CharPortraitTime += DeltaTime * (CharPendingPRI != none ? 1.5 : 1.0);

	CurrentPos = CharPortraitTime / CharPortraitSlideTime;
	// Figure out what we are doing
	if (CurrentPos < CharPortraitSlideTransitionTime)	// Sliding In
	{
		LocalPos = CurrentPos / CharPortraitSlideTransitionTime;
		XPos = FCubicInterp((W * -1), 0.0, (Canvas.ClipX * CharPortraitXPerc), 0.0, LocalPos);
	}
	else if ( (CurrentPos < 1.0 - CharPortraitSlideTransitionTime) )	// Sitting there
	{
		XPos = Canvas.ClipX * CharPortraitXPerc;
	}
	else if ( PlayerOwner.VoiceInterface.IsRemotePlayerTalking(CharPRI.UniqueID) )
	{
		XPos = Canvas.ClipX * CharPortraitXPerc;
		CharPortraitTime = (1.0 - CharPortraitSlideTransitionTime) * CharPortraitSlideTime;
	}
	else if ( CurrentPos < 1.0 )	// Sliding out
	{
		LocalPos = (CurrentPos - (1.0 - CharPortraitSlideTransitionTime)) / CharPortraitSlideTransitionTime;
		XPos = FCubicInterp((W * -1), 0.0, (Canvas.ClipX * CharPortraitXPerc), 0.0, 1.0-LocalPos);
	}
	else	// Done, reset everything
	{
		CharPRI = none;
		if ( CharPendingPRI != none )	// If we have a pending PRI, then display it
		{
			ShowPortrait(CharPendingPRI);
			CharPendingPRI = none;
		}
		return;
	}

	// Draw the portrait
	YPos = Canvas.ClipY * CharPortraitYPerc;
	Canvas.SetPos(XPos, YPos);
	Canvas.DrawColor = Whitecolor;
	Canvas.DrawMaterialTile(CharPortraitMI,W,H,0.0,0.0,1.0,1.0);
	Canvas.SetPos(XPos,YPos + H + 5);
	Canvas.Font = HudFonts[0];
	Canvas.DrawText(CharPRI.GetPlayerAlias());
}

/**
 * Displays the MOTD Scene
 */
function DisplayMOTD()
{
	OpenScene(MOTDSceneTemplate);
}

/**
 * Displays a HUD message
 */
function DisplayHUDMessage(string Message, optional float XOffsetPct = 0.05, optional float YOffsetPct = 0.05)
{
	local float XL,YL;
	local float BarHeight, Height, YBuffer, XBuffer, YCenter;

	if (!bHudMessageRendered)
	{
		// Preset the Canvas
		Canvas.SetDrawColor(255,255,255,255);
		Canvas.Font = GetFontSizeIndex(2);
		Canvas.StrLen(Message,XL,YL);

		// Figure out sizes/positions
		BarHeight = YL * 1.1;
		YBuffer = Canvas.ClipY * YOffsetPct;
		XBuffer = Canvas.ClipX * XOffsetPct;
		Height = YL * 2.0;

		YCenter = Canvas.ClipY - YBuffer - (Height * 0.5);

		// Draw the Bar
		Canvas.SetPos(0,YCenter - (BarHeight * 0.5) );
		Canvas.DrawTile(AltHudTexture, Canvas.ClipX, BarHeight, 382, 441, 127, 16);

		// Draw the Symbol
		Canvas.SetPos(XBuffer, YCenter - (Height * 0.5));
		Canvas.DrawTile(AltHudTexture, Height * 1.33333, Height, 734,190, 82, 70);

		// Draw the Text
		Canvas.SetPos(XBuffer + Height * 1.5, YCenter - (YL * 0.5));
		Canvas.DrawText(Message);

		bHudMessageRendered = true;
	}
}

function DisplayClock()
{
	local string Time;
	local vector2D POS;

	if (UTGRI != None)
	{
		POS = ResolveHudPosition(ClockPosition,183,44);
		Time = FormatTime(UTGRI.TimeLimit != 0 ? UTGRI.RemainingTime : UTGRI.ElapsedTime);

		Canvas.SetPos(POS.X, POS.Y);
		Canvas.DrawColorizedTile(AltHudTexture, 183 * ResolutionScale,44 * ResolutionScale,490,395,181,44,TeamHudColor);

		Canvas.DrawColor = WhiteColor;
		DrawGlowText(Time, POS.X + (28 * ResolutionScale), POS.Y, 39 * ResolutionScale);
	}
}

function DisplayPawnDoll()
{
	local vector2d POS;
	local string Amount;
	local int Health;
	local float xl,yl;
	local float ArmorAmount;
	local linearcolor ScaledWhite, ScaledTeamHUDColor;

	POS = ResolveHudPosition(DollPosition,216, 115);
	Canvas.DrawColor = WhiteColor;

	// should doll be visible?
	ArmorAmount = UTPawnOwner.ShieldBeltArmor + UTPawnOwner.VestArmor + UTPawnOwner.HelmetArmor + UTPawnOwner.ThighpadArmor;

	if ( (ArmorAmount > 0) || (UTPawnOwner.JumpbootCharge > 0) )
	{
		DollVisibility = FMin(DollVisibility + 3.0 * (WorldInfo.TimeSeconds - LastDollUpdate), 1.0);
	}
	else
	{
		DollVisibility = FMax(DollVisibility - 3.0 * (WorldInfo.TimeSeconds - LastDollUpdate), 0.0);
	}
	LastDollUpdate = WorldInfo.TimeSeconds;

	POS.X = POS.X + (DollVisibility - 1.0)*HealthOffsetX*ResolutionScale;
	ScaledWhite = LC_White;
	ScaledWhite.A = DollVisibility;
	ScaledTeamHUDColor = TeamHUDColor;
	ScaledTeamHUDColor.A = FMin(DollVisibility, TeamHUDColor.A);

	// First, handle the Pawn Doll
	if ( DollVisibility > 0.0 )
	{
		// The Background
		Canvas.SetPos(POS.X,POS.Y);
		Canvas.DrawColorizedTile(AltHudTexture, PawnDollBGCoords.UL * ResolutionScale, PawnDollBGCoords.VL * ResolutionScale, PawnDollBGCoords.U, PawnDollBGCoords.V, PawnDollBGCoords.UL, PawnDollBGCoords.VL, ScaledTeamHUDColor);

		// The ShieldBelt/Default Doll
		Canvas.SetPos(POS.X + (DollOffsetX * ResolutionScale), POS.Y + (DollOffsetY * ResolutionScale));
		if ( UTPawnOwner.ShieldBeltArmor > 0.0f )
		{
			DrawTileCentered(AltHudTexture, DollWidth * ResolutionScale, DollHeight * ResolutionScale, 71, 224, 56, 109,ScaledWhite);
		}
		else
		{
			DrawTileCentered(AltHudTexture, DollWidth * ResolutionScale, DollHeight * ResolutionScale, 4, 224, 56, 109, ScaledTeamHUDColor);
		}

		if ( UTPawnOwner.VestArmor > 0.0f )
		{
			Canvas.SetPos(POS.X + (VestX * ResolutionScale), POS.Y + (VestY * ResolutionScale));
			DrawTileCentered(AltHudTexture, VestWidth * ResolutionScale, VestHeight * ResolutionScale, 132, 220, 46, 28, ScaledWhite);
		}

		if (UTPawnOwner.ThighpadArmor > 0.0f )
		{
			Canvas.SetPos(POS.X + (ThighX * ResolutionScale), POS.Y + (ThighY * ResolutionScale));
			DrawTileCentered(AltHudTexture, ThighWidth * ResolutionScale, ThighHeight * ResolutionScale, 134, 263, 42, 28, ScaledWhite);
		}

		if (UTPawnOwner.HelmetArmor > 0.0f )
		{
			Canvas.SetPos(POS.X + (HelmetX * ResolutionScale), POS.Y + (HelmetY * ResolutionScale));
			DrawTileCentered(AltHudTexture, HelmetHeight * ResolutionScale, HelmetWidth * ResolutionScale, 193, 265, 22, 25, ScaledWhite);
		}

		if (UTPawnOwner.JumpBootCharge > 0 )
		{
			Canvas.SetPos(POS.X + BootX*ResolutionScale, POS.Y + BootY*ResolutionScale);
			DrawTileCentered(AltHudTexture, BootWidth * ResolutionScale, BootHeight * ResolutionScale, 222, 263, 54, 26, ScaledWhite);

			Canvas.Strlen(string(UTPawnOwner.JumpBootCharge),XL,YL);
			Canvas.SetPos(POS.X + (BootX-1)*ResolutionScale - 0.5*XL, POS.Y + (BootY+3)*ResolutionScale - 0.5*YL);
			Canvas.DrawTextClipped( UTPawnOwner.JumpBootCharge, false, 1.0, 1.0 );
		}
	}

	// Next, the health and Armor widgets

   	// Draw the Health Background
	Canvas.SetPos(POS.X + HealthBGOffsetX * ResolutionScale,POS.Y + HealthBGOffsetY * ResolutionScale);
	
	Canvas.DrawColorizedTile(AltHudTexture, HealthBGCoords.UL * ResolutionScale, HealthBGCoords.VL * ResolutionScale, HealthBGCoords.U, HealthBGCoords.V, HealthBGCoords.UL, HealthBGCoords.VL, TeamHudColor);
	Canvas.DrawColor = WhiteColor;

	// Draw the Health Text
	Health = UTPawnOwner.Health;

	// Figure out if we should be pulsing
	if ( Health > LastHealth )
	{
		HealthPulseTime = WorldInfo.TimeSeconds;
	}
	LastHealth = Health;

	Amount = (Health > 0) ? ""$Health : "0";
	DrawGlowText(Amount, POS.X + HealthTextX * ResolutionScale, POS.Y + HealthTextY * ResolutionScale, 60 * ResolutionScale, HealthPulseTime,true);

	// Draw the Health Icon
	Canvas.SetPos(POS.X + HealthIconX * ResolutionScale, POS.Y + HealthIconY * ResolutionScale);
	DrawTileCentered(AltHudTexture, 42 * ResolutionScale , 30 * ResolutionScale, 216, 102, 56, 40, LC_White);

	// Only Draw the Armor if there is any
	// TODO - Add fading
	if ( ArmorAmount > 0 )
	{
		if (ArmorAmount > LastArmorAmount)
		{
			ArmorPulseTime = WorldInfo.TimeSeconds;
		}
		LastArmorAmount = ArmorAmount;

    	// Draw the Armor Background
		Canvas.SetPos(POS.X + ArmorBGOffsetX * ResolutionScale,POS.Y + ArmorBGOffsetY * ResolutionScale);
		Canvas.DrawColorizedTile(AltHudTexture, ArmorBGCoords.UL * ResolutionScale, ArmorBGCoords.VL * ResolutionScale, ArmorBGCoords.U, ArmorBGCoords.V, ArmorBGCoords.UL, ArmorBGCoords.VL, ScaledTeamHudColor);
		Canvas.DrawColor = WhiteColor;
		Canvas.DrawColor.A = 255.0 * DollVisibility;

		// Draw the Armor Text
		DrawGlowText(""$INT(ArmorAmount), POS.X + ArmorTextX * ResolutionScale, POS.Y + ArmorTextY * ResolutionScale, 45 * ResolutionScale, ArmorPulseTime,true);

		// Draw the Armor Icon
		Canvas.SetPos(POS.X + ArmorIconX * ResolutionScale, POS.Y + ArmorIconY * ResolutionScale);
		DrawTileCentered(AltHudTexture, (33 * ResolutionScale) , (24 * ResolutionScale), 225, 68, 42, 32, ScaledWhite);
	}
}

function ResetHeroTooltipTimeStamp()
{
	HeroTooltipTimeStamp = WorldInfo.TimeSeconds + 0.2;
}

function DisplayHeroMeter()
{
	local vector2d POS;
	local float HeroMeter, PartialHero;
	local LinearColor HealthColor;
	local UTPlayerReplicationInfo OwnerPRI;
	local UTVehicle OwnerVehicle;
	local bool bHeroCountdown;
	local vector2d HeroMeterPos;
	local float myV, myVL;
	local float ResScale, Alpha, ToolTipLerpX, ToolTipLerpY;
	local float XL,YL,HeroBumpTextPosX, HeroBumpTextPosY;
	local float TempSin;
	local string HeroBumpText;

	OwnerPRI = (PawnOwner == None) 
		? UTPlayerReplicationinfo(PlayerOwner.PlayerReplicationInfo) 
		: UTPlayerReplicationinfo(PawnOwner.PlayerReplicationInfo);
	if ( OwnerPRI == None )
	{
		//Early out with no PRI
		return;
	}

	POS = ResolveHudPosition(AmmoPosition,HeroMeterWidth,HeroMeterHeight);

	// We should adjust hero meter position if we are driving a vehicle or
	// if we are in a vehicle turret
	if ( UTWeaponPawn(PawnOwner) != None )
	{
		OwnerVehicle = UTWeaponPawn(PawnOwner).MyVehicle;
	}
	else if ( UTVehicle(PawnOwner) != None )
	{
		OwnerVehicle = UTVehicle(PawnOwner);
	}

	//Calculate the upper right of the hero meter
	if ( OwnerVehicle != None )
	{
		HeroMeterPos.X = Canvas.ClipX - (Abs(OwnerVehicle.HudCoords.UL) + HeroMeterTexCoords.UL) * ResolutionScale;
		HeroMeterPos.Y = POS.Y - HeroMeterVehicleOffsetY * ResolutionScale;
	}
	else
	{
		HeroMeterPos.X = POS.X - HeroMeterOffsetX * ResolutionScale;
		HeroMeterPos.Y = POS.Y - HeroMeterOffsetY * ResolutionScale;
	}

	bHeroCountdown = (UTPawnOwner != None) && UTPawnOwner.IsHero() && (UTPawnOwner.HeroStartTime > 0);

	// draw hero meter
	HealthColor = TeamHudColor;
	if ( bHeroCountdown )
	{
		HealthColor.A *= 0.35;
	}
	HeroMeter = OwnerPRI.GetHeroMeter();
		
	Canvas.SetPos(HeroMeterPos.X, HeroMeterPos.Y);
	Canvas.DrawColorizedTile(UT3GHudTexture, HeroMeterWidth * ResolutionScale, HeroMeterHeight * ResolutionScale, HeroMeterTexCoords.U, HeroMeterTexCoords.V, HeroMeterTexCoords.UL, HeroMeterTexCoords.VL, HealthColor);

	if ( OwnerPRI.HeroThreshold < OwnerPRI.GetHeroMeter() )
	{
		TempSin = 0.25 * sin(10 * WorldInfo.TimeSeconds);
		HealthColor.A = FMin(1.0, HealthColor.A + TempSin);

		// also possibly show help
		if ( OwnerPRI.CanBeHero() && (UTPawn(PawnOwner) != None) && !UTPawn(PawnOwner).bFeigningDeath )
		{
			Alpha = FClamp(WorldInfo.TimeSeconds - HeroTooltipTimeStamp, 0, 0.4) / 0.4;
			ToolTipLerpX = Lerp(Canvas.ClipX * 0.5, Canvas.ClipX * 0.85, Alpha);
			ToolTipLerpY = Lerp(Canvas.ClipY * 0.5, Canvas.ClipY * 0.88, Alpha);
			ResScale = Lerp(Canvas.ClipY/720 * 2, Canvas.ClipY/720*(0.6 + TempSin), Alpha);

			DrawToolTip(Canvas, PlayerOwner, "GBA_TriggerHero", ToolTipLerpX, ToolTipLerpY, HeroToolTipIconCoords.U, HeroToolTipIconCoords.V, HeroToolTipIconCoords.UL, HeroToolTipIconCoords.VL, ResScale, UT3GHudTexture, FMax(0.6, Alpha));
		
			if (WorldInfo.TimeSeconds - HeroTooltipTimeStamp > 60)
			{
				//Reset hero meter tooltip (adding amount of time to stay centered before moving)
				HeroTooltipTimeStamp = WorldInfo.TimeSeconds + 0.2;
			}
		}
	}
	else
	{
		//Reset hero meter tooltip (adding amount of time to stay centered before moving)
		HeroTooltipTimeStamp = WorldInfo.TimeSeconds + 0.2;
	}

	if ( bHeroCountdown )
	{
		Canvas.Font = GetFontSizeIndex(3);
		Canvas.DrawColor = BlackColor;
		Canvas.SetPos(HeroMeterPos.X + HeroPointOffX * ResolutionScale, HeroMeterPos.Y + HeroPointOffY*ResolutionScale);
		Canvas.DrawText(""$int(45 - WorldInfo.TimeSeconds + UTPawnOwner.HeroStartTime));

		Canvas.DrawColor = WhiteColor;
		Canvas.SetPos(HeroMeterPos.X + (HeroPointOffX+2) * ResolutionScale, HeroMeterPos.Y + (HeroPointOffY+2)*ResolutionScale);
		Canvas.DrawText(""$int(45 - WorldInfo.TimeSeconds + UTPawnOwner.HeroStartTime));
	}
	else
	{
		//Fudge the partial hero so that the meter fills up slower
		PartialHero = FMin(0.9, (HeroMeter/OwnerPRI.HeroThreshold) * 0.85);
		Canvas.SetPos(HeroMeterPos.X, HeroMeterPos.Y + (HeroMeterHeight * (1.0 - PartialHero) * ResolutionScale));

		//Calculate the V offsets for the fill meter
		myV = HeroMeterOverlayTexCoords.V + HeroMeterOverlayTexCoords.VL * (1.0 - PartialHero);
		myVL= HeroMeterOverlayTexCoords.VL * PartialHero;

		Canvas.DrawColorizedTile(UT3GHudTexture, HeroMeterWidth * ResolutionScale, HeroMeterHeight * PartialHero * ResolutionScale, HeroMeterOverlayTexCoords.U, myV, HeroMeterOverlayTexCoords.UL, myVL, HealthColor);

		// display recent hero score bump
		if ( HeroMeter > OldHeroScore )
		{
			LastHeroScoreBumpTime = WorldInfo.TimeSeconds;
			LastHeroBump = HeroMeter - OldHeroScore;
		}
		OldHeroScore = HeroMeter;
		if ( (WorldInfo.TimeSeconds - LastHeroScoreBumpTime < 2.0)
			&& (LastHeroBump > 0) )
		{
			HeroBumpText = "+"$LastHeroBump;
							
			Canvas.Font = GetFontSizeIndex(3);
			Canvas.StrLen(HeroBumpText, XL, YL);

			//Make sure the text fits within the bounds
			ResScale = 1;
			if (LastHeroBump > 9)
			{
				ResScale = ((HeroMeterWidth - 6) / XL) * ResolutionScale;
				XL = (HeroMeterWidth - 6);
			}

			//Center the text
			HeroBumpTextPosX = HeroMeterPos.X + (HeroMeterWidth - XL) * 0.5 * ResolutionScale;
			HeroBumpTextPosY = HeroMeterPos.Y + (HeroMeterHeight * 0.5 * ResolutionScale) - (YL * 0.5 * ResScale);
			
			//Draw a drop shadow
			Canvas.DrawColor = BlackColor;
			Canvas.SetPos(HeroBumpTextPosX - 2 * ResolutionScale, HeroBumpTextPosY - 2 * ResolutionScale);
			Canvas.DrawText(HeroBumpText, ,ResScale, ResScale);

			//Draw the main text
			Canvas.DrawColor = WhiteColor;
			Canvas.SetPos(HeroBumpTextPosX, HeroBumpTextPosY);
			Canvas.DrawText(HeroBumpText, ,ResScale, ResScale);
		}
	}
}

function DisplayAmmo(UTWeapon Weapon)
{
	local vector2d POS;
	local string Amount;
	local float BarWidth;
	local float PercValue;
	local int AmmoCount;

	if ( Weapon.AmmoDisplayType == EAWDS_None )
	{
		return;
	}

	// Resolve the position
	POS = ResolveHudPosition(AmmoPosition,AmmoBGCoords.UL,AmmoBGCoords.VL);

	if ( Weapon.AmmoDisplayType != EAWDS_BarGraph )
	{
		// Figure out if we should be pulsing
		AmmoCount = Weapon.GetAmmoCount();

		if ( AmmoCount > LastAmmoCount && LastWeapon == Weapon )
		{
			AmmoPulseTime = WorldInfo.TimeSeconds;
		}

		LastWeapon = Weapon;
		LastAmmoCount = AmmoCount;

		// Draw the background
		Canvas.SetPos(POS.X,POS.Y - (AmmoBarOffsetY * ResolutionScale));
		Canvas.DrawColorizedTile(AltHudTexture, AmmoBGCoords.UL * ResolutionScale, AmmoBGCoords.VL * ResolutionScale, AmmoBGCoords.U, AmmoBGCoords.V, AmmoBGCoords.UL, AmmoBGCoords.VL, TeamHudColor);

		// Draw the amount
		Amount = ""$AmmoCount;
		Canvas.DrawColor = WhiteColor;

		DrawGlowText(Amount, POS.X + (AmmoTextOffsetX * ResolutionScale), POS.Y - ((AmmoBarOffsetY + AmmoTextOffsetY) * ResolutionScale), 58 * ResolutionScale, AmmoPulseTime,true);
	}

	// If we have a bar graph display, do it here
	if ( Weapon.AmmoDisplayType != EAWDS_Numeric )
	{
		PercValue = Weapon.GetPowerPerc();

		Canvas.SetPos(POS.X + (40 * ResolutionScale), POS.Y - 8 * ResolutionScale);
		Canvas.DrawColorizedTile(AltHudTexture, 76 * ResolutionScale, 18 * ResolutionScale, 376,458, 88, 14, LC_White);

		BarWidth = 70 * ResolutionScale;
		DrawHealth(POS.X + (43 * ResolutionScale), POS.Y - 4 * ResolutionScale, BarWidth * PercValue,  BarWidth, 16, Canvas);
	}
}

function DisplayPowerups()
{
	local UTTimedPowerup TP;
	local float YPos;

	if ( bIsSplitScreen )
	{
		YPos = Canvas.ClipY * 0.55;
	}
	else
	{
		YPos = Canvas.ClipY * PowerupYPos;
	}

	bDisplayingPowerups = false;
	if (bShowPowerups)
	{
		foreach UTPawnOwner.InvManager.InventoryActors(class'UTTimedPowerup', TP)
		{
			TP.DisplayPowerup(Canvas, self, ResolutionScale, YPos);
			bDisplayingPowerups = true;
		}
	}
}

function DisplayScoring()
{
	local vector2d POS;

	if ( bShowFragCount || (bHasLeaderboard && bShowLeaderboard) )
	{
		POS = ResolveHudPosition(ScoringPosition, 115,44);

		if ( bShowFragCount )
		{
			DisplayFragCount(POS);
		}

		if ( bHasLeaderboard )
		{
			DisplayLeaderBoard(POS);
		}
	}
}


function DisplayFragCount(vector2d POS)
{
	local int FragCount;
	local UTPlayerReplicationInfo FragPRI;
	
	FragPRI = ((PawnOwner != None) && (PawnOwner.PlayerReplicationInfo != None)) ? UTPlayerReplicationInfo(PawnOwner.PlayerReplicationInfo) : UTOwnerPRI;  

	Canvas.SetPos(POS.X, POS.Y);
	Canvas.DrawColorizedTile(AltHudTexture, 115 * ResolutionScale, 44 * ResolutionScale, 374, 395, 115, 44, TeamHudColor);
	Canvas.DrawColor = WhiteColor;

	// Figure out if we should be pulsing

	FragCount = (FragPRI != None) ? FragPRI.Score : 0.0;
	if ( FragCount > LastFragCount )
	{
		FragPulseTime = WorldInfo.TimeSeconds;
		LastFragCount = FragCount;
	}

	DrawGlowText(""$FragCount, POS.X + (87 * ResolutionScale), POS.Y + (-2 * ResolutionScale), 42 * ResolutionScale, FragPulseTime,true);
}

/*
*   Draws a nameplate behind text
*   @param Pos - top center of the nameplate
*   @param Wordwidth - width the name takes up (already accounts for resolution)
*   @param NameplateColor - linear color for the background texture
*   @param WordHeight - height of the nameplate (already accounts for resolution)
*/
function DrawNameplateBackground(vector2d Pos, float WordWidth, LinearColor NameplateColor, optional float WordHeight = 0.0)
{
	local float NameplateHeight, EndCapWidth;

	if (WordHeight > 0)
	{
		NameplateHeight = WordHeight;
	}
	else
	{
		NameplateHeight = NameplateCenter.VL * ResolutionScale;
	}
	
	EndCapWidth = NameplateWidth * ResolutionScale;

	//Start to the right half the length of the text
	Canvas.SetPos(Pos.X - (0.5 * WordWidth) - EndCapWidth, Pos.Y);
	Canvas.DrawColorizedTile(UT3GHudTexture, EndCapWidth, NameplateHeight, NameplateLeft.U, NameplateLeft.V, NameplateLeft.UL, NameplateLeft.VL, NameplateColor);
	Canvas.DrawColorizedTile(UT3GHudTexture, WordWidth, NameplateHeight, NameplateCenter.U, NameplateCenter.V, NameplateCenter.UL, NameplateCenter.VL, NameplateColor); 
	Canvas.DrawColorizedTile(UT3GHudTexture, EndCapWidth, NameplateHeight, NameplateRight.U, NameplateRight.V, NameplateRight.UL, NameplateRight.VL, NameplateColor);
}

function DisplayLeaderBoard(vector2d POS)
{
	local string Work,MySpreadStr;
	local int i, MySpread, MyPosition, LeaderboardCount;
	local float XL,YL;
	local vector2d BackgroundPos;
	local bool bTravelling;
	local UTPlayerReplicationInfo FragPRI;
	
	FragPRI = ((PawnOwner != None) && (PawnOwner.PlayerReplicationInfo != None)) ? UTPlayerReplicationInfo(PawnOwner.PlayerReplicationInfo) : UTOwnerPRI;  

	if ( (UTGRI == None) || (FragPRI == None) )
	{
		return;
	}

	POS.X = 0.99*Canvas.ClipX;
	POS.Y += 50 * ResolutionScale;

	// Figure out your Spread
	bTravelling = WorldInfo.IsInSeamlessTravel() || FragPRI.bFromPreviousLevel;
	for (i = 0; i < UTGRI.PRIArray.length; i++)
	{
		if (bTravelling || !UTGRI.PRIArray[i].bFromPreviousLevel)
		{
			break;
		}
	}
	if ( UTGRI.PRIArray[i] == FragPRI )
	{
		if ( UTGRI.PRIArray.Length > i + 1 )
		{
			MySpread = FragPRI.Score - UTGRI.PRIArray[i + 1].Score;
		}
		else
	{
		MySpread = 0;
		}
		MyPosition = 0;
	}
	else
	{
		MySpread = FragPRI.Score - UTGRI.PRIArray[i].Score;
		MyPosition = UTGRI.PRIArray.Find(FragPRI);
	}

	if (MySpread >0)
	{
		MySpreadStr = "+"$String(MySpread);
	}
	else
	{
		MySpreadStr = string(MySpread);
	}

	// Draw the Spread
	Work = string(MyPosition+1) $ PlaceMarks[min(MyPosition,3)] $ " / " $ MySpreadStr;

	Canvas.Font = GetFontSizeIndex(2);
	Canvas.SetDrawColor(255,255,255,255);

	Canvas.Strlen(Work,XL,YL);
	BackgroundPos.X = POS.X - (0.5 * XL);
	BackgroundPos.Y = POS.Y;
	DrawNameplateBackground(BackgroundPos, XL, BlackBackgroundColor, YL);
	Canvas.SetPos(POS.X - XL, POS.Y);
	Canvas.DrawTextClipped(Work);

	if ( bShowLeaderboard )
	{
		POS.Y += YL * 1.2;

		// Draw the leaderboard
		Canvas.Font = GetFontSizeIndex(1);
		Canvas.SetDrawColor(200,200,200,255);
		for (i = 0; i < UTGRI.PRIArray.Length && LeaderboardCount < 3; i++)
		{
			if ( UTGRI.PRIArray[i] != None && !UTGRI.PRIArray[i].bOnlySpectator &&
				(bTravelling || !UTGRI.PRIArray[i].bFromPreviousLevel) )
			{
				Work = string(i+1) $ PlaceMarks[i] $ ":" @ UTGRI.PRIArray[i].GetPlayerAlias();
				Canvas.StrLen(Work,XL,YL);
				BackgroundPos.X = POS.X - (0.5 * XL);
				BackgroundPos.Y = POS.Y;
				DrawNameplateBackground(BackgroundPos, XL, BlackBackgroundColor, (1.05 * YL));
				Canvas.SetPos(POS.X-XL,POS.Y+(2*ResolutionScale));
				Canvas.DrawTextClipped(Work);
				POS.Y += (1.05 * YL);

				LeaderboardCount++;
			}
		}
	}
}

/**
 * Toggle the Quick Pick Menu
 */
exec function ShowQuickPickMenu(bool bShow)
{
	if ( PlayerOwner != None && PlayerOwner.Pawn != None && bShow != bShowQuickPick &&
		(!bShow || UTPawn(PlayerOwner.Pawn) == None || !UTPawn(PlayerOwner.Pawn).bFeigningDeath) )
	{
		bShowQuickPick = bShow;
		if ( bShow )
		{
			QuickPickTarget = PlayerOwner.Pawn;
			QuickPickCurrentSelection = -1;
			bQuickPickMadeNewSelection = false;
		}
		else
		{
			if (QuickPickCurrentSelection != -1)
			{
				if (UTPawn(QuickPickTarget) != None)
				{
					UTPawn(QuickPickTarget).QuickPick(QuickPickCurrentSelection);
				}
				else if ( UTVehicleBase(QuickPickTarget) != None)
				{
					UTVehicleBase(QuickPickTarget).QuickPick(QuickPickCurrentSelection);
				}
			}
			QuickPickTarget = None;
		}
	}
}

simulated function DisplayQuickPickMenu()
{
	local int i, CurrentWeaponIndex;
	local float Angle,x,y;
	local array<QuickPickCell> Cells;
	local rotator r;
	local float AdjustedScale;

	if ( bIsSplitScreen )
	{
		AdjustedScale = 0.63 * ResolutionScale;
	}
	else
	{
		AdjustedScale = ResolutionScale;
	}

	if ( QuickPickTarget == PawnOwner )
	{
		CurrentWeaponIndex = -1;
		if ( UTPawn(QuickPickTarget) != none )
		{
			UTPawn(QuickPickTarget).GetQuickPickCells(Self, Cells, CurrentWeaponIndex);
		}
		else if ( UTVehicleBase(QuickPickTarget) != none )
		{
			UTVehicleBase(QuickPickTarget).GetQuickPickCells(Self, Cells, CurrentWeaponIndex);
		}
		if (QuickPickCurrentSelection == -1)
		{
			QuickPickCurrentSelection = CurrentWeaponIndex;
		}

		if ( Cells.Length > 0 )
		{
			QuickPickNumCells = Cells.Length;
			QuickPickDeltaAngle = 360.0 / float(QuickPickNumCells);
			Angle = 0.0;

			X = Canvas.ClipX * 0.5;
			Y = Canvas.ClipY * 0.5;

			//  The QuickMenu is offset differently depending if the top or bottom.
			if ( bIsSplitScreen )
			{
				if ( bIsFirstPlayer )
				{
					Y -= (1.0 - SafeRegionPct) * 0.5 * Canvas.ClipY;
				}
				else
				{
					Y += (1.0 - SafeRegionPct) * 0.5 * Canvas.ClipY;
				}
			}

			Canvas.SetPos(X - (164 * AdjustedScale * 0.5), Y - (264 * AdjustedScale) );
			R.Yaw = 0;

			// The base image is horz.  So adjust.
			for (i=0; i<8; i++)
			{
				if (Cells[i].Icon == None)
				{
					//Very transparent for non-existant weapons
					Canvas.SetDrawColor(128,128,128,128);
				}
				else
				{
		    //Weapon icon is present
					Canvas.SetDrawColor(255,255,255,255);
				}

				Canvas.DrawRotatedTile(IconHudTexture,R, 164 * AdjustedScale, 264 * AdjustedScale,289,315,164,264,0.5,1.0);
				r.Yaw += (QuickPickDeltaAngle * 182.04444);
			}

			Canvas.DrawColor = WHITECOLOR;
			for (i=0; i<Cells.Length; i++)
			{
				DisplayQuickPickCell(Cells[i], Angle, i == QuickPickCurrentSelection);
				Angle += QuickPickDeltaAngle;
			}
		}
		else
		{
			bShowQuickPick = false;
		}
	}
	else
	{
		bShowQuickPick = false;
	}
}

simulated function DisplayQuickPickCell(QuickPickCell Cell, float Angle, bool bSelected)
{
	local float X,Y, rX, rY,w,h;
	local float DrawScaler;
	local rotator r;
	local float AdjustedScale;
	local float SplitScreenOffsetY;

	if ( bIsSplitScreen )
	{
		AdjustedScale = 0.63 * ResolutionScale;
	}
	else
	{
		AdjustedScale = ResolutionScale;
	}

	if (Cell.bDrawCell)
	{
		SplitScreenOffsetY = 0.0;

		//  The QuickMenu is offset differently depending if the top or bottom.
		if ( bIsSplitScreen )
		{
			if ( bIsFirstPlayer )
			{
				SplitScreenOffsetY = -(1.0 - SafeRegionPct) * 0.5 * Canvas.ClipY;
			}
			else
			{
				SplitScreenOffsetY = (1.0 - SafeRegionPct) * 0.5 * Canvas.ClipY;
			}
		}

    	if ( bSelected )
    	{
			X = Canvas.ClipX * 0.5;
			Y = Canvas.ClipY * 0.5;

			Canvas.SetDrawColor(255,255,255,255);
			Canvas.SetPos( X - (164 * AdjustedScale * 0.5), Y - (264 * AdjustedScale) + SplitScreenOffsetY );
			R.Yaw = (Angle * 182.044444);
			Canvas.DrawRotatedTile(IconHudTexture,R, 164 * AdjustedScale, 264 * AdjustedScale,791,118,164,264,0.5,1.0);
		}

		DrawScaler = AdjustedScale * (bSelected ? 1.5 : 1.25);

		Angle *= (PI / 180);

		X = 0.0;
		Y = QuickPickRadius * AdjustedScale;

		// Tranform the location

		rX = (cos(Angle) * X) - (sin(Angle) * Y);
		rY = (sin(Angle) * X) - (cos(Angle) * Y);

		rX = (Canvas.ClipX * 0.5) + rX * -1;	// Flip the X
		rY = (Canvas.ClipY * 0.5) + rY;

		// Draw the Cell's Icon

		w = Cell.IconCoords.UL * DrawScaler;
		h = Cell.IconCoords.VL * DrawScaler;

		Canvas.SetPos( rX, rY + SplitScreenOffsetY);
		DrawTileCentered(IconHudTexture, (w + 4) * AdjustedScale * 0.75, (h + 4) * AdjustedScale * 0.75,Cell.IconCoords.U,Cell.IconCoords.V,Cell.IconCoords.UL,Cell.IconCoords.VL, MakeLinearColor(0,0,0,1));


		Canvas.SetPos( rX, rY + SplitScreenOffsetY);
		//Cell.Icon
		DrawTileCentered(IconHudTexture, Cell.IconCoords.UL * DrawScaler * AdjustedScale * 0.75, Cell.IconCoords.VL * DrawScaler * AdjustedScale * 0.75,
						Cell.IconCoords.U,Cell.IconCoords.V,Cell.IconCoords.UL,Cell.IconCoords.VL, WhiteLinearColor);


	}
}

/**
 * Change the selection in a given QuickPick group
 */
simulated function QuickPick(int Quad)
{
	if (QuickPickTarget != none && Quad >= 0 )
	{
		if ( QuickPickCurrentSelection != Quad )
		{
			PlayerOwner.ClientPlaySound(soundcue'A_interface.Menu.UT3MenuWeaponSelect01Cue');

			if( UTPlayerController(PlayerOwner) != None )
			{
				UTPlayerController(PlayerOwner).ClientPlayForceFeedbackWaveform(QuickPickWaveForm);
			}
		}
		QuickPickCurrentSelection = Quad;
		bQuickPickMadeNewSelection = true;
	}
	else
	{
		QuickPickCurrentSelection = -1;
		bQuickPickMadeNewSelection = false;
		PlayerOwner.ClientPlaySound(soundcue'A_interface.Menu.UT3MenuNavigateDownCue');
	}
}

/** Convert a string with potential escape sequenced data in it to a font and the string that should be displayed */
native static function TranslateBindToFont(string InBindStr, out Font DrawFont, out string OutBindStr);

//Given a input command of the form GBA_ and its mapping store that in a lookup for future use
function DrawToolTip(Canvas Cvs, PlayerController PC, string Command, float X, float Y, float U, float V, float UL, float VL, float ResScale, optional Texture2D IconTexture = default.IconHudTexture, optional float Alpha=1.0)
{
	local float Left,xl,yl;
	local float ScaleX, ScaleY;
	local float WholeWidth;
	local string MappingStr; //String of key mapping
	local font OrgFont, BindFont;
	local string Key;

	//Catchall for spectators who don't need tooltips
    if (PC.PlayerReplicationInfo.bOnlySpectator || LastTimeTooltipDrawn == WorldInfo.TimeSeconds)
    {
    	return;
    }

	//Only draw one tooltip per frame
	LastTimeTooltipDrawn = WorldInfo.TimeSeconds;

	OrgFont = Cvs.Font;

	//Get the fully localized version of the key binding
	UTPlayerController(PC).BoundEventsStringDataStore.GetStringWithFieldName(Command, MappingStr);
	if (MappingStr == "")
	{
			WarnInternal("No mapping for command"@Command);
			return;
		}

	TranslateBindToFont(MappingStr, BindFont, Key);

	if ( BindFont != none )
	{
		//These values might be negative (for flipping textures)
		ScaleX = abs(UL);
		ScaleY = abs(VL);
		Cvs.DrawColor = default.WhiteColor;
		Cvs.DrawColor.A = Alpha * 255;

		//Find the size of the string to be draw
		Cvs.Font = BindFont;
		Cvs.StrLen(Key, XL,YL);

		//Figure the offset from center for the left side
		WholeWidth = XL + (ScaleX * ResScale) + (default.ToolTipSepCoords.UL * ResScale);
		Left = X - (WholeWidth * 0.5);

		//Center and draw the key binding string
		Cvs.SetPos(Left, Y - (YL * 0.5));
		Cvs.DrawTextClipped(Key, true);

		//Position to the end of the keybinding string
		Left += XL;
		Cvs.SetPos(Left, Y - (default.ToolTipSepCoords.VL * ResScale * 0.5));
		//Draw the separation icon (arrow)
		Cvs.DrawTile(default.IconHudTexture,default.ToolTipSepCoords.UL * ResScale, default.ToolTipSepCoords.VL * ResScale,
					 default.ToolTipSepCoords.U,default.ToolTipSepCoords.V,default.ToolTipSepCoords.UL,default.ToolTipSepCoords.VL);

		//Position to the end of the separation icon
		Left += (default.ToolTipSepCoords.UL * ResScale);
		Cvs.SetPos(Left, Y - (ScaleY * ResScale * 0.5) );
		//Draw the tooltip icon
		Cvs.DrawTile(IconTexture, ScaleX * ResScale, ScaleY * ResScale, U, V, UL, VL);
	}

	Cvs.Font = OrgFont;
}

/**
 * Display current messages
 */
function DisplayConsoleMessages()
{
	local int Idx, XPos, YPos;
	local float XL, YL;

	if (ConsoleMessages.Length == 0 || PlayerOwner.bCinematicMode)
	{
		return;
	}

	for (Idx = 0; Idx < ConsoleMessages.Length; Idx++)
	{
		if ( ConsoleMessages[Idx].Text == "" || ConsoleMessages[Idx].MessageLife < WorldInfo.TimeSeconds )
		{
			ConsoleMessages.Remove(Idx--,1);
		}
	}
	ConsoleMessagePosX = bDisplayingPowerups ? 0.1 : 0.0;
	XPos = (ConsoleMessagePosX * HudCanvasScale * Canvas.SizeX) + (((1.0 - HudCanvasScale) / 2.0) * Canvas.SizeX);
	YPos = (ConsoleMessagePosY * HudCanvasScale * Canvas.SizeY) + (((1.0 - HudCanvasScale) / 2.0) * Canvas.SizeY);

	Canvas.Font = GetFontSizeIndex(0);

	Canvas.TextSize ("A", XL, YL);

	YPos -= YL * ConsoleMessages.Length; // DP_LowerLeft
	YPos -= YL; // Room for typing prompt

	for (Idx = 0; Idx < ConsoleMessages.Length; Idx++)
	{
		if (ConsoleMessages[Idx].Text == "")
		{
			continue;
		}
		Canvas.StrLen( ConsoleMessages[Idx].Text, XL, YL );
		Canvas.SetPos( XPos, YPos );
		Canvas.DrawColor = ConsoleMessages[Idx].TextColor;
		Canvas.DrawText( ConsoleMessages[Idx].Text, false );
		YPos += YL;
	}
}

simulated function DrawShadowedTile(texture2D Tex, float X, float Y, float XL, float YL, float U, float V, float UL, float VL, Color TileColor, Optional bool bScaleToRes)
{
	local Color B;

	B = BlackColor;
	B.A = TileColor.A;

	XL *= (bScaleToRes) ? ResolutionScale : 1.0;
	YL *= (bScaleToRes) ? ResolutionScale : 1.0;

	Canvas.SetPos(X+1,Y+1);
	Canvas.DrawColor = B;
	Canvas.DrawTile(Tex,XL,YL,U,V,UL,VL);
	Canvas.SetPos(X,Y);
	Canvas.DrawColor = TileColor;
	Canvas.DrawTile(Tex,XL,YL,U,V,UL,VL);
}

simulated function DrawShadowedStretchedTile(texture2D Tex, float X, float Y, float XL, float YL, float U, float V, float UL, float VL, Color TileColor, Optional bool bScaleToRes)
{
	local LinearColor C,B;

	C = ColorToLinearColor(TileColor);
	B = ColorToLinearColor(BlackColor);
	B.A = C.A;

	XL *= (bScaleToRes) ? ResolutionScale : 1.0;
	YL *= (bScaleToRes) ? ResolutionScale : 1.0;

	Canvas.SetPos(X+1,Y+1);
	Canvas.DrawTileStretched(Tex,XL,YL,U,V,UL,VL,B);
	Canvas.SetPos(X,Y);
	Canvas.DrawColor = TileColor;
	Canvas.DrawTileStretched(Tex,XL,YL,U,V,UL,VL,C);
}

simulated function DrawShadowedRotatedTile(texture2D Tex, Rotator Rot, float X, float Y, float XL, float YL, float U, float V, float UL, float VL, Color TileColor, Optional bool bScaleToRes)
{
	local Color B;

	B = BlackColor;
	B.A = TileColor.A;

	XL *= (bScaleToRes) ? ResolutionScale : 1.0;
	YL *= (bScaleToRes) ? ResolutionScale : 1.0;

	Canvas.SetPos(X+1,Y+1);
	Canvas.DrawColor = B;
	Canvas.DrawRotatedTile(Tex,Rot,XL,YL,U,V,UL,VL);
	Canvas.SetPos(X,Y);
	Canvas.DrawColor = TileColor;
	Canvas.DrawRotatedTile(Tex,Rot,XL,YL,U,V,UL,VL);
}

/** Draw postrenderfor team beacon for an on-foot player
  */
function DrawPlayerBeacon(UTPawn P, Canvas BeaconCanvas, Vector CameraPosition, Vector ScreenLoc)
{
	local float TextXL, XL, YL, Dist, AudioWidth, AudioHeight, PulseAudioWidth;
	local LinearColor BeaconTeamColor;
	local Color	TextColor;
	local string ScreenName;

	Canvas = BeaconCanvas;
	GetTeamColor( P.GetTeamNum(), BeaconTeamColor, TextColor);
	ScreenName = P.PlayerReplicationInfo.GetPlayerAlias();
	Canvas.StrLen(ScreenName, TextXL, YL);

	// now we always just use the text width, solves a lot of problems
	if (true)//!WorldInfo.GRI.GameClass.Default.bTeamGame )
	{
		XL = TextXL;
	}
	else
	{
		Dist = VSize(CameraPosition - P.Location);
		XL = Max( TextXL, 24 * Canvas.ClipX/1024 * (1 + 2*Square((P.TeamBeaconPlayerInfoMaxDist-Dist)/P.TeamBeaconPlayerInfoMaxDist)));
	}
	if ( CharPRI == P.PlayerReplicationInfo )
	{
		AudioHeight = 34 * Canvas.ClipX/1280;
		YL += AudioHeight;
	}

	DrawBeaconBackground(ScreenLoc.X-0.7*XL,ScreenLoc.Y-1.8*YL,1.4*XL,1.9*YL, BeaconTeamColor, Canvas);

	if ( CharPRI == P.PlayerReplicationInfo )
	{
		AudioWidth = 57*Canvas.ClipX/1280;
		PulseAudioWidth = AudioWidth * (0.75 + 0.25*sin(6.0*WorldInfo.TimeSeconds));
		Canvas.DrawColor = TextColor;
		Canvas.SetPos(ScreenLoc.X-0.5*PulseAudioWidth,ScreenLoc.Y-1.5*AudioHeight);
		Canvas.DrawTile(UT3GHudTexture, PulseAudioWidth, AudioHeight, 173, 132, 57, 34);
	}

	Canvas.DrawColor = TextColor;
	Canvas.SetPos(ScreenLoc.X-0.5*TextXL,ScreenLoc.Y-1.2*YL);
	Canvas.DrawTextClipped(ScreenName, true);
}

/** 
 * Draw postrenderfor team beacon for a vehicle
  */
function DrawVehicleBeacon( UTVehicle V, Canvas BeaconCanvas, Vector ScreenLoc, float XL, float YL, float HealthY, float TextXL, float Dist, linearcolor VTeamColor, string ScreenName, color TextColor )
{
	local float HealthX, NumXl, NumYL, FontScale, AudioWidth, AudioHeight, PulseAudioWidth;
	local int NumCoins;
	local string NumString;
	local UTPlayerReplicationInfo PRI;

	if ( !V.bDisplayHealthBar )
	{
		HealthY = 0;
	}
	PRI = UTPlayerReplicationInfo(V.PlayerReplicationInfo);

	if ( PRI != None )
	{
		// any greed coins?
		NumCoins = PRI.GetNumCoins();

		if ( NumCoins > 0 )
		{
			BeaconCanvas.Font = GetFontSizeIndex(2);
			NumString = string(NumCoins);
			BeaconCanvas.StrLen(NumString, NumXL, NumYL);
			FontScale = FClamp(800.0/(Dist+1.0), 0.75, 1.0);
			BeaconCanvas.Font = GetFontSizeIndex(0);
			NumYL *= FontScale;
		}

		if ( CharPRI == PRI )
	{
		AudioHeight = 34 * BeaconCanvas.ClipX/1280;
		AudioWidth = 57*BeaconCanvas.ClipX/1280;
		XL = FMax(XL, AudioWidth);
		YL += AudioHeight;
	}
	}

	DrawBeaconBackground(
		ScreenLoc.X-0.7*XL,
		ScreenLoc.Y-(YL + HealthY + NumYL) * 1.7,
		1.4*XL,
		(YL + HealthY + NumYL) * 2.4,
		VTeamColor, 
		BeaconCanvas);

	if ( (PRI != None) && (CharPRI == PRI) )
	{
		PulseAudioWidth = AudioWidth * (0.75 + 0.25*sin(6.0*WorldInfo.TimeSeconds));
		BeaconCanvas.DrawColor = TextColor;
		BeaconCanvas.SetPos(ScreenLoc.X-0.5*PulseAudioWidth, ScreenLoc.Y - AudioHeight - HealthY - NumYL);
		BeaconCanvas.DrawTile(UT3GHudTexture, PulseAudioWidth, AudioHeight, 173, 132, 57, 34);
	}

	BeaconCanvas.DrawColor = TextColor;

	if ( PRI != None && NumCoins > 0 )
	{
		BeaconCanvas.Font = GetFontSizeIndex(2);
		BeaconCanvas.SetPos(ScreenLoc.X - 0.5*FontScale*NumXL,ScreenLoc.Y- NumYL - HealthY);
		BeaconCanvas.DrawTextClipped(NumString, true, FontScale, FontScale);
		BeaconCanvas.Font = GetFontSizeIndex(0);
	}

	if ( ScreenName != "" )
	{
		BeaconCanvas.SetPos(ScreenLoc.X-0.5*TextXL,ScreenLoc.Y- YL - HealthY - NumYL);
		BeaconCanvas.DrawTextClipped(ScreenName, true);
	}

	if ( V.bDisplayHealthBar )
	{
		HealthX = XL * FMin(1.0, V.GetDisplayedHealth()/float(V.HealthMax));

		DrawHealth(ScreenLoc.X-0.5*XL,ScreenLoc.Y - HealthY, HealthX, XL, HealthY, BeaconCanvas);
	}
}

defaultproperties
{
   WeaponSwitchMessage=Class'UTGame.UTWeaponSwitchMessage'
   AltHudTexture=Texture2D'UI_HUD.HUD.UI_HUD_BaseA'
   IconHudTexture=Texture2D'UI_HUD.HUD.UI_HUD_BaseB'
   TalkingTexture=Texture2D'PS3Patch.Talking'
   UT3GHudTexture=Texture2D'UI_GoldHud.HUDIcons'
   ConsoleIconFontClassName="UI_Fonts.Fonts.UI_Fonts_Xbox18"
   ToolTipSepCoords=(U=260.000000,V=379.000000,UL=29.000000,VL=27.000000)
   LC_White=(R=1.000000,G=1.000000,B=1.000000,A=1.000000)
   LightGoldColor=(B=128,G=255,R=255,A=255)
   LightGreenColor=(B=128,G=255,R=128,A=255)
   GrayColor=(B=160,G=160,R=160,A=192)
   bShowDoll=True
   bShowAmmo=True
   bShowMap=True
   bShowPowerups=True
   bShowScoring=True
   bShowFragCount=True
   bHasLeaderboard=True
   bShowVehicle=True
   ScoreboardSceneTemplate=Scoreboard_DM'UI_Scenes_Scoreboards.sbDM'
   MusicManagerClass=Class'UTGame.UTMusicManager'
   HudFonts(0)=MultiFont'UI_Fonts_Final.HUD.MF_Small'
   HudFonts(1)=MultiFont'UI_Fonts_Final.HUD.MF_Medium'
   HudFonts(2)=MultiFont'UI_Fonts_Final.HUD.MF_Large'
   HudFonts(3)=MultiFont'UI_Fonts_Final.HUD.MF_Huge'
   CharPortraitMaterial=Material'UI_HUD.Materials.CharPortrait'
   CharPortraitYPerc=0.150000
   CharPortraitXPerc=0.010000
   CharPortraitSlideTime=2.000000
   CharPortraitSlideTransitionTime=0.175000
   CharPortraitSize=(X=96.000000,Y=120.000000)
   WeaponBarScale=0.750000
   WeaponBoxWidth=100.000000
   WeaponBoxHeight=64.000000
   TeamHUDColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)
   WeaponBarY=16.000000
   CurrentWeaponScale(0)=1.000000
   CurrentWeaponScale(1)=1.000000
   CurrentWeaponScale(2)=1.000000
   CurrentWeaponScale(3)=1.000000
   CurrentWeaponScale(4)=1.000000
   CurrentWeaponScale(5)=1.000000
   CurrentWeaponScale(6)=1.000000
   CurrentWeaponScale(7)=1.000000
   CurrentWeaponScale(8)=1.000000
   CurrentWeaponScale(9)=1.000000
   SelectedWeaponScale=1.500000
   BounceWeaponScale=2.250000
   SelectedWeaponAlpha=1.000000
   OffWeaponAlpha=0.500000
   EmptyWeaponAlpha=0.400000
   WeaponScaleSpeed=10.000000
   WeaponBarXOffset=70.000000
   WeaponXOffset=60.000000
   SelectedBoxScale=1.000000
   WeaponYScale=64.000000
   WeaponYOffset=8.000000
   WeaponAmmoLength=48.000000
   WeaponAmmoThickness=16.000000
   WeaponAmmoOffsetX=100.000000
   WeaponAmmoOffsetY=16.000000
   SelectedWeaponAmmoOffsetX=110.000000
   MessageOffset(0)=0.150000
   MessageOffset(1)=0.242000
   MessageOffset(2)=0.360000
   MessageOffset(3)=0.580000
   MessageOffset(4)=0.780000
   MessageOffset(5)=0.830000
   MessageOffset(6)=2.000000
   BlackColor=(B=0,G=0,R=0,A=255)
   GoldColor=(B=11,G=183,R=255,A=255)
   MapDefaultSize=255.000000
   GlowFonts(0)=Font'UI_Fonts_Final.HUD.F_GlowPrimary'
   GlowFonts(1)=Font'UI_Fonts_Final.HUD.F_GlowSecondary'
   SafeRegionPct=1.000000
   MaxNoOfIndicators=3
   BaseMaterial=Material'UI_HUD.HUD.M_UI_HUD_DamageDir'
   FadeTime=0.500000
   PositionalParamName="DamageDirectionRotation"
   FadeParamName="DamageDirectionAlpha"
   HitEffectIntensity=0.250000
   MaxHitEffectColor=(R=2.000000,G=-1.000000,B=-1.000000,A=1.000000)
   HitEffectFadeTime=0.500000
   QuickPickRadius=160.000000
   QuickPickBkgImage=Texture2D'UI_HUD.HUD.UI_HUD_BaseA'
   QuickPickBkgCoords=(U=459.000000,V=148.000000,UL=69.000000,VL=49.000000)
   QuickPickSelImage=Texture2D'UI_HUD.HUD.UI_HUD_BaseA'
   QuickPickSelCoords=(U=459.000000,V=248.000000,UL=69.000000,VL=49.000000)
   QuickPickCircleImage=Texture2D'UI_HUD.HUD.UI_HUD_BaseB'
   QuickPickCircleCoords=(U=18.000000,V=367.000000,UL=128.000000,VL=128.000000)
   QuickPickWaveForm=ForceFeedbackWaveform'UTGame.Default__UTHUD:ForceFeedbackWaveformQuickPick'
   DollPosition=(X=0.000000,Y=-1.000000)
   HealthBGCoords=(U=73.000000,V=111.000000,UL=143.000000,VL=57.000000)
   HealthOffsetX=65.000000
   HealthBGOffsetX=65.000000
   HealthBGOffsetY=59.000000
   HealthIconX=80.000000
   HealthIconY=88.000000
   HealthTextX=185.000000
   HealthTextY=55.000000
   ArmorBGCoords=(U=74.000000,V=69.000000,UL=117.000000,VL=42.000000)
   ArmorBGOffsetX=65.000000
   ArmorBGOffsetY=18.000000
   ArmorIconX=80.000000
   ArmorIconY=42.000000
   ArmorTextX=160.000000
   ArmorTextY=17.000000
   AmmoPosition=(X=-1.000000,Y=-1.000000)
   AmmoBarOffsetY=2.000000
   AmmoBGCoords=(U=1.000000,V=368.000000,UL=162.000000,VL=53.000000)
   AmmoTextOffsetX=125.000000
   AmmoTextOffsetY=3.000000
   MapPosition=(X=0.990000,Y=0.050000)
   PowerupYPos=0.750000
   ScoringPosition=(X=-1.000000,Y=0.000000)
   VehiclePosition=(X=-1.000000,Y=-1.000000)
   DamageIndicatorSize=384.000000
   NameplateWidth=8.000000
   NameplateBubbleWidth=15.000000
   NameplateLeft=(U=224.000000,V=11.000000,UL=14.000000,VL=35.000000)
   NameplateCenter=(U=238.000000,V=11.000000,UL=5.000000,VL=35.000000)
   NameplateBubble=(U=243.000000,V=11.000000,UL=26.000000,VL=35.000000)
   NameplateRight=(U=275.000000,V=11.000000,UL=14.000000,VL=35.000000)
   BlackBackgroundColor=(R=0.700000,G=0.700000,B=0.700000,A=0.700000)
   PulseDuration=0.330000
   PulseSplit=0.250000
   PulseMultiplier=0.500000
   WarmupString="Warmup Round"
   WaitingForMatch="Waiting for the Match to Begin..."
   PressFireToBegin="Press [FIRE] to Begin..."
   SpectatorMessage="Spectator"
   DeadMessage="You have Died!"
   FireToRespawnMessage="Press [FIRE] to respawn"
   YouHaveWon="YOU HAVE WON THE MATCH!"
   YouHaveLost="YOU HAVE LOST THE MATCH!"
   PlaceMarks(0)="st"
   PlaceMarks(1)="nd"
   PlaceMarks(2)="rd"
   PlaceMarks(3)="th"
   PawnDollBGCoords=(U=9.000000,V=52.000000,UL=65.000000,VL=116.000000)
   DollOffsetX=35.000000
   DollOffsetY=58.000000
   DollWidth=56.000000
   DollHeight=109.000000
   VestX=36.000000
   VestY=31.000000
   VestWidth=46.000000
   VestHeight=28.000000
   ThighX=36.000000
   ThighY=72.000000
   ThighWidth=42.000000
   ThighHeight=28.000000
   HelmetX=36.000000
   HelmetY=13.000000
   HelmetWidth=22.000000
   HelmetHeight=25.000000
   BootX=37.000000
   BootY=100.000000
   BootWidth=54.000000
   BootHeight=26.000000
   AmmoBarColor=(R=7.000000,G=7.000000,B=7.000000,A=1.000000)
   RedLinearColor=(R=3.000000,G=0.000000,B=0.050000,A=0.800000)
   BlueLinearColor=(R=0.500000,G=0.800000,B=10.000000,A=0.800000)
   DMLinearColor=(R=1.000000,G=1.000000,B=1.000000,A=0.500000)
   WhiteLinearColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000)
   GoldLinearColor=(R=1.000000,G=1.000000,B=0.000000,A=1.000000)
   SilverLinearColor=(R=0.750000,G=0.750000,B=0.750000,A=1.000000)
   HeroPointOffX=20.000000
   HeroPointOffY=8.000000
   HeroMeterOffsetX=1.000000
   HeroMeterOffsetY=52.000000
   HeroMeterVehicleOffsetX=93.000000
   HeroMeterVehicleOffsetY=53.000000
   HeroMeterWidth=95.000000
   HeroMeterHeight=65.000000
   HeroMeterTexCoords=(U=6.000000,V=8.000000,UL=95.000000,VL=65.000000)
   HeroMeterOverlayTexCoords=(U=6.000000,V=74.000000,UL=95.000000,VL=65.000000)
   HeroToolTipIconCoords=(U=136.000000,V=11.000000,UL=81.000000,VL=74.000000)
   MaxHUDAreaMessageCount=2
   Name="Default__UTHUD"
   ObjectArchetype=GameHUD'GameFramework.Default__GameHUD'
}

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