Áƒ*žEX@Cć++* ƒďňîێI–ŤvźŒÇÄőCXNoneMutateMyLogPrePadTickFindPI BeginStateEngineSystemDone PurePkgLogBusyStart PlayerBusyCore PlayerDone PackageLogLogDate DoEndStuffPlayerRequestingTimerPackageLoggerIdentPPL ModifyPlayer PPL_PInfo PPL_MutatorPostBeginPlayMutator LevelInfoTimeGetPropertyTextPi ReturnValueS ScriptTextiC GameInfoPlayerReplicationInfoGetPlayerNetworkAddress DeltaTimeOtherResultInfotries MutateString PlayerNameGameLevelOwnerYearMonthDayHourMinuteSecond bGameEnded BaseMutator NextMutator PlayerOwnerSenderPadActorPawn PlayerPawnCountClassPackage TextBufferObject FunctionPLi2LoggedState StrPropertyDate NamePropertyMut bRunning TriesBusy CurStateObjectPropertyFloatProperty BoolProperty IntPropertyPŽ*@˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙?ş\ŽU[ĽÚ†> ŁY†> ŁY†> ŁYCeŞ:†> ŁY†> ŁY Š†@@ @‹/(˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙CeŞ:‹=$:e„Ž”„Ž”„Ž”„Ž”„Ž”„Ž”†> ŁY†> ŁY†> ŁY†> ŁY›{#Uż?ş\?ş\?ş\„Ž”ŠŮŤ?ş\?ş\?ş\?ş\ Š] LINKERS€†€@ €@"€@ €†@†-€†€–@@$ -Ý.,w*PCK Player Done! ,€!€@€@5 'm.,w*PCK Player Busy! €@•) ?"‘|€ ,PCR Žw * , ~ Ž|€  ’ &  |€ ,PCF w * , ~ |€   •  ×\/a0 0/r010a  6žÔ .&–}!p" 14=*/a0   10v! V$// =============================================================== // PurePkgLog.PPL_PInfo: put your comment here // Created by UClasses - (C) 2000-2001 by meltdown@thirdtower.com // =============================================================== class PPL_PInfo extends Info; var PPL_Mutator Mut; var bool bRunning; // True when initialized var PlayerPawn PlayerOwner; // THe playerpawn owner var int Tries, TriesBusy; // Counts the # of times we've tried this var name CurState; // The state we were in/Try to be in function Tick(float deltaTime) { if (Owner == None) { Destroy(); Disable('Tick'); } } function Start() { PlayerOwner = PlayerPawn(Owner); if (PlayerOwner == None) Destroy(); else { Enable('Tick'); CurState = 'PlayerRequesting'; GotoState('PlayerBusy'); } } function Busy() { // For debugging if (PlayerOwner != None) PlayerOwner.Mutate("PCK Player Busy!"); } function Done() { // For debugging if (PlayerOwner != None) PlayerOwner.Mutate("PCK Player Done!"); } state PlayerRequesting { function BeginState() { //Log("PlayerRequesting.BeginState"@PlayerOwner.PlayerReplicationInfo.PlayerName); bRunning = True; // PCD = Pure command, LINKERS = code, OBJ LINKERS = command to run if (PlayerOwner != None) PlayerOwner.Mutate("PCD"@Mut.Ident@"OBJ LINKERS"); SetTimer(5.0, False); // Give them 5 seconds to reply, or new try. } function Timer() { Tries++; if (Tries == 3) { if (PlayerOwner != None) PlayerOwner.Mutate("PCK Failed Packagelog!"); Destroy(); } else BeginState(); } function Busy() { GotoState('PlayerBusy'); } function Done() { GotoState('PlayerDone'); } } state PlayerBusy { function BeginState() { //Log("PlayerBusy.BeginState"@PlayerOwner.PlayerReplicationInfo.PlayerName); TriesBusy++; if (TriesBusy == 10) { if (PlayerOwner != None) PlayerOwner.Mutate("PCK Timeout Packagelog!"); Destroy(); return; } SetTimer(2.0, False); } function Timer() { GotoState(CurState); } } state PlayerDone { function BeginState() { //Log("PlayerDone.BeginState"@PlayerOwner.PlayerReplicationInfo.PlayerName); Tries = 0; TriesBusy = 0; Disable('Tick'); } } Ž7B˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙+}TZŽU[ĽÚ„Ž”CeŞ:„Ž”ŠŮŤ„Ž”ŠŮŤ Š€@€&c´WKKŤbRemValid PCK Player Forged reply! ********************************************************************Š€~:¨ ŸŤ'~ (Package –%ŤĄ, ~ ):  “  ’,Ľ‘—’}},Fpp,ç“}&ă—%€¨¨Package Count:S******************************************************************** V8// =============================================================== // PurePkgChk.PPC_Mutator: put your comment here // Created by UClasses - (C) 2000-2001 by meltdown@thirdtower.com // =============================================================== class PPL_Mutator extends Mutator; var string Ident; function PPL_PInfo FindPI(PlayerPawn P) { // Finds or creates the info associated to this player local PPL_PInfo Result; // Try to find existing: ForEach AllActors(Class'PPL_PInfo', Result) if (Result.Owner == P) return Result; // None found, so create: Result = Spawn(Class'PPL_PInfo', P); Result.Mut = Self; return Result; } function ModifyPlayer(Pawn Other) { local PlayerPawn P; local PPL_PInfo PI; P = PlayerPawn(Other); if (P != None) { PI = FindPI(P); if (!PI.bRunning) PI.Start(); } Super.ModifyPlayer(Other); } function Tick(float deltaTime) { if (Level.Game.bGameEnded) DoEndStuff(); } function DoEndStuff() { // Do an additional request for packages now! local PPL_PInfo PI; ForEach AllActors(Class'PPL_PInfo', PI) PI.Start(); Disable('Tick'); } function Mutate(string MutateString, PlayerPawn Sender) { // Wait for Pure replies here. local string s; local int i; local PPL_PInfo PI; if (Left(MutateString,4) ~= "PCR ") { if (Sender != None) { s = Mid(MutateString,4); i = InStr(s, " "); if (Left(s, i) ~= Ident) { PackageLog(Sender, Mid(s, i+1)); PI = FindPI(Sender); PI.Done(); } } } else if (Left(MutateString,4) ~= "PCF ") { if (Sender != None) { s = Mid(MutateString,4); i = InStr(s, " "); if (Left(s, i) ~= Ident) { PI = FindPI(Sender); PI.Busy(); } } } Super.Mutate(MutateString, Sender); } function PackageLog(PlayerPawn P, string PL) { // Logs all the packages to file if found. local int i, i2, c; local string s, Logged; if (!bool(P.GetPropertyText("bRemValid"))) { // Should be true, else it is forged P.Mutate("PCK Player Forged reply!"); return; } MyLog("********************************************************************"); s = P.GetPlayerNetworkAddress(); s = Left(s,InStr(s,":")); // Remove the :port part of the ip MyLog(P.PlayerReplicationInfo.PlayerName@s); while (True) { i = InStr(PL, "(Package "); if (i < 0) // No more packages, so abort break; i += 9; i2 = InStr(PL, "): "); s = Mid(PL, i, i2 - i); PL = Mid(PL, i2+3); c++; // One more package found if ((Len(Logged) + Len(s)) > 70) // If this package would make log overflow, don't add yet. { MyLog(Logged); Logged = ""; // Flush out found packages } Logged = Logged$s$","; // Add package to list } // Log remaining if any. i = Len(Logged) - 1; if (i > 0) { Logged = Left(Logged, i); MyLog(Logged); } MyLog(LogDate()@"Package Count:"@c); MyLog("********************************************************************"); } function MyLog(coerce string s) { // Simply logs to log Log(s, 'PPL'); } function string LogDate() { // Simply returns date@time. local string Date, Time; Date = Level.Year$"-"$PrePad(Level.Month,"0",2)$"-"$PrePad(Level.Day,"0",2); Time = PrePad(Level.Hour,"0",2)$":"$PrePad(Level.Minute,"0",2)$"."$PrePad(Level.Second,"0",2); return Date@Time; } function string PrePad(coerce string s, string Pad, int Count) { // Pads a string in front with selected string. while (Len(s) < Count) { s = Pad$s; } return s; } €š20,Ş#!‰-§ —'÷\.†Ow*O- — š4>r*av! €3 —<.†!r*a:u!!q!  C%–– ČppppS‰¨-S‰¤0,-S‰Ľ0,ppppS‰Ś0,:S‰Ł0,.S‰˘0,¨ g // =============================================================== // PurePkgChk.PPC_Info: put your comment here // Created by UClasses - (C) 2000-2001 by meltdown@thirdtower.com // =============================================================== class PackageLogger extends Info; function PostBeginPlay() { local PPL_Mutator Mut; // Make sure it wasn't added as a mutator foreach AllActors(class'PPL_Mutator',Mut) return; Mut = Level.Spawn(Class'PPL_Mutator'); if (Mut != None) { Mut.NextMutator = Level.Game.BaseMutator; Level.Game.BaseMutator = Mut; } Destroy(); } <SÜ˙˙˙˙˙˙˙˙˙˙’6śQ-'Fw**¨¨PCDOBJ LINKERSa @( œ9?ČSĽKš,Ew*PCK Failed Packagelog!aQ $: L† q!   ; Qž q! 8? iR˙˙˙˙˙˙˙˙˙˙’ZdVĽKš, Fw*PCK Timeout Packagelog!a a@( œ>g8 q =At ˙˙˙˙˙˙˙˙˙˙’pÚ%%v!  ˆ/a0  0 10 ‰a zw * ž‰™‰™ a .#( ç#! DDCţ˙˙˙GC˙˙˙˙C˙˙˙˙?C˙˙˙˙ACţ˙˙˙SCţ˙˙˙LSű˙˙˙1Cţ˙˙˙FC˙˙˙˙Cţ˙˙˙VC˙˙˙˙&C˙˙˙˙,Sü˙˙˙0Sű˙˙˙2Cţ˙˙˙EGö˙˙˙Cţ˙˙˙CCţ˙˙˙KGő˙˙˙C˙˙˙˙@Gő˙˙˙Cţ˙˙˙TSó˙˙˙:Gű˙˙˙C˙˙˙˙'Gű˙˙˙Gű˙˙˙Ső˙˙˙;Lĺ˙˙˙/Sę˙˙˙'Cţ˙˙˙UVü˙˙˙8Vü˙˙˙7Vü˙˙˙4Vü˙˙˙5Vü˙˙˙6Uó˙˙˙9Vü˙˙˙3Gú˙˙˙(Cţ˙˙˙NGö˙˙˙ŽL]‡< iˆ.J vˆ." BŒ.$ Nˆ&" Z‹Uf‡'+ {‡&= H‡BO Uˆ.H bŒ&$ nˆ&. zˆ(" F‡.W R‡&  _ŒQ lŒ.I xˆ D‡2  P‡2W ]Œ- j‡O v‡'W CŞR PĄP \‡2* hˆ6 uˆ6M A‡)  MŒ.% Zƒ >fŒ(B d ˆ(> p ˆC" | ƒ >H!ˆ6! F"ƒ•GR"ƒQY%ƒ5j&ƒ4_'‘#4a$S(ŽLtLˆ(! @O‡'! LOƒWYO‘#4a8pV˜1) Qƒš0]ƒ—NMƒš*[‘˜3) E’ƒ =Q’ƒcN“‘+#4r q•”)cŸƒ’8XL ƒœ8ZdĄƒ$8 ~˘ƒ 8 ]Ł” )|Łƒ’=`e¤ƒœ=EŚ”*dŚƒ’@'N§ƒ+ku§ƒ!`Š