fix style
This commit is contained in:
@ -74578,4 +74578,4 @@ defaultproperties
|
||||
CT(74272)=(S=14680060,E=14680061,C=1)
|
||||
CT(74273)=(S=14680062,E=14680062,C=7)
|
||||
CT(74274)=(S=14680063,E=14680063,C=0)
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ function int ReadInt(optional byte MaxVal)
|
||||
function SaveStr(string S)
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
||||
if (S=="")
|
||||
{
|
||||
SaveInt(0,1);
|
||||
@ -97,7 +97,7 @@ function SaveStr(string S)
|
||||
function string ReadStr()
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
||||
i = ReadInt(1);
|
||||
if (i==0 || i>StrMap.Length)
|
||||
return "";
|
||||
@ -155,7 +155,7 @@ final function DebugData()
|
||||
local string S,SS;
|
||||
local array<byte> B;
|
||||
local int i;
|
||||
|
||||
|
||||
GetData(B);
|
||||
`Log("DEBUG DATA: Data size: "$B.Length);
|
||||
for (i=0; i<B.Length; ++i)
|
||||
@ -174,7 +174,7 @@ function GetData(out array<byte> Res)
|
||||
Res = Buffer;
|
||||
Res.Insert(0,1);
|
||||
Res[0] = ArVersion;
|
||||
|
||||
|
||||
// Add string map to start.
|
||||
// Write string map length.
|
||||
Res.Insert(1,2);
|
||||
@ -182,7 +182,7 @@ function GetData(out array<byte> Res)
|
||||
Res[1] = l & 255;
|
||||
Res[2] = (l >> 8) & 255;
|
||||
o = 3;
|
||||
|
||||
|
||||
// write each entry.
|
||||
for (i=0; i<StrMap.Length; ++i)
|
||||
{
|
||||
@ -204,7 +204,7 @@ function SetData(out array<byte> S)
|
||||
// read string map length.
|
||||
StrMap.Length = Buffer[1] | (Buffer[2] << 8);
|
||||
o = 3;
|
||||
|
||||
|
||||
// read each string map entry.
|
||||
for (i=0; i<StrMap.Length; ++i)
|
||||
{
|
||||
@ -257,4 +257,5 @@ function SetSaveVersion(int Num)
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -29,7 +29,7 @@ static final function bool CheckBestTrack(PlayerReplicationInfo PRI, int Value,
|
||||
local int i,l;
|
||||
|
||||
S = class'OnlineSubsystem'.Static.UniqueNetIdToString(PRI.UniqueId);
|
||||
|
||||
|
||||
l = class'ServerExtMut'.Default.MaxTopPlayers;
|
||||
if (V.Length>l) // See if list has overflown incase an admin has changed the max stats value.
|
||||
V.Length = l;
|
||||
@ -60,7 +60,7 @@ static final function bool CheckBestTrack(PlayerReplicationInfo PRI, int Value,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i<l; ++i)
|
||||
{
|
||||
if (i==V.Length || V[i].V<Value) // At final entry, or has higher value then this ranked player.
|
||||
|
@ -41,7 +41,7 @@ function bool handleQuery(WebAdminQuery q)
|
||||
final function IncludeFile(WebAdminQuery q, string file)
|
||||
{
|
||||
local string S;
|
||||
|
||||
|
||||
if (webadmin.HTMLSubDirectory!="")
|
||||
{
|
||||
S = webadmin.Path $ "/" $ webadmin.HTMLSubDirectory $ "/" $ file;
|
||||
@ -57,7 +57,7 @@ final function IncludeFile(WebAdminQuery q, string file)
|
||||
final function SendHeader(WebAdminQuery q, string Title)
|
||||
{
|
||||
local IQueryHandler handler;
|
||||
|
||||
|
||||
q.response.Subst("page.title", Title);
|
||||
q.response.Subst("page.description", "");
|
||||
foreach webadmin.handlers(handler)
|
||||
@ -83,7 +83,7 @@ final function SendFooter(WebAdminQuery q)
|
||||
final function AddConfigEditbox(WebAdminQuery q, string InfoStr, string CurVal, int MaxLen, string ResponseVar, string Tooltip, optional bool bSkipTrail)
|
||||
{
|
||||
local string S;
|
||||
|
||||
|
||||
S = "<TR><TD><abbr title=\""$Tooltip$"\">"$InfoStr$":</abbr></TD><TD><input class=\"textbox\" class=\"text\" name=\""$ResponseVar$"\" value=\""$CurVal$"\"></TD>";
|
||||
if (!bSkipTrail)
|
||||
S $= "</TR>";
|
||||
@ -93,7 +93,7 @@ final function AddConfigEditbox(WebAdminQuery q, string InfoStr, string CurVal,
|
||||
final function AddConfigCheckbox(WebAdminQuery q, string InfoStr, bool bCur, string ResponseVar, string Tooltip)
|
||||
{
|
||||
local string S;
|
||||
|
||||
|
||||
S = bCur ? " checked" : "";
|
||||
S = "<TR><TD><abbr title=\""$Tooltip$"\">"$InfoStr$":</abbr></TD><TD><input type=\"checkbox\" name=\""$ResponseVar$"\" value=\"1\" "$S$"></TD></TR>";
|
||||
q.response.SendText(S);
|
||||
@ -102,7 +102,7 @@ final function AddConfigCheckbox(WebAdminQuery q, string InfoStr, bool bCur, str
|
||||
final function AddConfigTextbox(WebAdminQuery q, string InfoStr, string CurVal, int Rows, string ResponseVar, string Tooltip)
|
||||
{
|
||||
local string S;
|
||||
|
||||
|
||||
S = "<TR><TD><abbr title=\""$Tooltip$"\">"$InfoStr$":</abbr></TD><TD>";
|
||||
S $= "<textarea name=\""$ResponseVar$"\" rows=\""$Rows$"\" cols=\"80\">"$CurVal$"</textarea></TD></TR>";
|
||||
q.response.SendText(S);
|
||||
@ -180,7 +180,7 @@ function handleExtMod(WebAdminQuery q)
|
||||
GetV = ExtAdminUI.ConfigList[EditPageIndex].GetValue;
|
||||
SetV = ExtAdminUI.ConfigList[EditPageIndex].SetValue;
|
||||
z = int(GetV(ExtAdminUI.ConfigList[EditPageIndex].Configs[i].PropName,-1));
|
||||
|
||||
|
||||
for (j=z; j>=0; --j)
|
||||
{
|
||||
if (q.request.getVariable("DEL"$j)=="1")
|
||||
@ -202,7 +202,7 @@ function handleExtMod(WebAdminQuery q)
|
||||
if (bEditArray)
|
||||
{
|
||||
q.response.SendText("<table id=\"settings\" class=\"grid\"><thead><tr><th><abbr title=\""$ExtAdminUI.ConfigList[EditPageIndex].Configs[i].UIDesc$"\">Edit Array "$ExtAdminUI.ConfigList[EditPageIndex].Configs[i].UIName$"</abbr></th><th></th><th>Delete Line</th></tr></thead><tbody>");
|
||||
|
||||
|
||||
GetV = ExtAdminUI.ConfigList[EditPageIndex].GetValue;
|
||||
z = int(GetV(ExtAdminUI.ConfigList[EditPageIndex].Configs[i].PropName,-1));
|
||||
|
||||
@ -227,7 +227,7 @@ function handleExtMod(WebAdminQuery q)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
q.response.SendText("<tr><td></td><td><input class=\"button\" type=\"submit\" name=\"edit"$EditPageIndex$"\" value=\"Submit "$ExtAdminUI.ConfigList[EditPageIndex].Configs[i].UIName$"\"></td></tr></form>");
|
||||
}
|
||||
else
|
||||
@ -262,7 +262,7 @@ function handleExtMod(WebAdminQuery q)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Submit button
|
||||
q.response.SendText("<tr><td></td><td><input class=\"button\" type=\"submit\" name=\"edit"$EditPageIndex$"\" value=\"Submit\"></td></tr></form>");
|
||||
}
|
||||
@ -286,4 +286,4 @@ defaultproperties
|
||||
{
|
||||
ExtWebURL="/settings/ExtServerMod"
|
||||
EditPageIndex=-1
|
||||
}
|
||||
}
|
||||
|
@ -43,4 +43,4 @@ function ResetFile()
|
||||
defaultproperties
|
||||
{
|
||||
bFlushEachWrite=false
|
||||
}
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ function bool IsCustomZed(class<KFPawn_Monster> KFPM)
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
@ -82,12 +82,12 @@ function PostBeginPlay()
|
||||
if (WorldInfo.Game.BaseMutator==None)
|
||||
WorldInfo.Game.BaseMutator = Self;
|
||||
else WorldInfo.Game.BaseMutator.AddMutator(Self);
|
||||
|
||||
|
||||
if (bDeleteMe) // This was a duplicate instance of the mutator.
|
||||
return;
|
||||
|
||||
SpawnPointer = class'ExtSpawnPointHelper'.Static.FindHelper(WorldInfo); // Start init world pathlist.
|
||||
|
||||
|
||||
//OnlineSubsystemSteamworks(class'GameEngine'.Static.GetOnlineSubsystem()).Int64ToUniqueNetId("",Id);
|
||||
//`Log("TEST"@class'OnlineSubsystem'.Static.UniqueNetIdToString(Id));
|
||||
|
||||
@ -97,7 +97,7 @@ function PostBeginPlay()
|
||||
class'OnlineSubsystem'.Static.StringToUniqueNetId(DevList[i],Id);
|
||||
DevNetID[i] = Id;
|
||||
}
|
||||
|
||||
|
||||
ServerStatLoader = new (None) class'ExtPlayerStat';
|
||||
WorldInfo.Game.HUDType = class'KFExtendedHUD';
|
||||
WorldInfo.Game.PlayerControllerClass = class'ExtPlayerController';
|
||||
@ -105,7 +105,7 @@ function PostBeginPlay()
|
||||
WorldInfo.Game.DefaultPawnClass = class'ExtHumanPawn';
|
||||
KFGameInfo(WorldInfo.Game).CustomizationPawnClass = class'ExtPawn_Customization';
|
||||
KFGameInfo(WorldInfo.Game).KFGFxManagerClass = class'ExtMoviePlayer_Manager';
|
||||
|
||||
|
||||
KFGIA = new(KFGameInfo(WorldInfo.Game)) class'KFGI_Access';
|
||||
|
||||
if (ServerMOTD=="")
|
||||
@ -211,7 +211,7 @@ function PostBeginPlay()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Bonus (pong) game contents.
|
||||
if (BonusGameSongs.Length>0)
|
||||
{
|
||||
@ -283,7 +283,7 @@ static final function string GetStatFile(const out UniqueNetId UID)
|
||||
final function bool IsDev(const out UniqueNetId UID)
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
||||
for (i=(DevNetID.Length-1); i>=0; --i)
|
||||
if (DevNetID[i]==UID)
|
||||
return true;
|
||||
@ -314,7 +314,7 @@ function NotifyWaveChange()
|
||||
{
|
||||
local ExtPlayerController ExtPC;
|
||||
local KFProj_RicochetStickBullet KFBolt;
|
||||
|
||||
|
||||
if (bRespawnCheck)
|
||||
{
|
||||
bIsPostGame = (KF.WaveMax<KF.WaveNum);
|
||||
@ -327,7 +327,7 @@ function NotifyWaveChange()
|
||||
NumWaveSwitches = 0;
|
||||
SaveAllPerks();
|
||||
}
|
||||
|
||||
|
||||
if (!KF.bTraderIsOpen)
|
||||
{
|
||||
foreach WorldInfo.AllControllers(class'ExtPlayerController',ExtPC)
|
||||
@ -393,10 +393,10 @@ function AddMutator(Mutator M)
|
||||
function bool IsFromMod(Object O)
|
||||
{
|
||||
local string PackageName;
|
||||
|
||||
|
||||
if (O == None)
|
||||
return false;
|
||||
|
||||
|
||||
PackageName = string(O.GetPackageName());
|
||||
if (Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0)
|
||||
{
|
||||
@ -404,7 +404,7 @@ function bool IsFromMod(Object O)
|
||||
if (Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -412,15 +412,15 @@ function bool HasModsInDamageInfo(DamageInfo DI)
|
||||
{
|
||||
local class<Actor> DamageCauser;
|
||||
local class<KFDamageType> DamageType;
|
||||
|
||||
|
||||
foreach DI.DamageCausers(DamageCauser)
|
||||
if (IsFromMod(DamageCauser))
|
||||
return true;
|
||||
|
||||
|
||||
foreach DI.DamageTypes(DamageType)
|
||||
if (IsFromMod(DamageType))
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -434,19 +434,19 @@ function CustomXP(Controller Killer, Controller Killed)
|
||||
local KFPerk InstigatorPerk;
|
||||
local DamageInfo DamageInfo;
|
||||
local class<KFPerk> DamagePerk;
|
||||
|
||||
|
||||
KFM = KFPawn_Monster(Killed.Pawn);
|
||||
foreach KFM.DamageHistory(DamageInfo)
|
||||
{
|
||||
DamagerKFPRI = KFPlayerReplicationInfo(DamageInfo.DamagerPRI);
|
||||
if (DamagerKFPRI == None) continue;
|
||||
|
||||
|
||||
// if no mods - exit the loop, the game will add experience by itself
|
||||
if (!HasModsInDamageInfo(DamageInfo) && !KFGIA.IsCustomZed(KFM.class)) continue;
|
||||
|
||||
if (!HasModsInDamageInfo(DamageInfo) && !KFGIA.IsCustomZed(KFM.class)) continue;
|
||||
|
||||
KFPC = KFPlayerController(DamagerKFPRI.Owner);
|
||||
if (KFPC == None) continue;
|
||||
|
||||
|
||||
i = CustomZedXPArray.Find('zedclass', KFM.Class);
|
||||
if (i != INDEX_NONE)
|
||||
{
|
||||
@ -456,9 +456,9 @@ function CustomXP(Controller Killer, Controller Killed)
|
||||
{
|
||||
XP = KFM.static.GetXPValue(MyKFGI.GameDifficulty);
|
||||
}
|
||||
|
||||
|
||||
InstigatorPerk = KFPC.GetPerk();
|
||||
|
||||
|
||||
// Special for survivalist - he gets experience for everything
|
||||
// and for TF2Sentry - it has no perk in DamageHistory
|
||||
if (InstigatorPerk.ShouldGetAllTheXP() || DamageInfo.DamagePerks.Length == 0)
|
||||
@ -466,7 +466,7 @@ function CustomXP(Controller Killer, Controller Killed)
|
||||
KFPC.OnPlayerXPAdded(XP, InstigatorPerk.Class);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
XP /= DamageInfo.DamagePerks.Length;
|
||||
foreach DamageInfo.DamagePerks(DamagePerk)
|
||||
{
|
||||
@ -481,10 +481,10 @@ function ScoreKill(Controller Killer, Controller Killed)
|
||||
local ExtPlayerController ExtPC;
|
||||
local ExtPerkManager KillersPerk;
|
||||
local KFPawn_Monster KFPM;
|
||||
|
||||
|
||||
if (bRespawnCheck && Killed.bIsPlayer)
|
||||
CheckRespawn(Killed);
|
||||
|
||||
|
||||
KFPM = KFPawn_Monster(Killed.Pawn);
|
||||
if (KFPM != None && Killed.GetTeamNum() != 0
|
||||
&& Killer != None && Killer.bIsPlayer && Killer.GetTeamNum() == 0)
|
||||
@ -492,13 +492,13 @@ function ScoreKill(Controller Killer, Controller Killed)
|
||||
ExtPC = ExtPlayerController(Killer);
|
||||
if (ExtPC != None && ExtPC.ActivePerkManager != None)
|
||||
ExtPC.ActivePerkManager.PlayerKilled(KFPM, LastKillDamageType);
|
||||
|
||||
|
||||
if (bKillMessages && Killer.PlayerReplicationInfo != None)
|
||||
BroadcastKillMessage(Killed.Pawn, Killer);
|
||||
|
||||
|
||||
CustomXP(Killer, Killed);
|
||||
}
|
||||
|
||||
|
||||
if (MyKFGI != None && MyKFGI.IsZedTimeActive() && KFPM != None)
|
||||
{
|
||||
KFPC = KFPlayerController(Killer);
|
||||
@ -512,11 +512,11 @@ function ScoreKill(Controller Killer, Controller Killed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ExtPC = ExtPlayerController(Killed);
|
||||
if (ExtPC != None)
|
||||
CheckPerkChange(ExtPC);
|
||||
|
||||
|
||||
if (NextMutator != None)
|
||||
NextMutator.ScoreKill(Killer, Killed);
|
||||
}
|
||||
@ -525,7 +525,7 @@ function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> dam
|
||||
{
|
||||
if ((KFPawn_Human(Killed)!=None && CheckPreventDeath(KFPawn_Human(Killed),Killer,damageType)) || Super.PreventDeath(Killed,Killer,damageType,HitLocation))
|
||||
return true;
|
||||
|
||||
|
||||
LastKillDamageType = damageType;
|
||||
if (Killed.Controller!=None && KFPawn_Monster(Killed)!=None)
|
||||
{
|
||||
@ -551,7 +551,7 @@ final function GT_PlayerKilled(Controller Killer, Controller Killed, class<Damag
|
||||
|
||||
KFG = KFGameInfo(WorldInfo.Game);
|
||||
ScoreKill(Killer,Killed); // Broadcast kill message.
|
||||
|
||||
|
||||
KFPC = ExtPlayerController(Killer);
|
||||
MonsterPawn = KFPawn_Monster(Killed.Pawn);
|
||||
if (KFG!=None && KFPC != none && MonsterPawn!=none)
|
||||
@ -568,7 +568,7 @@ final function GT_PlayerKilled(Controller Killer, Controller Killed, class<Damag
|
||||
final function bool CheckPreventDeath(KFPawn_Human Victim, Controller Killer, class<DamageType> damageType)
|
||||
{
|
||||
local ExtPlayerController E;
|
||||
|
||||
|
||||
if (Victim.IsA('KFPawn_Customization'))
|
||||
return false;
|
||||
E = ExtPlayerController(Victim.Controller);
|
||||
@ -598,7 +598,7 @@ final function BroadcastFFDeath(Controller Killer, Pawn Killed, class<DamageType
|
||||
local PlayerReplicationInfo KillerPRI;
|
||||
local string P;
|
||||
local bool bFF;
|
||||
|
||||
|
||||
P = Killed.PlayerReplicationInfo.PlayerName;
|
||||
if (Killer==None || Killer==Killed.Controller)
|
||||
{
|
||||
@ -775,7 +775,7 @@ final function InitializePerks(ExtPlayerController Other)
|
||||
local ExtPerkManager PM;
|
||||
local Ext_PerkBase P;
|
||||
local int i;
|
||||
|
||||
|
||||
Other.OnChangePerk = PlayerChangePerk;
|
||||
Other.OnBoughtStats = PlayerBuyStats;
|
||||
Other.OnBoughtTrait = PlayerBoughtTrait;
|
||||
@ -808,7 +808,7 @@ final function SendMOTD(ExtPlayerController PC)
|
||||
{
|
||||
local string S;
|
||||
local int i;
|
||||
|
||||
|
||||
S = ServerMOTD;
|
||||
while (Len(S)>510)
|
||||
{
|
||||
@ -816,7 +816,7 @@ final function SendMOTD(ExtPlayerController PC)
|
||||
S = Mid(S,500);
|
||||
}
|
||||
PC.ReceiveServerMOTD(S,true);
|
||||
|
||||
|
||||
for (i=0; i<AdminCommands.Length; ++i)
|
||||
PC.AddAdminCmd(AdminCommands[i]);
|
||||
}
|
||||
@ -838,13 +838,13 @@ final function SavePlayerPerk(ExtPlayerController PC)
|
||||
PC.ClientMessage("Warning: Your stats save data version differs from what is loaded, stat saving disabled to prevent stats loss.",'Priority');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Actually save.
|
||||
ServerStatLoader.FlushData();
|
||||
PC.ActivePerkManager.SaveData(ServerStatLoader);
|
||||
ServerStatLoader.SaveStatFile(PC);
|
||||
PC.ActivePerkManager.bStatsDirty = false;
|
||||
|
||||
|
||||
// Write XML output.
|
||||
if (FileOutput!=None)
|
||||
FileOutput.DumpXML(PC.ActivePerkManager);
|
||||
@ -854,7 +854,7 @@ final function SavePlayerPerk(ExtPlayerController PC)
|
||||
function SaveAllPerks(optional bool bOnEndGame)
|
||||
{
|
||||
local ExtPlayerController PC;
|
||||
|
||||
|
||||
if (bGameHasEnded)
|
||||
return;
|
||||
foreach WorldInfo.AllControllers(class'ExtPlayerController',PC)
|
||||
@ -896,7 +896,7 @@ function RemoveRespawn(Controller PC)
|
||||
final function InitPlayer(ExtHumanPawn Other)
|
||||
{
|
||||
local ExtPlayerReplicationInfo PRI;
|
||||
|
||||
|
||||
PRI = ExtPlayerReplicationInfo(Other.PlayerReplicationInfo);
|
||||
if (PRI!=None && PRI.PerkManager!=None && PRI.PerkManager.CurrentPerk!=None)
|
||||
PRI.PerkManager.CurrentPerk.ApplyEffectsTo(Other);
|
||||
@ -972,7 +972,7 @@ final function SavePlayerInventory()
|
||||
local int i,j;
|
||||
local Inventory Inv;
|
||||
local KFWeapon K;
|
||||
|
||||
|
||||
PlayerInv.Length = 0;
|
||||
i = 0;
|
||||
foreach WorldInfo.AllPawns(class'KFPawn_Human',P)
|
||||
@ -982,7 +982,7 @@ final function SavePlayerInventory()
|
||||
PlayerInv[i].OwnerPlayer = P.Controller;
|
||||
PlayerInv[i].Gren = KFInventoryManager(P.InvManager).GrenadeCount;
|
||||
j = 0;
|
||||
|
||||
|
||||
foreach P.InvManager.InventoryActors(class'Inventory',Inv)
|
||||
{
|
||||
if (KFInventory_Money(Inv)!=None)
|
||||
@ -1062,7 +1062,7 @@ final function bool RespawnPlayer(Controller NewPlayer)
|
||||
local int Idx;
|
||||
local array<SequenceObject> Events;
|
||||
local SeqEvent_PlayerSpawned SpawnedEvent;
|
||||
local LocalPlayer LP;
|
||||
local LocalPlayer LP;
|
||||
|
||||
if (NewPlayer.Pawn!=None)
|
||||
NewPlayer.Pawn.Destroy();
|
||||
@ -1144,16 +1144,16 @@ final function bool RespawnPlayer(Controller NewPlayer)
|
||||
// To fix custom post processing chain when not running in editor or PIE.
|
||||
if (KFPC != none)
|
||||
{
|
||||
LP = LocalPlayer(KFPC.Player);
|
||||
if (LP != None)
|
||||
{
|
||||
LP.RemoveAllPostProcessingChains();
|
||||
LP.InsertPostProcessingChain(LP.Outer.GetWorldPostProcessChain(),INDEX_NONE,true);
|
||||
LP = LocalPlayer(KFPC.Player);
|
||||
if (LP != None)
|
||||
{
|
||||
LP.RemoveAllPostProcessingChains();
|
||||
LP.InsertPostProcessingChain(LP.Outer.GetWorldPostProcessChain(),INDEX_NONE,true);
|
||||
if (KFPC.myHUD != None)
|
||||
{
|
||||
KFPC.myHUD.NotifyBindPostProcessEffects();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
KFGameInfo(WorldInfo.Game).SetTeam(NewPlayer, KFGameInfo(WorldInfo.Game).Teams[0]);
|
||||
@ -1180,7 +1180,7 @@ function PlayerBuyStats(ExtPlayerController PC, class<Ext_PerkBase> Perk, int iS
|
||||
|
||||
if (bGameHasEnded)
|
||||
return;
|
||||
|
||||
|
||||
P = PC.ActivePerkManager.FindPerk(Perk);
|
||||
if (P==None || !P.bPerkNetReady || iStat>=P.PerkStats.Length)
|
||||
return;
|
||||
@ -1248,12 +1248,12 @@ function Tick(float DeltaTime)
|
||||
{
|
||||
local bool bCheckedWave;
|
||||
local ExtPlayerController ExtPC;
|
||||
|
||||
|
||||
if (KFGameReplicationInfo(WorldInfo.GRI).bTraderIsOpen && !bCheckedWave)
|
||||
{
|
||||
foreach WorldInfo.AllControllers(class'ExtPlayerController',ExtPC)
|
||||
CheckPerkChange(ExtPC);
|
||||
|
||||
|
||||
bCheckedWave = true;
|
||||
}
|
||||
else if (bCheckedWave)
|
||||
@ -1267,7 +1267,7 @@ function PlayerBoughtTrait(ExtPlayerController PC, class<Ext_PerkBase> PerkClass
|
||||
|
||||
if (bGameHasEnded)
|
||||
return;
|
||||
|
||||
|
||||
P = PC.ActivePerkManager.FindPerk(PerkClass);
|
||||
if (P==None || !P.bPerkNetReady)
|
||||
return;
|
||||
@ -1281,7 +1281,7 @@ function PlayerBoughtTrait(ExtPlayerController PC, class<Ext_PerkBase> PerkClass
|
||||
cost = Trait.Static.GetTraitCost(P.PerkTraits[i].CurrentLevel);
|
||||
if (cost>P.CurrentSP || !Trait.Static.MeetsRequirements(P.PerkTraits[i].CurrentLevel,P))
|
||||
return;
|
||||
|
||||
|
||||
PC.ActivePerkManager.bStatsDirty = true;
|
||||
P.CurrentSP-=cost;
|
||||
P.bForceNetUpdate = true;
|
||||
@ -1313,7 +1313,7 @@ function PlayerUnloadInfo(ExtPlayerController PC, byte CallID, class<Ext_PerkBas
|
||||
// Verify if client tries to cause errors.
|
||||
if (PC==None || PerkClass==None || PC.ActivePerkManager==None)
|
||||
return;
|
||||
|
||||
|
||||
// Perk unloading disabled on this server.
|
||||
if (MinUnloadPerkLevel==-1)
|
||||
{
|
||||
@ -1321,18 +1321,18 @@ function PlayerUnloadInfo(ExtPlayerController PC, byte CallID, class<Ext_PerkBas
|
||||
PC.ClientGotUnloadInfo(CallID,0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
P = PC.ActivePerkManager.FindPerk(PerkClass);
|
||||
if (P==None) // More client hack attempts.
|
||||
return;
|
||||
|
||||
|
||||
if (P.CurrentLevel<MinUnloadPerkLevel) // Verify minimum level.
|
||||
{
|
||||
if (!bUnload)
|
||||
PC.ClientGotUnloadInfo(CallID,1,MinUnloadPerkLevel);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Calc how much EXP is lost on this progress.
|
||||
LostExp = Round(float(P.CurrentEXP) * UnloadPerkExpCost);
|
||||
|
||||
@ -1363,7 +1363,7 @@ function ResetPlayerPerk(ExtPlayerController PC, class<Ext_PerkBase> PerkClass,
|
||||
|
||||
if (bGameHasEnded)
|
||||
return;
|
||||
|
||||
|
||||
P = PC.ActivePerkManager.FindPerk(PerkClass);
|
||||
if (P==None || !P.bPerkNetReady)
|
||||
return;
|
||||
@ -1400,7 +1400,7 @@ function AdminCommand(ExtPlayerController PC, int PlayerID, int Action)
|
||||
{
|
||||
local ExtPlayerController E;
|
||||
local int i;
|
||||
|
||||
|
||||
if (bNoAdminCommands)
|
||||
{
|
||||
PC.ClientMessage("Admin level commands are disabled.",'Priority');
|
||||
@ -1411,17 +1411,17 @@ function AdminCommand(ExtPlayerController PC, int PlayerID, int Action)
|
||||
PC.ClientMessage("You do not have enough admin priveleges.",'Priority');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
foreach WorldInfo.AllControllers(class'ExtPlayerController',E)
|
||||
if (E.PlayerReplicationInfo.PlayerID==PlayerID)
|
||||
break;
|
||||
|
||||
|
||||
if (E==None)
|
||||
{
|
||||
PC.ClientMessage("Action failed, missing playerID: "$PlayerID,'Priority');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (Action>=100) // Set perk level.
|
||||
{
|
||||
if (E.ActivePerkManager.CurrentPerk==None)
|
||||
@ -1439,7 +1439,7 @@ function AdminCommand(ExtPlayerController PC, int PlayerID, int Action)
|
||||
Action = Min(Action-100000,E.ActivePerkManager.CurrentPerk.MaxPrestige);
|
||||
E.ActivePerkManager.CurrentPerk.CurrentPrestige = Action;
|
||||
PC.ClientMessage("Set "$E.PlayerReplicationInfo.PlayerName$"' perk "$E.ActivePerkManager.CurrentPerk.Default.PerkName$" prestige level to "$Action,'Priority');
|
||||
|
||||
|
||||
E.ActivePerkManager.CurrentPerk.FullReset(true);
|
||||
}
|
||||
else
|
||||
@ -1447,7 +1447,7 @@ function AdminCommand(ExtPlayerController PC, int PlayerID, int Action)
|
||||
Action = Clamp(Action-100,E.ActivePerkManager.CurrentPerk.MinimumLevel,E.ActivePerkManager.CurrentPerk.MaximumLevel);
|
||||
E.ActivePerkManager.CurrentPerk.CurrentEXP = E.ActivePerkManager.CurrentPerk.GetNeededExp(Action-1);
|
||||
PC.ClientMessage("Set "$E.PlayerReplicationInfo.PlayerName$"' perk "$E.ActivePerkManager.CurrentPerk.Default.PerkName$" level to "$Action,'Priority');
|
||||
|
||||
|
||||
E.ActivePerkManager.CurrentPerk.SetInitialLevel();
|
||||
E.ActivePerkManager.CurrentPerk.UpdatePRILevel();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ static final function GetHistory(int i, out int UpVotes, out int DownVotes, out
|
||||
static final function UpdateMapHistory(int iWon)
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
||||
for (i=(Default.M.Length-1); i>=0; --i)
|
||||
{
|
||||
if (i==iWon)
|
||||
|
@ -34,4 +34,5 @@ event AllowBroadcastLocalizedTeam(int TeamIndex, actor Sender, class<LocalMessag
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -33,7 +33,7 @@ function bool handleQuery(WebAdminQuery q)
|
||||
final function IncludeFile(WebAdminQuery q, string file)
|
||||
{
|
||||
local string S;
|
||||
|
||||
|
||||
if (webadmin.HTMLSubDirectory!="")
|
||||
{
|
||||
S = webadmin.Path $ "/" $ webadmin.HTMLSubDirectory $ "/" $ file;
|
||||
@ -49,7 +49,7 @@ final function IncludeFile(WebAdminQuery q, string file)
|
||||
final function SendHeader(WebAdminQuery q, string Title)
|
||||
{
|
||||
local IQueryHandler handler;
|
||||
|
||||
|
||||
q.response.Subst("page.title", Title);
|
||||
q.response.Subst("page.description", "");
|
||||
foreach webadmin.handlers(handler)
|
||||
@ -75,7 +75,7 @@ final function SendFooter(WebAdminQuery q)
|
||||
final function AddConfigEditbox(WebAdminQuery q, string InfoStr, string CurVal, int MaxLen, string ResponseVar, string Tooltip, optional bool bNoTR)
|
||||
{
|
||||
local string S;
|
||||
|
||||
|
||||
S = "<abbr title=\""$Tooltip$"\"><TD>"$InfoStr$":</TD><TD><input class=\"textbox\" class=\"text\" name=\""$ResponseVar$"\" size=\""$Min(100,MaxLen)$"\" value=\""$CurVal$"\" maxlength=\""$MaxLen$"\"></TD></abbr>";
|
||||
if (!bNoTR)
|
||||
S = "<TR>"$S$"</TR>";
|
||||
@ -206,4 +206,4 @@ defaultproperties
|
||||
{
|
||||
MapVoterURL="/settings/xMapVoter"
|
||||
EditSettingLine=-1
|
||||
}
|
||||
}
|
||||
|
@ -36,12 +36,12 @@ function PostBeginPlay()
|
||||
if (WorldInfo.Game.BaseMutator==None)
|
||||
WorldInfo.Game.BaseMutator = Self;
|
||||
else WorldInfo.Game.BaseMutator.AddMutator(Self);
|
||||
|
||||
|
||||
if (bDeleteMe) // This was a duplicate instance of the mutator.
|
||||
return;
|
||||
|
||||
InitConfig();
|
||||
|
||||
|
||||
MapFile = string(WorldInfo.GetPackageName());
|
||||
iCurrentHistory = class'xMapVoteHistory'.Static.GetMapHistory(MapFile,WorldInfo.Title);
|
||||
|
||||
@ -66,7 +66,7 @@ function PostBeginPlay()
|
||||
++z;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (MaxMapsOnList>0)
|
||||
{
|
||||
// Remove random maps from list.
|
||||
@ -81,16 +81,16 @@ function PostBeginPlay()
|
||||
function InitConfig()
|
||||
{
|
||||
local bool ConfigChanged;
|
||||
|
||||
|
||||
ConfigChanged = False;
|
||||
|
||||
// Parameters to check each initialization
|
||||
|
||||
// Parameters to check each initialization
|
||||
if (LastVotedGameInfo < 0 || LastVotedGameInfo >= GameModes.Length)
|
||||
LastVotedGameInfo = 0;
|
||||
|
||||
|
||||
if (MapChangeDelay == 0)
|
||||
MapChangeDelay = 3;
|
||||
|
||||
|
||||
if (GameModes.Length == 0) // None specified, so use current settings.
|
||||
{
|
||||
GameModes.Length = 1;
|
||||
@ -105,28 +105,28 @@ function InitConfig()
|
||||
VoteTime = 35;
|
||||
ConfigChanged = True;
|
||||
}
|
||||
|
||||
|
||||
if (VoteNumForOrgy <= 0)
|
||||
{
|
||||
VoteNumForOrgy = 4;
|
||||
bNoMapVoteOrgy = False;
|
||||
ConfigChanged = True;
|
||||
}
|
||||
|
||||
// Parameters that need to be added once when updating the config
|
||||
|
||||
// Parameters that need to be added once when updating the config
|
||||
switch (ConfigVersion)
|
||||
{
|
||||
case 0:
|
||||
bEnableAnnouncer = True;
|
||||
|
||||
|
||||
case 2147483647:
|
||||
`log("[xVotingHandler] Config updated to version"@CurrentVersion);
|
||||
break;
|
||||
|
||||
|
||||
case CurrentVersion:
|
||||
`log("[xVotingHandler] Config is up-to-date");
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
`log("[xVotingHandler] The config version is higher than the current version (are you using an old mutator?)");
|
||||
`log("[xVotingHandler] Config version is"@ConfigVersion@"but current version is"@CurrentVersion);
|
||||
@ -158,7 +158,7 @@ function SetupBroadcast()
|
||||
local WebAdmin A;
|
||||
local xVoteWebApp xW;
|
||||
local byte i;
|
||||
|
||||
|
||||
B = Spawn(class'xVoteBroadcast');
|
||||
B.Handler = Self;
|
||||
B.NextBroadcaster = WorldInfo.Game.BroadcastHandler;
|
||||
@ -216,7 +216,7 @@ final function AddVote(int Count, int MapIndex, int GameIndex)
|
||||
final function LogoutPlayer(PlayerController PC)
|
||||
{
|
||||
local int i;
|
||||
|
||||
|
||||
for (i=(ActiveVoters.Length-1); i>=0; --i)
|
||||
if (ActiveVoters[i].PlayerOwner==PC)
|
||||
{
|
||||
@ -229,7 +229,7 @@ final function LoginPlayer(PlayerController PC)
|
||||
{
|
||||
local xVotingReplication R;
|
||||
local int i;
|
||||
|
||||
|
||||
for (i=(ActiveVoters.Length-1); i>=0; --i)
|
||||
if (ActiveVoters[i].PlayerOwner==PC)
|
||||
return;
|
||||
@ -261,7 +261,7 @@ function ClientDownloadInfo(xVotingReplication V)
|
||||
V.DownloadStage = 255;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch (V.DownloadStage)
|
||||
{
|
||||
case 0: // Game modes.
|
||||
@ -336,7 +336,7 @@ function ClientDisconnect(xVotingReplication V)
|
||||
final function float GetPctOf(int Nom, int Denom)
|
||||
{
|
||||
local float R;
|
||||
|
||||
|
||||
R = float(Nom) / float(Denom);
|
||||
return R;
|
||||
}
|
||||
@ -357,17 +357,17 @@ final function TallyVotes(optional bool bForce)
|
||||
// First check for highest result.
|
||||
for (i=(ActiveVotes.Length-1); i>=0; --i)
|
||||
c = Max(c,ActiveVotes[i].NumVotes);
|
||||
|
||||
|
||||
if (c>0)
|
||||
{
|
||||
// Then check how many votes for the best.
|
||||
for (i=(ActiveVotes.Length-1); i>=0; --i)
|
||||
if (ActiveVotes[i].NumVotes==c)
|
||||
Candidates.AddItem(i);
|
||||
|
||||
|
||||
// Finally pick a random winner from the best.
|
||||
c = Candidates[Rand(Candidates.Length)];
|
||||
|
||||
|
||||
// If more then "VoteNumForOrgy" voters and everyone voted same map?!!! Give the mapvote some orgy.
|
||||
if (bEnableAnnouncer && !bNoMapVoteOrgy && NumVotees >= VoteNumForOrgy && ActiveVotes.Length==1)
|
||||
{
|
||||
@ -380,16 +380,16 @@ final function TallyVotes(optional bool bForce)
|
||||
{
|
||||
// Pick a random map to win.
|
||||
c = Rand(Maps.Length);
|
||||
|
||||
|
||||
// Pick a random gametype to win along with it.
|
||||
for (i=(GameModes.Length-1); i>=0; --i)
|
||||
if (Class'xUI_MapVote'.Static.BelongsToPrefix(Maps[c].MapName,GameModes[i].Prefix))
|
||||
Candidates.AddItem(i);
|
||||
|
||||
|
||||
if (Candidates.Length==0) // Odd, a map without gametype...
|
||||
i = Rand(GameModes.Length);
|
||||
else i = Candidates[Rand(Candidates.Length)];
|
||||
|
||||
|
||||
SwitchToLevel(i,c,false);
|
||||
}
|
||||
return;
|
||||
@ -411,7 +411,7 @@ final function TallyVotes(optional bool bForce)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check for mid-game voting timer.
|
||||
if (!bMapVoteTimer && NumVotees>0 && GetPctOf(c,NumVotees)>=MidGameVotePct)
|
||||
StartMidGameVote(true);
|
||||
@ -514,7 +514,7 @@ final function SwitchToLevel(int GameIndex, int MapIndex, bool bAdminForce)
|
||||
|
||||
if (bMapvoteHasEnded)
|
||||
return;
|
||||
|
||||
|
||||
Default.LastVotedGameInfo = GameIndex;
|
||||
Class.Static.StaticSaveConfig();
|
||||
bMapvoteHasEnded = true;
|
||||
@ -524,14 +524,14 @@ final function SwitchToLevel(int GameIndex, int MapIndex, bool bAdminForce)
|
||||
class'xMapVoteHistory'.Static.StaticSaveConfig();
|
||||
bHistorySaved = true;
|
||||
}
|
||||
|
||||
|
||||
S = Maps[MapIndex].MapName$" ("$GameModes[GameIndex].GameName$")";
|
||||
for (i=(ActiveVoters.Length-1); i>=0; --i)
|
||||
{
|
||||
KFPlayerController(ActiveVoters[i].PlayerOwner).ShowConnectionProgressPopup(PMT_AdminMessage,"Switching to level:",S);
|
||||
ActiveVoters[i].ClientNotifyVoteWin(GameIndex,MapIndex,bAdminForce);
|
||||
}
|
||||
|
||||
|
||||
PendingMapURL = Maps[MapIndex].MapName$"?Game="$GameModes[GameIndex].GameClass$"?Mutator="$PathName(BaseMutator);
|
||||
if (GameModes[GameIndex].Mutators!="")
|
||||
PendingMapURL $= ","$GameModes[GameIndex].Mutators;
|
||||
@ -639,4 +639,4 @@ defaultproperties
|
||||
AnnouncerCues.Add(SoundCue'xVoteAnnouncer.VX_30_seconds_Cue')
|
||||
AnnouncerCues.Add(SoundCue'xVoteAnnouncer.VX_1_minute_Cue')
|
||||
AnnouncerCues.Add(SoundCue'xVoteAnnouncer.VX_HolyShit_Cue')
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user