*pWqbCC~H"SR*fffgfhfifjfkflfmfnfofpfqppppppNoneInternalOnKeyEventCaption__OnKeyEvent__DelegateColor TextColor TextFont__OnKeyType__Delegate__OnActivate__DelegateInternalActivateClientMessage__OnDeActivate__DelegateInternalOnKeyTypeInternalDeactivateGetLocalPlayerController SendToServerConsoleCommandCalculateInterpol WelcomeMsgGetInterpolatedPos CloseMenuprimary SecondaryTick UTV2004c StyleName FixRotDistInternalOnClick bMultiLineCore CheckGameEnd DrawWelcomeInternalOnClose ShowMenuClientOpenMenuReceiveMovement bIntOnlyGetNextMovementInitComponent XInterfacebAllowedAsLastbAcceptsInput SendChanges bNeverFocusbRequire640x480 bRenderWorld ShowChatAddItem DrawWarnMsgDrawWelcomeText DrawTextBoxUserglobalKeyEventInternalOnChangeGetNextPlayer__OnClick__DelegateItemGap GotInitMsg MarginWidth SetPause BoxHeightSystem MyOnKeyEvent Controls MyOnKeyType SetWarningEngine DrawStats GotStatus GotBigStatus ResetServer SaveDefaultsGetPawnFromName BoxWidthGetMidGameFont BeginState ItemHeightSendInterpolValues KeyEventProcessMovement WelcomeEnd GameEnded SetState TextAlign MyOnDrawNone SendTarget bVisiblePostBeginPlay utvInputPageutvInteractionutvPrimaryMenuutvReplication ReadOnlyutvWatcherMenu GetIndex SetIndexInternalOnCreateComponent CaptionWidth WelcomeWidthWelcomeMarginbHidden MovementbSkipActorPropertyReplication WelcomePos__OnCreateComponent__Delegate WelcomeStartutvsayRemoveInteraction__OnChange__Delegate PostRenderGetFromServer RemoteRoleAddInteraction__OnDraw__Delegate GetTarget UtvPackageFollowPrimary FreeFlight TInterpolTPlayerInterpolDrawTypingPromptNotifyLevelChangeDelay  bFloatOnlyTotal clients Menu bChecked GoldColor bBehindViewPrevGUIControllerClipXClipYCurXDrawTileStretchedSetPos SetDrawColorcurDowndy ListenPortH1InterfaceContentNoneresGUIPagemyHUDOnCloseGUIMultiComponent GUIComponentGUI GUIButton GUIGFXButton GUIEditBoxGUICheckBoxButton GUILabel UT2K3GUIPage moComboBoxUT2MidGameFont DrawColorDelayWinTopWinLeft WinWidth WinHeighttmpPauser ViewTargetM CurrentTime PlayerNameSenderPXL MyControllerMyOwnerYL GetUrlOption Backgroundloct1 bIgnoreKeys TypedStr bCanceledPC DeltaTimeDeltaActionTextStrUnicodeKeyMsg__OnClose__DelegateMasterViewportOwner EInputKey EInputActionIndexNumTextposTargetStaticSaveConfigNoneit2X3Y3t MoveRight MoveLeftSsizingServerAddress ServerPort ReturnValue OkButtonLabel1Label2Label3 ResetButton TitleTextMarkButton2Button3m1m2 ComboBox Rotation LocationY2X2Y1X1UtvRep shownWelcomeZYXATime ScriptTextWarnMsgClients RestartIn JoinPasswordPrimaryPassword VipPasswordNormalPassword MaxClients LevelInfoHUDPlayerReplicationInfo ControllerPlayerControllerXW LineSpace WordSpaceCanvasywFontInteractionMasterLevelPlayertmpsPawnActor Interactions ViewModemoves movehead movetail viewingSelflastViewedSelfSeeAll NoPrimary Interaction MuteChatLastTargetNameStyle LocalPos LocalPosSet moveForward moveBackwardmoveUp moveDownYawk1k2g1c1Rollnoinfocords interpol ChatStringwantBehindviewuti lastSend wasEndedPitchTextureCmdRoleClassPackageRot TextBufferObjectEnumcord FunctionStateRotatorVectorm3Struct tempPawn targetNamegetNextName StrPropertyStructPropertyArrayPropertyDelegatePropertyObjectPropertyuiurtuiturFloatProperty BoolProperty IntProperty BytePropertySetViewTargetLabelSALabelSPLabelLPLabelJPLabelPPLabelVPLabelNPLabelDLabelMCLabelTCBoxSABoxSPBoxLPBoxJPBoxPPBoxVPBoxNPBoxDBoxMC LabelMute MuteButton HorizLineNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNone TabOrder OnslaughtFix ImageStyleImage LinkActors OldFollow 2K4MenusRemapComponentsohccit GUIImage OnslaughtBaseEyeHeightONSHUDOnslaught Display95TargetViewRotation EditBoxDownTargetEyeHeight NewControls TimeDilationWIsDemoNoneNoneNoneNoneNone`}\A9:9:$9:9:$Gd>6ʁ)hhzVGBhhzVGBhzVGB3} u u3} u u uh uh,e u u u u u u u>6>6 u u u u u u u u u u u u u uh u>6 u u uhQ*3} u3} u3} u u3} uQ*Q*Q*3} u u u u u3} u u uu*F uu*Fk>6 uQ*Q*>6>6Q*>63} u%/%/3}>6B=t] UTV2004C7uwvegpMboZvQ*\ >6>6>6>6 u>6>6>6>6>6>6>6>6>6 u>6 u>6>6>6>6 u>6>6 u>6>6>6u*F uu*F u u>6>6>6>6>6>6>6u*F uu*F u>6>6>6>6>6>6 u u>6 u u>6 uu*F uu*F u u>6u*F uu*Fu*Fҽ uҽ, ҽҽҽu)ҽҽҽҽҽ, ҽҽҽҽҽҽҽҽҽҽҽҽҽҽҽҽҽu*F ukB=c$>d$ ףjP"P ]*)Welcome to <2>UTV2004<1> Primary Client!ݟ]You are now broadcasting a game to people over the net! To configure settings and control the UTV server, press <2>F8<1> to bring up the configuration menu.&%Press any key to close this window..*)Welcome to <2>UTV2004<1> Watcher Client!݀~You are watching a live broadcast of a game! To configure watcher settings press <2>F8<1> to bring up the configuration menu.U STo toggle between first and third person view, press the <2>right<1> mouse button.& %Press any key to close this window..WMM@MMmMM9MMzMMMMMMMM'MM@MMMDMMM@MM@MMMMM7MMMM7MM7M[@MM@MM(MMXMnMlMMMM.MMjMMF@MM&MMMMWMMiMM/MMQ@MMMMmMMuMMKMMZMMMMFMMMM!MM`MM^MMX@MMyMMMMIMMnM7M<MMMMJMM> fMM7MMMMM|MM1@MMMM}@@MM3@MMh@MMMMJMMOMM,MMUMMMMLMDMMMLMMxMr"WK WK WK WKMMKM$WM WM WM WMMMMMMMN@MM5@MM6@MMP@MMS@MMT@MMMMbMM@@MMoM$WZ WZ WZ WZMMCMMEMM@MMAMM\@MM_MWa Wa Wa WaMMLMM-M|Wd Wd Wd WdMM$MMMMMMtMMiMMTMMjMMkMMk@M)S+Wn Wn Wn WnMM]MMMWq Wq Wq WqMMM$Ws Ws Ws WsMWt Wt Wt WtMMDMMPMWw Ww Ww WwMM:MM;MM{MMoMdBY2 |YNGIZ>6Z u uu)Z'3-,S(r'|T'|@W|>MM8@MMMM@MMAMMBMMCMMMM7EwMiMMIMM=MMc@MMoMMjMM)MMMMMMYMMvMMSMMMDMKMMFMMeMMMMEMM MMUMMmMMuMMMM%Maf[2 Q]U I>6Q*0Q*0Q*0Q*0Q*0Q*0Q*0Q*0Q*0Q*Q*Q*Q*Q*Q*Q*Q*Q*>6>6tZQ* uZ u3} unLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLߢ(aQ*0Q*0Q*0Q*0Q*0Q*0Q*0Q*0Q*0Q*t>6'3<$p=?I$?:$ ף6zm>6>6>6t>6tZ u3} unLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLzmzmzmzmzm>6nLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLnLߢ(aQ*ߢ(aQ*t>6t>6>6ߢ(anLnL>6ߢ(anLnL>6>6ߢ(aߢ(anLnL'3<$ף>I$?:$ ף.utvInteraction%Ra!~{ Xm-4lppp,,,,ka!kp,`mppppNamel: k X .mp1 mputv: Sending chat: m X G MOMMMM2M-OK]MidGameButtonr"27W]WNMMMMMM@MMOMM MMVMMsMMXMMWMMZMMMM}MM{MMzMM\MMGMMMM@MMMWcM]Reset]MidGameButtonr"37W]WdMr"dWeMM@MM]X#+ GMlMMMMfMMfMMDNxMQMb$i'pamWl5MMMM{@MM|M-OK]MidGameButton7WlWtMWuMMMMMMMwMMx& +#xw-[' GMysTgc,Zwg*wg*gyspUTVSAY utv: Current player has no hud, closing chat'' GMrMMgMMrH^BX/a0 rRQwr*zrr0rR10* GMzg@%#W -['R9:g, :{kpkPp9:g'( GMQW6@-V'/a0 WwW*Z-V-V(bWzW<-V'10<b GMCK@$utv: Entering secondary state GMMM~h>5E9:t&-[(79:h,'I9:t&(9:h, w{ X'9:h, 9:h,%}%}&'( GMhD?#?=&+~? n?%+639Mn??+&639N?6 3.9?,(83%#+&+%+#6 36 +883#% GMHOc\8( 6 (8.(8(Y((%%%%&66666666'66666666'%6 6 6 666666&6 6 6 666666,6 6 6 666666,6 6 6 9?669?669?66,6 6 6 9?669?669?66 GMFMMMMSM7MI_%U7WF(S%HS_F>FF%SF8 GMIJ0' 80-,w*9:9:$utv: Changing controller role to ROLE_Authority$-h?Q-h-DQw*wU.QwU* U -h -Dsearch/a9 mm10O-!-i-i-!-!AB-!K6Y.6N6Y|Waiting on movement interpolation data6y%6y&6y,6;9D,6;9D,6;%-Za yr*r-(3- - } %r*ra+; &a+; , o-1-~ի09?99 -ի09?99 W-Aի09?99 #?-@ի09?99 #?-Bի09?#?-Cի09?#?-(-w a lw*a - -UH<wU*wU UU A| GMLAr&HE-pAEAa!Q-p'3 GMMMNG%IF9?GR9?:GRFR GMGMMPv#Gv6QI6NL6YLLI]LI2.ILIK6iG26bG29?&26fG229?&26eGK GMxY&j YZ%x% %??x%?? & & W9?,&%o;&%W, , >,& ,&W, , >,, ,,, ף;, W9?,,, ,&, ,,,,9?, ,,,&%,j, , &%,&&  `, &&,],  , , , ,  9?,, , ,  ,  ?, &9?, , % ?, , ,,  ,, ,  ,  >, ,9?, , ,, &%,,, &%,&&  &, &&,, ,,,, 9?,,,/ uu10/ r9r10., 9Sc., _.,9S\.,9SE.,U.,T.,P.,9S-.,9SN.,S.,-9-4ED  GM@q  @6Q9C9?%C[Pv6i v6m P6E 6i O9?%6i 6i SvO[6L C[6b Pv6f 6L 6E 6b 6e @6b 6L 6E 6i @6Q 6N[6YC-6oC9?% O9?% GMf@=@GMIS[Xgd8[[.^?}M^.V} GMTyMOVMyppp2 9XM  9YM y GMUw@cgd-pwdwa!Q-p'3utv: Send gameend to server GMK9"utv: Entering primary state GMhfk/$putv: Got utvsay: f GM@MMOl Rfc,Cwf*wf*f;(-l GM^oF~ o%FI9JoF&I x,putv: Got init 9{ r* I &-4 . ,# , D , E  GM`@9<G~@ h@%G=9JhE=&q!Lq!@@G&=9J@=,-,'-h'-i(-!(-D'-1'9=,-h'-D(-,(9 =,-D'-,'-i(-!(-1'9)=&-D'-,(9-D(-,( GM\c[Prc, 9-4.,-*rc, Resetting server*F' GMg^s -! ArA^r^Au,wA^A ^-Z'u-Z(u%wA^A ^ GMMM_c5 GMMMb*)_., \9J.,E9J.,U.,T.,P.,-9D9L.,N9J.,S.,p5 serveraddress=_pp serverport=9S\pp listenport=9SEpp joinpassword=Upp primarypassword=Tpp vippassword=Spp normalpassword=Ppp delay=9S-pp maxclients=9SN9  GMMMdaF!a6 9 a GMieV; G M@MMIh G MnqXV?\utv: PostBeginPlay in replicationqu, -'s G Mmk*1k& GM MMnBN`g4BJj'A9:J9:$v9:B9:$-!-D-!(-1' Free flight mode - -( -'t-1 --1(9z<6 -+ Following player in 1st person view -(( Following player with behindview -'t0-,-!(-1' Free flight modet -(-!' Following primary'9:B9:$-!6-1(' pKEYNAME 9RB pKEYBINDING _| Talk%"p >.utvInputPage'| MoveForward-~'| MoveBackward-'| StrafeLeft-@'| StrafeRight-A' | Jump-B'A| Duck-C'9:J9:$ pKEYNAME 9RB pKEYBINDING | MoveForward-~(| MoveBackward-(,| StrafeLeft-@(T| StrafeRight-A(u| Jump-B(| Duck-C(( GMH!XzP Opening menu'"p >.utvWatcherMenu GMvk*GM_^& ^\%_%Y%??_%??Y& &Ym9?,&% #<&%m, ,&,&'9?, ,&, ,&,, ',&.,!/Locked during free flight.,/Completely locked.,/Completely free.,]'.,` }, ,,,,'9?, ,,, ,,,,' ,,, ,&9?,,, 9?,',??,, ,,,,' ,,, , ,, ,,,9?,,  , ,, ,' , ,,  ,  , , , ,,9?,ED / {K{10/ D:)D10.,p9W!{9SK-.,p9W!}9SKc.,-)-!., -)-4[)-D.,See all mode disabled,,)-,.,See all mode without primary client,, )-h0 )-D.,Watching server side demob .,Watching client side demo,, GMr`N1`% GMHt!C[E% Opening menu'"p >.utvPrimaryMenu# Waiting for info from proxy GM]MMCN1'4CBV'9:B9:$]pKEYNAME 9RC]pKEYBINDING ]|]TeamTalk%"p >.utvInputPage' GM{qQ*GMpR ROc,CwO*wO*O;(-R GM|E'h~ %_&~ %\9J&~ %E9J&~ %U&~ %T&~ %S&~ %P&~ %-9D9L&~ %N9J& GMH#D5~# Q#%5c9JQ##5&5~# Q#%5-9JQ##5&`9J#ppppputv: Got status - 9Sc - 9S- - 9S` GMzPtrP,M)-,)-!.,-)-4., -G' GMCQ.   Q GMMM}A5 GMMM@G8 }.,_  GMQHnbr*putv: Interaction setting playercontroller to 9VH$-zH`%0HppThe UTV Proxy will restart in about 9S` seconds{H0HHCH G]UTV2004 Primary settingsS*M]Total clients*MUT2MidGameFontMMServer address*MUT2MidGameFontM] Server port*MUT2MidGameFontM] Listen port*MUT2MidGameFontM]Join password*MUT2MidGameFontM]Primary password*MUT2MidGameFontM] VIP password*MUT2MidGameFontM]Normal password*MUT2MidGameFontM]Delay*MUT2MidGameFontM] Max clients*MUT2MidGameFontMMM-tc*MUT2MidGameFontMMROC GMS*0* J9D**aFJO* *7?*J*>* aF' GMT1  J9DeT{o9?,$lp$lq2$s'eT$bk?{9?,j?e9?,=9=,9=,9=,9=,0kjB {eo9?,joko$lp$lq2$s(kjT$ GM"2[d"aA6JVJ̌?""a 6JE6̌?//<1>ppp,,,,//<2>p,`//<3>p,@@:}/%x~/ xR//=R/%x//x&"aR6J:6U"XV:-X"7"W:"X" aR(:6EXV GMMM~MMVMMY]4<'-z9:z9:$-z''~9:z9:$~pKEYNAME 9R]~|~F8!'( GMZaA5oHa GM\bR--bq!q! G]Show UTV Chat*MUT2MidGameFontMMz't/utv: Removed interactionl GMpMMeM//----------------------------------------------------------- // //----------------------------------------------------------- class utvWatcherMenu extends GUIPage; var float BoxHeight; var float BoxWidth; var float MarginWidth; var float ItemHeight; var float ItemGap; var utvInteraction ui; var utvReplication ur; function InitComponent(GUIController MyController, GUIComponent MyOwner) { local utvInteraction tui; local utvReplication tur; super.InitComponent(MyController, MyOwner); //The window Controls[0].WinHeight = BoxHeight; Controls[0].WinWidth = BoxWidth; Controls[0].WinTop = 0.5 - (0.5 * BoxHeight); Controls[0].WinLeft = 0.5 - (0.5 * BoxWidth); //Headline Controls[1].WinHeight = ItemHeight; Controls[1].WinWidth = BoxWidth - (MarginWidth * 2); Controls[1].WinTop = Controls[0].WinTop + 0.01; //+ ItemGap * 2; Controls[1].WinLeft = Controls[0].WinLeft + MarginWidth; //label Controls[2].WinHeight = ItemHeight; Controls[2].WinWidth = Controls[1].WinWidth; Controls[2].WinTop = Controls[1].WinTop + ItemGap * 2 + ItemHeight; Controls[2].WinLeft = Controls[1].WinLeft; //combobox Controls[3].WinHeight = ItemHeight; Controls[3].WinWidth = Controls[1].WinWidth; Controls[3].WinTop = Controls[2].WinTop + ItemHeight - ItemGap; Controls[3].WinLeft = Controls[1].WinLeft; moComboBox (Controls[3]).AddItem ("Locked during free flight"); moComboBox (Controls[3]).AddItem ("Completely locked"); moComboBox (Controls[3]).AddItem ("Completely free"); moComboBox (Controls[3]).ReadOnly (true); moComboBox (Controls[3]).SetIndex (class'utvReplication'.default.ViewMode); //label delay Controls[4].WinHeight = ItemHeight; Controls[4].WinWidth = Controls[3].WinWidth; Controls[4].WinTop = Controls[3].WinTop + ItemGap * 2 + ItemHeight; Controls[4].WinLeft = Controls[3].WinLeft; //label clients Controls[5].WinHeight = ItemHeight; Controls[5].WinWidth = Controls[4].WinWidth; Controls[5].WinTop = Controls[4].WinTop + ItemGap + ItemHeight; Controls[5].WinLeft = Controls[4].WinLeft; //ok button Controls[6].WinHeight = ItemHeight; Controls[6].WinWidth = Controls[1].WinWidth / 2; Controls[6].WinTop = Controls[5].WinTop + ItemHeight * 4 + ItemGap; Controls[6].WinLeft = 0.5 - (0.5 * Controls[6].WinWidth); //label follow primary Controls[7].WinHeight = ItemHeight; Controls[7].WinWidth = Controls[5].WinWidth; Controls[7].WinTop = Controls[5].WinTop + ItemGap + ItemHeight; Controls[7].WinLeft = Controls[5].WinLeft; //button follow primary Controls[8].WinHeight = ItemHeight; Controls[8].WinWidth = ItemHeight; Controls[8].WinTop = Controls[5].WinTop + ItemHeight; Controls[8].WinLeft = Controls[5].WinLeft+Controls[5].WinWidth/2; //label show utv chat Controls[9].WinHeight = ItemHeight; Controls[9].WinWidth = Controls[7].WinWidth; Controls[9].WinTop = Controls[7].WinTop + ItemGap + ItemHeight; Controls[9].WinLeft = Controls[7].WinLeft; //button show utv chat Controls[10].WinHeight = ItemHeight; Controls[10].WinWidth = ItemHeight; Controls[10].WinTop = Controls[7].WinTop + ItemHeight; Controls[10].WinLeft = Controls[7].WinLeft+Controls[7].WinWidth/2; OnClose = InternalOnClose; foreach AllObjects (class'utvInteraction', tui) { ui = tui; } foreach AllObjects (class'utvReplication', tur) { ur = tur; } GUILabel(Controls[4]).Caption='Delay ' $ string(ui.Delay); GUILabel(Controls[5]).Caption='Total clients ' $ string(ui.Clients); GUICheckBoxButton(Controls[8]).bChecked=ur.FollowPrimary; GUICheckBoxButton(Controls[10]).bChecked=!ur.MuteChat; if(!ur.SeeAll){ GUILabel(Controls[7]).Caption="See all mode disabled"; Controls[8].WinHeight = 0; Controls[8].WinWidth = 0; } if(ur.NoPrimary){ GUILabel(Controls[7]).Caption="See all mode without primary client"; Controls[8].WinHeight = 0; Controls[8].WinWidth = 0; } if (ur.IsDemo) { if (ur.SeeAll) GUILabel(Controls[7]).Caption="Watching server side demo"; else GUILabel(Controls[7]).Caption="Watching client side demo"; Controls[8].WinHeight = 0; Controls[8].WinWidth = 0; } } function InternalOnClose(optional bool bCanceled) { local PlayerController pc; pc = PlayerOwner(); if(pc != None && pc.Level.Pauser != None) pc.SetPause(false); Super.OnClose(bCanceled); } function bool InternalOnClick(GUIComponent Sender) { if (Sender == Controls[6]) //Ok button { if(!ur.NoPrimary) { ur.FollowPrimary=GUICheckBoxButton(Controls[8]).bChecked; } ur.MuteChat=!GUICheckBoxButton(Controls[10]).bChecked; SaveDefaults (); Controller.CloseMenu (); } return true; } function InternalOnChange(GUIComponent Sender) { } function SaveDefaults () { class 'utvReplication'.default.ViewMode = moComboBox(Controls[3]).GetIndex (); class 'utvReplication'.static.StaticSaveConfig (); } ]UTV2004 Watcher settingsS*MMf//----------------------------------------------------------- // //----------------------------------------------------------- class utvReplication extends Actor; //A constant of sorts var config string UtvPackage; //Configuration things var config int ViewMode; //0 = locked on freeflight, 1 = free, 2 = locked struct Movement { var float time; var vector loc; var rotator rot; }; var Movement moves[1000]; //Around 10 should be enough.. :) var int movehead; var int movetail; var bool viewingSelf; var int lastViewedSelf; var bool SeeAll; var bool NoPrimary; var bool FollowPrimary; var bool OldFollow; var bool IsDemo; var bool MuteChat; var string LastTargetName; var bool FreeFlight; var Vector LocalPos; var bool LocalPosSet; var bool moveForward,moveBackward,moveLeft,moveRight,moveUp,moveDown; //shouldnt be needed but playercontroller aForward etc always 0 ? struct TInterpol { var float k1; var float k2; //slope var float y1; var float y2; //cur & next value var float g1; var float c1; var float dy; var float h1; }; struct TPlayerInterpol { var float x1; //cur & next timevalue var float x2; var bool noinfo; //if true, do linear extrapolation instead var TInterpol cords[7]; //x, y, z, rot.pitch, rot.yaw, viewrot.pitch, viewrot.yaw }; var TPlayerInterpol interpol; var config string ChatString; var config bool wantBehindview; replication { //Things the server calls on us reliable if (Role == ROLE_Authority) GetFromServer, GetTarget; //Things we can call on the server reliable if (Role2){ if (p.ViewTarget != t) p.SetViewTarget (t); viewingSelf=true; }else{ lastViewedSelf++; } }else{ viewingSelf=false; lastViewedSelf=0; if (p.ViewTarget != t) p.SetViewTarget (t); } } simulated function GotInitMsg (string s) { local string tmps; local int i,a; //Parse out the values i = InStr (s, " "); tmps = Mid (s, 0, i); a = int (tmps); if (a == 1) GotoState ('Primary'); else GotoState ('Secondary'); s = Mid (s, i + 1); a = int (s); if (a == 3) { //Looking at a server demo NoPrimary=true; IsDemo=true; OldFollow=false; FollowPrimary=false; SeeAll=true; FreeFlight=true; } else if (a == 4) { //Client demo IsDemo=true; SeeAll=false; NoPrimary=false; } else if (a == 2){ //Noprimary and seeall SeeAll=true; NoPrimary=true; OldFollow=false; FollowPrimary=false; FreeFlight=true; } else if (a == 1){ //Seeall with primary SeeAll=true; NoPrimary=false; }else{ //Regular primary SeeAll=false; NoPrimary=false; } } simulated function GetFromServer (string s) { local int i, cmd; local string tmp; //Find the command number i = InStr (s, " "); tmp = Mid (s, 0, i); cmd = int (tmp); s = Mid (s, i + 1); switch (cmd) { case 8: Log("utv: Got init " $ s); GotInitMsg(s); break; } //No need to check the following if we are not initialized yet if (uti == none) return; switch (cmd) { case 1: if (!MuteChat) uti.ShowChat (s); break; case 2: ReceiveMovement (s); break; case 4: uti.GotStatus (s); break; case 7: uti.GotBigStatus (s); break; } } //Stub function simulated function ReceiveMovement (string s) { } exec function utvsay (string s) { Log ("utv: Got utvsay: " $ s); } ///////////////////////////////////////////////// ///////////////////////////////////////////////// state Primary { simulated function BeginState () { log ("utv: Entering primary state"); } simulated function CheckGameEnd () { local PlayerController p; if (!wasEnded) { p = Level.GetLocalPlayerController(); if (p.IsInState('GameEnded')) { wasEnded = true; SendToServer ("3"); Log ("utv: Send gameend to server"); } } } simulated function SendInterpolValues () { local string s; local playercontroller p; p = level.GetLocalPlayerController (); s = "2 " /* $ currentTime $ " " */ $ p.Location $ " " $ p.Rotation; SendToServer (s); } simulated function Tick (float delta) { local PlayerController p; global.tick (delta); //Send out values for interpolation if (currentTime - LastSend > 0.5) { p = level.GetLocalPlayerController (); SendInterpolValues (); LastSend = currentTime; SendTarget (p.ViewTarget); } //Check if the game has started CheckGameEnd (); } } state Secondary { //Either x2 or both x2 and x3 can be zero, and indicates no known info at that time simulated function CalculateInterpol (int cord, float x1, float x2, float x3, float y1, float y2, float y3) { local TInterpol p; //Retrieve last one p = interpol.cords[cord]; //Just stop if we don't even have two points if (x2 == 0) { x2 = x1; y2 = y1; } p.y1 = y1; p.y2 = y2; //Calculate start and endslope p.k1 = p.k2; //If no info at x3, make the derivative zero if (x3 == 0) p.k2 = 0; else p.k2 = (y3 - y1) / (x3 - x1); p.h1 = x2 - x1; p.dy = y2 - y1; p.g1 = p.h1 * p.k1 - p.dy; p.c1 = 2 * p.dy - p.h1 * (p.k1 + p.k2); interpol.cords[cord] = p; //doh interpol.x1 = x1; interpol.x2 = x2; interpol.noinfo = ((x2 == 0) || (x3 == 0)); } //Get position according to timestamp variable simulated function float GetInterpolatedPos (int cord) { local TInterpol p; local float h1; local float t; local float x1; local float x2; local float res; p = interpol.cords [cord]; x1 = interpol.x1; x2 = interpol.x2; h1 = x2 - x1; //assert: x1 < timestamp < x2 if (x2 == x1) return 0; t = (currentTime - x1) / (x2 - x1); res = p.y1 + t * (p.dy) + t * (1 - t) * p.g1 + t*t * (1 - t) * p.c1; return res; } //Makes sure the absolute differences between pitch & yaw isn't more than 32k (since it's mod 65k anyway) simulated function FixRotDist (out int t1, out int t2, optional bool down) { if (Abs (t1 - t2) > 32768) { if (t1 > 32768) t2 += 65536; else t2 -= 65536; } } simulated function CheckGameEnd () { local PlayerController p; if (!wasEnded) { p = Level.GetLocalPlayerController(); if (p.IsInState('GameEnded')) { wasEnded = true; SendToServer ("3"); } } } simulated function Tick (float delta) { local vector pos; local rotator rot; local string WarnMsg; local PlayerController p, it; local Pawn target; global.tick (delta); if(NoPrimary) CheckGameEnd(); p = Level.GetLocalPlayerController (); //This saves bandwidth for the server because the client stops //sending ServerMove all the time if ((p != none) && (p.Role < ROLE_Authority)) { log("utv: Changing controller role to ROLE_Authority"); p.Role = ROLE_Authority; } //If watching a demo, do dilation adjustment for smoothness if ((IsDemo) && (Level.TimeDilation > 1.0)) { //Log("utv: Setting timedilation to 1.0"); //Level.TimeDilation = 1.0; } //When watching a server demo, the view rotation is not updated correctly if ((IsDemo) && (SeeAll)) { if ((p.ViewTarget != none) && (p.ViewTarget != p)) { target = Pawn(p.ViewTarget); if (target.Controller != none) { p.TargetViewRotation = target.Controller.Rotation; } } } //A clientside demo needs to be adjusted as well if ((IsDemo) && (!SeeAll)) { Log("search"); foreach dynamicactors(class'PlayerController', it) { it.SetViewTarget(p.Pawn); } } ProcessMovement (); //Server will filter packets for us if we don't follow primary, so check if it has changed if (FollowPrimary != OldFollow) { OldFollow = FollowPrimary; if (FollowPrimary) SendToServer("A"); else SendToServer("B"); } if(FollowPrimary){ //Do we have interpolation data to act on? if ((interpol.x2 < currentTime) || (interpol.x1 == interpol.x2)) { WarnMsg = "Waiting on movement interpolation data"; } else { //Calculate interpolated position and rotation pos.x = GetInterpolatedPos (0); pos.y = GetInterpolatedPos (1); pos.z = GetInterpolatedPos (2); rot.pitch = GetInterpolatedPos (3); rot.yaw = GetInterpolatedPos (4); rot.roll = 0; //Always set the location if(viewingSelf) p.SetLocation (pos); //Force behindview depending on user pref when speccing something if ((p.viewtarget == none) || (p.ViewTarget == p)) { p.bBehindView = false; } else { p.bBehindView = class'utvReplication'.default.wantBehindview; } //Now determine what to do with the rotation switch (class'utvReplication'.default.ViewMode) { case 0: if ((p.ViewTarget == none) || (p.ViewTarget == p)) { p.SetRotation (rot); } break; case 1: p.SetRotation (rot); break; case 2: break; } } } else { //not following primary if(FreeFlight){ //LocalPos+=p.aForward*delta*0.15*Vector(p.rotation); //LocalPos-=p.aStrafe*delta*0.15*Vector(p.rotation) Cross Vect(0,0,1); if(MoveForward) LocalPos+=delta*1000*Vector(p.rotation); if(MoveBackward) LocalPos-=delta*1000*Vector(p.rotation); if(MoveRight) LocalPos-=delta*1000*Vector(p.rotation) Cross Vect(0,0,1); if(MoveLeft) LocalPos+=delta*1000*Vector(p.rotation) Cross Vect(0,0,1); if(MoveUp) LocalPos+=delta*1000*Vect(0,0,1); if(MoveDown) LocalPos-=delta*1000*Vect(0,0,1); //p.ClientMessage ("Move " $ MoveForward $ " - " $ LocalPos $ " - " $ delta); p.bBehindView=false; if (p.ViewTarget != p) p.SetViewTarget(p); p.SetLocation(LocalPos); if(p.pawn!=none){ p.Pawn.SetLocation(LocalPos); } } else { p.bBehindView = class'utvReplication'.default.wantBehindview; target=GetPawnFromName(LastTargetName); if(target!=none){ if (p.ViewTarget != target) p.SetViewTarget(target); p.TargetEyeHeight = target.BaseEyeHeight; } } } uti.SetWarning (WarnMsg); } simulated function Movement GetNextMovement (int num) { local int i; local int index; index = movetail; for (i = 0; i < num; ++i) { index++; if (index == 1000) index = 0; } return moves [index]; } simulated function ProcessMovement () { local Movement m1, m2, m3; if (movetail == movehead) return; if (moves[movetail].time < currentTime) { m1 = moves[movetail]; //log ("Processing move to: " $ tmp.loc $ " - " $ tmp.rot); movetail++; if (movetail == 1000) movetail = 0; //Calculate new interpolation values m2 = GetNextMovement (0); m3 = GetNextMovement (1); //Log ("processing moves from: " $ m1.time $ " - " $ m2.time $ " - " $ m3.time); FixRotDist (m1.rot.pitch, m2.rot.pitch); FixRotDist (m2.rot.pitch, m3.rot.pitch, true); FixRotDist (m1.rot.yaw, m2.rot.yaw); FixRotDist (m2.rot.yaw, m3.rot.yaw, true); //Coordinates CalculateInterpol (0, m1.time, m2.time, m3.time, m1.loc.x, m2.loc.x, m3.loc.x); CalculateInterpol (1, m1.time, m2.time, m3.time, m1.loc.y, m2.loc.y, m3.loc.y); CalculateInterpol (2, m1.time, m2.time, m3.time, m1.loc.z, m2.loc.z, m3.loc.z); //Rotation CalculateInterpol (3, m1.time, m2.time, m3.time, m1.rot.pitch, m2.rot.pitch, m3.rot.pitch); CalculateInterpol (4, m1.time, m2.time, m3.time, m1.rot.yaw, m2.rot.yaw, m3.rot.yaw); } } simulated function ReceiveMovement (string s) { local Movement tmp; local string tmps; local int i; //Parse out the values i = InStr (s, " "); tmps = Mid (s, 0, i); tmp.loc = vector (tmps); s = Mid (s, i + 1); tmp.rot = rotator (s); //Log ("Got movement: " $ tmp.time $ " - " $ tmp.loc $ " - " $ tmp.rot); //test tmp.time = currentTime + 5; //And insert it into the queue if (movehead == movetail) { moves[movehead] = tmp; movehead++; if (movehead == 1000) movehead = 0; } else { //Make sure we only insert newer things i = movehead - 1; if (i < 0) i = 999; if (tmp.time > moves[i].time) { moves[movehead] = tmp; movehead++; if (movehead == 1000) movehead = 0; } } } simulated function BeginState () { log ("utv: Entering secondary state"); } } simulated function GetNextPlayer() { local Pawn tempPawn; local string targetName; local bool getNext; getNext=true; foreach AllActors(class'Pawn',tempPawn){ if(tempPawn.PlayerReplicationInfo!=none){ if(GetNext){ GetNext=false; TargetName=tempPawn.PlayerReplicationInfo.PlayerName; } if(tempPawn.PlayerReplicationInfo.PlayerName==LastTargetName){ GetNext=true; } } } LastTargetName=TargetName; } simulated function Pawn GetPawnFromName(string name) { local Pawn tempPawn; foreach AllActors(class'Pawn',tempPawn){ if(tempPawn.PlayerReplicationInfo!=none && tempPawn.PlayerReplicationInfo.PlayerName==name){ return tempPawn; break; } } return none; } MTf//----------------------------------------------------------- // //----------------------------------------------------------- class utvPrimaryMenu extends ut2k3guIPage; var float BoxHeight; var float BoxWidth; var float MarginWidth; var float ItemHeight; var float ItemGap; var utvInteraction ui; var utvReplication ur; function InitComponent(GUIController MyController, GUIComponent MyOwner) { local int a, prev, mark; local utvInteraction tui; local utvReplication tur; super.InitComponent(MyController, MyOwner); //The window Controls[0].WinHeight = BoxHeight; Controls[0].WinWidth = BoxWidth; Controls[0].WinTop = 0.5 - (0.5 * BoxHeight); Controls[0].WinLeft = 0.5 - (0.5 * BoxWidth); //Headline Controls[1].WinHeight = ItemHeight; Controls[1].WinWidth = BoxWidth - (MarginWidth * 2); Controls[1].WinTop = Controls[0].WinTop + 0.002; // + ItemGap * 5; Controls[1].WinLeft = Controls[0].WinLeft + MarginWidth; //label total clients Controls[2].WinHeight = ItemHeight; Controls[2].WinWidth = BoxWidth*0.4; Controls[2].WinTop = Controls[1].WinTop + ItemGap + ItemHeight; Controls[2].WinLeft = Controls[1].WinLeft + MarginWidth; ///mmuuu //label mute Controls[24].WinHeight = ItemHeight; Controls[24].WinWidth = BoxWidth*0.4; Controls[24].WinTop = Controls[2].WinTop + ItemGap + ItemHeight; Controls[24].WinLeft = Controls[2].WinLeft; //divider Controls[26].WinHeight = 0.005; Controls[26].WinWidth = BoxWidth - (MarginWidth * 2); Controls[26].WinTop = Controls[24].WinTop + ItemGap + ItemHeight; Controls[26].WinLeft = Controls[1].WinLeft; //label serveraddress Controls[3].WinHeight = ItemHeight; Controls[3].WinWidth = Controls[24].WinWidth; Controls[3].WinTop = Controls[24].WinTop + ItemGap * 3 + ItemHeight; Controls[3].WinLeft = Controls[24].WinLeft; //rest of the labels prev=3; mark=0; for(a=4;a<11;++a){ if ((a == 8) && (mark == 0)) { //would renumbering have been easier? :) a = 22; mark = 1; } Controls[a].WinHeight = ItemHeight; Controls[a].WinWidth = Controls[prev].WinWidth; Controls[a].WinTop = Controls[prev].WinTop + ItemGap + ItemHeight; Controls[a].WinLeft = Controls[prev].WinLeft; prev=a; if ((a == 22) && (mark == 1)) a = 7; } //ok button Controls[11].WinHeight = ItemHeight; Controls[11].WinWidth = Controls[10].WinWidth; Controls[11].WinTop = Controls[10].WinTop + ItemHeight * 2; Controls[11].WinLeft = Controls[10].WinLeft; //textbox total clients Controls[12].WinHeight = ItemHeight; Controls[12].WinWidth = BoxWidth*0.5; Controls[12].WinTop = Controls[1].WinTop + ItemGap * 2 + ItemHeight; Controls[12].WinLeft = Controls[0].WinLeft+BoxWidth*0.5; //muu //checkbox mute chat Controls[25].WinHeight = ItemHeight; Controls[25].WinWidth = ItemHeight; Controls[25].WinTop = Controls[12].WinTop + ItemHeight; Controls[25].WinLeft = Controls[12].WinLeft; //textbox serveraddress Controls[13].WinHeight = ItemHeight; Controls[13].WinWidth = BoxWidth*0.4; Controls[13].WinTop = Controls[25].WinTop + ItemGap * 3 + ItemHeight; Controls[13].WinLeft = Controls[25].WinLeft; //rest of the textboxes prev=13; mark=0; for(a=14;a<21;++a){ if ((a == 18) && (mark == 0)) { a = 23; mark = 1; } Controls[a].WinHeight = ItemHeight; Controls[a].WinWidth = Controls[prev].WinWidth; Controls[a].WinTop = Controls[prev].WinTop + ItemGap + ItemHeight; Controls[a].WinLeft = Controls[prev].WinLeft; Controls[a].TabOrder = Controls[prev].TabOrder + 1; prev=a; if ((a == 23) && (mark == 1)) a = 17; } //reset button Controls[21].WinHeight = ItemHeight; Controls[21].WinWidth = Controls[20].WinWidth; Controls[21].WinTop = Controls[20].WinTop + ItemHeight * 2; Controls[21].WinLeft = Controls[20].WinLeft; foreach AllObjects (class'utvInteraction', tui) { ui = tui; } foreach AllObjects (class'utvReplication', tur) { ur = tur; } GUILabel(Controls[12]).Caption=string(ui.Clients); GUIEditBox(Controls[13]).TextStr=ui.ServerAddress; GUIEditBox(Controls[14]).TextStr=string(ui.ServerPort); GUIEditBox(Controls[15]).TextStr=string(ui.ListenPort); GUIEditBox(Controls[16]).TextStr=ui.JoinPassword; GUIEditBox(Controls[17]).TextStr=ui.PrimaryPassword; GUIEditBox(Controls[18]).TextStr=ui.NormalPassword; GUIEditBox(Controls[19]).TextStr=string(ui.Delay); GUIEditBox(Controls[20]).TextStr=string(ui.MaxClients); GUIEditBox(Controls[23]).TextStr=ui.VipPassword; GUICheckBoxButton(Controls[25]).bChecked=!ur.MuteChat; OnClose = InternalOnClose; RemapComponents(); } function InternalOnClose(optional bool bCanceled) { local PlayerController pc; pc = PlayerOwner(); if(pc != None && pc.Level.Pauser != None) pc.SetPause(false); Super.OnClose(bCanceled); } function bool InternalOnClick(GUIComponent Sender) { if (Sender == Controls[11]) //Ok button { ur.MuteChat=!GUICheckBoxButton(Controls[25]).bChecked; SendChanges (); Controller.CloseMenu (); } if (Sender == Controls[21]) //Reset button { ui.p.ClientMessage ("Resetting server"); SendChanges (); ResetServer (); Controller.CloseMenu (); } return true; } function InternalOnChange(GUIComponent Sender) { } function SendChanges () { local string s; ui.ServerAddress=GUIEditBox(Controls[13]).TextStr; ui.ServerPort=int(GUIEditBox(Controls[14]).TextStr); ui.ListenPort=int(GUIEditBox(Controls[15]).TextStr); ui.JoinPassword=GUIEditBox(Controls[16]).TextStr; ui.PrimaryPassword=GUIEditBox(Controls[17]).TextStr; ui.NormalPassword=GUIEditBox(Controls[18]).TextStr; ui.Delay=float(GUIEditBox(Controls[19]).TextStr); ui.MaxClients=int(GUIEditBox(Controls[20]).TextStr); ui.VipPassword=GUIEditBox(Controls[23]).TextStr; s="5 serveraddress=" $ ui.ServerAddress; s=s $ " serverport=" $ ui.ServerPort; s=s $ " listenport=" $ ui.ListenPort; s=s $ " joinpassword=" $ ui.JoinPassword; s=s $ " primarypassword=" $ ui.PrimaryPassword; s=s $ " vippassword=" $ ui.VipPassword; s=s $ " normalpassword=" $ ui.NormalPassword; s=s $ " delay=" $ ui.Delay; s=s $ " maxclients=" $ ui.maxclients; ur.SendToServer(s); } function ResetServer () { local string s; s="6 "; ur.SendToServer(s); } /* Begin Object Class=GUIButton name=Background bAcceptsInput=false bNeverFocus=true StyleName="SquareBar" End Object */ //display95 99 Mn//----------------------------------------------------------- // //----------------------------------------------------------- class utvInteraction extends Interaction; //P should always be set.. up is not set for the primary spectator var PlayerController p; var utvReplication UtvRep; //var utvPlayer up; var bool shownWelcome; var float WelcomeWidth; var float WelcomeMargin; var float WelcomePos; var int WelcomeStart[2]; var int WelcomeEnd[2]; var string WelcomeMsg[12]; var string WarnMsg; var int Clients; var int Delay; var int RestartIn; //primary only var string ServerAddress; var int ServerPort; var int ListenPort; var string JoinPassword; var string PrimaryPassword; var string VipPassword; var string NormalPassword; //var float Delay; var int MaxClients; //Remove ourselves if the level changes event NotifyLevelChange() { Log ("utv: Removed interaction"); Master.RemoveInteraction (self); } simulated function SetState (bool primary) { if (primary) GotoState ('Primary'); else GotoState ('Secondary'); } simulated function SetWarning (string msg) { WarnMsg = msg; } function bool globalKeyEvent( out EInputKey Key, out EInputAction Action, FLOAT Delta ) { local string tmp; if ((!shownWelcome) && (Action == IST_Press)) { shownWelcome = true; return true; } //Is it the key that would invoke say? if (Action == IST_Press) { tmp = Viewportowner.Actor.ConsoleCommand ("KEYNAME " $ key); if (tmp ~= "F8") { ShowMenu (); return true; } } return false; } //stub, overriden in states function DrawWelcome (Canvas canvas) { } function DrawTextBox (Canvas canvas, string text, bool sizing, float X, out float Y, float XW) { local float LineSpace; local float WordSpace; local string cur; local float xl, yl; local int i; local float curx; Canvas.TextSize("A", XL, YL); LineSpace = (YL * 1.1) / Canvas.ClipY; Canvas.TextSize(" ", XL, YL); WordSpace = XL * 1.1; //Replace color tags with the codes that DrawText recognizes text = Repl(text, "<1>", chr(27) $ chr(255) $ chr(255) $ chr(255)); text = Repl(text, "<2>", chr(27) $ "`"); text = Repl(text, "<3>", chr(27) $ "@@"); curx = 0; while (len (text) > 0) { i = InStr (text, " "); if (i == -1) { cur = text; text = ""; } else { cur = Mid (text, 0, i); text = Mid (text, i + 1); } Canvas.TextSize (cur, xl, yl); if (curx + xl > xw * Canvas.ClipX) { Y+=LineSpace; Curx = 0; } if (!sizing) { Canvas.SetPos ((Canvas.ClipX * x) + curx, Canvas.ClipY * y); Canvas.DrawText (cur, false); } curx += xl + wordspace; } Y+=LineSpace; } function DrawWelcomeText (Canvas canvas, int index) { local float x, y, xw, yw; local int i; Canvas.Font = class'UT2MidGameFont'.static.GetMidGameFont(Canvas.ClipX); // Update which font to use. yw = 0; xw = WelcomeWidth - WelcomeMargin*2; //Check sizing for (i = WelcomeStart[index]; i <= WelcomeEnd[index]; ++i) { DrawTextBox (canvas, WelcomeMsg[i], true, 0, yw, xw); } //Now draw it x = (1 - WelcomeWidth) / 2; y = ((1 - yw) / 2) - 0.1; //kind of looks better with - 0.1 Canvas.SetDrawColor(255,255,255,255); Canvas.SetPos(Canvas.ClipX * x, Canvas.ClipY * y); //Canvas.DrawTileStretched(texture 'InterfaceContent.Menu.BorderBoxD', Canvas.ClipX * WelcomeWidth, Canvas.ClipY * (yw + WelcomeMargin * 2)); Canvas.DrawTileStretched(texture 'InterfaceContent.Menu.EditBoxDown', Canvas.ClipX * WelcomeWidth, Canvas.ClipY * (yw + WelcomeMargin * 2)); //cPlayerHightlight ScoreBoxB/C ButtonFocus y += WelcomeMargin; x += WelcomeMargin; for (i = WelcomeStart[index]; i <= WelcomeEnd[index]; ++i) { DrawTextBox (canvas, WelcomeMsg[i], false, x, y, xw); } } function DrawWarnMsg (Canvas canvas, string m) { local float xl, yl; //Canvas.Font = class'HUD'.static.GetMediumFontFor (Canvas); //hm funka inte.. noo Canvas.Font = class'UT2MidGameFont'.static.GetMidGameFont(Canvas.ClipX); Canvas.StrLen(m,XL,YL); Canvas.DrawColor = class'HUD'.default.GoldColor; Canvas.SetPos(0.5*(Canvas.ClipX-XL), Canvas.ClipY * 0.15); Canvas.DrawText(m, true); } function DrawStats (Canvas canvas) { /* local float xl, yl; Canvas.Font = class'HUD'.static.GetConsoleFont (Canvas); Canvas.DrawColor = class'HUD'.default.WhiteColor; Canvas.StrLen("o_O", xl, yl); Canvas.SetPos(0.01 * (Canvas.ClipX), Canvas.ClipY * 0.25); Canvas.DrawText("UTV Clients: " $ Clients, true); Canvas.SetPos(0.01 * (Canvas.ClipX), Canvas.ClipY * 0.25 + yl * 1.1); Canvas.DrawText("UTV Delay: " $ Delay $ " seconds", true); */ } function PostRender( canvas Canvas ) { if (p == none) { Log ("utv: Interaction setting playercontroller to " $ viewportowner.actor); p = ViewPortOwner.Actor; } Canvas.Style = p.ERenderStyle.STY_Alpha; if (!shownWelcome) { DrawWelcome (canvas); } //Anything important to tell the client? if (RestartIn > 0) { DrawWarnMsg (Canvas, "The UTV Proxy will restart in about " $ RestartIn $ " seconds"); } else { if (WarnMsg != "") { DrawWarnMsg (Canvas, WarnMsg); } } DrawStats (Canvas); } function ShowChat (string msg) { Viewportowner.Actor.ClientMessage (msg); } function ShowMenu () { } simulated function GotStatus (string s) { local string tmps; local int i; //Parse out the values i = InStr (s, " "); tmps = Mid (s, 0, i); clients = int (tmps); s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); delay = int (tmps); s = Mid (s, i + 1); restartin = int (s); Log ("utv: Got status - " $ clients $ " - " $ delay $ " - " $ restartin); } simulated function GotBigStatus (string s) { local string tmps; local int i; //Parse out the values i = InStr (s, " "); tmps = Mid (s, 0, i); ServerAddress = tmps; s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); ServerPort = int (tmps); s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); ListenPort = int (tmps); s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); JoinPassword = tmps; s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); PrimaryPassword = tmps; s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); VipPassword = tmps; s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); NormalPassword = tmps; s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); Delay = float (tmps); s = Mid (s, i + 1); i = InStr (s, " "); tmps = Mid (s, 0, i); MaxClients = int (tmps); s = Mid (s, i + 1); } state Primary { function bool KeyEvent( out EInputKey Key, out EInputAction Action, FLOAT Delta ) { local string tmp; if (GlobalKeyEvent (Key, Action, Delta)) return true; //Check stuff if (Action == IST_Press) { //teamsay key? tmp = Viewportowner.Actor.ConsoleCommand ("KEYNAME " $ key); tmp = Viewportowner.Actor.ConsoleCommand ("KEYBINDING " $ tmp); if (tmp ~= "TeamTalk") { p.ClientOpenMenu (class'utvReplication'.default.UtvPackage $ ".utvInputPage"); return true; } } } function ShowMenu () { if(ListenPort!=0){ //StopForceFeedback(); p.ClientMessage ("Opening menu"); p.ClientOpenMenu(class'utvReplication'.default.UtvPackage $ ".utvPrimaryMenu"); } else { p.ClientMessage ("Waiting for info from proxy"); } } function DrawWelcome (canvas canvas) { DrawWelcomeText (canvas, 0); } } state Secondary { function ShowMenu () { //StopForceFeedback(); p.ClientMessage ("Opening menu"); p.ClientOpenMenu(class'utvReplication'.default.UtvPackage $ ".utvWatcherMenu"); } function bool KeyEvent( out EInputKey Key, out EInputAction Action, FLOAT Delta ) { local string tmp; if (GlobalKeyEvent (Key, Action, Delta)) return true; //Check stuff if (Action == IST_Press) { //Right mouse pressed? if (Key == IK_RightMouse) { if(utvRep.FollowPrimary){ if(utvRep.SeeAll){ utvRep.FollowPrimary=false; utvRep.FreeFlight=true; p.ClientMessage ("Free flight mode"); } else { if (class'utvReplication'.default.wantBehindview) class'utvReplication'.default.wantBehindview = false; else class'utvReplication'.default.wantBehindview = true; } } else { if(utvRep.FreeFlight || class'utvReplication'.default.wantBehindview){ utvRep.FreeFlight=false; if(utvRep.LastTargetName=="") utvRep.GetNextPlayer(); if(class'utvReplication'.default.wantBehindview){ p.ClientMessage ("Following player in 1st person view"); class'utvReplication'.default.wantBehindview = false; } else { p.ClientMessage ("Following player with behindview"); class'utvReplication'.default.wantBehindview = true; } } else { if(utvRep.NoPrimary){ utvRep.FollowPrimary=false; utvRep.FreeFlight=true; p.ClientMessage ("Free flight mode"); } else { class'utvReplication'.default.wantBehindview = false; utvRep.FollowPrimary=true; p.ClientMessage ("Following primary"); } } } return true; } if (Key == IK_LeftMouse) { if(!utvRep.FollowPrimary){ utvRep.GetNextPlayer(); utvRep.FreeFlight=false; return true; } } //Or the say key? tmp = Viewportowner.Actor.ConsoleCommand ("KEYNAME " $ key); tmp = Viewportowner.Actor.ConsoleCommand ("KEYBINDING " $ tmp); if (tmp ~= "Talk") { p.ClientOpenMenu (class'utvReplication'.default.UtvPackage $ ".utvInputPage"); return true; } if (tmp ~= "MoveForward") { utvRep.MoveForward=true; } if (tmp ~= "MoveBackward") { utvRep.MoveBackward=true; } if (tmp ~= "StrafeLeft") { utvRep.MoveLeft=true; } if (tmp ~= "StrafeRight") { utvRep.MoveRight=true; } if (tmp ~= "Jump") { utvRep.MoveUp=true; } if (tmp ~= "Duck") { utvRep.MoveDown=true; } } if (Action == IST_Release) { tmp = Viewportowner.Actor.ConsoleCommand ("KEYNAME " $ key); tmp = Viewportowner.Actor.ConsoleCommand ("KEYBINDING " $ tmp); if (tmp ~= "MoveForward") { utvRep.MoveForward=false; } if (tmp ~= "MoveBackward") { utvRep.MoveBackward=false; } if (tmp ~= "StrafeLeft") { utvRep.MoveLeft=false; } if (tmp ~= "StrafeRight") { utvRep.MoveRight=false; } if (tmp ~= "Jump") { utvRep.MoveUp=false; } if (tmp ~= "Duck") { utvRep.MoveDown=false; } } return false; } function DrawWelcome (canvas canvas) { DrawWelcomeText (canvas, 1); } } MFollow primary*MUT2MidGameFontMMn//----------------------------------------------------------- // //----------------------------------------------------------- class utvInputPage extends ut2k3guIPage; var string TypedStr; var bool bIgnoreKeys; function InitComponent(GUIController MyController, GUIComponent MyOwner) { super.InitComponent(MyController, MyOwner); bIgnoreKeys = true; TypedStr = ""; } function bool MyOnDraw (Canvas canvas) { local PlayerController pc; pc = PlayerOwner(); if ((pc != none) && (pc.myhud != none)) { pc.myhud.DrawTypingPrompt (Canvas, "UTVSAY " $ TypedStr); } else { Log ("utv: Current player has no hud, closing chat"); Controller.CloseMenu (); return true; } return true; } function bool MyOnKeyType(out byte Key, optional string Unicode) { if (bIgnoreKeys) return true; if (Key >= 0x20) { if (Unicode != "") TypedStr = TypedStr $ Unicode; else TypedStr = TypedStr $ Chr (Key); return true; } return false; } function bool MyOnKeyEvent(out byte Key, out byte Action, float delta) { if (Action == 1) { //press bIgnoreKeys = false; } if (Key == 0x1b) { //escape Controller.CloseMenu (); return true; } else if (Action != 1) { return false; } else if (Key == 0x0d) { //enter if (TypedStr != "") { class'utvReplication'.default.ChatString = TypedStr; } Controller.CloseMenu (); return true; } else if (Key == 0x08 || Key == 0x25) { //backspace, left if (Len (TypedStr) > 0) TypedStr = Left (TypedStr, Len (TypedStr) - 1); return true; } return false; } ]Show UTV Chat*MUT2MidGameFontMMVRgGMMM4MMhMMgMMl@MM@MMUMut+Mut+MMjjsi tjrj*utv: Level.GetLocalPlayerController was false, trying alternate methodg*/a9 gutv: Found onslaught hud with alternate method10rg*utv: Alternate Onslaught node fix failed g.jqwg*utv: Preparing onslaught HUD for powerlink receptiongvg = Gr'rqVrBqUD?qqZqxqKqCqFKbKcKdquqBq\qLqqqMqKKeqHqJ}zB}qUq[q{qC}{q^qRFGFhFKFCqCqNM_MmKDBqLLqYCeF~qWq}x&KEr~q~F}xOq@qtLAFHq_qyNpFJKmKnKoq|q]q}vDFSqXxHvEBkxTrEMrEAxKxrxFFq}CfFEqFxNFgF~BnAxzxnxrxXxKMdKFBnCxyr~rOxIxGC`NXKC@KDCBFB\Qa^ZUrn;TG mUGekt;MDpRL`Ln-f|mJ7qZ;Ih$TvmDcS7sbbq|@|wOi^OlgzSCK7t[jjYyTIBX8fItuCTCR<TaSMpm~_N8]PlH{RCJMZThavjETHT {cvrQ@fOV_<MmTn{fJNbHqTF@ sNW^pltzTITW mf-uhFSUMcFrm@CCQj`TqoZ!~h_bnzK:yYyh<IwTJExSwbvq@@~Nh^hl[{jXWg4fv QDVTuc`rLLt[aiSDGyUydsaCSnRSoaSFpTe Ndnl}_K~e\t]QRkiz^ITMc Iql@cOYF^Md[r\ASPR_]n^}wK`dMsMBsPo_-|nGNNm\jkOzgIfX NhMwS@F JUTAd:sTnAIPQ_|vnz|[LJkV<eM&TtBlQZ0acQb`oIiNZ]~l^w{:rI@fNj\PkJzI|XIhMmx<GTUX|d0Iu sEmSXfb#pwS mb4|q4B0JSTBbRiq u@!"OKqRn|QKNYMY-gRqT=lb>@r:x@POMT@]4{lTo{TUJoYpi{x0pGXW0ohGx1CGY@VZdar]1zdkTzM##HM-{k+CzxIgXxgeAdP*mgAvCEY&U`{wCpRoa|&6q|ThgXOX_Hdn|@bR6ItKE}XB|>CPh#PSOfc{IXXXf%_vIuUUJ K__mXL{[&TVkj1UIfbFfM_hftGfKB{k>}MT{MMM ^Io^g9@EVEs~[XY5#g"lJ*sY'QLF8[V&S)Ty%GXll/+X-XC/N\QH/!]m1J&r{6+mH6!PX4Xh6NBwM1yMMM ^jEBHDvJ@.5=Xt5#B@leGFtn|z^*vZ-`P-MQ+zR+eS-PT0}U,mV/YW%HX+mQCXY$gC$K0`o1tO2WCCZXXiX{x4IGA+PR6{c-qzK^hir4qMx^-ir4sVr4`fIr4{i[0d|r4zT\0N1~pzoH~wLpm[{kGz |HsXsfsnt