Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
// ============================================================================ // JBInterfaceHud // Copyright 2002 by Mychaeel <mychaeel@planetjailbreak.com> // $Id: JBInterfaceHud.uc,v 1.84 2012-10-28 16:21:07 wormbo Exp $ // // Heads-up display for Jailbreak, showing team states and switch locations. // ============================================================================ class JBInterfaceHud extends HudCTeamDeathMatch notplaceable; // ============================================================================ // Imports // ============================================================================ #exec texture import file=Textures\SpriteWidgetHud.dds mips=on alpha=on lodset=LODSET_Interface #exec texture import file=Textures\ArenaBeacon.dds mips=on alpha=on lodset=LODSET_Interface uclampmode=clamp vclampmode=clamp #exec texture import file=Textures\ArenaPendingBeacon.dds mips=on alpha=on lodset=LODSET_Interface uclampmode=clamp vclampmode=clamp // ============================================================================ // Localization // ============================================================================ var localized string TextPlayerKilled; // player was killed var localized string TextPlayerExecuted; // player was executed var localized string TextMenuEntryTactics; // tactics entry in order menu var localized string TextMenuTitleTactics; // title for tactics submenu var localized string TextOrderName[6]; // selections in tactics submenu var localized string TextTactics[5]; // tactics names for widget var localized string TextArenaNotifier; // arena notifier slider // ============================================================================ // Variables // ============================================================================ var bool bWidescreen; // display widescreen bars var private float RatioWidescreen; // widescreen scroll-in progress var private float RatioBlackout; // blackout fade-out progress var private array<Actor> ListActorOverlay; // list of registered overlays var private transient JBTagClient TagClientOwner; // client bridge head var private transient JBTagPlayer TagPlayerOwner; // player state for owner var private bool bHasGameEnded; // previously detected game end var private bool bIsLastMan; // previously detected last man var private bool bShowLocation; // Show player's current location var private float TimeUpdateLocationChat; // last chat area movement var private float TimeUpdateCompass; // last compass rendering var private float TimeUpdateDisposition; // last disposition rendering var private float TimeUpdateArenaNotifier; // last arena notifier rendering var private float TimeUpdateTactics; // last tactics rendering var private float TimeUpdateWidescreen; // last widescreen bar rendering var private float TimeUpdateBlackout; // last blackout rendering var private float TimeUpdateLastMan; // last time last man was shown var bool bChatMovedToTop; // external override to move chat var vector LocationChatScoreboard; // location of chat on scoreboard var private float AlphaLocationChat; // relative chat area position var private byte SpeechMenuState; // current speech menu state var private bool bSpeechMenuVisible; // speech menu displayed var private bool bSpeechMenuVisibleTactics; // tactics submenu displayed var private Actor ViewTargetPrev; // previous view target var vector LocationCompass; // location of center of compass var vector SizeCompass; // size of compass ring var private float AlphaCompass; // transparency of compass dots var private Pawn PawnOwnerCompass; // previous compass owner var private JBDispositionTeam DispositionTeamRed; // red team disposition var private JBDispositionTeam DispositionTeamBlue; // blue team disposition var string FontTactics; // name of font for tactics text var vector LocationTextTactics; // location of tactics text var vector SizeIconTactics; // size of tactics icons var vector SizeTextTactics; // relative size of tactics text var Color ColorTactics[5]; // colors for the tactics blob var private float TacticsInterpolated; // currently displayed tactics var private Font FontObjectTactics; // dynamically loaded font object var string FontArenaNotifier; // name of font for notifier var vector LocationTextArenaNotifier; // location of notifier text var vector SizeTextArenaNotifier; // relative size of notifier text var Color ColorTextArenaNotifier; // color of arena notifier text var private float AlphaArenaNotifier; // transparency of arena notifier var private Font FontObjectArenaNotifier; // dynamically loaded font object var SpriteWidget SpriteWidgetCompass[2]; // compass rings and jail circles var SpriteWidget SpriteWidgetCompassDot; // compass dot showing releases var SpriteWidget SpriteWidgetHandcuffs[2]; // handcuff icons in circles var SpriteWidget SpriteWidgetArenaNotifier; // arena notifier slider var Color JammedLockCompassColor; // Color to show for jammed locks var SpriteWidget SpriteWidgetTacticsCircle; // tactics circle var SpriteWidget SpriteWidgetTacticsBlob; // colored and pulsing blob var SpriteWidget SpriteWidgetTacticsBack; // tactics background var SpriteWidget SpriteWidgetTacticsIcon[5]; // tactics icons var SpriteWidget SpriteWidgetTacticsAuto; // auto tactics display var Texture TextureArenaBeacon; // texture of arena player beacon var Material MaterialArenaPendingBeacon;// texture of arena pending beacon var Texture TextureArenaNoAttack; // texture for "don't attack" indicator var bool bTimerModified; // set to false when resetted var bool bModifiedTimerAnnouncer; // announcer based on modded timer var int OldTimerSeconds; // announcer shouldn't play twice var float LastTimerModTime; // for animation purposes var float TimerIconTexScale; // original tex scale of the icon var int TimerCountdown; // custom countdown in seconds var TexOscillator TexOscTimerHighlight; // highlights the timer var SpriteWidget SpriteWidgetTimerHighlight; // highlights the timer var int TimerPreFlashTime; // seconds to flash timer before.. var int TimerPostFlashTime; // ..and after hitting zero var int TimerResetTime; // how long to wait before reset // ============================================================================ // RegisterOverlay // // Registers an actor whose RenderOverlays event will be called once per // frame. If the actor is already registered, moves it to the end of the list. // ============================================================================ simulated function RegisterOverlay(Actor ActorOverlay) { UnregisterOverlay(ActorOverlay); if (ActorOverlay != None) ListActorOverlay[ListActorOverlay.Length] = ActorOverlay; } // ============================================================================ // UnregisterOverlay // // Unregisters a previously registered overlay actor. // ============================================================================ simulated function UnregisterOverlay(Actor ActorOverlay) { local int iActorOverlay; for (iActorOverlay = ListActorOverlay.Length - 1; iActorOverlay >= 0; iActorOverlay--) if (ListActorOverlay[iActorOverlay] == None || ListActorOverlay[iActorOverlay] == ActorOverlay) ListActorOverlay.Remove(iActorOverlay, 1); } // ============================================================================ // UpdatePrecacheMaterials // // Adds the sprite widget material to the global list of precached materials. // ============================================================================ simulated function UpdatePrecacheMaterials() { Level.AddPrecacheMaterial(Material'SpriteWidgetHud'); Super.UpdatePrecacheMaterials(); } // ============================================================================ // TeamScoreOffset // // Calculates and adjusts the draw offset of the team scores. // ============================================================================ simulated function TeamScoreOffset() { ScoreTeam[1].OffsetX = 180; if (ScoreTeam[1].Value < 0) ScoreTeam[1].OffsetX += 90; if (Abs(ScoreTeam[1].Value) > 9) ScoreTeam[1].OffsetX += 90; } // ============================================================================ // SetRelativePos // // Sets the pen position of the given Canvas to the specified relative // position depending on the current scaling factors. // ============================================================================ simulated function SetRelativePos(Canvas Canvas, float X, float Y, EDrawPivot Pivot) { local float OffsetPixelX; local float OffsetPixelY; switch (Pivot) { case DP_UpperLeft: case DP_UpperMiddle: case DP_UpperRight: OffsetPixelY = 0; break; case DP_MiddleLeft: case DP_MiddleMiddle: case DP_MiddleRight: OffsetPixelY = Canvas.ClipY / 2.0; break; case DP_LowerLeft: case DP_LowerMiddle: case DP_LowerRight: OffsetPixelY = Canvas.ClipY; break; } switch (Pivot) { case DP_UpperLeft: case DP_MiddleLeft: case DP_LowerLeft: OffsetPixelX = 0; break; case DP_UpperMiddle: case DP_MiddleMiddle: case DP_LowerMiddle: OffsetPixelX = Canvas.ClipX / 2.0; break; case DP_UpperRight: case DP_MiddleRight: case DP_LowerRight: OffsetPixelX = Canvas.ClipX; break; } OffsetPixelX += Canvas.ClipX * X * HudScale; OffsetPixelY += Canvas.ClipY * Y * HudScale; Canvas.SetPos(OffsetPixelX, OffsetPixelY); } // ============================================================================ // PostRender // // Displays the scoreboard when the game has ended. Renders overlays for the // JBCamera actor the player is viewing from, if applicable; otherwise renders // the normal display. Synchronizes client time with the server. Moves chat // area to accommodate the visibility state of the scoreboard. // ============================================================================ simulated event PostRender(Canvas Canvas) { if (UnrealPlayer(Owner).bDisplayWinner || UnrealPlayer(Owner).bDisplayLoser) { if (!bHasGameEnded) bShowScoreBoard = True; bHasGameEnded = True; } if (ViewTargetPrev != PlayerOwner.ViewTarget) { if (ViewTargetPrev != None) Blackout(); ViewTargetPrev = PlayerOwner.ViewTarget; } if (!JBGameReplicationInfo(PlayerOwner.GameReplicationInfo).bIsExecuting && !bHasGameEnded) CheckLastMan(); ShowWidescreen(Canvas); ShowBlackout (Canvas); MoveChat(bShowScoreBoard && !bShowLocalStats || bChatMovedToTop); if (JBCamera(PlayerOwner.ViewTarget) != None) { LinkActors(); PlayerOwner.ViewTarget.RenderOverlays(Canvas); // In case the timer is modified and needs announcement, then disable this, // so the announcements don't interfere. if (!bModifiedTimerAnnouncer) CheckCountDown(PlayerOwner.GameReplicationInfo); if (bShowScoreBoard) ScoreBoard.DrawScoreboard(Canvas); if (bShowBadConnectionAlert) DisplayBadConnectionAlert(Canvas); DisplayMessages(Canvas); DisplayLocalMessages(Canvas); PlayerOwner.RenderOverlays(Canvas); if (PlayerConsole != None && PlayerConsole.bTyping) DrawTypingPrompt(Canvas, PlayerConsole.TypedStr); } else { Super.PostRender(Canvas); if (!bHideHUD) { if (bShowScoreBoard || bShowLocalStats) DisplayMessages(Canvas); else DrawOverlays(Canvas); } } if (Level.LevelAction == LEVACT_None) // skip precaching SynchronizeTime(); } // ============================================================================ // LinkActors // // Initializes the TagPlayerOwner and TagClientOwner references. // ============================================================================ simulated function LinkActors() { Super.LinkActors(); if (PawnOwner != None) TagPlayerOwner = Class'JBTagPlayer'.Static.FindFor(PawnOwner.PlayerReplicationInfo); if (TagClientOwner == None && PlayerOwner != None) TagClientOwner = Class'JBTagClient'.Static.FindFor(PlayerOwner); } // ============================================================================ // CheckLastMan // // Checks whether the local player is the last man standing and triggers the // appropriate messages if so. // ============================================================================ simulated function CheckLastMan() { local int nPlayersFree; local int nPlayersJailed; local int nPlayersJailedJailIsJammed; local JBTagPlayer firstTagPlayer; local JBTagPlayer thisTagPlayer; local JBTagPlayer TagPlayerOwner; if (PlayerOwner == None || PlayerOwner.PlayerReplicationInfo == None) return; TagPlayerOwner = Class'JBTagPlayer'.Static.FindFor(PlayerOwner.PlayerReplicationInfo); if (TagPlayerOwner == None) return; if (!TagPlayerOwner.IsFree()) { bIsLastMan = False; } else { if (Level.TimeSeconds - TimeUpdateLastMan < 1.0) return; firstTagPlayer = JBGameReplicationInfo(PlayerOwner.GameReplicationInfo).firstTagPlayer; for (thisTagPlayer = firstTagPlayer; thisTagPlayer != None; thisTagPlayer = thisTagPlayer.nextTag) if (thisTagPlayer.GetTeam() == PlayerOwner.PlayerReplicationInfo.Team) { if (thisTagPlayer.IsFree()) nPlayersFree += 1; else if (thisTagPlayer.IsInJail()) { if (thisTagPlayer.GetJail().IsReleaseActive(thisTagPlayer.GetTeam())) nPlayersFree += 1; else { nPlayersJailed += 1; if (thisTagPlayer.GetJail().IsJammed(thisTagPlayer.GetTeam().TeamIndex)) nPlayersJailedJailIsJammed += 1; } } } if (nPlayersFree == 1 && nPlayersJailed > 0) { if (!bIsLastMan) PlayerOwner.ReceiveLocalizedMessage(Class'JBLocalMessage', 600 + Min(1, nPlayersJailedJailIsJammed)); else PlayerOwner.ReceiveLocalizedMessage(Class'JBLocalMessage', 610 + Min(1, nPlayersJailedJailIsJammed)); bIsLastMan = True; TimeUpdateLastMan = Level.TimeSeconds; } else { bIsLastMan = False; } } } // ============================================================================ // MoveChat // // Moves the chat area in a slight arc from its normal position to its // position on the scoreboard or back. // ============================================================================ simulated function MoveChat(bool bIsScoreboardDisplayed) { local float TimeDelta; local vector LocationChatDelta; local vector LocationChatNormal; local vector LocationChatInterpolated; TimeDelta = Level.TimeSeconds - TimeUpdateLocationChat; TimeUpdateLocationChat = Level.TimeSeconds; if (bIsScoreboardDisplayed) { if (AlphaLocationChat == 1.0) return; AlphaLocationChat = FMin(1.0, AlphaLocationChat + 3.0 * TimeDelta); } else { if (AlphaLocationChat == 0.0) return; AlphaLocationChat = FMax(0.0, AlphaLocationChat - 3.0 * TimeDelta); } LocationChatNormal.X = Default.ConsoleMessagePosX; LocationChatNormal.Y = Default.ConsoleMessagePosY; LocationChatDelta = LocationChatScoreboard - LocationChatNormal; LocationChatInterpolated = LocationChatNormal + AlphaLocationChat * LocationChatDelta + LocationChatDelta cross vect(0.0, 0.0, 0.1) * (0.25 - Square(AlphaLocationChat - 0.5)); ConsoleMessagePosX = LocationChatInterpolated.X; ConsoleMessagePosY = LocationChatInterpolated.Y; } // ============================================================================ // SynchronizeTime // // Synchronizes the client with the server's actual game time. // ============================================================================ simulated function SynchronizeTime() { if (TagClientOwner == None || TagClientOwner.IsTimeSynchronized()) return; TagClientOwner.SynchronizeTime(); } // ============================================================================ // DrawOverlays // // Renders all overlay actors on the screen. // ============================================================================ simulated function DrawOverlays(Canvas Canvas) { local int iActorOverlay; for (iActorOverlay = 0; iActorOverlay < ListActorOverlay.Length; iActorOverlay++) if (ListActorOverlay[iActorOverlay] != None) ListActorOverlay[iActorOverlay].RenderOverlays(Canvas); } // ============================================================================ // DrawSpectatingHud // // Since, for an arcane reason, the ScoreBoardDeathMatch class is hard-coded // in the superclass implementation of this function, we work around that // by temporarily modifying the default values of the scoreboard class here. // ============================================================================ simulated function DrawSpectatingHud(Canvas Canvas) { local string TextPlayerRestartPrev; TextPlayerRestartPrev = Class'ScoreboardDeathMatch'.Default.Restart; if (JBGameReplicationInfo(PlayerOwner.GameReplicationInfo) != None && JBGameReplicationInfo(PlayerOwner.GameReplicationInfo).bIsExecuting) Class'ScoreboardDeathMatch'.Default.Restart = TextPlayerExecuted; else Class'ScoreboardDeathMatch'.Default.Restart = TextPlayerKilled; Super.DrawSpectatingHud(Canvas); // Draw the timer, something the superclass lacks to do. if (bDrawTimer) DrawTimer(Canvas); Class'ScoreboardDeathMatch'.Default.Restart = TextPlayerRestartPrev; } // ============================================================================ // ShowPointBarBottom // ShowPointBarTop // ShowPersonalScore // // Disabled inherited functions. // ============================================================================ simulated function ShowPointBarBottom(Canvas Canvas); simulated function ShowPointBarTop(Canvas Canvas); simulated function ShowPersonalScore(Canvas Canvas); // ============================================================================ // ShowWidescreen // // Updates the size of and draws the widescreen bars. // ============================================================================ simulated function ShowWidescreen(Canvas Canvas) { local int HeightBars; local float TimeDelta; TimeDelta = Level.TimeSeconds - TimeUpdateWidescreen; TimeUpdateWidescreen = Level.TimeSeconds; if (bWidescreen) RatioWidescreen = FMin(1.0, RatioWidescreen + TimeDelta * 3.0); else RatioWidescreen = FMax(0.0, RatioWidescreen - TimeDelta * 3.0); HeightBars = RatioWidescreen * Max(0, Canvas.ClipY - Canvas.ClipX / (16.0 / 9.0)) / 2; Canvas.Style = ERenderStyle.STY_Alpha; Canvas.DrawColor.A = 255 * RatioWidescreen; Canvas.SetPos(0, 0); Canvas.DrawTileStretched(Texture'BlackTexture', Canvas.ClipX, HeightBars); Canvas.SetPos(0, Canvas.ClipY); Canvas.DrawTileStretched(Texture'BlackTexture', Canvas.ClipX, -HeightBars); } // ============================================================================ // Blackout // // Briefly blacks out the player's screen. // ============================================================================ simulated function Blackout() { RatioBlackout = 1.0; TimeUpdateBlackout = Level.TimeSeconds; } // ============================================================================ // ShowBlackout // // Updates the opacity and draws the brief blackout which appears when players // switch cameras. // ============================================================================ simulated function ShowBlackout(Canvas Canvas) { local float TimeDelta; if (RatioBlackout <= 0.0) return; TimeDelta = Level.TimeSeconds - TimeUpdateBlackout; TimeUpdateBlackout = Level.TimeSeconds; RatioBlackout = FMax(0.0, RatioBlackout - TimeDelta * 4.0); Canvas.Style = ERenderStyle.STY_Alpha; Canvas.DrawColor.A = 255 * RatioBlackout; Canvas.SetPos(0, 0); Canvas.DrawRect(Texture'BlackTexture', Canvas.ClipX, Canvas.ClipY); } // ============================================================================ // ShowTactics // // Updates and displays the team tactics widget. // ============================================================================ simulated function ShowTactics(Canvas Canvas) { local float AlphaTactics; local float TacticsSelected; local float TimeDelta; local JBTagTeam TagTeam; if (PawnOwner == None || PawnOwner.PlayerReplicationInfo == None) return; TimeDelta = Level.TimeSeconds - TimeUpdateTactics; TimeUpdateTactics = Level.TimeSeconds; TagTeam = Class'JBTagTeam'.Static.FindFor(PawnOwner.PlayerReplicationInfo.Team); if (TagTeam == None) return; switch (TagTeam.GetTactics()) { case 'Evasive': TacticsSelected = 0.0; break; case 'Defensive': TacticsSelected = 1.0; break; case 'Normal': TacticsSelected = 2.0; break; case 'Aggressive': TacticsSelected = 3.0; break; case 'Suicidal': TacticsSelected = 4.0; break; } if (TacticsSelected > TacticsInterpolated) TacticsInterpolated = FMin(TacticsSelected, TacticsInterpolated + TimeDelta * 4.0); else TacticsInterpolated = FMax(TacticsSelected, TacticsInterpolated - TimeDelta * 4.0); AlphaTactics = TacticsInterpolated - int(TacticsInterpolated); if (AlphaTactics == 0.0) SpriteWidgetTacticsBlob.Tints[TeamIndex] = ColorTactics[int(TacticsInterpolated)]; else { SpriteWidgetTacticsBlob.Tints[TeamIndex] = ColorTactics[int(TacticsInterpolated) ] * (1.0 - AlphaTactics) + ColorTactics[int(TacticsInterpolated) + 1] * AlphaTactics; SpriteWidgetTacticsBlob.Tints[TeamIndex].A = ColorTactics[int(TacticsInterpolated) ].A * (1.0 - AlphaTactics) + ColorTactics[int(TacticsInterpolated) + 1].A * AlphaTactics; } if (TacticsInterpolated < 1.0 || TacticsInterpolated > 3.0) SpriteWidgetTacticsBlob.Tints[TeamIndex].A = SpriteWidgetTacticsBlob.Tints[TeamIndex].A * (1.0 - (Abs(2.0 - TacticsInterpolated) - 1.0) * (Level.TimeSeconds % 0.3) / 0.6); if (TagTeam.GetTacticsAuto()) SpriteWidgetTacticsAuto.Scale = FMin(1.0, SpriteWidgetTacticsAuto.Scale + TimeDelta * 3.0); else SpriteWidgetTacticsAuto.Scale = FMax(0.0, SpriteWidgetTacticsAuto.Scale - TimeDelta * 3.0); SpriteWidgetTacticsAuto.PosX = Abs(SpriteWidgetTacticsAuto.TextureCoords.X2 - SpriteWidgetTacticsAuto.TextureCoords.X1) * SpriteWidgetTacticsAuto.TextureScale / 640 * (SpriteWidgetTacticsAuto.Scale - 1.0); SpriteWidgetTacticsAuto.PosY = Abs(SpriteWidgetTacticsAuto.TextureCoords.Y2 - SpriteWidgetTacticsAuto.TextureCoords.Y1) * SpriteWidgetTacticsAuto.TextureScale / 480 * (SpriteWidgetTacticsAuto.Scale - 1.0); DrawSpriteWidget(Canvas, SpriteWidgetTacticsBack); DrawSpriteWidget(Canvas, SpriteWidgetTacticsAuto); DrawSpriteWidget(Canvas, SpriteWidgetTacticsCircle); DrawSpriteWidget(Canvas, SpriteWidgetTacticsBlob); if (FontObjectTactics == None) FontObjectTactics = Font(DynamicLoadObject(FontTactics, Class'Font')); ShowTacticsIcon(Canvas, int(TacticsInterpolated), AlphaTactics); if (AlphaTactics > 0.0) ShowTacticsIcon(Canvas, int(TacticsInterpolated) + 1, AlphaTactics - 1.0); } // ============================================================================ // ShowTacticsIcon // // Displays a tactics icon and the accompanying text, faded and scrolled to // the given alpha. Negative alpha values mean that the icon is above its // normal position, positive values mean that it is below. // ============================================================================ simulated function ShowTacticsIcon(Canvas Canvas, int iTactics, float Alpha) { local vector LocationTextTacticsScreen; SpriteWidgetTacticsIcon[iTactics].Tints[TeamIndex].A = 255 - 255 * Abs(Alpha); SpriteWidgetTacticsIcon[iTactics].PosY = SizeIconTactics.Y * Alpha; DrawSpriteWidget(Canvas, SpriteWidgetTacticsIcon[iTactics]); LocationTextTacticsScreen.X = HudScale * LocationTextTactics.X; LocationTextTacticsScreen.Y = HudScale * (LocationTextTactics.Y + SizeIconTactics.Y * Alpha / 2.0); Canvas.Font = FontObjectTactics; Canvas.FontScaleX = SizeTextTactics.X * HudScale * HudCanvasScale * Canvas.ClipX / 640; Canvas.FontScaleY = SizeTextTactics.Y * HudScale * HudCanvasScale * Canvas.ClipY / 480; Canvas.DrawScreenText( TextTactics[iTactics], HudCanvasScale * (LocationTextTacticsScreen.X - 0.5) + 0.5, HudCanvasScale * (LocationTextTacticsScreen.Y - 0.5) + 0.5, DP_MiddleLeft); Canvas.FontScaleX = Canvas.Default.FontScaleX; Canvas.FontScaleY = Canvas.Default.FontScaleY; } // ============================================================================ // ShowDisposition // // Updates and displays the player disposition for both teams. // ============================================================================ simulated function ShowDisposition(Canvas Canvas) { local float TimeDelta; if (DispositionTeamRed == None && PlayerOwner.GameReplicationInfo != None && PlayerOwner.GameReplicationInfo.Teams[0] != None) { DispositionTeamRed = new Class'JBDispositionTeam'; DispositionTeamRed.Initialize(PlayerOwner.GameReplicationInfo.Teams[0]); } if (DispositionTeamBlue == None && PlayerOwner.GameReplicationInfo != None && PlayerOwner.GameReplicationInfo.Teams[1] != None) { DispositionTeamBlue = new Class'JBDispositionTeam'; DispositionTeamBlue.Initialize(PlayerOwner.GameReplicationInfo.Teams[1]); } if (!JBGameReplicationInfo(PlayerOwner.GameReplicationInfo).bIsExecuting) { if (TimeUpdateDisposition > 0.0) TimeDelta = Level.TimeSeconds - TimeUpdateDisposition; TimeUpdateDisposition = Level.TimeSeconds; DispositionTeamRed .Update(TimeDelta); DispositionTeamBlue.Update(TimeDelta); } DispositionTeamRed .Draw(Canvas); DispositionTeamBlue.Draw(Canvas); } // ============================================================================ // ShowCompass // // Displays the compass dots. // ============================================================================ simulated function ShowCompass(Canvas Canvas) { local int nPlayersReleasable; local float AngleDot; local float DeltaAlphaCompass; local float TimeDelta; local vector LocationOwner; local GameObjective Objective; local JBTagObjective firstTagObjective; local JBTagObjective thisTagObjective; local int DefenderTeamIndex; local bool bIsJammed; TimeDelta = Level.TimeSeconds - TimeUpdateCompass; TimeUpdateCompass = Level.TimeSeconds; if (PawnOwner != None) LocationOwner = PawnOwner.Location; else LocationOwner = PlayerOwner.Location; if (TagPlayerOwner != None) { DeltaAlphaCompass = 1.0; if (PawnOwnerCompass == PawnOwner) DeltaAlphaCompass = TimeDelta * 2.0; if (TagPlayerOwner.IsFree()) AlphaCompass = FMin(1.0, AlphaCompass + DeltaAlphaCompass); else AlphaCompass = FMax(0.0, AlphaCompass - DeltaAlphaCompass); PawnOwnerCompass = PawnOwner; } if (AlphaCompass == 0.0) return; firstTagObjective = JBGameReplicationInfo(PlayerOwner.GameReplicationInfo).firstTagObjective; for (thisTagObjective = firstTagObjective; thisTagObjective != None; thisTagObjective = thisTagObjective.nextTag) { Objective = thisTagObjective.GetObjective(); DefenderTeamIndex = Objective.DefenderTeamIndex; if (Class'Jailbreak'.Default.bReverseSwitchColors) SpriteWidgetCompassDot.Tints[TeamIndex] = TeamSymbols[abs(DefenderTeamIndex-1)].Tints[TeamIndex]; else SpriteWidgetCompassDot.Tints[TeamIndex] = TeamSymbols[DefenderTeamIndex ].Tints[TeamIndex]; SpriteWidgetCompassDot.PosY = LocationCompass.Y; switch (DefenderTeamIndex) { case 0: SpriteWidgetCompassDot.PosX = -LocationCompass.X; break; case 1: SpriteWidgetCompassDot.PosX = LocationCompass.X; break; } nPlayersReleasable = thisTagObjective.CountPlayersReleasable(True); bIsJammed = thisTagObjective.IsJammed(abs(Objective.DefenderTeamIndex-1), True); if (!bIsJammed && nPlayersReleasable > 0) { thisTagObjective.ScaleDot -= 0.5 * nPlayersReleasable * TimeDelta; if (thisTagObjective.ScaleDot < 1.0) thisTagObjective.ScaleDot = (thisTagObjective.ScaleDot % 0.5) + 1.0; } else if (thisTagObjective.ScaleDot != 1.0) { thisTagObjective.ScaleDot -= 0.5 * TimeDelta; if (thisTagObjective.ScaleDot < 1.0) thisTagObjective.ScaleDot = 1.0; } AngleDot = ((rotator(Objective.Location - LocationOwner).Yaw - PlayerOwner.Rotation.Yaw) & 65535) * Pi / 32768; SpriteWidgetCompassDot.PosX = (SpriteWidgetCompassDot.PosX + SizeCompass.X * Sin(AngleDot)) * HudScale + 0.5; SpriteWidgetCompassDot.PosY = (SpriteWidgetCompassDot.PosY - SizeCompass.Y * Cos(AngleDot)) * HudScale; if (bIsJammed) SpriteWidgetCompassDot.Tints[TeamIndex] = JammedLockCompassColor * (1.0 / thisTagObjective.ScaleDot); else SpriteWidgetCompassDot.Tints[TeamIndex] = SpriteWidgetCompassDot.Tints[TeamIndex] * (1.0 / thisTagObjective.ScaleDot); SpriteWidgetCompassDot.Tints[TeamIndex].A = 255 * AlphaCompass; SpriteWidgetCompassDot.TextureScale = Default.SpriteWidgetCompassDot.TextureScale * thisTagObjective.ScaleDot; DrawSpriteWidget(Canvas, SpriteWidgetCompassDot); } } // ============================================================================ // ShowArenaNotifier // // Draws the arena notifier. // ============================================================================ simulated function ShowArenaNotifier(Canvas Canvas) { local bool bShowArenaNotifier; local float TimeDelta; local JBInfoArena firstArena; local JBInfoArena thisArena; if (TimeUpdateArenaNotifier > 0.0) TimeDelta = Level.TimeSeconds - TimeUpdateArenaNotifier; TimeUpdateArenaNotifier = Level.TimeSeconds; firstArena = JBGameReplicationInfo(PlayerOwner.GameReplicationInfo).firstArena; for (thisArena = firstArena; thisArena != None; thisArena = thisArena.nextArena) if (thisArena.CountPlayers() == 2) bShowArenaNotifier = True; if (bShowArenaNotifier && AlphaArenaNotifier == 0.0) PlayerOwner.ReceiveLocalizedMessage(Class'JBLocalMessageScreen', 500); if (bShowArenaNotifier) AlphaArenaNotifier = FMin(1.0, AlphaArenaNotifier + 2.0 * TimeDelta); else AlphaArenaNotifier = FMax(0.0, AlphaArenaNotifier - 2.0 * TimeDelta); if (AlphaArenaNotifier > 0) { SpriteWidgetArenaNotifier.Tints[TeamIndex].A = FClamp(Default.SpriteWidgetArenaNotifier.Tints[TeamIndex].A * AlphaArenaNotifier, 0, 255); DrawSpriteWidget(Canvas, SpriteWidgetArenaNotifier); if (FontObjectArenaNotifier == None) FontObjectArenaNotifier = Font(DynamicLoadObject(FontArenaNotifier, Class'Font')); Canvas.DrawColor = ColorTextArenaNotifier; Canvas.DrawColor.A = FClamp(255 * AlphaArenaNotifier, 0, 255); if (Canvas.DrawColor.A > 0) { Canvas.Font = FontObjectArenaNotifier; Canvas.FontScaleX = SizeTextArenaNotifier.X * HudScale * HudCanvasScale * Canvas.ClipX / 640; Canvas.FontScaleY = SizeTextArenaNotifier.Y * HudScale * HudCanvasScale * Canvas.ClipY / 480; Canvas.DrawScreenText( TextArenaNotifier, HudCanvasScale * (LocationTextArenaNotifier.X - 0.5) + 0.5, HudCanvasScale * (LocationTextArenaNotifier.Y - 0.5) + 0.5, DP_UpperMiddle); Canvas.FontScaleX = Canvas.Default.FontScaleX; Canvas.FontScaleY = Canvas.Default.FontScaleY; } } } // ============================================================================ // ShowBuild // // Draws information about build time and date and the local player. // ============================================================================ simulated function ShowBuild(Canvas Canvas) { Canvas.Font = GetConsoleFont(Canvas); Canvas.DrawColor = WhiteColor; Canvas.DrawColor.A = 64; Canvas.DrawScreenText( PlayerOwner.PlayerReplicationInfo.PlayerName $ ", Jailbreak 2004, build" @ Class'Jailbreak'.Default.Build, 0.5, HudCanvasScale * 0.42 + 0.5, DP_LowerMiddle); } // ============================================================================ // SetDisplayAdrenaline // // Shows or hides the adrenaline widget. To my dismay there doesn't seem to be // a less ugly way to make this happen than that. // ============================================================================ simulated function SetDisplayAdrenaline(bool bDisplay) { if (bDisplay == (AdrenalineIcon.WidgetTexture != None)) return; if (bDisplay) { AdrenalineCount.Tints[0].A = Default.AdrenalineCount.Tints[0].A; AdrenalineCount.Tints[1].A = Default.AdrenalineCount.Tints[1].A; AdrenalineIcon .WidgetTexture = Default.AdrenalineIcon .WidgetTexture; AdrenalineBackground .WidgetTexture = Default.AdrenalineBackground .WidgetTexture; AdrenalineBackgroundDisc.WidgetTexture = Default.AdrenalineBackgroundDisc.WidgetTexture; AdrenalineAlert .WidgetTexture = Default.AdrenalineAlert .WidgetTexture; } else { AdrenalineCount.Tints[0].A = 0; AdrenalineCount.Tints[1].A = 0; AdrenalineIcon .WidgetTexture = None; AdrenalineBackground .WidgetTexture = None; AdrenalineBackgroundDisc.WidgetTexture = None; AdrenalineAlert .WidgetTexture = None; } } // ============================================================================ // ShowTeamScorePassA // // Draws team status and compass. // ============================================================================ simulated function ShowTeamScorePassA(Canvas Canvas) { if (TagPlayerOwner != None && TagPlayerOwner.IsInArena()) { SetDisplayAdrenaline(False); TagPlayerOwner.GetArena().RenderOverlays(Canvas); } else { SetDisplayAdrenaline(True); Super.ShowTeamScorePassA(Canvas); if (bShowPoints) { DrawSpriteWidget(Canvas, SpriteWidgetCompass[0]); DrawSpriteWidget(Canvas, SpriteWidgetCompass[1]); DrawSpriteWidget(Canvas, SpriteWidgetHandcuffs[0]); DrawSpriteWidget(Canvas, SpriteWidgetHandcuffs[1]); } ShowArenaNotifier(Canvas); if (bDrawTimer) ShowTactics(Canvas); if (bShowPoints) { ShowCompass(Canvas); ShowDisposition(Canvas); } } if(bShowLocation) ShowLocation(Canvas); // ShowBuild(Canvas); } // ============================================================================ // ShowTeamScorePassC // // Only draws team scores if not in arena. // ============================================================================ simulated function ShowTeamScorePassC(Canvas Canvas) { if (TagPlayerOwner != None && TagPlayerOwner.IsInArena()) return; Super.ShowTeamScorePassC(Canvas); } // ============================================================================ // LayoutMessage // // Makes sure that no message overlaps the player icons at the screen top. // ============================================================================ simulated function LayoutMessage(out HudLocalizedMessage Message, Canvas Canvas) { Super.LayoutMessage(Message, Canvas); if (JBCamera(PlayerOwner.ViewTarget) == None) Message.PosY = FMax(Message.PosY, 0.16 * HudScale); } // ============================================================================ // ClearMessageByClass // // Clears all messages of the given class (and optional switch) from the list // of local messages. // ============================================================================ simulated function ClearMessageByClass(Class<LocalMessage> ClassLocalMessage, optional int Switch) { local int iLocalMessage; for (iLocalMessage = 0; iLocalMessage < ArrayCount(LocalMessages); iLocalMessage++) if (LocalMessages[iLocalMessage].Message == ClassLocalMessage && (LocalMessages[iLocalMessage].Switch == Switch || Switch == 0)) ClearMessage(LocalMessages[iLocalMessage]); } // ============================================================================ // GetTagClientOwner // // Returns the JBTagClient actor for the local player. // ============================================================================ simulated function JBTagClient GetTagClientOwner() { return Class'JBTagClient'.Static.FindFor(PlayerOwner); } // ============================================================================ // Tick // // Monitors the speech menu in order to hack into it and updates arena player // beacons. // ============================================================================ simulated function Tick(float TimeDelta) { HackSpeechMenu(); // hack into the speech menu UpdateArenaPlayerBeacons(); Super.Tick(TimeDelta); } // ============================================================================ // UpdateArenaPlayerBeacons // // Updates pawns' bScriptPostRender property in order to draw special beacons // above arena players. // ============================================================================ function UpdateArenaPlayerBeacons() { local UnrealPawn thisPawn; local JBTagPlayer thisTagPlayer; local JBInfoArena ViewingArena; if (JBCameraArena(PlayerOwner.ViewTarget) != None) { ViewingArena = JBCameraArena(PlayerOwner.ViewTarget).Arena; } else if (TagPlayerOwner != None) { ViewingArena = TagPlayerOwner.GetArena(); } foreach DynamicActors(class'UnrealPawn', thisPawn) { if (thisPawn != PawnOwner) { thisTagPlayer = class'JBTagPlayer'.static.FindFor(thisPawn.PlayerReplicationInfo); if (thisTagPlayer == None) thisPawn.bScriptPostRender = False; else thisPawn.bScriptPostRender = ViewingArena != None || thisTagPlayer.IsInArena() || thisTagPlayer.GetArenaPending() != None /*|| thisTagPlayer.GetArenaRequest() != None*/; } } } // ============================================================================ // DrawCustomBeacon // // Draws custom beacons over arena players if viewed from outside that player's // arena. Draws "don't attack" icon over non-arena players if viewed from // within an arena. // ============================================================================ function DrawCustomBeacon(Canvas C, Pawn thisPawn, float ScreenLocX, float ScreenLocY) { local JBTagPlayer thisTagPlayer; local JBInfoArena ViewingArena, PlayerArena; local float PawnDist, ScaledDist, BeaconScale; local vector CamLocation, X, Y, Z, ScreenLocation; local rotator CamRotation; local PlayerReplicationInfo thisPRI; if (thisPawn == None || thisPawn.bNoTeamBeacon || thisPawn.Health <= 0 || thisPawn.LastRenderTime < Level.TimeSeconds || ScreenLocX < 0 || ScreenLocX > C.ClipX || ScreenLocY < 0 || ScreenLocY > C.ClipY || PlayerOwner.PlayerReplicationInfo != None && PlayerOwner.PlayerReplicationInfo.bOnlySpectator && PlayerOwner.bHideSpectatorBeacons || xPawn(thisPawn) != None && xPawn(thisPawn).bInvis) return; thisPRI = thisPawn.PlayerReplicationInfo; if (thisPRI == None && thisPawn.DrivenVehicle != None) thisPRI = thisPawn.DrivenVehicle.PlayerReplicationInfo; thisTagPlayer = class'JBTagPlayer'.static.FindFor(thisPRI); if (thisTagPlayer == None) return; else PlayerArena = thisTagPlayer.GetArena(); C.GetCameraLocation(CamLocation, CamRotation); GetAxes(CamRotation, X, Y, Z); PawnDist = PlayerOwner.FOVBias * (X dot (thisPawn.Location - CamLocation)); if (PawnDist < 0 || !PlayerOwner.LineOfSightTo(thisPawn)) return; // behind viewer or hidden behind something, don't draw! ScaledDist = PlayerOwner.TeamBeaconMaxDist * FClamp(0.04 * thisPawn.CollisionRadius, 1, 2); if (PawnDist > ScaledDist) return; // too far away if (JBCameraArena(PlayerOwner.ViewTarget) != None) { ViewingArena = JBCameraArena(PlayerOwner.ViewTarget).Arena; } else if ((PlayerOwner.PlayerReplicationInfo == None || !PlayerOwner.PlayerReplicationInfo.bOnlySpectator) && TagPlayerOwner != None) { ViewingArena = TagPlayerOwner.GetArena(); } C.Style = ERenderStyle.STY_Alpha; if (ViewingArena != None && ViewingArena != PlayerArena) { // viewer is in arena, but pawn is not (or not in same) arena ScreenLocation = C.WorldToScreen(thisPawn.Location); ScreenLocX = ScreenLocation.X; ScreenLocY = ScreenLocation.Y; BeaconScale = Square(FClamp(1 - (0.5 * PawnDist) / PlayerOwner.TeamBeaconPlayerInfoMaxDist, 0.55, 1)); C.SetDrawColor(255, 255, 255); C.SetPos(ScreenLocX - 0.5 * BeaconScale * TextureArenaNoAttack.USize, ScreenLocY - 0.5 * BeaconScale * TextureArenaNoAttack.VSize); C.DrawIcon(TextureArenaNoAttack, BeaconScale); } else if (PlayerArena != None && ViewingArena != PlayerArena) { // pawn is in an arena, but viewer is not BeaconScale = FClamp(0.28 * (ScaledDist - VSize(thisPawn.Location - CamLocation)) / ScaledDist, 0.1, 0.25) * 1.25; C.SetDrawColor(255, 255, 255); C.SetPos(ScreenLocX - 0.5 * BeaconScale * TextureArenaBeacon.USize, ScreenLocY - BeaconScale * TextureArenaBeacon.VSize); C.DrawIcon(TextureArenaBeacon, BeaconScale); } else if (thisTagPlayer.GetArenaPending() != None) { // pawn is about to enter the arena BeaconScale = FClamp(0.28 * (ScaledDist - VSize(thisPawn.Location - CamLocation)) / ScaledDist, 0.1, 0.25) * 1.25; C.SetDrawColor(255, 255, 255); C.SetPos(ScreenLocX - 0.5 * BeaconScale * MaterialArenaPendingBeacon.MaterialUSize(), ScreenLocY - BeaconScale * MaterialArenaPendingBeacon.MaterialVSize()); C.DrawTileScaled(MaterialArenaPendingBeacon, BeaconScale, BeaconScale); } } // ============================================================================ // ModifyTimerDisplay // // Changes the timer's display color, icon, time, announcer to be based on the // modified timer, if and for how long the timer icon should flash and if and // when the timer should reset. // ============================================================================ simulated function ModifyTimerDisplay(color C, SpriteWidget Icon, int SecondsCountdown, optional bool bAnnouncerUsesModifiedTimer, optional bool bFlash, optional float FlashRate, optional float FlashPhase, optional int PreFlashForSeconds, optional int PostFlashForSeconds, optional bool bReset, optional int ResetAfterSeconds) { bTimerModified = True; bModifiedTimerAnnouncer = bAnnouncerUsesModifiedTimer; TimerHours .Tints[0] = C; TimerHours .Tints[1] = C; TimerMinutes.Tints[0] = C; TimerMinutes.Tints[1] = C; TimerSeconds.Tints[0] = C; TimerSeconds.Tints[1] = C; TimerDigitSpacer[0].Tints[0] = C; TimerDigitSpacer[0].Tints[1] = C; TimerDigitSpacer[1].Tints[0] = C; TimerDigitSpacer[1].Tints[1] = C; TimerIcon = Icon; TimerIconTexScale = Icon.TextureScale; TimerCountdown = PlayerOwner.GameReplicationInfo.ElapsedTime + SecondsCountdown; if (FlashRate > 0.0) { TexOscTimerHighlight.UOscillationRate = FlashRate; TexOscTimerHighlight.VOscillationRate = FlashRate; } if (FlashPhase > 0.0) { TexOscTimerHighlight.UOscillationPhase = FlashPhase; TexOscTimerHighlight.VOscillationPhase = FlashPhase; } if (bFlash) { TimerPreFlashTime = TimerCountdown - PreFlashForSeconds; TimerPostFlashTime = TimerCountdown + PostFlashForSeconds; } else { TimerPreFlashTime = 0; TimerPostFlashTime = 0; } if (bReset) TimerResetTime = TimerCountdown + ResetAfterSeconds; else TimerResetTime = 0; LastTimerModTime = Level.TimeSeconds; } // ============================================================================ // ResetTimerDisplay // // Resets the timer to it's original state. The time is the current time, not // the time it was when the timer was changed. // ============================================================================ simulated function ResetTimerDisplay() { bModifiedTimerAnnouncer = False; TimerHours .Tints[0] = Default.TimerHours .Tints[0]; TimerHours .Tints[1] = Default.TimerHours .Tints[1]; TimerMinutes.Tints[0] = Default.TimerMinutes.Tints[0]; TimerMinutes.Tints[1] = Default.TimerMinutes.Tints[1]; TimerSeconds.Tints[0] = Default.TimerSeconds.Tints[0]; TimerSeconds.Tints[1] = Default.TimerSeconds.Tints[1]; TimerDigitSpacer[0].Tints[0] = Default.TimerDigitSpacer[0].Tints[0]; TimerDigitSpacer[0].Tints[1] = Default.TimerDigitSpacer[0].Tints[1]; TimerDigitSpacer[1].Tints[0] = Default.TimerDigitSpacer[1].Tints[0]; TimerDigitSpacer[1].Tints[1] = Default.TimerDigitSpacer[1].Tints[1]; TimerIcon = Default.TimerIcon; TimerCountdown = 0; TexOscTimerHighlight.UOscillationRate = 3.0; TexOscTimerHighlight.VOscillationRate = 3.0; TimerPreFlashTime = 0; TimerPostFlashTime = 0; TimerResetTime = 0; bTimerModified = False; LastTimerModTime = Level.TimeSeconds; } // ============================================================================ // ModifiedTimerAnnouncer // // Plays the announcer. // ============================================================================ simulated function ModifiedTimerAnnouncer(int Seconds) { local String Announcement; if (OldTimerSeconds == Seconds || Seconds == 0) return; switch (Seconds) { case 300: Announcement = "5_minute_warning"; break; case 180: Announcement = "3_minutes_remain"; break; case 120: Announcement = "2_minutes_remain"; break; case 60: Announcement = "1_minute_remains"; break; case 30: Announcement = "30_seconds_remain"; break; case 20: Announcement = "20_seconds"; break; case 10: Announcement = "Ten"; break; case 9: Announcement = "Nine"; break; case 8: Announcement = "Eight"; break; case 7: Announcement = "Seven"; break; case 6: Announcement = "Six"; break; case 5: Announcement = "Five"; break; case 4: Announcement = "Four"; break; case 3: Announcement = "Three"; break; case 2: Announcement = "Two"; break; case 1: Announcement = "One"; break; } if (Announcement != "") Class'JBSpeechManager'.Static.PlayFor(Level, "Status/" $ Announcement); // Prevent the same announcement a second time. OldTimerSeconds = Seconds; } // ============================================================================ // DrawTimer // // Exact copy from HudCDeathmatch, because I need to change the time displayed. // ============================================================================ simulated function DrawTimer(Canvas C) { local GameReplicationInfo GRI; local int Minutes, Hours, Seconds; GRI = PlayerOwner.GameReplicationInfo; // One added if-statement and one changed variable.. if (TimerCountdown != 0) Seconds = Max(0, TimerCountdown - GRI.ElapsedTime); else if (GRI.TimeLimit != 0) Seconds = GRI.RemainingTime; else Seconds = GRI.ElapsedTime; // Announce the modified timer countdown. if (bModifiedTimerAnnouncer) ModifiedTimerAnnouncer(Seconds); TimerBackground.Tints[TeamIndex] = HudColorBlack; TimerBackground.Tints[TeamIndex].A = 150; DrawSpriteWidget(C, TimerBackground); DrawSpriteWidget(C, TimerBackgroundDisc); if (TimerPreFlashTime <= GRI.ElapsedTime && TimerPostFlashTime >= GRI.ElapsedTime) { DrawSpriteWidget(C, SpriteWidgetTimerHighlight); SpriteWidgetTimerHighlight.Tints[TeamIndex] = HudColorHighLight; } DrawSpriteWidget(C, TimerIcon); TimerMinutes.OffsetX = default.TimerMinutes.OffsetX - 80; TimerSeconds.OffsetX = default.TimerSeconds.OffsetX - 80; TimerDigitSpacer[0].OffsetX = Default.TimerDigitSpacer[0].OffsetX; TimerDigitSpacer[1].OffsetX = Default.TimerDigitSpacer[1].OffsetX; if (Seconds > 3600) { Hours = Seconds / 3600; Seconds -= Hours * 3600; DrawNumericWidget( C, TimerHours, DigitsBig); TimerHours.Value = Hours; if (Hours>9) { TimerMinutes.OffsetX = default.TimerMinutes.OffsetX; TimerSeconds.OffsetX = default.TimerSeconds.OffsetX; } else { TimerMinutes.OffsetX = default.TimerMinutes.OffsetX - 40; TimerSeconds.OffsetX = default.TimerSeconds.OffsetX - 40; TimerDigitSpacer[0].OffsetX = Default.TimerDigitSpacer[0].OffsetX - 32; TimerDigitSpacer[1].OffsetX = Default.TimerDigitSpacer[1].OffsetX - 32; } DrawSpriteWidget(C, TimerDigitSpacer[0]); } DrawSpriteWidget(C, TimerDigitSpacer[1]); Minutes = Seconds / 60; Seconds -= Minutes * 60; TimerMinutes.Value = Min(Minutes, 60); TimerSeconds.Value = Min(Seconds, 60); DrawNumericWidget(C, TimerMinutes, DigitsBig); DrawNumericWidget(C, TimerSeconds, DigitsBig); // Draw animation. if (TimerIconTexScale == 0) TimerIconTexScale = default.TimerIcon.TextureScale; DrawHUDAnimWidget(TimerIcon, TimerIconTexScale, LastTimerModTime, 0.6, 0.6); // Reset timer if wanted. if (TimerResetTime == GRI.ElapsedTime) ResetTimerDisplay(); } // ============================================================================ // HackSpeechMenu // // Hacks into the speech menu in order to add a team tactics selection there. // Monitors the menu and adds or changes menu entries depending on the menu's // current state. // ============================================================================ simulated function HackSpeechMenu() { local byte KeySubmenuOrder; local PlayerController PlayerControllerLocal; local ExtendedConsole Console; PlayerControllerLocal = Level.GetLocalPlayerController(); if (PlayerControllerLocal == None) return; Console = ExtendedConsole(PlayerControllerLocal.Player.Console); if (Console.IsInState('SpeechMenuVisible')) { if (Console.SMState != SpeechMenuState || !bSpeechMenuVisible) { if (Console.SMState == SMS_Main && bSpeechMenuVisibleTactics) { if (Console.bSpeechMenuUseLetters) KeySubmenuOrder = Console.LetterKeys[3]; else KeySubmenuOrder = Console.NumberKeys[3]; Console.SMAcceptSound = None; // disable opening sound Console.KeyEvent(EInputKey(KeySubmenuOrder), IST_Press, 0.0); Console.SMAcceptSound = Console.Default.SMAcceptSound; } ResetSpeechMenu(Console); switch (Console.SMState) { case SMS_Order: bSpeechMenuVisibleTactics = False; SetupSpeechMenuOrders(Console); break; case SMS_PlayerSelect: bSpeechMenuVisibleTactics = (Console.SMIndex == 1337); if (bSpeechMenuVisibleTactics) SetupSpeechMenuTactics(Console); break; default: bSpeechMenuVisibleTactics = False; break; } bSpeechMenuVisible = True; SpeechMenuState = Console.SMState; } } else if (bSpeechMenuVisible) { ResetSpeechMenu(Console); bSpeechMenuVisible = False; bSpeechMenuVisibleTactics = False; } } // ============================================================================ // ResetSpeechMenu // // Resets everything that was permanently changed in the speech menu while the // tactics submenu was displayed. // ============================================================================ private simulated function ResetSpeechMenu(ExtendedConsole Console) { local int iStateName; for (iStateName = 0; iStateName < ArrayCount(Console.SMStateName); iStateName++) Console.SMStateName[iStateName] = Console.Default.SMStateName[iStateName]; } // ============================================================================ // SetupSpeechMenuOrders // // Adds a team tactics menu item to the orders submenu of the speech menu. // ============================================================================ private simulated function SetupSpeechMenuOrders(ExtendedConsole Console) { Console.SMNameArray [Console.SMArraySize] = TextMenuEntryTactics; Console.SMIndexArray[Console.SMArraySize] = 1337; Console.SMArraySize += 1; } // ============================================================================ // SetupSpeechMenuTactics // // Sets up the tactics submenu of the speech menu. // ============================================================================ private simulated function SetupSpeechMenuTactics(ExtendedConsole Console) { local int iOrderNameTactics; local JBGameReplicationInfo InfoGame; local JBTagTeam TagTeam; Console.SMState = SMS_Other; Console.SMStateName[Console.SMState] = TextMenuTitleTactics; InfoGame = JBGameReplicationInfo(PlayerOwner.GameReplicationInfo); Console.SMArraySize = ArrayCount(InfoGame.OrderNameTactics); for (iOrderNameTactics = 0; iOrderNameTactics < Console.SMArraySize; iOrderNameTactics++) { Console.SMNameArray [iOrderNameTactics] = TextOrderName[iOrderNameTactics]; Console.SMIndexArray[iOrderNameTactics] = InfoGame.OrderNameTactics[iOrderNameTactics].iOrderName; } TagTeam = Class'JBTagTeam'.Static.FindFor(PawnOwner.PlayerReplicationInfo.Team); if (TagTeam.GetTacticsAuto()) Console.HighlightRow = 0; else { switch (TagTeam.GetTactics()) { case 'Suicidal': Console.HighlightRow = 1; break; case 'Aggressive': Console.HighlightRow = 2; break; case 'Normal': Console.HighlightRow = 3; break; case 'Defensive': Console.HighlightRow = 4; break; case 'Evasive': Console.HighlightRow = 5; break; } } } // ============================================================================ // exec TeamTactics // // Allows the player to change the current team tactics from the console. // Replicated to the server via ExecTeamTactics in JBTagPlayer. // ============================================================================ simulated exec function TeamTactics(string TextTactics, optional string TextTeam) { local name Tactics; local TeamInfo Team; if (TextTeam == "") Team = None; else if (TextTeam ~= Left("red", Len(TextTeam))) Team = PlayerOwner.GameReplicationInfo.Teams[0]; else if (TextTeam ~= Left("blue", Len(TextTeam))) Team = PlayerOwner.GameReplicationInfo.Teams[1]; if (TextTactics ~= Left("auto", Len(TextTactics))) Tactics = 'Auto'; else if (TextTactics ~= Left("up", Len(TextTactics))) Tactics = 'MoreAggressive'; else if (TextTactics ~= Left("down", Len(TextTactics))) Tactics = 'MoreDefensive'; else if (TextTactics ~= Left("evasive", Len(TextTactics))) Tactics = 'Evasive'; else if (TextTactics ~= Left("defensive", Len(TextTactics))) Tactics = 'Defensive'; else if (TextTactics ~= Left("normal", Len(TextTactics))) Tactics = 'Normal'; else if (TextTactics ~= Left("aggressive", Len(TextTactics))) Tactics = 'Aggressive'; else if (TextTactics ~= Left("suicidal", Len(TextTactics))) Tactics = 'Suicidal'; GetTagClientOwner().ExecTeamTactics(Tactics, Team); } // ============================================================================ // exec ArenaCam // // Activates the next viable arena cam, or deactivates arena cams for this // player if the player was viewing the last available one already. // ============================================================================ simulated exec function ArenaCam() { ClearMessageByClass(Class'JBLocalMessageScreen', 500); GetTagClientOwner().ExecArenaCam(); } // ============================================================================ // exec ViewTeamFree // exec ViewTeamJailed // exec ViewTeamAny // // Allows players to spectate one of their teammates. // ============================================================================ simulated exec function ViewTeamFree() { GetTagClientOwner().ExecViewTeam('Free' ); } simulated exec function ViewTeamJailed() { GetTagClientOwner().ExecViewTeam('Jailed'); } simulated exec function ViewTeamAny() { GetTagClientOwner().ExecViewTeam('Any' ); } // ============================================================================ // exec ViewSelf // // Resets the player's view point to normal first-person view. // ============================================================================ simulated exec function ViewSelf() { GetTagClientOwner().ExecViewSelf(); } // ============================================================================ // exec Help // // Pops up our JBMidGamePanelHelp; // ============================================================================ simulated exec function Help() { PlayerOwner.Player.GUIController.OpenMenu("JBToolbox2.JBLoginMenu", "JBTutorial"); } // ============================================================================ // exec SetupPanorama // // Allows mappers to interactively align the scoreboard panorama map. Creates // a JBInteractionSetupPanorama interaction and lets it handle the rest. // ============================================================================ exec function SetupPanorama() { if (Level.NetMode == NM_Standalone) PlayerOwner.Player.InteractionMaster.AddInteraction("Jailbreak.JBInteractionPanorama", PlayerOwner.Player); } // ============================================================================ // exec BotThoughts // // Allows users to dump verbose explanations of why bots are deployed where to // the log or to the screen. // // BotThoughts Toggles both log and screen explanations. // BotThoughts log|screen Toggles either log or screen explanations. // BotThoughts on|off Sets both log and screen on or off. // BotThoughts log|screen on|off Sets either log or screen on or off. // // ============================================================================ exec function BotThoughts(optional string Param1, optional string Param2) { local bool bExplainToLog; local bool bExplainToScreen; local bool bFlag; local string Flag; local string Place; local JBBotTeam JBBotTeam[2]; if (Level.NetMode != NM_Standalone) return; JBBotTeam[0] = JBBotTeam(TeamGame(Level.Game).Teams[0].AI); JBBotTeam[1] = JBBotTeam(TeamGame(Level.Game).Teams[1].AI); bExplainToLog = JBBotTeam[0].bExplainToLog || JBBotTeam[1].bExplainToLog; bExplainToScreen = JBBotTeam[0].bExplainToScreen || JBBotTeam[1].bExplainToScreen; if (Param2 != "" || Param1 ~= "log" || Param1 ~= "screen") { Flag = Param2; Place = Param1; } else { Flag = Param1; Place = "both"; } if (Flag == "1" || Flag ~= "true" || Flag ~= "on" || Flag ~= "yes") bFlag = True; else if (Flag == "0" || Flag ~= "false" || Flag ~= "off" || Flag ~= "no") bFlag = False; else if (Flag != "") return; if (!(Place ~= "log" || Place ~= "screen" || Place ~= "both")) return; if (Place ~= "log" || Place ~= "both") { if (Flag == "") bExplainToLog = !bExplainToLog; else bExplainToLog = bFlag; } if (Place ~= "screen" || Place ~= "both") { if (Flag == "") bExplainToScreen = !bExplainToScreen; else bExplainToScreen = bFlag; } JBBotTeam[0].bExplainToLog = bExplainToLog; JBBotTeam[0].bExplainToScreen = bExplainToScreen; JBBotTeam[1].bExplainToLog = bExplainToLog; JBBotTeam[1].bExplainToScreen = bExplainToScreen; PlayerOwner.ClientMessage("BotThoughts written to log:" @ bExplainToLog $ ", to screen:" @ bExplainToScreen); } // ============================================================================ // Get and Set functions for bShowLocation // ============================================================================ function SetDebugShowLoc(bool bShow) { bShowLocation = bShow; } function bool GetDebugShowLoc() { return bShowLocation; } // ============================================================================ // ShowLocation // // This will show the HUD owner's current location. Used for debugging. // ============================================================================ function ShowLocation(Canvas Canvas) { local String strLocName; strLocName = PlayerOwner.PlayerReplicationInfo.GetLocationName(); Canvas.SetPos(0.0, 75.0); Canvas.DrawText(strLocName); } // ============================================================================ // Defaults // ============================================================================ defaultproperties { TextPlayerKilled = "You were killed."; TextPlayerExecuted = "You have been executed." TextMenuEntryTactics = "Team tactics"; TextMenuTitleTactics = "Team Tactics" TextOrderName[0] = "[AUTO]"; TextOrderName[1] = "Suicidal"; TextOrderName[2] = "Aggressive"; TextOrderName[3] = "Normal"; TextOrderName[4] = "Defensive"; TextOrderName[5] = "Evasive"; FontArenaNotifier = "2K4Fonts.Verdana20"; TextArenaNotifier = "arena match"; LocationTextArenaNotifier = (X=0.500,Y=0.084); SizeTextArenaNotifier = (X=0.400,Y=0.450); ColorTextArenaNotifier = (R=176,G=176,B=176); LocationChatScoreboard = (X=0.050,Y=0.300); LocationCompass = (X=0.056,Y=0.043); SizeCompass = (X=0.023,Y=0.031); LocationTextTactics = (X=0.049,Y=0.096); SizeIconTactics = (Y=0.040); SizeTextTactics = (X=0.400,Y=0.450); FontTactics = "2K4Fonts.Verdana20"; TextTactics[0] = "evasive"; TextTactics[1] = "defensive"; TextTactics[2] = "normal"; TextTactics[3] = "aggressive"; TextTactics[4] = "suicidal"; ColorTactics[0] = (R=000,G=255,B=000,A=192); ColorTactics[1] = (R=128,G=255,B=128,A=192); ColorTactics[2] = (R=128,G=128,B=128,A=192); ColorTactics[3] = (R=240,G=064,B=032,A=192); ColorTactics[4] = (R=240,G=064,B=032,A=192); SpriteWidgetArenaNotifier = (WidgetTexture=Texture'HUDContent.Generic.HUD',TextureCoords=(X1=168,Y1=211,X2=334,Y2=255),TextureScale=0.40,DrawPivot=DP_UpperMiddle,PosX=0.5,PosY=0,OffsetX=0,OffsetY=97,RenderStyle=STY_Alpha,Tints[0]=(R=000,G=000,B=000,A=150),Tints[1]=(R=000,G=000,B=000,A=150)); SpriteWidgetCompass[0] = (WidgetTexture=Texture'HUDContent.Generic.HUD',TextureCoords=(X1=119,Y1=258,X2=173,Y2=313),TextureScale=0.60,DrawPivot=DP_UpperRight,PosX=0.5,PosY=0,OffsetX=-32,OffsetY=7,RenderStyle=STY_Alpha,Tints[0]=(R=255,G=255,B=255,A=255),Tints[1]=(R=255,G=255,B=255,A=255)) SpriteWidgetCompass[1] = (WidgetTexture=Texture'HUDContent.Generic.HUD',TextureCoords=(X1=119,Y1=258,X2=173,Y2=313),TextureScale=0.60,DrawPivot=DP_UpperLeft,PosX=0.5,PosY=0,OffsetX=32,OffsetY=7,RenderStyle=STY_Alpha,Tints[0]=(R=255,G=255,B=255,A=255),Tints[1]=(R=255,G=255,B=255,A=255)) SpriteWidgetCompassDot = (WidgetTexture=Texture'HUDContent.Generic.HUD',TextureCoords=(X1=340,Y1=432,X2=418,Y2=510),TextureScale=0.12,DrawPivot=DP_MiddleMiddle,RenderStyle=STY_Alpha); SpriteWidgetHandcuffs[0] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=064,Y1=400,X2=160,Y2=507),TextureScale=0.23,DrawPivot=DP_UpperRight,PosX=0.5,PosY=0.0,OffsetX=-108,OffsetY=34,RenderStyle=STY_Alpha,Tints[0]=(R=255,G=255,B=255,A=64),Tints[1]=(R=255,G=255,B=255,A=64)); SpriteWidgetHandcuffs[1] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X2=064,Y1=400,X1=160,Y2=507),TextureScale=0.23,DrawPivot=DP_UpperLeft,PosX=0.5,PosY=0.0,OffsetX=108,OffsetY=34,RenderStyle=STY_Alpha,Tints[0]=(R=255,G=255,B=255,A=64),Tints[1]=(R=255,G=255,B=255,A=64)); JammedLockCompassColor = (R=128,G=128,B=128,A=255) SpriteWidgetTacticsBlob = (WidgetTexture=Texture'HUDContent.Generic.GlowCircle',TextureCoords=(X1=0,Y1=0,X2=64,Y2=64),TextureScale=0.47,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=0,OffsetY=67,RenderStyle=STY_Alpha,Tints[0]=(R=255,G=255,B=000,A=255),Tints[1]=(R=255,G=255,B=000,A=255)); SpriteWidgetTacticsCircle = (WidgetTexture=Texture'HUDContent.Generic.HUD',TextureCoords=(X1=119,Y1=258,X2=173,Y2=313),TextureScale=0.53,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=00,OffsetY=60,RenderStyle=STY_Alpha,Tints[0]=(B=255,G=255,R=255,A=255),Tints[1]=(B=255,G=255,R=255,A=255)); SpriteWidgetTacticsBack = (WidgetTexture=Texture'HUDContent.Generic.HUD',TextureCoords=(X1=168,Y1=211,X2=334,Y2=255),TextureScale=0.40,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=60,OffsetY=94,RenderStyle=STY_Alpha,Tints[0]=(R=000,G=000,B=000,A=150),Tints[1]=(R=000,G=000,B=000,A=150)); SpriteWidgetTacticsIcon[0] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=400,Y1=016,X2=502,Y2=100),TextureScale=0.18,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=036,OffsetY=216,RenderStyle=STY_Alpha,Tints[0]=(R=176,G=176,B=176,A=255),Tints[1]=(R=176,G=176,B=176,A=255)); SpriteWidgetTacticsIcon[1] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=400,Y1=128,X2=496,Y2=223),TextureScale=0.18,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=035,OffsetY=214,RenderStyle=STY_Alpha,Tints[0]=(R=176,G=176,B=176,A=255),Tints[1]=(R=176,G=176,B=176,A=255)); SpriteWidgetTacticsIcon[2] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=176,Y1=400,X2=252,Y2=498),TextureScale=0.18,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=044,OffsetY=210,RenderStyle=STY_Alpha,Tints[0]=(R=176,G=176,B=176,A=255),Tints[1]=(R=176,G=176,B=176,A=255)); SpriteWidgetTacticsIcon[3] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=272,Y1=400,X2=351,Y2=488),TextureScale=0.18,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=043,OffsetY=213,RenderStyle=STY_Alpha,Tints[0]=(R=176,G=176,B=176,A=255),Tints[1]=(R=176,G=176,B=176,A=255)); SpriteWidgetTacticsIcon[4] = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=400,Y1=240,X2=497,Y2=332),TextureScale=0.18,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=033,OffsetY=213,RenderStyle=STY_Alpha,Tints[0]=(R=176,G=176,B=176,A=255),Tints[1]=(R=176,G=176,B=176,A=255)); SpriteWidgetTacticsAuto = (WidgetTexture=Material'SpriteWidgetHud',TextureCoords=(X1=080,Y1=352,X2=136,Y2=371),TextureScale=0.53,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=038,OffsetY=098,RenderStyle=STY_Alpha,Tints[0]=(R=255,G=255,B=255,A=255),Tints[1]=(R=255,G=255,B=255,A=255),ScaleMode=SM_Left,Scale=1.0); // Prevents the clock from animating and flashing when the game initially starts. LastTimerModTime = -10 TimerPreFlashTime = -10 TimerPostFlashTime = -10 TimerResetTime = -10 Begin Object Class=FadeColor Name=ArenaPendingPulse Color1=(R=255,G=255,B=255,A=255) Color2=(R=0,G=0,B=0,A=0) FadePeriod=0.2 ColorFadeType=FC_Sinusoidal End Object Begin Object Class=Combiner Name=ArenaPendingPulseCombiner CombineOperation=CO_Multiply AlphaOperation=AO_Multiply Material1=Texture'ArenaPendingBeacon' Material2=FadeColor'ArenaPendingPulse' End Object Begin Object Class=Combiner Name=ArenaPendingBeaconCombiner CombineOperation=CO_AlphaBlend_With_Mask AlphaOperation=AO_Add Material1=Texture'ArenaBeacon' Material2=Combiner'ArenaPendingPulseCombiner' Mask=Combiner'ArenaPendingPulseCombiner' End Object Begin Object Class=FinalBlend Name=ArenaPendingBeaconFinal FrameBufferBlending=FB_AlphaBlend Material=Combiner'ArenaPendingBeaconCombiner' FallbackMaterial=Texture'ArenaBeacon' End Object TextureArenaBeacon = Texture'ArenaBeacon'; MaterialArenaPendingBeacon = FinalBlend'ArenaPendingBeaconFinal'; TextureArenaNoAttack = Texture'HUDContent.NoEntry'; ScoreTeam[0] = (PosX=0.442000); ScoreTeam[1] = (PosX=0.558000); TeamScoreBackGround[0] = (PosX=0.442000); TeamScoreBackGround[1] = (PosX=0.558000); TeamScoreBackGroundDisc[0] = (PosX=0.442000); TeamScoreBackGroundDisc[1] = (PosX=0.558000); TeamSymbols[0] = (PosX=0.442000); TeamSymbols[1] = (PosX=0.558000); TimerIcon = (TextureScale=0.54,OffsetY=11); bShowLocation = false; // Copy from GlowCirclePulse and fb_Pulse001 from HudContent. Was necessary // to support slowing down the flashing. Begin Object Class=TexOscillator Name=TimerGlowCirclePulse UOscillationRate=0.91 VOscillationRate=0.91 UOscillationPhase=0.5 VOscillationPhase=0.5 UOscillationAmplitude=0.5 VOscillationAmplitude=0.5 UOscillationType=OT_Stretch VOscillationType=OT_Stretch UOffset=32.0 VOffset=32.0 Material=TexScaler'HUDContent.Generic.ScaledGlowCircle' End Object Begin Object Class=FinalBlend Name=Timerfb_Pulse001 FrameBufferBlending=FB_AlphaBlend Material=TexOscillator'TimerGlowCirclePulse' End Object TexOscTimerHighlight = TexOscillator'TimerGlowCirclePulse' SpriteWidgetTimerHighlight = (WidgetTexture=TexOscillator'TimerGlowCirclePulse',TextureCoords=(X1=0,Y1=0,X2=64,Y2=64),TextureScale=0.53,DrawPivot=DP_UpperLeft,PosX=0,PosY=0,OffsetX=-4,OffsetY=-4,RenderStyle=STY_Alpha,Tints[0]=(G=255,R=255,B=255,A=255),Tints[1]=(G=255,R=255,B=255,A=255),ScaleMode=SM_Right,Scale=1.000000) } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |