From e68d21f1d9799e86f484b8e5cb16b320c5733018 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sun, 29 Nov 2020 00:54:57 +0300 Subject: [PATCH] style: empty line between functions --- ServerExt/Classes/ExtAutoPurchaseHelper.uc | 1 + ServerExt/Classes/ExtCharDataInfo.uc | 1 + ServerExt/Classes/ExtHUD_PlayerStatus.uc | 1 + ServerExt/Classes/ExtHumanPawn.uc | 15 +++++ ServerExt/Classes/ExtMenu_Gear.uc | 2 + ServerExt/Classes/ExtMenu_Perks.uc | 2 + ServerExt/Classes/ExtMenu_Trader.uc | 2 + ServerExt/Classes/ExtMoviePlayer_Manager.uc | 1 + ServerExt/Classes/ExtPerkManager.uc | 64 +++++++++++++++++++ ServerExt/Classes/ExtPlayerController.uc | 37 +++++++++++ ServerExt/Classes/ExtPlayerInput.uc | 2 + ServerExt/Classes/ExtPlayerReplicationInfo.uc | 28 ++++++++ ServerExt/Classes/ExtProj_CrackerGrenade.uc | 4 ++ ServerExt/Classes/ExtSpawnPointHelper.uc | 4 ++ ServerExt/Classes/ExtWebAdmin_UI.uc | 2 + ServerExt/Classes/Ext_AICommandBasePet.uc | 1 + ServerExt/Classes/Ext_AINoTaunt.uc | 1 + ServerExt/Classes/Ext_PerkBase.uc | 30 +++++++++ ServerExt/Classes/Ext_PerkBerserker.uc | 1 + ServerExt/Classes/Ext_PerkFieldMedic.uc | 13 ++++ ServerExt/Classes/Ext_PerkRhythmPerkBase.uc | 2 + ServerExt/Classes/Ext_PerkSharpshooter.uc | 1 + ServerExt/Classes/Ext_TGroupBase.uc | 1 + ServerExt/Classes/Ext_TGroupRegen.uc | 1 + ServerExt/Classes/Ext_T_AmmoRegHelp.uc | 1 + ServerExt/Classes/Ext_T_AutoFireHelper.uc | 2 + ServerExt/Classes/Ext_T_HealthRegHelp.uc | 1 + ServerExt/Classes/Ext_T_MonsterPRI.uc | 4 ++ ServerExt/Classes/Ext_T_SupplierInteract.uc | 3 + ServerExt/Classes/Ext_T_UnCloakHelper.uc | 1 + ServerExt/Classes/Ext_T_ZEDHelper.uc | 6 ++ ServerExt/Classes/Ext_TraitAcidicCompound.uc | 1 + ServerExt/Classes/Ext_TraitAirborne.uc | 1 + ServerExt/Classes/Ext_TraitAirborneAgent.uc | 1 + ServerExt/Classes/Ext_TraitAmmoReg.uc | 1 + ServerExt/Classes/Ext_TraitArmorReg.uc | 1 + ServerExt/Classes/Ext_TraitArmorRep.uc | 1 + ServerExt/Classes/Ext_TraitAutoFire.uc | 1 + ServerExt/Classes/Ext_TraitBase.uc | 8 +++ ServerExt/Classes/Ext_TraitBoomWeld.uc | 1 + ServerExt/Classes/Ext_TraitBunnyHop.uc | 1 + ServerExt/Classes/Ext_TraitCarryCap.uc | 1 + ServerExt/Classes/Ext_TraitContactNade.uc | 1 + ServerExt/Classes/Ext_TraitDemoCriticalHit.uc | 1 + ServerExt/Classes/Ext_TraitDemoDirectHit.uc | 1 + .../Classes/Ext_TraitDemoReactiveArmor.uc | 1 + ServerExt/Classes/Ext_TraitDireReload.uc | 1 + ServerExt/Classes/Ext_TraitDuracell.uc | 1 + ServerExt/Classes/Ext_TraitEliteReload.uc | 1 + ServerExt/Classes/Ext_TraitEnemyHP.uc | 1 + ServerExt/Classes/Ext_TraitFanfire.uc | 1 + ServerExt/Classes/Ext_TraitFireExplode.uc | 1 + ServerExt/Classes/Ext_TraitFireRange.uc | 1 + ServerExt/Classes/Ext_TraitGrenadeCap.uc | 1 + ServerExt/Classes/Ext_TraitGrenadeSUpg.uc | 1 + ServerExt/Classes/Ext_TraitGrenadeUpg.uc | 2 + ServerExt/Classes/Ext_TraitHealthReg.uc | 1 + ServerExt/Classes/Ext_TraitHeavyArmor.uc | 1 + ServerExt/Classes/Ext_TraitKnockback.uc | 1 + ServerExt/Classes/Ext_TraitNapalm.uc | 1 + ServerExt/Classes/Ext_TraitNightvision.uc | 1 + ServerExt/Classes/Ext_TraitRackEmUp.uc | 1 + ServerExt/Classes/Ext_TraitRagdoll.uc | 1 + ServerExt/Classes/Ext_TraitRanger.uc | 1 + ServerExt/Classes/Ext_TraitRapidAssault.uc | 1 + ServerExt/Classes/Ext_TraitSWATEnforcer.uc | 3 + ServerExt/Classes/Ext_TraitSirenResistance.uc | 1 + ServerExt/Classes/Ext_TraitSpartan.uc | 1 + ServerExt/Classes/Ext_TraitSupply.uc | 2 + ServerExt/Classes/Ext_TraitSupplyData.uc | 2 + ServerExt/Classes/Ext_TraitTacticalMove.uc | 1 + ServerExt/Classes/Ext_TraitToxicDart.uc | 1 + ServerExt/Classes/Ext_TraitUberAmmo.uc | 1 + ServerExt/Classes/Ext_TraitUnCloak.uc | 1 + ServerExt/Classes/Ext_TraitUnGrab.uc | 1 + ServerExt/Classes/Ext_TraitVampire.uc | 1 + ServerExt/Classes/Ext_TraitWeapons.uc | 4 ++ ServerExt/Classes/Ext_TraitZED_Damage.uc | 1 + ServerExt/Classes/Ext_TraitZED_Health.uc | 1 + ServerExt/Classes/Ext_TraitZED_Summon.uc | 4 ++ ServerExt/Classes/Ext_TraitZED_SummonExt.uc | 2 + ServerExt/Classes/GUIStyleBase.uc | 4 ++ ServerExt/Classes/KF2GUIController.uc | 13 ++++ ServerExt/Classes/KF2GUIInput.uc | 1 + ServerExt/Classes/KF2GUINetwork.uc | 2 + ServerExt/Classes/KF2Style.uc | 11 ++++ ServerExt/Classes/KFExtendedHUD.uc | 22 +++++++ ServerExt/Classes/KFGUI_Base.uc | 17 +++++ ServerExt/Classes/KFGUI_Clickable.uc | 5 ++ ServerExt/Classes/KFGUI_ColumnList.uc | 4 ++ ServerExt/Classes/KFGUI_ColumnTop.uc | 4 ++ ServerExt/Classes/KFGUI_ComboBox.uc | 3 + ServerExt/Classes/KFGUI_ComponentList.uc | 4 ++ ServerExt/Classes/KFGUI_EditBox.uc | 2 + ServerExt/Classes/KFGUI_FloatingWindow.uc | 4 ++ .../Classes/KFGUI_FloatingWindowHeader.uc | 2 + ServerExt/Classes/KFGUI_List.uc | 7 ++ ServerExt/Classes/KFGUI_MultiComponent.uc | 8 +++ ServerExt/Classes/KFGUI_NumericBox.uc | 3 + ServerExt/Classes/KFGUI_RightClickMenu.uc | 5 ++ ServerExt/Classes/KFGUI_ScrollBarBase.uc | 8 +++ ServerExt/Classes/KFGUI_SwitchComponent.uc | 4 ++ ServerExt/Classes/KFGUI_TextField.uc | 4 ++ ServerExt/Classes/KFGUI_TextLable.uc | 3 + ServerExt/Classes/KFGUI_Tooltip.uc | 3 + ServerExt/Classes/MS_HUD.uc | 1 + ServerExt/Classes/MS_PC.uc | 1 + ServerExt/Classes/MS_TMPUI.uc | 1 + ServerExt/Classes/MX_PongGame.uc | 1 + ServerExt/Classes/UIP_AdminMenu.uc | 2 + ServerExt/Classes/UIP_News.uc | 3 + ServerExt/Classes/UIP_PerkSelection.uc | 5 ++ ServerExt/Classes/UIP_PlayerSpecs.uc | 3 + ServerExt/Classes/UIP_Settings.uc | 7 ++ ServerExt/Classes/UIR_PerkStat.uc | 6 ++ ServerExt/Classes/UIR_PerkTraitList.uc | 1 + ServerExt/Classes/UIR_TraitInfoPopup.uc | 2 + ServerExt/Classes/UI_AdminMOTD.uc | 3 + ServerExt/Classes/UI_AdminPerkLevel.uc | 1 + ServerExt/Classes/UI_MidGameMenu.uc | 3 + ServerExt/Classes/UI_ResetWarning.uc | 2 + ServerExt/Classes/UI_Scoreboard.uc | 6 ++ ServerExt/Classes/UI_UnloadInfo.uc | 3 + ServerExt/Classes/VSFPZedHands.uc | 3 + ServerExt/Classes/VSZombie.uc | 16 +++++ ServerExt/Classes/VS_ZedRecentZed.uc | 3 + ServerExt/Classes/xUI_MapVote.uc | 6 ++ ServerExt/Classes/xVotingReplication.uc | 10 +++ ServerExtMut/Classes/CtryDatabase.uc | 1 + ServerExtMut/Classes/ExtPlayerStat.uc | 14 ++++ ServerExtMut/Classes/ExtStatList.uc | 1 + ServerExtMut/Classes/ExtWebApp.uc | 8 +++ ServerExtMut/Classes/ExtXMLOutput.uc | 3 + ServerExtMut/Classes/ServerExtMut.uc | 34 ++++++++++ ServerExtMut/Classes/xMapVoteHistory.uc | 2 + ServerExtMut/Classes/xVoteWebApp.uc | 8 +++ ServerExtMut/Classes/xVotingHandler.uc | 18 ++++++ 137 files changed, 625 insertions(+) diff --git a/ServerExt/Classes/ExtAutoPurchaseHelper.uc b/ServerExt/Classes/ExtAutoPurchaseHelper.uc index 395093f..daa4df5 100644 --- a/ServerExt/Classes/ExtAutoPurchaseHelper.uc +++ b/ServerExt/Classes/ExtAutoPurchaseHelper.uc @@ -4,6 +4,7 @@ final function class GetBasePerk() { return (ActivePerkManager!=None && ActivePerkManager.CurrentPerk!=None) ? ActivePerkManager.CurrentPerk.BasePerk : None; } + final function Ext_PerkBase GetExtPerk() { return ActivePerkManager!=None ? ActivePerkManager.CurrentPerk : None; diff --git a/ServerExt/Classes/ExtCharDataInfo.uc b/ServerExt/Classes/ExtCharDataInfo.uc index a8430fa..c6f73f5 100644 --- a/ServerExt/Classes/ExtCharDataInfo.uc +++ b/ServerExt/Classes/ExtCharDataInfo.uc @@ -27,6 +27,7 @@ final function FMyCustomChar LoadData() R.AttachmentSkinIndices[2] = AttachmentSkin2; return R; } + final function SaveData(FMyCustomChar R) { HeadMeshIndex = R.HeadMeshIndex; diff --git a/ServerExt/Classes/ExtHUD_PlayerStatus.uc b/ServerExt/Classes/ExtHUD_PlayerStatus.uc index db878a8..b13c8cc 100644 --- a/ServerExt/Classes/ExtHUD_PlayerStatus.uc +++ b/ServerExt/Classes/ExtHUD_PlayerStatus.uc @@ -52,6 +52,7 @@ function UpdatePerk() LastEXPValue = CurrentPerkEXP; } } + function ShowXPBark(int DeltaXP, string IconPath, bool bIsCurrentPerk) { ActionScriptVoid("showXPBark"); diff --git a/ServerExt/Classes/ExtHumanPawn.uc b/ServerExt/Classes/ExtHumanPawn.uc index f3ae20d..22f7b6c 100644 --- a/ServerExt/Classes/ExtHumanPawn.uc +++ b/ServerExt/Classes/ExtHumanPawn.uc @@ -93,6 +93,7 @@ simulated function bool Died(Controller Killer, class damageType, ve } return Super.Died(Killer, DamageType, HitLocation); } + simulated function BroadcastDeathMessage(Controller Killer); function SetBatteryRate(float Rate) @@ -101,6 +102,7 @@ function SetBatteryRate(float Rate) NVGBatteryDrainRate = Default.NVGBatteryDrainRate*Rate; ClientSetBatteryRate(Rate); } + simulated reliable client function ClientSetBatteryRate(float Rate) { BatteryDrainRate = Default.BatteryDrainRate*Rate; @@ -257,6 +259,7 @@ function PlayHit(float Damage, Controller InstigatedBy, vector HitLocation, clas } Super.PlayHit(Damage,InstigatedBy,HitLocation,damageType,Momentum,HitInfo); } + event Landed(vector HitNormal, actor FloorActor) { local float ExcessSpeed; @@ -313,6 +316,7 @@ function bool DoJump(bool bUpdating) } return false; } + simulated function ResetBHopAccel(optional bool bSkipRep) // Set on Landed, or Tick if falling 2D speed is too low. { if (BHopAccelSpeed>0) @@ -325,6 +329,7 @@ simulated function ResetBHopAccel(optional bool bSkipRep) // Set on Landed, or T NotifyHasStopped(); } } + function UpdateGroundSpeed() { local KFInventoryManager InvM; @@ -384,10 +389,12 @@ function DelayedRagdoll() { SetFeignDeath(2.f+FRand()*3.f); } + exec function FeignDeath(float Time) { SetFeignDeath(Time); } + function SetFeignDeath(float Time) { if (WorldInfo.NetMode!=NM_Client && !bFeigningDeath && Health>0 && bCanBecomeRagdoll && NoRagdollChance<1.f && (NoRagdollChance==0.f || FRand()>NoRagdollChance)) @@ -397,6 +404,7 @@ function SetFeignDeath(float Time) SetTimer(Time,false,'UnsetFeignDeath'); } } + function UnsetFeignDeath() { if (bFeigningDeath) @@ -560,6 +568,7 @@ simulated function PlayFeignDeath(bool bEnable, optional bool bForce, optional b SetRotation(NewRotation); } } + final function vector PickNearestNode() { local NavigationPoint N,Best; @@ -576,6 +585,7 @@ final function vector PickNearestNode() } return (Best!=None ? Best.Location : Location); } + simulated function bool SetFeignEndLocation(vector HitLocation, vector FeignLocation) { local vector NewDest; @@ -607,6 +617,7 @@ simulated function bool SetFeignEndLocation(vector HitLocation, vector FeignLoca return false; } + simulated function bool CheckValidLocation(vector FeignLocation) { local vector HitLocation, HitNormal, DestFinalZ; @@ -627,6 +638,7 @@ simulated function bool CheckValidLocation(vector FeignLocation) } return false; } + simulated function SetPawnRBChannels(bool bRagdollMode) { if (bRagdollMode) @@ -649,6 +661,7 @@ simulated function SetPawnRBChannels(bool bRagdollMode) Mesh.SetRBCollidesWithChannel(RBCC_BlockingVolume,FALSE); } } + simulated function PlayRagdollDeath(class DamageType, vector HitLoc) { local TraceHitInfo HitInfo; @@ -693,6 +706,7 @@ simulated function PlayRagdollDeath(class DamageType, vector HitLoc) } } } + simulated function StartFeignDeathRecoveryAnim() { if (FPBodyMesh!=None && !bFPLegsAttached && bOnFirstPerson && Class'ExtPlayerController'.Default.bShowFPLegs) @@ -740,6 +754,7 @@ simulated event FellOutOfWorld(class dmgType) if (Role==ROLE_Authority && NextRedeemTimer P) } return false; } + function bool ApplyPerkName(string S) { local int i; @@ -75,6 +77,7 @@ function bool ApplyPerkName(string S) } return false; } + function ApplyPerk(Ext_PerkBase P) { local KFPawn_Human HP; @@ -142,6 +145,7 @@ function ApplyPerk(Ext_PerkBase P) } } } + simulated final function Ext_PerkBase FindPerk(class P) { local int i; @@ -186,10 +190,12 @@ simulated function InitPerks() } } } + function CheckPlayTime() { ++TotalPlayTime; // Stats. } + function ServerInitPerks() { local int i; @@ -209,6 +215,7 @@ simulated function RegisterPerk(Ext_PerkBase P) UserPerks[UserPerks.Length] = P; P.PerkManager = Self; } + simulated function UnregisterPerk(Ext_PerkBase P) { UserPerks.RemoveItem(P); @@ -415,6 +422,7 @@ function InitiateClientRep() RepIndex = 0; SetTimer(0.01,true,'ReplicateTimer'); } + function ReplicateTimer() { switch (RepState) @@ -478,123 +486,150 @@ simulated function ModifySpeed(out float Speed) if (CurrentPerk!=None) Speed *= CurrentPerk.Modifiers[0]; } + function ModifyDamageGiven(out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class DamageType, optional int HitZoneIdx) { if (CurrentPerk!=None) CurrentPerk.ModifyDamageGiven(InDamage,DamageCauser,MyKFPM,DamageInstigator,DamageType,HitZoneIdx); } + simulated function ModifyDamageTaken(out int InDamage, optional class DamageType, optional Controller InstigatedBy) { if (CurrentPerk!=None) CurrentPerk.ModifyDamageTaken(InDamage,DamageType,InstigatedBy); } + simulated function ModifyRecoil(out float CurrentRecoilModifier, KFWeapon KFW) { if (CurrentPerk!=None) CurrentPerk.ModifyRecoil(CurrentRecoilModifier,KFW); } + simulated function ModifySpread(out float InSpread) { if (CurrentPerk!=None) CurrentPerk.ModifySpread(InSpread); } + simulated function ModifyRateOfFire(out float InRate, KFWeapon KFW) { if (CurrentPerk!=None) CurrentPerk.ModifyRateOfFire(InRate,KFW); } + simulated function float GetReloadRateScale(KFWeapon KFW) { return (CurrentPerk!=None ? CurrentPerk.GetReloadRateScale(KFW) : 1.f); } + simulated function bool GetUsingTactialReload(KFWeapon KFW) { return (CurrentPerk!=None ? CurrentPerk.GetUsingTactialReload(KFW) : false); } + function ModifyHealth(out int InHealth) { if (CurrentPerk!=None) CurrentPerk.ModifyHealth(InHealth); } + function ModifyArmor(out byte MaxArmor) { if (CurrentPerk!=None) CurrentPerk.ModifyArmor(MaxArmor); } + function float GetKnockdownPowerModifier(optional class DamageType, optional byte BodyPart, optional bool bIsSprinting=false) { return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f); } + function float GetStumblePowerModifier(optional KFPawn KFP, optional class DamageType, optional out float CooldownModifier, optional byte BodyPart) { return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f); } + function float GetStunPowerModifier(optional class DamageType, optional byte HitZoneIdx) { return (CurrentPerk!=None ? CurrentPerk.GetStunPowerModifier(DamageType,HitZoneIdx) : 1.f); } + simulated function ModifyMeleeAttackSpeed(out float InDuration, KFWeapon KFW) { if (CurrentPerk!=None) CurrentPerk.ModifyMeleeAttackSpeed(InDuration); } + simulated function class GetGrenadeClass() { return (CurrentPerk!=None ? CurrentPerk.GrenadeClass : GrenadeClass); } + simulated function ModifyWeldingRate(out float FastenRate, out float UnfastenRate) { if (CurrentPerk!=None) CurrentPerk.ModifyWeldingRate(FastenRate,UnfastenRate); } + simulated function bool HasNightVision() { return (CurrentPerk!=None ? CurrentPerk.bHasNightVision : false); } + function bool RepairArmor(Pawn HealTarget) { return (CurrentPerk!=None ? CurrentPerk.RepairArmor(HealTarget) : false); } + function bool ModifyHealAmount(out float HealAmount) { return (CurrentPerk!=None ? CurrentPerk.ModifyHealAmount(HealAmount) : false); } + function bool CanNotBeGrabbed() { return (CurrentPerk!=None ? !CurrentPerk.bCanBeGrabbed : false); } + simulated function ModifyMagSizeAndNumber(KFWeapon KFW, out int MagazineCapacity, optional array< Class > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname) { if (CurrentPerk!=None) CurrentPerk.ModifyMagSizeAndNumber(KFW,MagazineCapacity,WeaponPerkClass,bSecondary,WeaponClassname); } + simulated function ModifySpareAmmoAmount(KFWeapon KFW, out int PrimarySpareAmmo, optional const out STraderItem TraderItem, optional bool bSecondary=false) { if (CurrentPerk!=None) CurrentPerk.ModifySpareAmmoAmount(KFW,PrimarySpareAmmo,TraderItem,bSecondary); } + simulated function ModifyMaxSpareAmmoAmount(KFWeapon KFW, out int SpareAmmoCapacity, optional const out STraderItem TraderItem, optional bool bSecondary=false) { if (CurrentPerk!=None) CurrentPerk.ModifySpareAmmoAmount(KFW,SpareAmmoCapacity,TraderItem,bSecondary); } + simulated function bool ShouldMagSizeModifySpareAmmo(KFWeapon KFW, optional Class WeaponPerkClass) { return (CurrentPerk!=None ? CurrentPerk.ShouldMagSizeModifySpareAmmo(KFW,WeaponPerkClass) : false); } + simulated function ModifyHealerRechargeTime(out float RechargeRate) { if (CurrentPerk!=None) CurrentPerk.ModifyHealerRechargeTime(RechargeRate); } + simulated function bool CanExplosiveWeld() { return (CurrentPerk!=None ? CurrentPerk.bExplosiveWeld : false); } + simulated function bool IsOnContactActive() { return (CurrentPerk!=None ? CurrentPerk.bExplodeOnContact : false); } + function bool CanSpreadNapalm() { if (CurrentPerk!=None && CurrentPerk.bNapalmFire && LastNapalmTime!=WorldInfo.TimeSeconds) @@ -604,34 +639,41 @@ function bool CanSpreadNapalm() } return false; } + simulated function bool IsRangeActive() { return MyPRI!=None ? MyPRI.bExtraFireRange : false; } + simulated function DrawSpecialPerkHUD(Canvas C) { if (CurrentPerk!=None) CurrentPerk.DrawSpecialPerkHUD(C); } + function PlayerKilled(KFPawn_Monster Victim, class DamageType) { if (CurrentPerk!=None) CurrentPerk.PlayerKilled(Victim,DamageType); } + function ModifyBloatBileDoT(out float DoTScaler) { if (CurrentPerk!=None) CurrentPerk.ModifyBloatBileDoT(DoTScaler); } + simulated function bool GetIsUberAmmoActive(KFWeapon KFW) { return (CurrentPerk!=None ? CurrentPerk.GetIsUberAmmoActive(KFW) : false); } + function UpdatePerkHeadShots(ImpactInfo Impact, class DamageType, int NumHit) { if (CurrentPerk!=None) CurrentPerk.UpdatePerkHeadShots(Impact,DamageType,NumHit); } + function CheckForAirborneAgent(KFPawn HealTarget, class DamType, int HealAmount) { if (!bCurrentlyHealing && CurrentPerk!=None) @@ -642,6 +684,7 @@ function CheckForAirborneAgent(KFPawn HealTarget, class DamType, int bCurrentlyHealing = false; } } + simulated function float GetZedTimeModifier(KFWeapon W) { return (CurrentPerk!=None ? CurrentPerk.GetZedTimeModifier(W) : 0.f); @@ -652,6 +695,7 @@ function bool IsAcidicCompoundActive() { return (CurrentPerk!=None ? CurrentPerk.bToxicDart : false); } + function ModifyACDamage(out int InDamage) { if (CurrentPerk!=None && CurrentPerk.bToxicDart) @@ -663,10 +707,12 @@ function bool CouldBeZedShrapnel(class KFDT) { return (CurrentPerk!=None ? (CurrentPerk.bFireExplode && class(KFDT)!=None) : false); } + simulated function bool ShouldShrapnel() { return (CurrentPerk!=None ? (CurrentPerk.bFireExplode && Rand(3)==0) : false); } + function GameExplosion GetExplosionTemplate() { return class'KFPerk_Firebug'.Default.ExplosionTemplate; @@ -677,10 +723,12 @@ function OnWaveEnded() { CurrentPerk.OnWaveEnded(); } + function NotifyZedTimeStarted() { CurrentPerk.NotifyZedTimeStarted(); } + simulated function float GetZedTimeExtensions(byte Level) { return CurrentPerk.GetZedTimeExtensions(Level); @@ -691,14 +739,17 @@ simulated function bool HasHeavyArmor() { return (CurrentPerk!=None && CurrentPerk.bHeavyArmor); } + simulated function float GetIronSightSpeedModifier(KFWeapon KFW) { return (CurrentPerk!=None ? CurrentPerk.GetIronSightSpeedModifier(KFW) : 1.f); } + simulated function float GetCrouchSpeedModifier(KFWeapon KFW) { return (CurrentPerk!=None ? CurrentPerk.GetIronSightSpeedModifier(KFW) : 1.f); } + simulated function bool ShouldKnockDownOnBump() { return (CurrentPerk!=None && CurrentPerk.bHasSWATEnforcer); @@ -709,22 +760,27 @@ simulated function bool ShouldRandSirenResist() { return (Ext_PerkDemolition(CurrentPerk)!=None ? Ext_PerkDemolition(CurrentPerk).bSirenResistance : false); } + simulated function bool IsAoEActive() { return (Ext_PerkDemolition(CurrentPerk)!=None ? Ext_PerkDemolition(CurrentPerk).AOEMult > 1.0f : false); } + simulated function bool ShouldSacrifice() { return (Ext_PerkDemolition(CurrentPerk)!=None ? (Ext_PerkDemolition(CurrentPerk).bCanUseSacrifice && !Ext_PerkDemolition(CurrentPerk).bUsedSacrifice) : false); } + simulated function bool ShouldNeverDud() { return (Ext_PerkDemolition(CurrentPerk)!=None ? Ext_PerkDemolition(CurrentPerk).bProfessionalActive : false); } + function NotifyPerkSacrificeExploded() { if (Ext_PerkDemolition(CurrentPerk) != none) Ext_PerkDemolition(CurrentPerk).bUsedSacrifice = true; } + simulated function float GetAoERadiusModifier() { return (Ext_PerkDemolition(CurrentPerk)!=None ? Ext_PerkDemolition(CurrentPerk).GetAoERadiusModifier() : 1.0); @@ -735,30 +791,37 @@ simulated function bool GetHealingSpeedBoostActive() { return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetHealingSpeedBoostActive() : false); } + simulated function bool GetHealingDamageBoostActive() { return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetHealingDamageBoostActive() : false); } + simulated function bool GetHealingShieldActive() { return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetHealingShieldActive() : false); } + simulated function float GetSelfHealingSurgePct() { return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetSelfHealingSurgePct() : 0.f); } + function bool IsToxicDmgActive() { return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).bUseToxicDamage : false); } + static function class GetToxicDmgTypeClass() { return class'Ext_PerkFieldMedic'.static.GetToxicDmgTypeClass(); } + static function ModifyToxicDmg(out int ToxicDamage) { ToxicDamage = class'Ext_PerkFieldMedic'.static.ModifyToxicDmg(ToxicDamage); } + simulated function float GetSnarePower(optional class DamageType, optional byte HitZoneIdx) { return (Ext_PerkFieldMedic(CurrentPerk)!=None ? Ext_PerkFieldMedic(CurrentPerk).GetSnarePower(DamageType, HitZoneIdx) : 0.f); @@ -769,6 +832,7 @@ simulated function bool CanRepairDoors() { return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).CanRepairDoors() : false); } + simulated function float GetPenetrationModifier(byte Level, class DamageType, optional bool bForce ) { return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).GetPenetrationModifier(Level, DamageType, bForce) : 0.f); diff --git a/ServerExt/Classes/ExtPlayerController.uc b/ServerExt/Classes/ExtPlayerController.uc index f845375..f3957e9 100644 --- a/ServerExt/Classes/ExtPlayerController.uc +++ b/ServerExt/Classes/ExtPlayerController.uc @@ -66,6 +66,7 @@ simulated function PostBeginPlay() SetTimer(0.1,true,'CheckPerk'); } } + simulated function Destroyed() { if (ActivePerkManager!=None) @@ -74,6 +75,7 @@ simulated function Destroyed() if (ActivePerkManager!=None) ActivePerkManager.Destroy(); } + function CheckPerk() { if (CurrentPerk!=ActivePerkManager) @@ -105,21 +107,25 @@ reliable client function AddAdminCmd(string S) AdminCommands[i].Info = Mid(S,j+1); } } + reliable client function ClientSetHUD(class newHUDType) { Super.ClientSetHUD(newHUDType); SendServerSettings(); } + reliable client function ClientSetBonus(SoundCue C, Object FX) { BonusMusic = C; BonusFX = FX; } + simulated final function SendServerSettings() { if (LocalPlayer(Player)!=None) ServerSetSettings(bHideKillMsg,bHideDamageMsg,bHideNumberMsg,bNoMonsterPlayer); } + reliable server function ServerSetSettings(bool bHideKill, bool bHideDmg, bool bHideNum, bool bNoZ) { bClientHideKillMsg = bHideKill; @@ -128,6 +134,7 @@ reliable server function ServerSetSettings(bool bHideKill, bool bHideDmg, bool b bNoDamageTracking = (bHideDmg && bHideNum); bClientNoZed = bNoZ; } + unreliable server function NotifyFixed(byte Mode) { if (Mode==1 && (Pawn==None || (WorldInfo.TimeSeconds-Pawn.SpawnTime)<5.f)) @@ -136,6 +143,7 @@ unreliable server function NotifyFixed(byte Mode) if (Default.bRenderModes && ExtPlayerReplicationInfo(PlayerReplicationInfo)!=None) ExtPlayerReplicationInfo(PlayerReplicationInfo).SetFixedData(Mode); } + delegate OnClientFixed(ExtPlayerController PC, byte Mode); reliable client event ReceiveLocalizedMessage(class Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject) @@ -176,10 +184,12 @@ function AddSmallRadiusKill(byte Difficulty, class PerkClass) { AwardXP(class'KFPerk_Berserker'.static.GetSmallRadiusKillXP(Difficulty)); } + function AddWeldPoints(int PointsWelded) { AwardXP(PointsWelded,1); } + function AddHealPoints(int PointsHealed) { AwardXP(PointsHealed,2); @@ -253,6 +263,7 @@ reliable client function ReceiveServerMOTD(string S, bool bFinal) ServerMOTD $= S; bMOTDReceived = bFinal; } + reliable server function ServerSetMOTD(string S, bool bFinal) { PendingMOTD $= S; @@ -277,6 +288,7 @@ reliable client function ReceiveLevelUp(Ext_PerkBase Perk, int NewLevel) if (Perk!=None) MyGFxHUD.LevelUpNotificationWidget.ShowAchievementNotification(class'KFGFxWidget_LevelUpNotification'.Default.LevelUpString, Perk.PerkName, class'KFGFxWidget_LevelUpNotification'.Default.TierUnlockedString, Perk.GetPerkIconPath(NewLevel), false, NewLevel); } + reliable client function ReceiveKillMessage(class Victim, optional bool bGlobal, optional PlayerReplicationInfo KillerPRI) { if (bHideKillMsg || (bGlobal && KillerPRI==None)) @@ -291,11 +303,13 @@ reliable client function ReceiveKillMessage(class Victim, optional bool bG else if (KFExtendedHUD(myHUD)!=None && Victim!=None) KFExtendedHUD(myHUD).AddKillMessage(Victim,1,KillerPRI,byte(bGlobal)); } + unreliable client function ReceiveDamageMessage(class Victim, int Damage) { if (!bHideDamageMsg && KFExtendedHUD(myHUD)!=None && Victim!=None) KFExtendedHUD(myHUD).AddKillMessage(Victim,Damage,None,2); } + unreliable client function ClientNumberMsg(int Count, vector Pos, EDmgMsgType Type) { if (!bHideNumberMsg && KFExtendedHUD(myHUD)!=None) @@ -356,6 +370,7 @@ reliable client event TeamMessage(PlayerReplicationInfo PRI, coerce string S, na } } } + final function PopScreenMsg(string S) { local int i; @@ -381,6 +396,7 @@ final function PopScreenMsg(string S) } MyGFxHUD.DisplayPriorityMessage(S,L,T); } + reliable client function ClientKillMessage(class DamType, PlayerReplicationInfo Victim, PlayerReplicationInfo KillerPRI, optional class KillerPawn) { local string Msg,S; @@ -435,6 +451,7 @@ reliable client function ClientKillMessage(class DamType, PlayerRepl KFExtendedHUD(myHUD).AddDeathMessage(Msg,S); ClientMessage(S,'DeathMessage'); } + reliable client function ClientZedKillMessage(class DamType, string Victim, optional PlayerReplicationInfo KillerPRI, optional class KillerPawn, optional bool bFFKill) { local string Msg,S; @@ -471,6 +488,7 @@ reliable client function ClientZedKillMessage(class DamType, string KFExtendedHUD(myHUD).AddDeathMessage(Msg,S); ClientMessage(S,'DeathMessage'); } + simulated final function string ParseSuicideMsg(string Victim, class DamType) { local string S; @@ -487,6 +505,7 @@ simulated final function string ParseSuicideMsg(string Victim, class return Victim$Chr(6)$"M was blown into pieces"; return Victim$Chr(6)$"M had a sudden heart attack"; } + simulated final function string ParseKillMsg(string Victim, string Killer, bool bFF, class DamType) { local string T,S; @@ -514,10 +533,12 @@ reliable server function ServerCamera(name NewMode) NewMode = 'ThirdPerson'; SetCameraMode(NewMode); } + exec function Camera(name NewMode) { ServerCamera(PlayerCamera.CameraStyle=='FirstPerson' ? 'ThirdPerson' : 'FirstPerson'); } + simulated final function ToggleFPBody(bool bEnable) { bShowFPLegs = bEnable; @@ -537,6 +558,7 @@ exec function Kick(string S) if (WorldInfo.Game!=None) WorldInfo.Game.Kick(S); } + reliable server function SkipLobby(); Delegate OnChangePerk(ExtPlayerController PC, class NewPerk); @@ -614,6 +636,7 @@ function ShowBossNameplate(KFInterface_MonsterBoss KFBoss, optional string Playe SetTimer(8,false,'HideBossNameplate'); // MAKE sure it goes hidden. } } + function HideBossNameplate() { if (!bNamePlateHidden) @@ -638,12 +661,14 @@ reliable server function ServerGetUnloadInfo(byte CallID, class Pe { OnRequestUnload(Self,CallID,PerkClass,bUnload); } + delegate OnRequestUnload(ExtPlayerController PC, byte CallID, class PerkClass, bool bUnload); reliable client function ClientGotUnloadInfo(byte CallID, byte Code, optional int DataA, optional int DataB) { OnClientGetResponse(CallID,Code,DataA,DataB); } + delegate OnClientGetResponse(byte CallID, byte Code, int DataA, int DataB); function DefClientResponse(byte CallID, byte Code, int DataA, int DataB); @@ -702,6 +727,7 @@ exec function ViewPlayerID(int ID) { ServerViewPlayerID(ID); } + reliable server function ServerViewPlayerID(int ID) { local PlayerReplicationInfo PRI; @@ -738,6 +764,7 @@ reliable server function SpectateRoaming() ClientSetLocation(Location,Rotation); } } + reliable client function ClientSetLocation(vector NewLocation, rotator NewRotation) { SetLocation(NewLocation); @@ -752,6 +779,7 @@ unreliable server function ServerPlayLevelUpDialog() Super.ServerPlayLevelUpDialog(); } } + unreliable server function ServerPlayVoiceCommsDialog(int CommsIndex) { if (NextCommTime0 ? (string(ECurrentPerkPrestige)$"-"$string(ECurrentPerkLevel)) : string(ECurrentPerkLevel)); } + simulated final function color PickPerkColor() { local float P; @@ -219,6 +227,7 @@ function SetInitPlayTime(int T) RepPlayTime = T; SetTimer(5,false,'UnsetPT'); } + function UnsetPT() { bInitialPT = false; @@ -228,6 +237,7 @@ Delegate bool OnRepNextItem(ExtPlayerReplicationInfo PRI, int RepIndex) { return false; } + simulated reliable client function ClientAddTraderItem(int Index, FCustomTraderItem Item) { // Make sure to not execute on server. @@ -254,6 +264,7 @@ simulated static final function KFGFxObject_TraderItems CreateNewList() return L; } + simulated static final function SetWeaponInfo(bool bDedicated, int Index, FCustomTraderItem Item, KFGFxObject_TraderItems List) { local array S; @@ -318,6 +329,7 @@ simulated final function bool ShowAdminName() { return (bAdmin || AdminType<255); } + simulated function string GetAdminName() { switch (AdminType) @@ -335,6 +347,7 @@ simulated function string GetAdminName() return "VIP"; } } + simulated function string GetAdminNameAbr() { switch (AdminType) @@ -352,6 +365,7 @@ simulated function string GetAdminNameAbr() return "V"; } } + simulated function string GetAdminColor() { switch (AdminType) @@ -369,6 +383,7 @@ simulated function string GetAdminColor() return "FFD700"; } } + simulated function color GetAdminColorC() { switch (AdminType) @@ -398,10 +413,12 @@ function SetFixedData(byte M) FixedData = FixedData | M; SetTimer(5,false,'ClearFixed'); } + function ClearFixed() { FixedData = 0; } + simulated final function string GetDesc() { local string S; @@ -418,6 +435,7 @@ simulated final function string GetDesc() S $= "WA."; return S; } + delegate OnModeSet(ExtPlayerReplicationInfo PRI, byte Num); simulated final function bool LoadPlayerCharacter(byte CharIndex, out FMyCustomChar CharInfo) @@ -437,6 +455,7 @@ simulated final function bool LoadPlayerCharacter(byte CharIndex, out FMyCustomC CharInfo = SaveDataObjects[CharIndex].LoadData(); return true; } + simulated final function bool SavePlayerCharacter() { local KFCharacterInfo_Human C; @@ -454,6 +473,7 @@ simulated final function bool SavePlayerCharacter() SaveDataObjects[CustomCharacter.CharacterIndex].SaveData(CustomCharacter); return true; } + simulated function ChangeCharacter(byte CharIndex, optional bool bFirstSet) { local FMyCustomChar NewChar; @@ -484,6 +504,7 @@ simulated function ChangeCharacter(byte CharIndex, optional bool bFirstSet) CharacterCustomizationChanged(); } } + simulated function UpdateCustomization(byte Type, byte MeshIndex, byte SkinIndex, optional byte SlotIndex) { switch (Type) @@ -506,6 +527,7 @@ simulated function UpdateCustomization(byte Type, byte MeshIndex, byte SkinIndex if (WorldInfo.NetMode==NM_Client) CharacterCustomizationChanged(); } + simulated final function RemoveAttachments() { local byte i; @@ -520,6 +542,7 @@ simulated final function RemoveAttachments() if (WorldInfo.NetMode==NM_Client) CharacterCustomizationChanged(); } + simulated function ClearCharacterAttachment(int AttachmentIndex) { if (UsesCustomChar()) @@ -542,6 +565,7 @@ reliable server final function ServerSetCharacterX(FMyCustomChar NewMeshInfo) CharacterCustomizationChanged(); } } + simulated final function bool IsClientCharLocked(byte Index) { if (Index=CharacterArchetypes.Length); } + simulated final function KFCharacterInfo_Human GetSelectedArch() { if (UsesCustomChar()) @@ -688,6 +714,7 @@ final function SaveCustomCharacter(ExtSaveDataBase Data) } } } + final function LoadCustomCharacter(ExtSaveDataBase Data) { local string S; @@ -755,6 +782,7 @@ static final function DummyLoadChar(ExtSaveDataBase Data) for (i=0; i Obj, const out array Configs, delegate GetFunc, delegate SetFunc) { local int i; @@ -56,6 +57,7 @@ final function AddSettingsPage(string PageName, class Obj, const out arr ConfigList[i].GetValue = GetFunc; ConfigList[i].SetValue = SetFunc; } + final function bool HasConfigfor (class Obj) { return (ConfigList.Find('ObjClass',Obj)>=0); diff --git a/ServerExt/Classes/Ext_AICommandBasePet.uc b/ServerExt/Classes/Ext_AICommandBasePet.uc index fc902bc..ffca2bf 100644 --- a/ServerExt/Classes/Ext_AICommandBasePet.uc +++ b/ServerExt/Classes/Ext_AICommandBasePet.uc @@ -31,6 +31,7 @@ final function vector PickPointNearOwner() OwnerPawn = None; return V; } + final function bool CanSeeOwner() { local Pawn P; diff --git a/ServerExt/Classes/Ext_AINoTaunt.uc b/ServerExt/Classes/Ext_AINoTaunt.uc index 9283041..dc7b8db 100644 --- a/ServerExt/Classes/Ext_AINoTaunt.uc +++ b/ServerExt/Classes/Ext_AINoTaunt.uc @@ -4,6 +4,7 @@ function SpecialMoveStarted(bool bForced, Name PrevMove) { KFPOwner.EndSpecialMove(); } + function SpecialMoveEnded(Name PrevMove, Name NextMove) { } diff --git a/ServerExt/Classes/Ext_PerkBase.uc b/ServerExt/Classes/Ext_PerkBase.uc index 4fc8935..ddbb798 100644 --- a/ServerExt/Classes/Ext_PerkBase.uc +++ b/ServerExt/Classes/Ext_PerkBase.uc @@ -214,6 +214,7 @@ simulated function PostBeginPlay() } } } + simulated function InitPerk() { if (PlayerOwner==None) @@ -227,6 +228,7 @@ simulated function InitPerk() } } } + simulated function Destroyed() { local int i; @@ -291,6 +293,7 @@ reliable client simulated function ClientReceiveStat(int Index, int MaxValue, in else PerkStats[Index].UIName = string(Type); // Fallback to stat name then... } } + reliable client simulated function ClientSetStatValue(int Index, int NewValue) { if (PerkStats.Length<=Index) @@ -299,6 +302,7 @@ reliable client simulated function ClientSetStatValue(int Index, int NewValue) if (bPerkNetReady) ApplyEffects(); } + reliable client simulated function ClientReceiveTrait(int Index, class TC, byte Lvl) { if (PerkTraits.Length<=Index) @@ -306,11 +310,13 @@ reliable client simulated function ClientReceiveTrait(int Index, class=0) PerkStats[i].CurrentValue = Value; } + final function int GetPerkStat(name Type) { local int i; @@ -652,6 +659,7 @@ static function CheckConfig() T.Static.CheckConfig(); } } + static function UpdateConfigs(int OldVer) { local int i,j; @@ -716,6 +724,7 @@ static function UpdateConfigs(int OldVer) Default.TraitClasses[i] = PathName(Default.DefTraitList[i]); } } + static final function AddStatsCfg(int StartRange) { local int i,j; @@ -750,6 +759,7 @@ static function InitWebAdmin(ExtWebAdmin_UI UI) T.Static.InitWebAdmin(UI); } } + static function string GetValue(name PropName, int ElementIndex) { switch (PropName) @@ -782,6 +792,7 @@ static function string GetValue(name PropName, int ElementIndex) return string(Default.PrestigeXPReduce); } } + static function ApplyValue(name PropName, int ElementIndex, string Value) { switch (PropName) @@ -833,6 +844,7 @@ static function ApplyValue(name PropName, int ElementIndex, string Value) } StaticSaveConfig(); } + static final function FPerkStat ParsePerkStatStr(string S) { local FPerkStat Res; @@ -959,6 +971,7 @@ simulated unreliable client function ClientAuth() SetOwner(PlayerOwner); ServerAck(); } + unreliable server function ServerAck() { if (!bClientAuthorized) @@ -969,6 +982,7 @@ unreliable server function ServerAck() SetTimer(0.01+FRand()*0.025,true,'ReplicateTimer'); } } + function ReplicateTimer() { switch (RepState) @@ -1001,11 +1015,13 @@ function ReplicateTimer() ClientIsReady(); // Notify client were ready. } } + simulated reliable client function ClientIsReady() { bPerkNetReady = true; ApplyEffects(); } + simulated function string GetStatUIStr(int iStat) { local string S; @@ -1081,6 +1097,7 @@ final function UnloadStats(optional byte Mode) } } } + function FullReset(optional bool bNotPrestige) { UnloadStats(); @@ -1236,6 +1253,7 @@ simulated function ModifyDamageGiven(out int InDamage, optional Actor DamageCaus else if (DamageType==None || DamageType.Name!='KFDT_SuicideExplosive') InDamage *= Modifiers[12]; } + simulated function ModifyDamageTaken(out int InDamage, optional class DamageType, optional Controller InstigatedBy) { if (InDamage>0) @@ -1252,36 +1270,44 @@ simulated function ModifyDamageTaken(out int InDamage, optional class DamageType, optional byte HitZoneIdx) { return Modifiers[7]; @@ -1316,21 +1342,25 @@ function bool RepairArmor(Pawn HealTarget) { return false; } + function bool ModifyHealAmount(out float HealAmount) { HealAmount*=Modifiers[9]; return false; } + simulated function ModifyMagSizeAndNumber(KFWeapon KFW, out int MagazineCapacity, optional array< Class > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname) { if (MagazineCapacity>2 && (KFW==None ? WeaponPerkClass.Find(BasePerk)>=0 : IsWeaponOnPerk(KFW))) // Skip boomstick for this. MagazineCapacity = Min(MagazineCapacity*Modifiers[10],255); } + simulated function ModifySpareAmmoAmount(KFWeapon KFW, out int PrimarySpareAmmo, optional const out STraderItem TraderItem, optional bool bSecondary) { if (KFW==None ? TraderItem.AssociatedPerkClasses.Find(BasePerk)>=0 : IsWeaponOnPerk(KFW)) PrimarySpareAmmo*=Modifiers[11]; } + simulated function bool ShouldMagSizeModifySpareAmmo(KFWeapon KFW, optional Class WeaponPerkClass) { return (KFW==None ? WeaponPerkClass==BasePerk : IsWeaponOnPerk(KFW)); diff --git a/ServerExt/Classes/Ext_PerkBerserker.uc b/ServerExt/Classes/Ext_PerkBerserker.uc index 8a2d59c..cf42e9f 100644 --- a/ServerExt/Classes/Ext_PerkBerserker.uc +++ b/ServerExt/Classes/Ext_PerkBerserker.uc @@ -15,6 +15,7 @@ simulated function ModifyMeleeAttackSpeed(out float InDuration) if (ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f) InDuration *= ZedTimeMeleeAtkRate; } + simulated function ModifyRateOfFire(out float InRate, KFWeapon KFW) { if (IsWeaponOnPerk(KFW)) diff --git a/ServerExt/Classes/Ext_PerkFieldMedic.uc b/ServerExt/Classes/Ext_PerkFieldMedic.uc index cce3b0f..cdd9e61 100644 --- a/ServerExt/Classes/Ext_PerkFieldMedic.uc +++ b/ServerExt/Classes/Ext_PerkFieldMedic.uc @@ -47,6 +47,7 @@ function bool RepairArmor(Pawn HealTarget) } return false; } + function bool ModifyHealAmount(out float HealAmount) { HealAmount*=Modifiers[9]; @@ -128,50 +129,62 @@ simulated function bool GetHealingSpeedBoostActive() { return bHealingBoost; } + simulated function byte GetHealingSpeedBoost() { return byte(HealingSpeedBoostPct); } + simulated function byte GetMaxHealingSpeedBoost() { return MaxHealingSpeedBoost; } + simulated function float GetHealingSpeedBoostDuration() { return HealingSpeedBoostDuration; } + simulated function bool GetHealingDamageBoostActive() { return bHealingDamageBoost; } + simulated function byte GetHealingDamageBoost() { return byte(HealingDamageBoostPct); } + simulated function byte GetMaxHealingDamageBoost() { return MaxHealingDamageBoost; } + simulated function float GetHealingDamageBoostDuration() { return HealingDamageBoostDuration; } + simulated function bool GetHealingShieldActive() { return bHealingShield; } + simulated function byte GetHealingShield() { return byte(HealingShieldPct); } + simulated function byte GetMaxHealingShield() { return MaxHealingShield; } + simulated function float GetHealingShieldDuration() { return HealingShieldDuration; } + simulated function float GetSelfHealingSurgePct() { return SelfHealingSurgePct; diff --git a/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc b/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc index 317f88a..54f0fbd 100644 --- a/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc +++ b/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc @@ -15,6 +15,7 @@ final function SetMaxRhythm(byte MaxCombo) { MaxRhythmCombo = MaxCombo; } + final function ResetRhythm() { MaxRhythmCombo = 0; @@ -66,6 +67,7 @@ function UpdatePerkHeadShots(ImpactInfo Impact, class DamageType, in UpdateDmgScale(true); } } + reliable client function HeadShotMessage(byte HeadShotNum, bool bMissed, byte MaxHits) { local AkEvent TempAkEvent; diff --git a/ServerExt/Classes/Ext_PerkSharpshooter.uc b/ServerExt/Classes/Ext_PerkSharpshooter.uc index 210051d..f72443a 100644 --- a/ServerExt/Classes/Ext_PerkSharpshooter.uc +++ b/ServerExt/Classes/Ext_PerkSharpshooter.uc @@ -16,6 +16,7 @@ simulated function float GetReloadRateScale(KFWeapon KFW) return Super.GetReloadRateScale(KFW)*DireReloadSpeed; return Super.GetReloadRateScale(KFW); } + function float GetStunPowerModifier(optional class DamageType, optional byte HitZoneIdx) { if (ZEDTimeStunPower>0 && HitZoneIdx==HZI_Head && WorldInfo.TimeDilation<1.f && (class(DamageType)!=None && class(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0)) diff --git a/ServerExt/Classes/Ext_TGroupBase.uc b/ServerExt/Classes/Ext_TGroupBase.uc index b94dbba..3c16c98 100644 --- a/ServerExt/Classes/Ext_TGroupBase.uc +++ b/ServerExt/Classes/Ext_TGroupBase.uc @@ -9,6 +9,7 @@ static function string GetUIInfo(Ext_PerkBase Perk) { return (Default.bLimitToOne ? Default.GroupInfo$" (MAX 1)" : Default.GroupInfo); } + static function string GetUIDesc() { return Default.GroupInfo$" trait group"; diff --git a/ServerExt/Classes/Ext_TGroupRegen.uc b/ServerExt/Classes/Ext_TGroupRegen.uc index 3633b1a..0ec92d9 100644 --- a/ServerExt/Classes/Ext_TGroupRegen.uc +++ b/ServerExt/Classes/Ext_TGroupRegen.uc @@ -4,6 +4,7 @@ static function string GetUIInfo(Ext_PerkBase Perk) { return Default.GroupInfo$" (MAX "$GetMaxLimit(Perk)$")"; } + static function string GetUIDesc() { return Super.GetUIDesc()$"|To buy additional regen abilities:|-Prestige level 1 + Perk level 100 = MAX 2 traits|-Prestige level 5 + Perk level 150 = MAX 3 traits"; diff --git a/ServerExt/Classes/Ext_T_AmmoRegHelp.uc b/ServerExt/Classes/Ext_T_AmmoRegHelp.uc index 792cb2f..fdb171f 100644 --- a/ServerExt/Classes/Ext_T_AmmoRegHelp.uc +++ b/ServerExt/Classes/Ext_T_AmmoRegHelp.uc @@ -11,6 +11,7 @@ function PostBeginPlay() Destroy(); else SetTimer(29+FRand(),true); } + function Timer() { local KFWeapon W; diff --git a/ServerExt/Classes/Ext_T_AutoFireHelper.uc b/ServerExt/Classes/Ext_T_AutoFireHelper.uc index 1fb2ca7..4c03108 100644 --- a/ServerExt/Classes/Ext_T_AutoFireHelper.uc +++ b/ServerExt/Classes/Ext_T_AutoFireHelper.uc @@ -19,11 +19,13 @@ function PostBeginPlay() Destroy(); else SetTimer(0.5+FRand()*0.4,true); } + function Timer() { if (PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None) Destroy(); } + simulated function Tick(float Delta) { if (WorldInfo.NetMode==NM_DedicatedServer diff --git a/ServerExt/Classes/Ext_T_HealthRegHelp.uc b/ServerExt/Classes/Ext_T_HealthRegHelp.uc index d0f7fa6..1b5230c 100644 --- a/ServerExt/Classes/Ext_T_HealthRegHelp.uc +++ b/ServerExt/Classes/Ext_T_HealthRegHelp.uc @@ -11,6 +11,7 @@ function PostBeginPlay() Destroy(); else SetTimer(9+FRand(),true); } + function Timer() { if (PawnOwner==None || PawnOwner.Health<=0) diff --git a/ServerExt/Classes/Ext_T_MonsterPRI.uc b/ServerExt/Classes/Ext_T_MonsterPRI.uc index b8603b9..eea079e 100644 --- a/ServerExt/Classes/Ext_T_MonsterPRI.uc +++ b/ServerExt/Classes/Ext_T_MonsterPRI.uc @@ -21,6 +21,7 @@ simulated event PostBeginPlay() if (WorldInfo.NetMode!=NM_Client) SetTimer(1,true); } + simulated event Destroyed() { if (OwnerHUD!=None) @@ -31,6 +32,7 @@ simulated event Destroyed() if (WorldInfo.GRI != None) WorldInfo.GRI.RemovePRI(self); } + simulated event ReplicatedEvent(name VarName) { if (VarName=='OwnerPRI' && OwnerPRI!=None) @@ -38,6 +40,7 @@ simulated event ReplicatedEvent(name VarName) else if (VarName=='MonsterType' && MonsterType!=None) MonsterName = Class'KFExtendedHUD'.Static.GetNameOf(MonsterType); } + simulated function Timer() { if (PawnOwner==None || PawnOwner.Health<=0) @@ -45,6 +48,7 @@ simulated function Timer() else if (HealthStatus!=PawnOwner.Health) HealthStatus = PawnOwner.Health; } + simulated final function NotifyOwner() { local PlayerController PC; diff --git a/ServerExt/Classes/Ext_T_SupplierInteract.uc b/ServerExt/Classes/Ext_T_SupplierInteract.uc index 4d87949..26bad5c 100644 --- a/ServerExt/Classes/Ext_T_SupplierInteract.uc +++ b/ServerExt/Classes/Ext_T_SupplierInteract.uc @@ -119,6 +119,7 @@ simulated function bool GetCanInteract(Pawn User, optional bool bInteractIfTrue } return true; } + function CleanupUsers() { local int i; @@ -129,6 +130,7 @@ function CleanupUsers() if (ActiveUsers.Length==0) ClearTimer('CleanupUsers'); } + final function GiveAmmunition(KFPawn_Human Other) { local KFWeapon KFW; @@ -167,6 +169,7 @@ final function GiveAmmunition(KFPawn_Human Other) } } } + simulated final function UsedOnClient(Pawn User) { local ExtPlayerReplicationInfo PRI; diff --git a/ServerExt/Classes/Ext_T_UnCloakHelper.uc b/ServerExt/Classes/Ext_T_UnCloakHelper.uc index 54d7738..9e3c5dd 100644 --- a/ServerExt/Classes/Ext_T_UnCloakHelper.uc +++ b/ServerExt/Classes/Ext_T_UnCloakHelper.uc @@ -11,6 +11,7 @@ function PostBeginPlay() Destroy(); else SetTimer(0.5+FRand()*0.1,true); } + function Timer() { local KFPawn_Monster M; diff --git a/ServerExt/Classes/Ext_T_ZEDHelper.uc b/ServerExt/Classes/Ext_T_ZEDHelper.uc index ed99d43..4ce978f 100644 --- a/ServerExt/Classes/Ext_T_ZEDHelper.uc +++ b/ServerExt/Classes/Ext_T_ZEDHelper.uc @@ -28,6 +28,7 @@ function PostBeginPlay() SetTimer(1+(FRand()*0.1),true); } } + function Timer() { if (PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.PlayerReplicationInfo==None) @@ -64,11 +65,13 @@ function Timer() } else NoLiveCounter = 5; } + function Destroyed() { if (LiveHelper!=None && LiveHelper.Health>0) LiveHelper.Died(None,class'DmgType_Suicided',vect(0,0,0)); } + final function bool HasLiveZeds() { local KFPawn_Monster M; @@ -81,6 +84,7 @@ final function bool HasLiveZeds() return true; return false; } + final function SpawnHelper() { local class MC; @@ -188,6 +192,7 @@ final function SetDamageScale(float Sc) if (LiveHelper!=None) LiveHelper.DamageScaling = DamageScale; } + final function SetHealthScale(float Sc) { HPScale = Default.HPScale*Sc; @@ -217,6 +222,7 @@ static final function LoadMonsterList() Default.ZedTypes[i].Zeds[Default.ZedTypes[i].Zeds.Length] = Class'KFPawn_ZedClot_Alpha'; } } + static final function class PickRandomMonster(byte Level, bool bNotBoss) { local byte i; diff --git a/ServerExt/Classes/Ext_TraitAcidicCompound.uc b/ServerExt/Classes/Ext_TraitAcidicCompound.uc index 293c147..ada0750 100644 --- a/ServerExt/Classes/Ext_TraitAcidicCompound.uc +++ b/ServerExt/Classes/Ext_TraitAcidicCompound.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkFieldMedic(Perk).bUseToxicDamage = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkFieldMedic(Perk).bUseToxicDamage = false; diff --git a/ServerExt/Classes/Ext_TraitAirborne.uc b/ServerExt/Classes/Ext_TraitAirborne.uc index 40f8499..1831f32 100644 --- a/ServerExt/Classes/Ext_TraitAirborne.uc +++ b/ServerExt/Classes/Ext_TraitAirborne.uc @@ -7,6 +7,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD Ext_PerkFieldMedic(Perk).AirborneAgentHealRate = Default.HealRates[Level-1]; Ext_PerkFieldMedic(Perk).AirborneAgentLevel = (Level<4 ? 1 : 2); } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkFieldMedic(Perk).AirborneAgentLevel = 0; diff --git a/ServerExt/Classes/Ext_TraitAirborneAgent.uc b/ServerExt/Classes/Ext_TraitAirborneAgent.uc index 7de0fb9..26e55cf 100644 --- a/ServerExt/Classes/Ext_TraitAirborneAgent.uc +++ b/ServerExt/Classes/Ext_TraitAirborneAgent.uc @@ -33,6 +33,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkFieldMedic(Perk).bUseAirborneAgent = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkFieldMedic(Perk).bUseAirborneAgent = false; diff --git a/ServerExt/Classes/Ext_TraitAmmoReg.uc b/ServerExt/Classes/Ext_TraitAmmoReg.uc index 7c522de..edbb2ae 100644 --- a/ServerExt/Classes/Ext_TraitAmmoReg.uc +++ b/ServerExt/Classes/Ext_TraitAmmoReg.uc @@ -10,6 +10,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (H!=None) H.RegCount = Default.RegenValues[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_AmmoRegHelp H; diff --git a/ServerExt/Classes/Ext_TraitArmorReg.uc b/ServerExt/Classes/Ext_TraitArmorReg.uc index 97048c8..acf4f30 100644 --- a/ServerExt/Classes/Ext_TraitArmorReg.uc +++ b/ServerExt/Classes/Ext_TraitArmorReg.uc @@ -8,6 +8,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (H!=None) H.RegCount = Default.RegenValues[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_ArmorRegHelp H; diff --git a/ServerExt/Classes/Ext_TraitArmorRep.uc b/ServerExt/Classes/Ext_TraitArmorRep.uc index fc59049..1ed487b 100644 --- a/ServerExt/Classes/Ext_TraitArmorRep.uc +++ b/ServerExt/Classes/Ext_TraitArmorRep.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkFieldMedic(Perk).RepairArmorRate = float(Level)*0.05f; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkFieldMedic(Perk).RepairArmorRate = 0; diff --git a/ServerExt/Classes/Ext_TraitAutoFire.uc b/ServerExt/Classes/Ext_TraitAutoFire.uc index b5ba8ca..71fae30 100644 --- a/ServerExt/Classes/Ext_TraitAutoFire.uc +++ b/ServerExt/Classes/Ext_TraitAutoFire.uc @@ -7,6 +7,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level H = Player.Spawn(class'Ext_T_AutoFireHelper',Player); H.AssociatedPerkClass = Perk.BasePerk; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_AutoFireHelper H; diff --git a/ServerExt/Classes/Ext_TraitBase.uc b/ServerExt/Classes/Ext_TraitBase.uc index c268098..11d763e 100644 --- a/ServerExt/Classes/Ext_TraitBase.uc +++ b/ServerExt/Classes/Ext_TraitBase.uc @@ -96,6 +96,7 @@ static function Ext_TraitDataStore Initializefor (Ext_PerkBase Perk, ExtPlayerCo } return T; } + static function CleanupTrait(ExtPlayerController Player, Ext_PerkBase Perk, optional Ext_TraitDataStore Data) { if (Data!=None) @@ -130,10 +131,12 @@ static final function string IntToStr(int Value, optional byte MaxVal) // Helper return Chr((Value & 32767)+1) $ Chr(((Value >> 15) & 32767)+1); } } + static final function string InlineString(string Str) // Helper function to append a string line to a text using a length char in front. { return IntToStr(Len(Str))$Str; } + static final function int StrToInt(out string Value, optional byte MaxVal) // Reverse. { local int Res; @@ -151,6 +154,7 @@ static final function int StrToInt(out string Value, optional byte MaxVal) // Re } return Res; } + static final function string GetInlineStr(out string S) // Reverse. { local int l; @@ -172,6 +176,7 @@ static function string GetRepData() S $= IntToStr(Default.LevelCosts[i]); return S; } + static function string ClientSetRepData(string S) { local int i; @@ -193,6 +198,7 @@ static function CheckConfig() StaticSaveConfig(); } } + static function UpdateConfigs(int OldVer) { if (OldVer==0) @@ -207,6 +213,7 @@ static function InitWebAdmin(ExtWebAdmin_UI UI) { UI.AddSettingsPage("Trait "$Default.TraitName,Default.Class,Default.WebConfigs,GetValue,ApplyValue); } + static function string GetValue(name PropName, int ElementIndex) { switch (PropName) @@ -219,6 +226,7 @@ static function string GetValue(name PropName, int ElementIndex) return string(Default.bDisabled); } } + static function ApplyValue(name PropName, int ElementIndex, string Value) { switch (PropName) diff --git a/ServerExt/Classes/Ext_TraitBoomWeld.uc b/ServerExt/Classes/Ext_TraitBoomWeld.uc index 487f116..0fc285e 100644 --- a/ServerExt/Classes/Ext_TraitBoomWeld.uc +++ b/ServerExt/Classes/Ext_TraitBoomWeld.uc @@ -5,6 +5,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bExplosiveWeld = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bExplosiveWeld = false; diff --git a/ServerExt/Classes/Ext_TraitBunnyHop.uc b/ServerExt/Classes/Ext_TraitBunnyHop.uc index 4dd76c9..9d57ee7 100644 --- a/ServerExt/Classes/Ext_TraitBunnyHop.uc +++ b/ServerExt/Classes/Ext_TraitBunnyHop.uc @@ -5,6 +5,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (ExtHumanPawn(Player)!=None) ExtHumanPawn(Player).bHasBunnyHop = true; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (ExtHumanPawn(Player)!=None) diff --git a/ServerExt/Classes/Ext_TraitCarryCap.uc b/ServerExt/Classes/Ext_TraitCarryCap.uc index 6468c0d..d99dd23 100644 --- a/ServerExt/Classes/Ext_TraitCarryCap.uc +++ b/ServerExt/Classes/Ext_TraitCarryCap.uc @@ -10,6 +10,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (M!=None) M.MaxCarryBlocks = M.Default.MaxCarryBlocks+Default.CarryAdds[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local KFInventoryManager M; diff --git a/ServerExt/Classes/Ext_TraitContactNade.uc b/ServerExt/Classes/Ext_TraitContactNade.uc index d4bb0b7..fef629b 100644 --- a/ServerExt/Classes/Ext_TraitContactNade.uc +++ b/ServerExt/Classes/Ext_TraitContactNade.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bExplodeOnContact = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bExplodeOnContact = false; diff --git a/ServerExt/Classes/Ext_TraitDemoCriticalHit.uc b/ServerExt/Classes/Ext_TraitDemoCriticalHit.uc index e20d73d..5c6eee1 100644 --- a/ServerExt/Classes/Ext_TraitDemoCriticalHit.uc +++ b/ServerExt/Classes/Ext_TraitDemoCriticalHit.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkDemolition(Perk).bCriticalHit = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkDemolition(Perk).bCriticalHit = false; diff --git a/ServerExt/Classes/Ext_TraitDemoDirectHit.uc b/ServerExt/Classes/Ext_TraitDemoDirectHit.uc index 7802182..113e345 100644 --- a/ServerExt/Classes/Ext_TraitDemoDirectHit.uc +++ b/ServerExt/Classes/Ext_TraitDemoDirectHit.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkDemolition(Perk).bDirectHit = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkDemolition(Perk).bDirectHit = false; diff --git a/ServerExt/Classes/Ext_TraitDemoReactiveArmor.uc b/ServerExt/Classes/Ext_TraitDemoReactiveArmor.uc index 17fd410..743a989 100644 --- a/ServerExt/Classes/Ext_TraitDemoReactiveArmor.uc +++ b/ServerExt/Classes/Ext_TraitDemoReactiveArmor.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkDemolition(Perk).bCanUseSacrifice = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkDemolition(Perk).bCanUseSacrifice = false; diff --git a/ServerExt/Classes/Ext_TraitDireReload.uc b/ServerExt/Classes/Ext_TraitDireReload.uc index 44c3c91..30b5642 100644 --- a/ServerExt/Classes/Ext_TraitDireReload.uc +++ b/ServerExt/Classes/Ext_TraitDireReload.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkSharpshooter(Perk).bHasDireReload = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkSharpshooter(Perk).bHasDireReload = false; diff --git a/ServerExt/Classes/Ext_TraitDuracell.uc b/ServerExt/Classes/Ext_TraitDuracell.uc index 70fd17f..5a71fea 100644 --- a/ServerExt/Classes/Ext_TraitDuracell.uc +++ b/ServerExt/Classes/Ext_TraitDuracell.uc @@ -7,6 +7,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (ExtHumanPawn(Player)!=None) ExtHumanPawn(Player).SetBatteryRate(Default.BatteryCharges[Level-1]); } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (ExtHumanPawn(Player)!=None) diff --git a/ServerExt/Classes/Ext_TraitEliteReload.uc b/ServerExt/Classes/Ext_TraitEliteReload.uc index 3e91088..64a334b 100644 --- a/ServerExt/Classes/Ext_TraitEliteReload.uc +++ b/ServerExt/Classes/Ext_TraitEliteReload.uc @@ -4,6 +4,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level { Perk.bTacticalReload = true; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bTacticalReload = false; diff --git a/ServerExt/Classes/Ext_TraitEnemyHP.uc b/ServerExt/Classes/Ext_TraitEnemyHP.uc index e494817..8c3efbf 100644 --- a/ServerExt/Classes/Ext_TraitEnemyHP.uc +++ b/ServerExt/Classes/Ext_TraitEnemyHP.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.EnemyHealthRange = Level; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.EnemyHealthRange = 0; diff --git a/ServerExt/Classes/Ext_TraitFanfire.uc b/ServerExt/Classes/Ext_TraitFanfire.uc index 99c1237..8b7147a 100644 --- a/ServerExt/Classes/Ext_TraitFanfire.uc +++ b/ServerExt/Classes/Ext_TraitFanfire.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkGunslinger(Perk).bHasFanfire = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkGunslinger(Perk).bHasFanfire = false; diff --git a/ServerExt/Classes/Ext_TraitFireExplode.uc b/ServerExt/Classes/Ext_TraitFireExplode.uc index d9e5717..6faa4d8 100644 --- a/ServerExt/Classes/Ext_TraitFireExplode.uc +++ b/ServerExt/Classes/Ext_TraitFireExplode.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bFireExplode = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bFireExplode = false; diff --git a/ServerExt/Classes/Ext_TraitFireRange.uc b/ServerExt/Classes/Ext_TraitFireRange.uc index d7c0793..1b0d689 100644 --- a/ServerExt/Classes/Ext_TraitFireRange.uc +++ b/ServerExt/Classes/Ext_TraitFireRange.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = false; diff --git a/ServerExt/Classes/Ext_TraitGrenadeCap.uc b/ServerExt/Classes/Ext_TraitGrenadeCap.uc index 3291be4..0a8c267 100644 --- a/ServerExt/Classes/Ext_TraitGrenadeCap.uc +++ b/ServerExt/Classes/Ext_TraitGrenadeCap.uc @@ -7,6 +7,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.PerkManager.SetGrenadeCap(Default.CarryAdds[Level-1]); } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.PerkManager.SetGrenadeCap(0); diff --git a/ServerExt/Classes/Ext_TraitGrenadeSUpg.uc b/ServerExt/Classes/Ext_TraitGrenadeSUpg.uc index 83dc6a2..4218d70 100644 --- a/ServerExt/Classes/Ext_TraitGrenadeSUpg.uc +++ b/ServerExt/Classes/Ext_TraitGrenadeSUpg.uc @@ -5,6 +5,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD if (Level==1) Perk.GrenadeClass = Perk.SuperGrenade; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.GrenadeClass = Perk.Default.GrenadeClass; diff --git a/ServerExt/Classes/Ext_TraitGrenadeUpg.uc b/ServerExt/Classes/Ext_TraitGrenadeUpg.uc index 34a4a0f..38f30f3 100644 --- a/ServerExt/Classes/Ext_TraitGrenadeUpg.uc +++ b/ServerExt/Classes/Ext_TraitGrenadeUpg.uc @@ -6,6 +6,7 @@ static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk) return false; return Super.MeetsRequirements(Lvl,Perk); } + static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (Level==1) @@ -13,6 +14,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD else if (Level==2) Perk.GrenadeClass = Perk.SuperGrenade; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.GrenadeClass = Perk.Default.GrenadeClass; diff --git a/ServerExt/Classes/Ext_TraitHealthReg.uc b/ServerExt/Classes/Ext_TraitHealthReg.uc index 40e346b..045271e 100644 --- a/ServerExt/Classes/Ext_TraitHealthReg.uc +++ b/ServerExt/Classes/Ext_TraitHealthReg.uc @@ -10,6 +10,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (H!=None) H.RegCount = Default.RegenValues[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_HealthRegHelp H; diff --git a/ServerExt/Classes/Ext_TraitHeavyArmor.uc b/ServerExt/Classes/Ext_TraitHeavyArmor.uc index 3074cd4..368169b 100644 --- a/ServerExt/Classes/Ext_TraitHeavyArmor.uc +++ b/ServerExt/Classes/Ext_TraitHeavyArmor.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bHeavyArmor = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bHeavyArmor = false; diff --git a/ServerExt/Classes/Ext_TraitKnockback.uc b/ServerExt/Classes/Ext_TraitKnockback.uc index b7fd800..ef9fa77 100644 --- a/ServerExt/Classes/Ext_TraitKnockback.uc +++ b/ServerExt/Classes/Ext_TraitKnockback.uc @@ -5,6 +5,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (ExtHumanPawn(Player)!=None) ExtHumanPawn(Player).KnockbackResist = Default.ChanceValues[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (ExtHumanPawn(Player)!=None) diff --git a/ServerExt/Classes/Ext_TraitNapalm.uc b/ServerExt/Classes/Ext_TraitNapalm.uc index 3d3d0d5..2fef253 100644 --- a/ServerExt/Classes/Ext_TraitNapalm.uc +++ b/ServerExt/Classes/Ext_TraitNapalm.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bNapalmFire = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bNapalmFire = false; diff --git a/ServerExt/Classes/Ext_TraitNightvision.uc b/ServerExt/Classes/Ext_TraitNightvision.uc index 001c7a0..35e313a 100644 --- a/ServerExt/Classes/Ext_TraitNightvision.uc +++ b/ServerExt/Classes/Ext_TraitNightvision.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bHasNightVision = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bHasNightVision = false; diff --git a/ServerExt/Classes/Ext_TraitRackEmUp.uc b/ServerExt/Classes/Ext_TraitRackEmUp.uc index 4a9ac43..7511cbc 100644 --- a/ServerExt/Classes/Ext_TraitRackEmUp.uc +++ b/ServerExt/Classes/Ext_TraitRackEmUp.uc @@ -6,6 +6,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkRhythmPerkBase(Perk).SetMaxRhythm(Default.ComboSize[Level-1]); } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkRhythmPerkBase(Perk).ResetRhythm(); diff --git a/ServerExt/Classes/Ext_TraitRagdoll.uc b/ServerExt/Classes/Ext_TraitRagdoll.uc index 5d45f3b..17ab99e 100644 --- a/ServerExt/Classes/Ext_TraitRagdoll.uc +++ b/ServerExt/Classes/Ext_TraitRagdoll.uc @@ -7,6 +7,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (ExtHumanPawn(Player)!=None) ExtHumanPawn(Player).NoRagdollChance = Default.ChanceValues[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (ExtHumanPawn(Player)!=None) diff --git a/ServerExt/Classes/Ext_TraitRanger.uc b/ServerExt/Classes/Ext_TraitRanger.uc index 293d02d..e8a2119 100644 --- a/ServerExt/Classes/Ext_TraitRanger.uc +++ b/ServerExt/Classes/Ext_TraitRanger.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkSharpshooter(Perk).ZEDTimeStunPower = 4.f; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkSharpshooter(Perk).ZEDTimeStunPower = 0.f; diff --git a/ServerExt/Classes/Ext_TraitRapidAssault.uc b/ServerExt/Classes/Ext_TraitRapidAssault.uc index 92ecb55..1e479b3 100644 --- a/ServerExt/Classes/Ext_TraitRapidAssault.uc +++ b/ServerExt/Classes/Ext_TraitRapidAssault.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkSWAT(Perk).bRapidAssault = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkSWAT(Perk).bRapidAssault = false; diff --git a/ServerExt/Classes/Ext_TraitSWATEnforcer.uc b/ServerExt/Classes/Ext_TraitSWATEnforcer.uc index e876c14..3b9f83a 100644 --- a/ServerExt/Classes/Ext_TraitSWATEnforcer.uc +++ b/ServerExt/Classes/Ext_TraitSWATEnforcer.uc @@ -5,15 +5,18 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (ExtHumanPawn(Player)!=None) ExtHumanPawn(Player).bMovesFastInZedTime = true; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (ExtHumanPawn(Player)!=None) ExtHumanPawn(Player).bMovesFastInZedTime = false; } + static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bHasSWATEnforcer = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bHasSWATEnforcer = false; diff --git a/ServerExt/Classes/Ext_TraitSirenResistance.uc b/ServerExt/Classes/Ext_TraitSirenResistance.uc index 13be550..194fa9c 100644 --- a/ServerExt/Classes/Ext_TraitSirenResistance.uc +++ b/ServerExt/Classes/Ext_TraitSirenResistance.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkDemolition(Perk).bSirenResistance = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkDemolition(Perk).bSirenResistance = false; diff --git a/ServerExt/Classes/Ext_TraitSpartan.uc b/ServerExt/Classes/Ext_TraitSpartan.uc index ada61b2..daf7fe2 100644 --- a/ServerExt/Classes/Ext_TraitSpartan.uc +++ b/ServerExt/Classes/Ext_TraitSpartan.uc @@ -8,6 +8,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level ExtHumanPawn(Player).bMovesFastInZedTime = true; Ext_PerkBerserker(Perk).ZedTimeMeleeAtkRate = 1.f/Default.AtkRates[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { if (ExtHumanPawn(Player)!=None) diff --git a/ServerExt/Classes/Ext_TraitSupply.uc b/ServerExt/Classes/Ext_TraitSupply.uc index df43e53..796dbab 100644 --- a/ServerExt/Classes/Ext_TraitSupply.uc +++ b/ServerExt/Classes/Ext_TraitSupply.uc @@ -6,10 +6,12 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level { Ext_TraitSupplyData(Data).SpawnSupplier(Player); } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_TraitSupplyData(Data).RemoveSupplier(); } + static function PlayerDied(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_TraitSupplyData(Data).RemoveSupplier(); diff --git a/ServerExt/Classes/Ext_TraitSupplyData.uc b/ServerExt/Classes/Ext_TraitSupplyData.uc index 4254170..16eb5ae 100644 --- a/ServerExt/Classes/Ext_TraitSupplyData.uc +++ b/ServerExt/Classes/Ext_TraitSupplyData.uc @@ -16,6 +16,7 @@ final function SpawnSupplier(KFPawn_Human H, optional bool bGrenades) if (PlayerOwner!=None && ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo)!=None) ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo).HasSupplier = class(TraitClass); } + final function RemoveSupplier() { if (SupplyInteraction!=None) @@ -24,6 +25,7 @@ final function RemoveSupplier() if (PlayerOwner!=None && ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo)!=None) ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo).HasSupplier = None; } + function Destroyed() { RemoveSupplier(); diff --git a/ServerExt/Classes/Ext_TraitTacticalMove.uc b/ServerExt/Classes/Ext_TraitTacticalMove.uc index 0a9b716..5bcca7d 100644 --- a/ServerExt/Classes/Ext_TraitTacticalMove.uc +++ b/ServerExt/Classes/Ext_TraitTacticalMove.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkSWAT(Perk).RepTacticalMove = Level; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkSWAT(Perk).RepTacticalMove = 0; diff --git a/ServerExt/Classes/Ext_TraitToxicDart.uc b/ServerExt/Classes/Ext_TraitToxicDart.uc index e1b86cf..7ccb793 100644 --- a/ServerExt/Classes/Ext_TraitToxicDart.uc +++ b/ServerExt/Classes/Ext_TraitToxicDart.uc @@ -7,6 +7,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD Perk.ToxicDartDamage = Default.DartDamages[Level-1]; Perk.bToxicDart = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bToxicDart = false; diff --git a/ServerExt/Classes/Ext_TraitUberAmmo.uc b/ServerExt/Classes/Ext_TraitUberAmmo.uc index c4c23b1..077c714 100644 --- a/ServerExt/Classes/Ext_TraitUberAmmo.uc +++ b/ServerExt/Classes/Ext_TraitUberAmmo.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkGunslinger(Perk).bHasUberAmmo = true; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkGunslinger(Perk).bHasUberAmmo = false; diff --git a/ServerExt/Classes/Ext_TraitUnCloak.uc b/ServerExt/Classes/Ext_TraitUnCloak.uc index 10954a7..51873af 100644 --- a/ServerExt/Classes/Ext_TraitUnCloak.uc +++ b/ServerExt/Classes/Ext_TraitUnCloak.uc @@ -10,6 +10,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (H!=None) H.HandleRadius = Default.RadiusValues[Level-1]; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_UnCloakHelper H; diff --git a/ServerExt/Classes/Ext_TraitUnGrab.uc b/ServerExt/Classes/Ext_TraitUnGrab.uc index 5fd8b6b..2d7d71f 100644 --- a/ServerExt/Classes/Ext_TraitUnGrab.uc +++ b/ServerExt/Classes/Ext_TraitUnGrab.uc @@ -4,6 +4,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.bCanBeGrabbed = false; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.bCanBeGrabbed = true; diff --git a/ServerExt/Classes/Ext_TraitVampire.uc b/ServerExt/Classes/Ext_TraitVampire.uc index 214a9a2..678e73d 100644 --- a/ServerExt/Classes/Ext_TraitVampire.uc +++ b/ServerExt/Classes/Ext_TraitVampire.uc @@ -6,6 +6,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Ext_PerkBerserker(Perk).VampRegenRate = Default.RegenRate[Level-1]; } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Ext_PerkBerserker(Perk).VampRegenRate = 0; diff --git a/ServerExt/Classes/Ext_TraitWeapons.uc b/ServerExt/Classes/Ext_TraitWeapons.uc index 6309ac4..6fb79de 100644 --- a/ServerExt/Classes/Ext_TraitWeapons.uc +++ b/ServerExt/Classes/Ext_TraitWeapons.uc @@ -13,6 +13,7 @@ static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk) return false; return Super.MeetsRequirements(Lvl,Perk); } + static final function bool HasMaxCarry(Ext_PerkBase Perk) { local int i; @@ -20,6 +21,7 @@ static final function bool HasMaxCarry(Ext_PerkBase Perk) i = Perk.PerkTraits.Find('TraitType',Class'Ext_TraitCarryCap'); return (i==-1 || Perk.PerkTraits[i].CurrentLevel>=3); } + static function string GetPerkDescription() { return Super.GetPerkDescription()$"|- Level 4 requires perk level 50 and level 3 carry capacity trait!"; @@ -29,6 +31,7 @@ static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitD { Perk.PrimaryWeapon = None; // Give a new primary weapon. } + static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { Perk.PrimaryWeapon = Perk.Default.PrimaryWeapon; @@ -56,6 +59,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (M!=None) M.bInfiniteWeight = false; } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local class IC; diff --git a/ServerExt/Classes/Ext_TraitZED_Damage.uc b/ServerExt/Classes/Ext_TraitZED_Damage.uc index 683e0ec..7b6bd91 100644 --- a/ServerExt/Classes/Ext_TraitZED_Damage.uc +++ b/ServerExt/Classes/Ext_TraitZED_Damage.uc @@ -10,6 +10,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) H.SetDamageScale(Default.DamList[Level-1]); } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_ZEDHelper H; diff --git a/ServerExt/Classes/Ext_TraitZED_Health.uc b/ServerExt/Classes/Ext_TraitZED_Health.uc index 3633e0f..af9dccf 100644 --- a/ServerExt/Classes/Ext_TraitZED_Health.uc +++ b/ServerExt/Classes/Ext_TraitZED_Health.uc @@ -10,6 +10,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) H.SetHealthScale(Default.HPList[Level-1]); } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_ZEDHelper H; diff --git a/ServerExt/Classes/Ext_TraitZED_Summon.uc b/ServerExt/Classes/Ext_TraitZED_Summon.uc index 7c1b0ce..9391334 100644 --- a/ServerExt/Classes/Ext_TraitZED_Summon.uc +++ b/ServerExt/Classes/Ext_TraitZED_Summon.uc @@ -83,6 +83,7 @@ static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk) } return true; } + static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_ZEDHelper H; @@ -97,6 +98,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (Perk.PerkTraits[i].CurrentLevel>0 && Class(Perk.PerkTraits[i].TraitType)!=None && !Class(Perk.PerkTraits[i].TraitType).Default.bIsSummoner) Perk.PerkTraits[i].TraitType.Static.ApplyEffectOn(Player,Perk,Level,Data); } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_ZEDHelper H; @@ -115,6 +117,7 @@ static function string GetRepData() S $= IntToStr(Default.FinalLevelPrestige); return S; } + static function string ClientSetRepData(string S) { S = Super.ClientSetRepData(S); @@ -136,6 +139,7 @@ static function string GetValue(name PropName, int ElementIndex) return Super.GetValue(PropName,ElementIndex); } } + static function ApplyValue(name PropName, int ElementIndex, string Value) { switch (PropName) diff --git a/ServerExt/Classes/Ext_TraitZED_SummonExt.uc b/ServerExt/Classes/Ext_TraitZED_SummonExt.uc index b4724d0..e75fa23 100644 --- a/ServerExt/Classes/Ext_TraitZED_SummonExt.uc +++ b/ServerExt/Classes/Ext_TraitZED_SummonExt.uc @@ -33,6 +33,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level if (Perk.PerkTraits[i].CurrentLevel>0 && Class(Perk.PerkTraits[i].TraitType)!=None && !Class(Perk.PerkTraits[i].TraitType).Default.bIsSummoner) Perk.PerkTraits[i].TraitType.Static.ApplyEffectOn(Player,Perk,Level,Data); } + static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data) { local Ext_T_ZEDHelper H; @@ -41,6 +42,7 @@ static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Leve if (H.bIsExtra) H.Destroy(); } + static final function AddHelperType(byte Lv, KFPawn_Human Player) { local Ext_T_ZEDHelper H; diff --git a/ServerExt/Classes/GUIStyleBase.uc b/ServerExt/Classes/GUIStyleBase.uc index 146bdd5..e4f088a 100644 --- a/ServerExt/Classes/GUIStyleBase.uc +++ b/ServerExt/Classes/GUIStyleBase.uc @@ -13,6 +13,7 @@ function InitStyle() if (ItemTex==None) ItemTex = Texture2D'EngineMaterials.DefaultWhiteGrid'; } + function RenderFramedWindow(KFGUI_FloatingWindow P); function RenderWindow(KFGUI_Page P); function RenderToolTip(KFGUI_Tooltip TT); @@ -45,6 +46,7 @@ function PickDefaultFontSize(float YRes) PickFont(DefaultFontSize,YRes).GetStringHeightAndWidth(S,YL,XL); DefaultHeight = float(YL)*YRes; } + final function DrawText(byte Res, string S) { local float Scale; @@ -70,6 +72,7 @@ final function DrawCornerTexNU(int SizeX, int SizeY, byte Dir) // Draw non-unifo Canvas.DrawTile(ItemTex,SizeX,SizeY,11,73,66,-58); } } + final function DrawCornerTex(int Size, byte Dir) { switch (Dir) @@ -87,6 +90,7 @@ final function DrawCornerTex(int Size, byte Dir) Canvas.DrawTile(ItemTex,Size,Size,11,73,66,-58); } } + final function DrawWhiteBox(int XS, int YS) { Canvas.DrawTile(ItemTex,XS,YS,19,45,1,1); diff --git a/ServerExt/Classes/KF2GUIController.uc b/ServerExt/Classes/KF2GUIController.uc index 293f406..f2897d0 100644 --- a/ServerExt/Classes/KF2GUIController.uc +++ b/ServerExt/Classes/KF2GUIController.uc @@ -68,6 +68,7 @@ simulated function HandleDrawMenu() } } } + simulated function RenderMenu(Canvas C) { local int i; @@ -290,6 +291,7 @@ simulated final function int GetFreeIndex(bool bNewAlwaysTop) // Find first allo ActiveMenus.Length = i+1; return i; } + simulated function KFGUI_Page OpenMenu(class MenuClass) { local int i; @@ -351,6 +353,7 @@ simulated function KFGUI_Page OpenMenu(class MenuClass) M.ShowMenu(); return M; } + simulated function CloseMenu(class MenuClass, optional bool bCloseAll) { local int i; @@ -380,6 +383,7 @@ simulated function CloseMenu(class MenuClass, optional bool bCloseAl if (ActiveMenus.Length==0) SetMenuState(false); } + simulated function PopCloseMenu(KFGUI_Base Item) { local int i; @@ -410,6 +414,7 @@ simulated function PopCloseMenu(KFGUI_Base Item) if (ActiveMenus.Length==0) SetMenuState(false); } + simulated function BringMenuToFront(KFGUI_Page Page) { local int i; @@ -431,6 +436,7 @@ simulated function BringMenuToFront(KFGUI_Page Page) ActiveMenus.Insert(0,1); ActiveMenus[0] = Page; } + simulated final function bool MenuIsOpen(optional class MenuClass) { local int i; @@ -440,6 +446,7 @@ simulated final function bool MenuIsOpen(optional class MenuClass) return true; return false; } + simulated final function GrabInputFocus(KFGUI_Base Comp, optional bool bForce) { if (Comp==KeyboardFocus && !bForce) @@ -515,6 +522,7 @@ simulated final function GUI_InputMouse(bool bPressed, bool bRight) MouseFocus.MouseRelease(bRight); } } + simulated final function bool CheckMouse(name Key, EInputEvent Event) { if (Event == IE_Pressed) @@ -543,6 +551,7 @@ simulated final function bool CheckMouse(name Key, EInputEvent Event) } return false; } + simulated function bool ReceivedInputKey(int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad) { if (!bIsInMenuState) @@ -565,6 +574,7 @@ simulated function bool ReceivedInputKey(int ControllerId, name Key, EInputEvent } return true; } + simulated function bool ReceivedInputChar(int ControllerId, string Unicode) { if (!bIsInMenuState) @@ -576,14 +586,17 @@ simulated Delegate bool OnInputKey(int ControllerId, name Key, EInputEvent Event { return false; } + simulated Delegate bool OnReceivedInputChar(int ControllerId, string Unicode) { return false; } + simulated Delegate bool InternalInputKey(int ControllerId, name Key, EInputEvent Event, optional float AmountDepressed=1.f, optional bool bGamepad) { return false; } + simulated Delegate bool InternalReceivedInputChar(int ControllerId, string Unicode) { return false; diff --git a/ServerExt/Classes/KF2GUIInput.uc b/ServerExt/Classes/KF2GUIInput.uc index 71d73ba..5c8eb62 100644 --- a/ServerExt/Classes/KF2GUIInput.uc +++ b/ServerExt/Classes/KF2GUIInput.uc @@ -8,6 +8,7 @@ function DrawHUD(HUD H) { //ControllerOwner.RenderMenu(H.Canvas); } + function PostRender(Canvas Canvas) { if (ControllerOwner.bIsInMenuState) diff --git a/ServerExt/Classes/KF2GUINetwork.uc b/ServerExt/Classes/KF2GUINetwork.uc index 0c4e06a..adebe2f 100644 --- a/ServerExt/Classes/KF2GUINetwork.uc +++ b/ServerExt/Classes/KF2GUINetwork.uc @@ -16,6 +16,7 @@ static function OpenMenuForClient(PlayerController PC, class Page) G = PC.Spawn(class'KF2GUINetwork',PC); G.ClientOpenMenu(Page); } + static function CloseMenuForClient(PlayerController PC, class Page, optional bool bCloseAll) { local KF2GUINetwork G; @@ -35,6 +36,7 @@ simulated reliable client function ClientOpenMenu(class Page) GUIController = Class'KF2GUIController'.Static.GetGUIController(PlayerOwner); GUIController.OpenMenu(Page); } + simulated reliable client function ClientCloseMenu(class Page, bool bCloseAll) { if (!bLocalClient) diff --git a/ServerExt/Classes/KF2Style.uc b/ServerExt/Classes/KF2Style.uc index 6d8551a..f8e6dea 100644 --- a/ServerExt/Classes/KF2Style.uc +++ b/ServerExt/Classes/KF2Style.uc @@ -26,6 +26,7 @@ function InitStyle() DrawFonts[i] = class'Engine'.Static.GetMediumFont(); } } + function RenderFramedWindow(KFGUI_FloatingWindow P) { local int XS,YS,CornerSlope,TitleHeight; @@ -83,6 +84,7 @@ function RenderFramedWindow(KFGUI_FloatingWindow P) DrawText(DefaultFontSize,P.WindowTitle); } } + function RenderWindow(KFGUI_Page P) { local int XS,YS,CornerSlope; @@ -112,6 +114,7 @@ function RenderWindow(KFGUI_Page P) Canvas.SetPos(XS-CornerSlope,CornerSlope); DrawWhiteBox(CornerSlope,YS-(CornerSlope*2)); } + function RenderToolTip(KFGUI_Tooltip TT) { local int i; @@ -168,6 +171,7 @@ function RenderToolTip(KFGUI_Tooltip TT) Y+=DefaultHeight; } } + function RenderButton(KFGUI_Button B) { local float XL,YL,TS; @@ -217,6 +221,7 @@ function RenderButton(KFGUI_Button B) Canvas.DrawText(B.ButtonText,,TS,TS,B.TextFontInfo); } } + function RenderEditBox(KFGUI_EditBox E) { local color C; @@ -249,6 +254,7 @@ function RenderEditBox(KFGUI_EditBox E) Canvas.DrawColor = C; DrawWhiteBox(E.CompPos[2]-6,E.CompPos[3]-6); } + function RenderScrollBar(KFGUI_ScrollBarBase S) { local float A; @@ -303,6 +309,7 @@ function RenderScrollBar(KFGUI_ScrollBarBase S) DrawWhiteBox(S.SliderScale,S.CompPos[3]); } } + function RenderColumnHeader(KFGUI_ColumnTop C, float XPos, float Width, int Index, bool bFocus, bool bSort) { local int XS; @@ -329,6 +336,7 @@ function RenderColumnHeader(KFGUI_ColumnTop C, float XPos, float Width, int Inde Canvas.SetPos(XPos+XS,(C.CompPos[3]-C.ListOwner.TextHeight)*0.5f); C.ListOwner.DrawStrClipped(C.ListOwner.Columns[Index].Text); } + function RenderCheckbox(KFGUI_CheckBox C) { if (C.bDisabled) @@ -351,6 +359,7 @@ function RenderCheckbox(KFGUI_CheckBox C) Canvas.DrawTile(LoadedTex[1],C.CompPos[2],C.CompPos[3],0,0,LoadedTex[1].GetSurfaceWidth(),LoadedTex[1].GetSurfaceHeight()); } } + function RenderComboBox(KFGUI_ComboBox C) { if (C.bDisabled) @@ -375,6 +384,7 @@ function RenderComboBox(KFGUI_ComboBox C) Canvas.PopMaskRegion(); } } + function RenderComboList(KFGUI_ComboSelector C) { local float X,Y,YL,YP,Edge; @@ -430,6 +440,7 @@ function RenderComboList(KFGUI_ComboSelector C) C.PlayMenuSound(MN_DropdownChange); } } + function RenderRightClickMenu(KFGUI_RightClickMenu C) { local float X,Y,YP,Edge,TextScale; diff --git a/ServerExt/Classes/KFExtendedHUD.uc b/ServerExt/Classes/KFExtendedHUD.uc index 8b85c6d..37bcb4a 100644 --- a/ServerExt/Classes/KFExtendedHUD.uc +++ b/ServerExt/Classes/KFExtendedHUD.uc @@ -79,11 +79,13 @@ simulated function PostBeginPlay() SetTimer(300 + FRand()*120.f,false,'CheckForItems'); } + simulated function Destroyed() { Super.Destroyed(); NotifyLevelChange(); } + simulated final function NotifyLevelChange(optional bool bMapswitch) { if (OnlineSub!=None) @@ -96,6 +98,7 @@ simulated final function NotifyLevelChange(optional bool bMapswitch) if (bMapswitch) SetTimer(0.5,false,'PendingMapSwitch'); } + simulated function PendingMapswitch () { // Make sure we dont garbage collect the game: @@ -132,6 +135,7 @@ final function AddKillMessage(class Victim, int Value, PlayerReplicationIn KillMessages[i].Name = GetNameOf(Victim); KillMessages[i].MsgColor = GetMsgColor(bDmg,Value); } + final function AddDeathMessage(string S, string StrippedMsg) { DeathMessages.Insert(0,1); @@ -139,6 +143,7 @@ final function AddDeathMessage(string S, string StrippedMsg) DeathMessages[0].SMsg = StrippedMsg; DeathMessages[0].MsgTime = WorldInfo.TimeSeconds; } + final function ShowProgressMsg(string S, optional bool bDis) { if (S=="") @@ -156,6 +161,7 @@ final function ShowProgressMsg(string S, optional bool bDis) LocalPlayer(KFPlayerOwner.Player).ViewportClient.ViewportConsole.OutputText(Repl(S,"|","\n")); } } + static final function string GetNameOf(class Other) { local string S; @@ -178,6 +184,7 @@ static final function string GetNameOf(class Other) S = Repl(S,"_"," "); return S; } + static final function string GetNameArticle(string S) { switch (Caps(Left(S,1))) // Check if a vowel, then an. @@ -191,6 +198,7 @@ static final function string GetNameArticle(string S) } return "a"; } + static final function string StripMsgColors(string S) { local int i; @@ -204,6 +212,7 @@ static final function string StripMsgColors(string S) } return S; } + final function color GetMsgColor(bool bDamage, int Count) { local float T; @@ -298,6 +307,7 @@ event PostRender() if (PlayerOwner.Player==None && OnlineSub!=None) NotifyLevelChange(); } + simulated function CancelConnection() { if (!bConfirmDisconnect) @@ -307,6 +317,7 @@ simulated function CancelConnection() } else class'Engine'.Static.GetEngine().GameViewport.ConsoleCommand("Disconnect"); } + final function DrawRespawnCounter() { local float Sc,XL,YL; @@ -319,6 +330,7 @@ final function DrawRespawnCounter() Canvas.SetPos((Canvas.ClipX-XL)*0.5,Canvas.ClipY*0.075); Canvas.DrawText(S,,Sc,Sc); } + exec function SetShowScores(bool bNewValue) { bShowScores = bNewValue; @@ -329,6 +341,7 @@ exec function SetShowScores(bool bNewValue) else GUIController.CloseMenu(class'UI_Scoreboard_CD'); } } + final function RenderKillMsg() { local float Sc,YL,T,X,Y; @@ -363,6 +376,7 @@ final function RenderKillMsg() Y+=YL; } } + final function RenderDMMessages() { local float Sc,YL,XL,T,Y,X; @@ -424,6 +438,7 @@ final function RenderDMMessages() } } } + final function RenderProgress() { local float Y,XL,YL,Sc; @@ -627,6 +642,7 @@ simulated static final function color GetHPColorScale(Pawn P) C.B = 25; return C; } + simulated function DrawFriendlyHUDZ(KFPawn_Monster KFPH) { local float Percentage; @@ -662,6 +678,7 @@ simulated function DrawFriendlyHUDZ(KFPawn_Monster KFPH) Canvas.SetPos(ScreenPos.X - (BarLength *0.5f), ScreenPos.Y - BarHeight * 2); Canvas.DrawText(KFPH.PlayerReplicationInfo.PlayerName,,FontScale,FontScale, MyFontRenderInfo); } + simulated function bool DrawFriendlyHumanPlayerInfo(KFPawn_Human KFPH) { local float Percentage; @@ -781,6 +798,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo(KFPawn_Human KFPH) return true; } + simulated final function DrawPlayerInfoBar(KFPawn P, float BarPercentage, float BarLength, float BarHeight, float XPos, float YPos, Color BarColor, byte FadeAlpha, optional bool bDrawingHealth) { //background for status bar @@ -811,6 +829,7 @@ simulated final function DrawPlayerInfoBar(KFPawn P, float BarPercentage, float Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32); } } + simulated function DrawPerkIcons(KFPawn_Human KFPH, float PerkIconSize, float PerkIconPosX, float PerkIconPosY, float SupplyIconPosX, float SupplyIconPosY, bool bDropShadow) { local byte PrestigeLevel; @@ -876,6 +895,7 @@ simulated function DrawPerkIcons(KFPawn_Human KFPH, float PerkIconSize, float Pe Canvas.DrawTile(KFPRI.ECurrentPerk.default.BasePerk.static.GetInteractIcon(), (PlayerStatusIconSize * 0.75) * ResModifier, (PlayerStatusIconSize * 0.75) * ResModifier, 0, 0, 256, 256); } } + simulated function DrawMonsterHUD(KFPawn KFPH) { local float Percentage; @@ -917,6 +937,7 @@ simulated function DrawMonsterHUD(KFPawn KFPH) Canvas.SetPos(ScreenPos.X - (BarLength * 0.75), ScreenPos.Y - BarHeight * 2); Canvas.DrawRect(PlayerStatusIconSize * FriendlyHudScale,PlayerStatusIconSize * FriendlyHudScale,HealthIconTex); } + simulated function DrawPetInfo() { local float X,Y,Sc,XL,YL,YS; @@ -1110,6 +1131,7 @@ simulated function SearchInventoryForNewItem() } bLoadedInitItems = true; } + simulated final function string RarityStr(byte R) { switch (R) diff --git a/ServerExt/Classes/KFGUI_Base.uc b/ServerExt/Classes/KFGUI_Base.uc index a339974..904c16f 100644 --- a/ServerExt/Classes/KFGUI_Base.uc +++ b/ServerExt/Classes/KFGUI_Base.uc @@ -43,6 +43,7 @@ function PreDraw() Canvas.SetClip(CompPos[0]+CompPos[2],CompPos[1]+CompPos[3]); DrawMenu(); } + function DrawMenu(); // Draw menu now. function CloseMenu(); // Menu was closed. @@ -56,6 +57,7 @@ function MenuTick(float DeltaTime) Timer(); } } + final function SetTimer(float Rate, optional bool bLoop) { bTimerActive = (Rate>0.f); @@ -66,6 +68,7 @@ final function SetTimer(float Rate, optional bool bLoop) TimerCounter = Rate; } } + function Timer(); function MouseEnter() @@ -73,11 +76,13 @@ function MouseEnter() bFocused = true; OnFocus(Self,True); } + function MouseLeave() { bFocused = false; OnFocus(Self,False); } + function MouseClick(bool bRight); function MouseRelease(bool bRight); function DoubleMouseClick(bool bRight) // User rapidly double clicked this component. @@ -139,16 +144,19 @@ function UserPressedEsc() // user pressed escape while this menu was active. ParentComponent.UserPressedEsc(); else DoClose(); } + function bool BringPageToFront() { if (ParentComponent!=None) return ParentComponent.BringPageToFront(); return true; // Allow user to bring this page to front. } + final function bool IsTopMenu() { return (Owner.ActiveMenus.Length>0 && GetPageTop()==Owner.ActiveMenus[0]); } + final function KFGUI_Page GetPageTop() { local KFGUI_Base M; @@ -157,17 +165,20 @@ final function KFGUI_Page GetPageTop() {} return KFGUI_Page(M); } + function KFGUI_Base FindComponentID(name InID) { if (ID==InID) return Self; return None; } + function FindAllComponentID(name InID, out array Res) { if (ID==InID) Res[Res.Length] = Self; } + function RemoveComponent(KFGUI_Base B); function GetInputFocus() @@ -176,6 +187,7 @@ function GetInputFocus() Owner.InputFocus.LostInputFocus(); Owner.InputFocus = Self; } + function DropInputFocus() { if (Owner.InputFocus==Self) @@ -184,6 +196,7 @@ function DropInputFocus() Owner.InputFocus = None; } } + function LostInputFocus(); // Obtain keyboard focus. @@ -191,17 +204,20 @@ final function GrabKeyFocus() { Owner.GrabInputFocus(Self); } + final function ReleaseKeyFocus() { if (Owner.KeyboardFocus==Self) Owner.GrabInputFocus(None); } + function LostKeyFocus(); function bool NotifyInputKey(int ControllerId, name Key, EInputEvent Event, float AmountDepressed, bool bGamepad) { return false; } + function bool NotifyInputChar(int ControllerId, string Unicode) { return false; @@ -218,6 +234,7 @@ final function GetActualPos(out float X, out float Y) X = ((XPosition+X)*InputPos[2]) + InputPos[0]; Y = ((YPosition+Y)*InputPos[3]) + InputPos[1]; } + final function GetRealtivePos(out float X, out float Y) { X = X / CompPos[2]; diff --git a/ServerExt/Classes/KFGUI_Clickable.uc b/ServerExt/Classes/KFGUI_Clickable.uc index 300fa39..bbc112e 100644 --- a/ServerExt/Classes/KFGUI_Clickable.uc +++ b/ServerExt/Classes/KFGUI_Clickable.uc @@ -14,6 +14,7 @@ function InitMenu() Super.InitMenu(); bClickable = !bDisabled; } + function MouseClick(bool bRight) { if (!bDisabled) @@ -22,6 +23,7 @@ function MouseClick(bool bRight) bPressedDown = true; } } + function MouseRelease(bool bRight) { if (!bDisabled && PressedDown[byte(bRight)]==1) @@ -31,6 +33,7 @@ function MouseRelease(bool bRight) HandleMouseClick(bRight); } } + function MouseLeave() { Super.MouseLeave(); @@ -40,6 +43,7 @@ function MouseLeave() PressedDown[1] = 0; bPressedDown = false; } + function MouseEnter() { Super.MouseEnter(); @@ -74,6 +78,7 @@ function NotifyMousePaused() ToolTipItem.GetInputFocus(); } } + final function ChangeToolTip(string S) { if (ToolTipItem!=None) diff --git a/ServerExt/Classes/KFGUI_ColumnList.uc b/ServerExt/Classes/KFGUI_ColumnList.uc index 83abd7c..a8c7ba4 100644 --- a/ServerExt/Classes/KFGUI_ColumnList.uc +++ b/ServerExt/Classes/KFGUI_ColumnList.uc @@ -120,6 +120,7 @@ function KFGUI_ListItem AddLine(string Value, optional int iValue, optional stri return N; } + final function RemoveLine(KFGUI_ListItem I) { local KFGUI_ListItem N; @@ -153,6 +154,7 @@ final function RemoveLine(KFGUI_ListItem I) UpdateListSize(); } + final function EmptyList() { local KFGUI_ListItem N,I; @@ -403,11 +405,13 @@ function PreDraw() CompPos[2] += SpaceX; CompPos[3] += ColumnComp.CompPos[3]; } + function InternalClickedItem(int Index, bool bRight, int MouseX, int MouseY) { SelectedRowIndex = Index; OnSelectedRow(GetFromIndex(Index),Index,bRight,false); } + function InternalDblClickedItem(int Index, bool bRight, int MouseX, int MouseY) { SelectedRowIndex = Index; diff --git a/ServerExt/Classes/KFGUI_ColumnTop.uc b/ServerExt/Classes/KFGUI_ColumnTop.uc index 3c05565..aaceb3c 100644 --- a/ServerExt/Classes/KFGUI_ColumnTop.uc +++ b/ServerExt/Classes/KFGUI_ColumnTop.uc @@ -132,6 +132,7 @@ function MouseClick(bool bRight) } } } + function MouseRelease(bool bRight) { if (bScaleColumn && !bRight) @@ -155,12 +156,14 @@ function MouseRelease(bool bRight) } } } + function byte GetCursorStyle() { if (bClickable) return (bMouseScaler ? 2 : 1); return 0; } + function MouseLeave() { Super.MouseLeave(); @@ -171,6 +174,7 @@ function MouseLeave() bPressedDown = false; } } + function MouseEnter() { Super.MouseEnter(); diff --git a/ServerExt/Classes/KFGUI_ComboBox.uc b/ServerExt/Classes/KFGUI_ComboBox.uc index 6027f4d..b2843da 100644 --- a/ServerExt/Classes/KFGUI_ComboBox.uc +++ b/ServerExt/Classes/KFGUI_ComboBox.uc @@ -38,12 +38,14 @@ function HandleMouseClick(bool bRight) Selection.YPosition-=((Selection.YPosition+Selection.YSize)-1.f); Selection.GetInputFocus(); } + final function string GetCurrent() { if (SelectedIndex=MaxTextLength) || (bHoldCtrl && (Unicode~="C" || Unicode~="X" || Unicode~="V"))) diff --git a/ServerExt/Classes/KFGUI_FloatingWindow.uc b/ServerExt/Classes/KFGUI_FloatingWindow.uc index 6130a6d..3072f0a 100644 --- a/ServerExt/Classes/KFGUI_FloatingWindow.uc +++ b/ServerExt/Classes/KFGUI_FloatingWindow.uc @@ -12,6 +12,7 @@ function InitMenu() HeaderComp = new (Self) class'KFGUI_FloatingWindowHeader'; AddComponent(HeaderComp); } + function DrawMenu() { Owner.CurrentStyle.RenderFramedWindow(Self); @@ -22,6 +23,7 @@ function DrawMenu() HeaderComp.YSize = HeaderComp.CompPos[3] / CompPos[3]; // Keep header height fit the window height. } } + function SetWindowDrag(bool bDrag) { bDragWindow = bDrag; @@ -31,6 +33,7 @@ function SetWindowDrag(bool bDrag) DragOffset[1] = Owner.MousePosition.Y-CompPos[1]; } } + function bool CaptureMouse() { if (bDragWindow && HeaderComp!=None) // Always keep focus on window frame now! @@ -40,6 +43,7 @@ function bool CaptureMouse() } return Super.CaptureMouse(); } + function PreDraw() { if (bDragWindow) diff --git a/ServerExt/Classes/KFGUI_FloatingWindowHeader.uc b/ServerExt/Classes/KFGUI_FloatingWindowHeader.uc index 7bcfb26..96b5b55 100644 --- a/ServerExt/Classes/KFGUI_FloatingWindowHeader.uc +++ b/ServerExt/Classes/KFGUI_FloatingWindowHeader.uc @@ -6,11 +6,13 @@ function PreDraw() { ComputeCoords(); } + function MouseClick(bool bRight) { if (!bRight) KFGUI_FloatingWindow(ParentComponent).SetWindowDrag(true); } + function MouseRelease(bool bRight) { if (!bRight) diff --git a/ServerExt/Classes/KFGUI_List.uc b/ServerExt/Classes/KFGUI_List.uc index 4c11d6d..7dfa466 100644 --- a/ServerExt/Classes/KFGUI_List.uc +++ b/ServerExt/Classes/KFGUI_List.uc @@ -107,6 +107,7 @@ function PreDraw() } } } + function UpdateListVis() { if (ListCount<=ListItemsPerPage) @@ -120,6 +121,7 @@ function UpdateListVis() ScrollBar.SetDisabled(false); } } + function ChangeListSize(int NewSize) { if (ListCount==NewSize) @@ -127,6 +129,7 @@ function ChangeListSize(int NewSize) ListCount = NewSize; UpdateListVis(); } + final function int GetListSize() { return ListCount; @@ -142,6 +145,7 @@ function DoubleMouseClick(bool bRight) OnDblClickedItem(FocusMouseItem,bRight,Owner.MousePosition.X-CompPos[0],MouseYHit); } } + function MouseClick(bool bRight) { if (!bDisabled && bClickable) @@ -150,6 +154,7 @@ function MouseClick(bool bRight) bPressedDown = true; } } + function MouseRelease(bool bRight) { if (!bDisabled && bClickable && PressedDown[byte(bRight)]==1) @@ -160,6 +165,7 @@ function MouseRelease(bool bRight) OnClickedItem(FocusMouseItem,bRight,Owner.MousePosition.X-CompPos[0],MouseYHit); } } + function MouseLeave() { Super.MouseLeave(); @@ -169,6 +175,7 @@ function MouseLeave() PressedDown[1] = 0; bPressedDown = false; } + function MouseEnter() { Super.MouseEnter(); diff --git a/ServerExt/Classes/KFGUI_MultiComponent.uc b/ServerExt/Classes/KFGUI_MultiComponent.uc index e3d7279..29feeb1 100644 --- a/ServerExt/Classes/KFGUI_MultiComponent.uc +++ b/ServerExt/Classes/KFGUI_MultiComponent.uc @@ -13,6 +13,7 @@ function InitMenu() Components[i].InitMenu(); } } + function ShowMenu() { local int i; @@ -20,6 +21,7 @@ function ShowMenu() for (i=0; i Res) { local int i; @@ -98,6 +104,7 @@ function FindAllComponentID(name InID, out array Res) for (i=0; i=0 && (ItemRows[CurrentRow].bSplitter || ItemRows[CurrentRow].bDisabled)) @@ -82,6 +86,7 @@ function HandleMouseClick(bool bRight) if (CurrentRow>=0) OnSelectedItem(CurrentRow); } + function LostInputFocus() { OnBecameHidden(Self); diff --git a/ServerExt/Classes/KFGUI_ScrollBarBase.uc b/ServerExt/Classes/KFGUI_ScrollBarBase.uc index 47aa62c..18fbc42 100644 --- a/ServerExt/Classes/KFGUI_ScrollBarBase.uc +++ b/ServerExt/Classes/KFGUI_ScrollBarBase.uc @@ -19,19 +19,23 @@ final function UpdateScrollSize(int Current, int MxRange, int Stride, int StepSt PageStep = StepStride; SetValue(Current); } + final function AddValue(int V) { SetValue(CurrentScroll+V); } + final function SetValue(int V) { CurrentScroll = Clamp((V / ScrollStride) * ScrollStride,0,MaxRange); OnScrollChange(Self,CurrentScroll); } + final function int GetValue() { return CurrentScroll; } + Delegate OnScrollChange(KFGUI_ScrollBarBase Sender, int Value); // Get UI width. @@ -40,6 +44,7 @@ function float GetWidth() CalcButtonScale = ButtonScale*Owner.CurrentStyle.DefaultHeight; return CalcButtonScale / (bVertical ? InputPos[2] : InputPos[3]); } + function PreDraw() { // Auto scale to match width to screen size. @@ -48,10 +53,12 @@ function PreDraw() else YSize = GetWidth(); Super.PreDraw(); } + function DrawMenu() { Owner.CurrentStyle.RenderScrollBar(Self); } + function MouseClick(bool bRight) { if (bRight || bDisabled) @@ -84,6 +91,7 @@ function MouseClick(bool bRight) else AddValue(PageStep); } } + function MouseRelease(bool bRight) { if (!bRight) diff --git a/ServerExt/Classes/KFGUI_SwitchComponent.uc b/ServerExt/Classes/KFGUI_SwitchComponent.uc index 30b6323..5c14669 100644 --- a/ServerExt/Classes/KFGUI_SwitchComponent.uc +++ b/ServerExt/Classes/KFGUI_SwitchComponent.uc @@ -31,12 +31,14 @@ final function int GetSelectedPage() { return CurrentComponent; } + final function name GetSelectedPageID() { if (CurrentComponent=48 && n<=57) // '0' - '9' @@ -254,6 +257,7 @@ final function int FindSplitPoint(string S, float X, float ClipX) } return l; } + final function string StripWhiteSpaces(string S) { if (Left(S,1)==" ") diff --git a/ServerExt/Classes/KFGUI_TextLable.uc b/ServerExt/Classes/KFGUI_TextLable.uc index cc4a8e6..32b5856 100644 --- a/ServerExt/Classes/KFGUI_TextLable.uc +++ b/ServerExt/Classes/KFGUI_TextLable.uc @@ -66,6 +66,7 @@ function InitSize() InitOffset[1] = CompPos[3]-YL; } } + function SetText(string S) { if (Text==S) @@ -73,6 +74,7 @@ function SetText(string S) Text = S; OldSize[0] = -1; // Force to refresh. } + final function string GetText() { return Text; @@ -92,6 +94,7 @@ function DrawMenu() Canvas.DrawColor = TextColor; Canvas.DrawText(Text,,InitFontScale,InitFontScale,TextFontInfo); } + function bool CaptureMouse() { return false; diff --git a/ServerExt/Classes/KFGUI_Tooltip.uc b/ServerExt/Classes/KFGUI_Tooltip.uc index 4a95a75..a5c655b 100644 --- a/ServerExt/Classes/KFGUI_Tooltip.uc +++ b/ServerExt/Classes/KFGUI_Tooltip.uc @@ -8,14 +8,17 @@ function InputMouseMoved() { DropInputFocus(); } + function MouseClick(bool bRight) { DropInputFocus(); } + function MouseRelease(bool bRight) { DropInputFocus(); } + function ShowMenu() { CurrentAlpha = 1; diff --git a/ServerExt/Classes/MS_HUD.uc b/ServerExt/Classes/MS_HUD.uc index 3bffefc..b778a07 100644 --- a/ServerExt/Classes/MS_HUD.uc +++ b/ServerExt/Classes/MS_HUD.uc @@ -11,6 +11,7 @@ function PostBeginPlay() ActiveGame.Init(); ActiveGame.SetFXTrack(class'MS_PC'.Default.TravelData.PendingFX); } + event PostRender() { ActiveGame.Canvas = Canvas; diff --git a/ServerExt/Classes/MS_PC.uc b/ServerExt/Classes/MS_PC.uc index 729630e..ac824bd 100644 --- a/ServerExt/Classes/MS_PC.uc +++ b/ServerExt/Classes/MS_PC.uc @@ -101,6 +101,7 @@ exec function SelectNextWeapon() { MS_HUD(myHUD).ActiveGame.AdjustSensitivity(true); } + exec function SelectPrevWeapon() { MS_HUD(myHUD).ActiveGame.AdjustSensitivity(false); diff --git a/ServerExt/Classes/MS_TMPUI.uc b/ServerExt/Classes/MS_TMPUI.uc index 4945b45..6ef72b1 100644 --- a/ServerExt/Classes/MS_TMPUI.uc +++ b/ServerExt/Classes/MS_TMPUI.uc @@ -16,6 +16,7 @@ static final function Apply() T.UIManager = T.RealUI.UIManager; G.UIController = T; } + static final function Remove() { local GameViewportClient G; diff --git a/ServerExt/Classes/MX_PongGame.uc b/ServerExt/Classes/MX_PongGame.uc index 992248b..c54b829 100644 --- a/ServerExt/Classes/MX_PongGame.uc +++ b/ServerExt/Classes/MX_PongGame.uc @@ -184,6 +184,7 @@ final function PlayHitSound(bool bPlayer) HitSoundIndex[1] = 0; } } + final function PlayerScored(bool bPlayer) { ++NumPlays; diff --git a/ServerExt/Classes/UIP_AdminMenu.uc b/ServerExt/Classes/UIP_AdminMenu.uc index 5a53fe5..2bd4a37 100644 --- a/ServerExt/Classes/UIP_AdminMenu.uc +++ b/ServerExt/Classes/UIP_AdminMenu.uc @@ -107,6 +107,7 @@ function SelectedRow(KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick) PlayerContext.OpenMenu(Self); } } + function SelectedRCItem(int Index) { if (Index>0 && !PlayerContext.ItemRows[Index].bSplitter) @@ -116,6 +117,7 @@ function SelectedRCItem(int Index) else UI_AdminPerkLevel(Owner.OpenMenu(class'UI_AdminPerkLevel')).InitPage(SelectedID,-PlayerContext.ItemRows[Index].Value); } } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) diff --git a/ServerExt/Classes/UIP_News.uc b/ServerExt/Classes/UIP_News.uc index 47f4c59..1f0a49d 100644 --- a/ServerExt/Classes/UIP_News.uc +++ b/ServerExt/Classes/UIP_News.uc @@ -19,6 +19,7 @@ function InitMenu() Timer(); } + function ShowMenu() { local KFGameReplicationInfo GRI; @@ -32,12 +33,14 @@ function ShowMenu() WebsiteButton.ChangeToolTip(WebsiteButtonToolTip$" "$WebsiteURL); } } + function Timer() { if (!ExtPlayerController(GetPlayer()).bMOTDReceived) SetTimer(0.2,false); else NewsField.SetText(ExtPlayerController(GetPlayer()).ServerMOTD); } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) diff --git a/ServerExt/Classes/UIP_PerkSelection.uc b/ServerExt/Classes/UIP_PerkSelection.uc index fa646b8..fa22e99 100644 --- a/ServerExt/Classes/UIP_PerkSelection.uc +++ b/ServerExt/Classes/UIP_PerkSelection.uc @@ -46,12 +46,14 @@ function InitMenu() Super.InitMenu(); } + function ShowMenu() { Super.ShowMenu(); SetTimer(0.1,true); Timer(); } + function CloseMenu() { Super.CloseMenu(); @@ -236,6 +238,7 @@ function DrawPerkInfo(Canvas C, int Index, float YOffset, float Height, float Wi C.SetPos(6+Height,YOffset+Height*0.5); C.DrawText("Lv "$P.GetLevelString()$" ("$P.CurrentEXP$"/"$P.NextLevelEXP$" XP)",,Sc,Sc); } + function SwitchedPerk(int Index, bool bRight, int MouseX, int MouseY) { if (CurrentManager==None || Index>=CurrentManager.UserPerks.Length) @@ -244,6 +247,7 @@ function SwitchedPerk(int Index, bool bRight, int MouseX, int MouseY) PendingPerk = CurrentManager.UserPerks[Index]; ExtPlayerController(GetPlayer()).SwitchToPerk(PendingPerk.Class); } + function ShowTraitInfo(KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick) { local UIR_TraitInfoPopup T; @@ -253,6 +257,7 @@ function ShowTraitInfo(KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick T.ShowTraitInfo(Item.Value,PendingPerk); } } + function ButtonClicked(KFGUI_Button Sender) { local KFGUI_Page T; diff --git a/ServerExt/Classes/UIP_PlayerSpecs.uc b/ServerExt/Classes/UIP_PlayerSpecs.uc index 9f28492..aa112f5 100644 --- a/ServerExt/Classes/UIP_PlayerSpecs.uc +++ b/ServerExt/Classes/UIP_PlayerSpecs.uc @@ -83,12 +83,14 @@ function InitMenu() Super.InitMenu(); } + function ShowMenu() { Super.ShowMenu(); SetTimer(2,true); Timer(); } + function CloseMenu() { Super.CloseMenu(); @@ -167,6 +169,7 @@ static final function string FormatTimeSMH(float Sec) S = Days$"d "$S; return S; } + static final function string FormatInteger(int Val) { local string S,O; diff --git a/ServerExt/Classes/UIP_Settings.uc b/ServerExt/Classes/UIP_Settings.uc index 4bef127..f429211 100644 --- a/ServerExt/Classes/UIP_Settings.uc +++ b/ServerExt/Classes/UIP_Settings.uc @@ -71,6 +71,7 @@ final function InitBehindviewKey() } KeyBindButton.ButtonText = (CurKeybind!='' ? string(CurKeybind) : NotSetText); } + final function KFGUI_CheckBox AddCheckBox(string Cap, string TT, name IDN, bool bDefault) { local KFGUI_CheckBox CB; @@ -84,6 +85,7 @@ final function KFGUI_CheckBox AddCheckBox(string Cap, string TT, name IDN, bool CB.OnCheckChange = CheckChange; return CB; } + final function KFGUI_Button AddButton(string ButtonText, string Cap, string TT, name IDN, out KFGUI_TextLable Label) { local KFGUI_Button CB; @@ -150,6 +152,7 @@ function CheckChange(KFGUI_CheckBox Sender) } PC.SaveConfig(); } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) @@ -164,10 +167,12 @@ function ButtonClicked(KFGUI_Button Sender) break; } } + function Timer() { bDelayedSet = false; } + function bool NotifyInputKey(int ControllerId, name Key, EInputEvent Event, float AmountDepressed, bool bGamepad) { if (Event==IE_Pressed && !bDelayedSet && InStr(Caps(string(Key)),"MOUSE")==-1) @@ -178,12 +183,14 @@ function bool NotifyInputKey(int ControllerId, name Key, EInputEvent Event, floa } return true; } + function LostKeyFocus() { KeyBindButton.SetDisabled(false); bSetKeybind = false; InitBehindviewKey(); } + final function BindNewKey(name Key, string Cmd) { local int i; diff --git a/ServerExt/Classes/UIR_PerkStat.uc b/ServerExt/Classes/UIR_PerkStat.uc index 439b894..c3ef3dd 100644 --- a/ServerExt/Classes/UIR_PerkStat.uc +++ b/ServerExt/Classes/UIR_PerkStat.uc @@ -32,18 +32,21 @@ function ShowMenu() SetTimer(0.1,true); EditBoxChange(StatCountBox); } + function CloseMenu() { Super.CloseMenu(); MyPerk = None; SetTimer(0,false); } + function SetActivePerk(Ext_PerkBase P) { MyPerk = P; StatCountBox.Value = "5"; OldValue = -1; } + function Timer() { if (OldValue!=MyPerk.PerkStats[StatIndex].CurrentValue || bCostDirty) @@ -56,10 +59,12 @@ function Timer() InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$"/"$MaxStatValue$", "$ProgressStr$"%]:"); } } + function BuyStatPoint(KFGUI_Button Sender) { ExtPlayerController(GetPlayer()).BuyPerkStat(MyPerk.Class,StatIndex,StatCountBox.GetValueInt()); } + function EditBoxChange(KFGUI_EditBox Sender) { if (MyPerk.PerkStats[StatIndex].CostPerValue > 1) @@ -72,6 +77,7 @@ function EditBoxChange(KFGUI_EditBox Sender) bCostDirty = true; Timer(); } + final function CheckBuyLimit() { local int i; diff --git a/ServerExt/Classes/UIR_PerkTraitList.uc b/ServerExt/Classes/UIR_PerkTraitList.uc index 08bace1..0d16afa 100644 --- a/ServerExt/Classes/UIR_PerkTraitList.uc +++ b/ServerExt/Classes/UIR_PerkTraitList.uc @@ -113,6 +113,7 @@ function DrawMenu() C = C.Next; } } + function NotifyMousePaused() { if (Owner.InputFocus==None && FocusMouseItem!=-1 && ToolTip[FocusMouseItem]!="") diff --git a/ServerExt/Classes/UIR_TraitInfoPopup.uc b/ServerExt/Classes/UIR_TraitInfoPopup.uc index 54aee7d..b05e19f 100644 --- a/ServerExt/Classes/UIR_TraitInfoPopup.uc +++ b/ServerExt/Classes/UIR_TraitInfoPopup.uc @@ -49,6 +49,7 @@ function ShowTraitInfo(int Index, Ext_PerkBase Perk) Timer(); SetTimer(0.2,true); } + function Timer() { local int Cost; @@ -70,6 +71,7 @@ function Timer() else YesButton.SetDisabled(false); } } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) diff --git a/ServerExt/Classes/UI_AdminMOTD.uc b/ServerExt/Classes/UI_AdminMOTD.uc index 1b4430a..11f9ac7 100644 --- a/ServerExt/Classes/UI_AdminMOTD.uc +++ b/ServerExt/Classes/UI_AdminMOTD.uc @@ -32,6 +32,7 @@ function InitMenu() Timer(); } + function Timer() { if (!ExtPlayerController(GetPlayer()).bMOTDReceived) @@ -42,6 +43,7 @@ function Timer() MOTDEdited(EditField); } } + function ButtonClicked(KFGUI_Button Sender) { local string S; @@ -63,6 +65,7 @@ function ButtonClicked(KFGUI_Button Sender) break; } } + function MOTDEdited(KFGUI_EditBox Sender) { NewsField.SetText(MotdPreviewText$"|"$Sender.Value); diff --git a/ServerExt/Classes/UI_AdminPerkLevel.uc b/ServerExt/Classes/UI_AdminPerkLevel.uc index da4216b..ba7f795 100644 --- a/ServerExt/Classes/UI_AdminPerkLevel.uc +++ b/ServerExt/Classes/UI_AdminPerkLevel.uc @@ -51,6 +51,7 @@ final function InitPage(int UserID, byte Mode) LevelBox.ChangeValue(string(Mode==1 ? ExtPlayerReplicationInfo(PRI).ECurrentPerkLevel : ExtPlayerReplicationInfo(PRI).ECurrentPerkPrestige)); BaseValue = (Mode==1 ? 100 : 100000); } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) diff --git a/ServerExt/Classes/UI_MidGameMenu.uc b/ServerExt/Classes/UI_MidGameMenu.uc index 83b7a65..307e61d 100644 --- a/ServerExt/Classes/UI_MidGameMenu.uc +++ b/ServerExt/Classes/UI_MidGameMenu.uc @@ -94,10 +94,12 @@ function ShowMenu() Timer(); SetTimer(0.5,true); } + function CloseMenu() { Super.CloseMenu(); } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) @@ -128,6 +130,7 @@ function ButtonClicked(KFGUI_Button Sender) break; } } + final function OpenUpMapvote() { local xVotingReplication R; diff --git a/ServerExt/Classes/UI_ResetWarning.uc b/ServerExt/Classes/UI_ResetWarning.uc index 0b4e0b3..4fb05e2 100644 --- a/ServerExt/Classes/UI_ResetWarning.uc +++ b/ServerExt/Classes/UI_ResetWarning.uc @@ -26,11 +26,13 @@ function InitMenu() Super.InitMenu(); } + function SetupTo(Ext_PerkBase P) { PerkToReset = P.Class; WindowTitle = TitleText$" "$P.PerkName; } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) diff --git a/ServerExt/Classes/UI_Scoreboard.uc b/ServerExt/Classes/UI_Scoreboard.uc index da8402f..95f2370 100644 --- a/ServerExt/Classes/UI_Scoreboard.uc +++ b/ServerExt/Classes/UI_Scoreboard.uc @@ -87,6 +87,7 @@ function ShowMenu() PlayerContext.ItemRows[4+i].Text = PC.AdminCommands[i].Info; } } + function CloseMenu() { Owner.bAbsorbInput = true; @@ -107,6 +108,7 @@ function bool InOrder(PlayerReplicationInfo A, PlayerReplicationInfo B) return (A.Score P) { PerkToReset = P; @@ -42,6 +43,7 @@ final function SetupTo(class P) ExtPlayerController(GetPlayer()).OnClientGetResponse = ReceivedInfo; ExtPlayerController(GetPlayer()).ServerGetUnloadInfo(CurCallCode,PerkToReset,false); } + function ButtonClicked(KFGUI_Button Sender) { switch (Sender.ID) @@ -55,6 +57,7 @@ function ButtonClicked(KFGUI_Button Sender) break; } } + function CloseMenu() { Super.CloseMenu(); diff --git a/ServerExt/Classes/VSFPZedHands.uc b/ServerExt/Classes/VSFPZedHands.uc index 2881305..860303a 100644 --- a/ServerExt/Classes/VSFPZedHands.uc +++ b/ServerExt/Classes/VSFPZedHands.uc @@ -12,15 +12,18 @@ simulated function InitHands(SkeletalMeshComponent C) HandsAnimNode = AnimNodeSlot(Mesh.FindAnimNode('ArmsSlot')); BodyNode = AnimNodeSlot(Mesh.FindAnimNode('BodySlot')); } + simulated final function SetIdleAnim(name N) { IdleAnimName = N; Timer(); } + simulated function Timer() { HandsAnimNode.PlayCustomAnim(IdleAnimName,1.f,0.15,,true); } + simulated final function PlayHandsAnim(name N, optional float Rate=1.f) { SetTimer(HandsAnimNode.PlayCustomAnim(N,Rate,0.05,,,true),false); diff --git a/ServerExt/Classes/VSZombie.uc b/ServerExt/Classes/VSZombie.uc index afa2bf5..4efd4cc 100644 --- a/ServerExt/Classes/VSZombie.uc +++ b/ServerExt/Classes/VSZombie.uc @@ -26,10 +26,12 @@ function bool BotFire(bool bFinished) StartFire(0); return true; } + function bool CanAttack(Actor Other) { return VSizeSq(Other.Location-Location)<62500.f; // 250.f } + function bool IsFiring() { local byte i; @@ -39,6 +41,7 @@ function bool IsFiring() return true; return false; } + function bool StopFiring() { local byte i; @@ -47,6 +50,7 @@ function bool StopFiring() IsFiringMode[i] = 0; return true; } + function bool HasRangedAttack() { return false; @@ -70,10 +74,12 @@ function PlayAttackAnim(byte Num) if (!bAttacking) ServerAttackAnim(Num); } + simulated function float StartAttackAnim(byte Num) // Return animation duration. { return 0.2f; } + simulated function AttackFinished() { local byte i; @@ -103,12 +109,14 @@ reliable server function ServerModeFire(bool bStart, byte Mode) if (bStart) PlayAttackAnim(Mode); } + simulated function StartFire(byte FireModeNum) { if (bNoWeaponFiring) return; ServerModeFire(true,FireModeNum); } + simulated function StopFire(byte FireModeNum) { ServerModeFire(false,FireModeNum); @@ -132,10 +140,12 @@ function ServerAttackAnim(byte Num) SetTimer(F+0.5,false,'ResetAttackTimer'); } } + function ResetAttackTimer() { ServerAttackMode = 0; } + simulated event ReplicatedEvent(name VarName) { switch (VarName) @@ -227,12 +237,14 @@ function bool MeleeDamageTarget(vector pushdir) } return bResult; } + function DealMeleeDamage(Actor Other, vector HL, vector pushdir) { if (KFPawn_Monster(Other)!=None && KFPawn_Monster(Other).GetTeamNum()==0) Other.TakeDamage(MeleeDamage*5, Controller, HL, pushdir, MeleeHitDT,,Self); // Almost insta-kill pet zeds. else Other.TakeDamage(MeleeDamage, Controller, HL, pushdir, MeleeHitDT,,Self); } + function DamageDoor(KFDoorActor D, vector HL, vector pushdir) { local bool bIsP; @@ -313,6 +325,7 @@ simulated function DrawHUD(HUD H) FPHandModel.SetLocation(GetPawnViewLocation()+(FPHandOffset >> FPHandModel.Rotation)); } } + simulated function InitFPHands() { FPHandModel.Mesh.HideBoneByName('RightUpLeg',PBO_Term); @@ -320,6 +333,7 @@ simulated function InitFPHands() FPHandModel.Mesh.HideBoneByName('Neck',PBO_Term); FPHandModel.SetIdleAnim(FPHandsIdle); } + simulated function Destroyed() { DisableNightVision(); @@ -327,6 +341,7 @@ simulated function Destroyed() FPHandModel.Destroy(); Super.Destroyed(); } + simulated function PlayDying(class DamageType, vector HitLoc) { DisableNightVision(); @@ -334,6 +349,7 @@ simulated function PlayDying(class DamageType, vector HitLoc) FPHandModel.Destroy(); Super.PlayDying(DamageType,HitLoc); } + exec function TestFPOffset(vector V) { FPHandOffset = V; diff --git a/ServerExt/Classes/VS_ZedRecentZed.uc b/ServerExt/Classes/VS_ZedRecentZed.uc index f7468a2..29263bb 100644 --- a/ServerExt/Classes/VS_ZedRecentZed.uc +++ b/ServerExt/Classes/VS_ZedRecentZed.uc @@ -28,6 +28,7 @@ simulated event ReplicatedEvent(name VarName) Super.ReplicatedEvent(VarName); } } + simulated function WakeUp() // Just spawned from transformed into a zombie. { bWasWoken = true; @@ -36,6 +37,7 @@ simulated function WakeUp() // Just spawned from transformed into a zombie. SetTimer(WakeUpAnimTime,false,'GotUp'); GoToState('WakingUp'); } + simulated function GotUp() { if (Health<=0) @@ -137,6 +139,7 @@ simulated function bool PlayDismemberment(int InHitZoneIndex, class DmgType, vector HitLocation, vector HitDirection); diff --git a/ServerExt/Classes/xUI_MapVote.uc b/ServerExt/Classes/xUI_MapVote.uc index c6b63b0..44bd342 100644 --- a/ServerExt/Classes/xUI_MapVote.uc +++ b/ServerExt/Classes/xUI_MapVote.uc @@ -68,15 +68,18 @@ function InitMenu() WindowTitle=Title; } + function CloseMenu() { Super.CloseMenu(); RepInfo = None; } + function InitMapvote(xVotingReplication R) { RepInfo = R; } + function DrawMenu() { Super.DrawMenu(); @@ -129,6 +132,7 @@ final function UpdateList() // Keep same row selected if possible. CurrentVotes.SelectedRowIndex = (SItem!=None ? SItem.Index : -1); } + function ChangeToMaplist(KFGUI_ComboBox Sender) { local int i,g; @@ -157,6 +161,7 @@ function ChangeToMaplist(KFGUI_ComboBox Sender) } } } + static final function bool BelongsToPrefix(string MN, string Prefix) { return (Prefix=="" || Left(MN,Len(Prefix))~=Prefix); @@ -183,6 +188,7 @@ function ClickedRow(int RowNum) RepInfo.ServerCastVote(GameModeCombo.SelectedIndex,SelectedMapIndex,true); } } + function SelectedVoteRow(KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick) { if (bRight) diff --git a/ServerExt/Classes/xVotingReplication.uc b/ServerExt/Classes/xVotingReplication.uc index 1a1a4d4..75a626f 100644 --- a/ServerExt/Classes/xVotingReplication.uc +++ b/ServerExt/Classes/xVotingReplication.uc @@ -72,6 +72,7 @@ reliable server function ServerNotifyReady() { bClientConnected = true; } + unreliable client simulated function ClientVerify() { SetOwner(GetPlayer()); @@ -84,6 +85,7 @@ simulated final function PlayerController GetPlayer() PlayerOwner = GetALocalPlayerController(); return PlayerOwner; } + reliable client simulated function ClientReceiveGame(int Index, string GameName, string GameSName, string Prefix) { if (GameModes.Length<=Index) @@ -93,6 +95,7 @@ reliable client simulated function ClientReceiveGame(int Index, string GameName, GameModes[Index].Prefix = Prefix; bListDirty = true; } + reliable client simulated function ClientReceiveMap(int Index, string MapName, int UpVote, int DownVote, int Sequence, int NumPlays, optional string MapTitle) { if (Maps.Length<=Index) @@ -105,6 +108,7 @@ reliable client simulated function ClientReceiveMap(int Index, string MapName, i Maps[Index].NumPlays = NumPlays; bListDirty = true; } + reliable client simulated function ClientReceiveVote(int GameIndex, int MapIndex, int VoteCount) { local int i; @@ -126,6 +130,7 @@ reliable client simulated function ClientReceiveVote(int GameIndex, int MapIndex ActiveVotes[i].NumVotes = VoteCount; bListDirty = true; } + reliable client simulated function ClientReady(int CurGame) { ClientCurrentGame = CurGame; @@ -138,6 +143,7 @@ simulated final function MapVoteMsg(string S) if (S!="") GetPlayer().ClientMessage(ClientMapVoteMsg$" "$S); } + reliable client simulated function ClientNotifyVote(PlayerReplicationInfo PRI, int GameIndex, int MapIndex) { if (bAllReceived) @@ -158,6 +164,7 @@ reliable client simulated function ClientNotifyVoteTime(int Time) else if (Time==120) MapVoteMsg(TwoMinRemainMsg); } + reliable client simulated function ClientNotifyVoteWin(int GameIndex, int MapIndex, bool bAdminForce) { Class'KF2GUIController'.Static.GetGUIController(GetPlayer()).CloseMenu(None,true); @@ -171,6 +178,7 @@ reliable client simulated function ClientNotifyVoteWin(int GameIndex, int MapInd MapVoteMsg(Maps[MapIndex].MapTitle$" ("$GameModes[GameIndex].GameShortName$") "$KnownMapSwitchMsg); else MapVoteMsg(UnknownMapSwitchMsg); } + reliable client simulated function ClientOpenMapvote(optional bool bShowRank) { local xUI_MapRank R; @@ -189,6 +197,7 @@ reliable client simulated function ClientOpenMapvote(optional bool bShowRank) KFGameReplicationInfo(WorldInfo.GRI).ProcessChanceDrop(); } } + simulated function DelayedOpenMapvote() { local xUI_MapVote U; @@ -205,6 +214,7 @@ reliable server simulated function ServerCastVote(int GameIndex, int MapIndex, b VoteHandler.ClientCastVote(Self,GameIndex,MapIndex,bAdminForce); } } + reliable server simulated function ServerRankMap(bool bUp) { if (!bClientRanked) diff --git a/ServerExtMut/Classes/CtryDatabase.uc b/ServerExtMut/Classes/CtryDatabase.uc index 27373b3..4330148 100644 --- a/ServerExtMut/Classes/CtryDatabase.uc +++ b/ServerExtMut/Classes/CtryDatabase.uc @@ -26,6 +26,7 @@ static final function string GetClientCountryStr(string IP) return GetClientCountryTag(i); } + static final function string GetClientCountryTag(int IP) { local byte V; diff --git a/ServerExtMut/Classes/ExtPlayerStat.uc b/ServerExtMut/Classes/ExtPlayerStat.uc index 5cec58c..a74a611 100644 --- a/ServerExtMut/Classes/ExtPlayerStat.uc +++ b/ServerExtMut/Classes/ExtPlayerStat.uc @@ -23,6 +23,7 @@ final function bool LoadStatFile(PlayerController Other) Buffer.Length = 0; return false; } + final function SaveStatFile(PlayerController Other) { local string S; @@ -51,6 +52,7 @@ function SaveInt(int Value, optional byte MaxVal) } } } + function int ReadInt(optional byte MaxVal) { local int Res; @@ -72,6 +74,7 @@ function int ReadInt(optional byte MaxVal) } return Res; } + function SaveStr(string S) { local int i; @@ -90,6 +93,7 @@ function SaveStr(string S) } SaveInt((i+1),1); } + function string ReadStr() { local int i; @@ -104,26 +108,32 @@ function int TellOffset() { return BufferOffset; } + function SeekOffset(int Offset) { BufferOffset = Clamp(Offset,0,BufferSize); } + function int TotalSize() { return BufferSize; } + function ToEnd() { BufferOffset = BufferSize; } + function ToStart() { BufferOffset = 0; } + function bool AtEnd() { return (BufferOffset>=BufferSize); } + function SkipBytes(int Count) { BufferOffset = Clamp(BufferOffset+Count,0,BufferSize); @@ -183,6 +193,7 @@ function GetData(out array Res) Res[o++] = Asc(Mid(StrMap[i],j,1)); } } + function SetData(out array S) { local int i,o,l,j; @@ -211,6 +222,7 @@ function int GetArVer() { return ArVersion; } + function SetArVer(int Ver) { ArVersion = Ver; @@ -221,6 +233,7 @@ function PushEOFLimit(int EndOffset) EOFStack.AddItem(BufferSize); BufferSize = EndOffset; } + function PopEOFLimit() { if (EOFStack.Length==0) @@ -236,6 +249,7 @@ function int GetSaveVersion() { return SaveNum; } + function SetSaveVersion(int Num) { SaveNum = Num; diff --git a/ServerExtMut/Classes/ExtStatList.uc b/ServerExtMut/Classes/ExtStatList.uc index 680ef4c..40b7fcb 100644 --- a/ServerExtMut/Classes/ExtStatList.uc +++ b/ServerExtMut/Classes/ExtStatList.uc @@ -22,6 +22,7 @@ static final function SetTopPlayers(ExtPlayerController Other) if (bDirty) StaticSaveConfig(); } + static final function bool CheckBestTrack(PlayerReplicationInfo PRI, int Value, out array V) { local string S; diff --git a/ServerExtMut/Classes/ExtWebApp.uc b/ServerExtMut/Classes/ExtWebApp.uc index 3e8aa44..227703f 100644 --- a/ServerExtMut/Classes/ExtWebApp.uc +++ b/ServerExtMut/Classes/ExtWebApp.uc @@ -16,14 +16,17 @@ function cleanup() ExtAdminUI = None; } } + function init(WebAdmin webapp) { webadmin = webapp; } + function registerMenuItems(WebAdminMenu menu) { menu.addMenu(ExtWebURL, "ExtServer Mod", self, "Modify settings of Extended Server Mod.", -44); } + function bool handleQuery(WebAdminQuery q) { switch (q.request.URI) @@ -50,6 +53,7 @@ final function IncludeFile(WebAdminQuery q, string file) } q.response.IncludeUHTM(webadmin.Path $ "/" $ file); } + final function SendHeader(WebAdminQuery q, string Title) { local IQueryHandler handler; @@ -68,6 +72,7 @@ final function SendHeader(WebAdminQuery q, string Title) IncludeFile(q,"header.inc"); q.response.SendText("

"$Title$"

"); } + final function SendFooter(WebAdminQuery q) { IncludeFile(q,"navigation.inc"); @@ -84,6 +89,7 @@ final function AddConfigEditbox(WebAdminQuery q, string InfoStr, string CurVal, S $= ""; q.response.SendText(S); } + final function AddConfigCheckbox(WebAdminQuery q, string InfoStr, bool bCur, string ResponseVar, string Tooltip) { local string S; @@ -92,6 +98,7 @@ final function AddConfigCheckbox(WebAdminQuery q, string InfoStr, bool bCur, str S = ""$InfoStr$":"; q.response.SendText(S); } + final function AddConfigTextbox(WebAdminQuery q, string InfoStr, string CurVal, int Rows, string ResponseVar, string Tooltip) { local string S; @@ -271,6 +278,7 @@ function bool producesXhtml() { return true; } + function bool unhandledQuery(WebAdminQuery q); function decoratePage(WebAdminQuery q); diff --git a/ServerExtMut/Classes/ExtXMLOutput.uc b/ServerExtMut/Classes/ExtXMLOutput.uc index df4eeca..f7e26f2 100644 --- a/ServerExtMut/Classes/ExtXMLOutput.uc +++ b/ServerExtMut/Classes/ExtXMLOutput.uc @@ -17,6 +17,7 @@ function WriteValue(string Key, string Value) { Logf(Intendent$"<"$Key$">"$Value$""); } + function StartIntendent(string Section, optional string Key, optional string Value) { if (Key!="") @@ -25,12 +26,14 @@ function StartIntendent(string Section, optional string Key, optional string Val Intendent $= Chr(9); StackedSect.AddItem(Section); } + function EndIntendent() { Intendent = Left(Intendent,Len(Intendent)-1); Logf(Intendent$""); StackedSect.Remove(StackedSect.Length-1,1); } + function ResetFile() { Intendent = ""; diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index aa931d9..8db4393 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -424,6 +424,7 @@ static final function string GetStatFile(const out UniqueNetId UID) { return Repl(Default.StatFileDir,"%s","U_"$class'OnlineSubsystem'.Static.UniqueNetIdToString(UID)); } + final function bool IsDev(const out UniqueNetId UID) { local int i; @@ -433,6 +434,7 @@ final function bool IsDev(const out UniqueNetId UID) return true; return false; } + function InitGRIList() { local ExtPlayerController PC; @@ -447,6 +449,7 @@ function InitGRIList() PC.PurchaseHelper.TraderItems = CustomTrader; } } + function CheckWave() { if (KF==None) @@ -466,6 +469,7 @@ function CheckWave() bGameHasEnded = true; } } + function NotifyWaveChange() { local ExtPlayerController ExtPC; @@ -497,6 +501,7 @@ function NotifyWaveChange() KFBolt.Destroy(); } } + function SetupWebAdmin() { local WebServer W; @@ -520,6 +525,7 @@ function SetupWebAdmin() } else `Log("ExtWebAdmin ERROR: No WebServer object found!"); } + function SetMaxPlayers() { local OnlineGameSettings GameSettings; @@ -533,6 +539,7 @@ function SetMaxPlayers() GameSettings.NumPublicConnections = ForcedMaxPlayers; } } + function AddMutator(Mutator M) { if (M!=Self) // Make sure we don't get added twice. @@ -662,6 +669,7 @@ function ScoreKill(Controller Killer, Controller Killed) else Super.ScoreKill(Killer, Killed); } + function bool PreventDeath(Pawn Killed, Controller Killer, class damageType, vector HitLocation) { if ((KFPawn_Human(Killed)!=None && CheckPreventDeath(KFPawn_Human(Killed),Killer,damageType)) || Super.PreventDeath(Killed,Killer,damageType,HitLocation)) @@ -705,6 +713,7 @@ final function GT_PlayerKilled(Controller Killer, Controller Killed, class damageType) { local ExtPlayerController E; @@ -714,6 +723,7 @@ final function bool CheckPreventDeath(KFPawn_Human Victim, Controller Killer, cl E = ExtPlayerController(Victim.Controller); return (E!=None && E.ActivePerkManager!=None && E.ActivePerkManager.CurrentPerk!=None && E.ActivePerkManager.CurrentPerk.PreventDeath(Victim,Killer,damageType)); } + final function BroadcastKillMessage(Pawn Killed, Controller Killer) { local ExtPlayerController E; @@ -730,6 +740,7 @@ final function BroadcastKillMessage(Pawn Killed, Controller Killer) else if (ExtPlayerController(Killer)!=None && !ExtPlayerController(Killer).bClientHideKillMsg) ExtPlayerController(Killer).ReceiveKillMessage(Killed.Class); } + final function BroadcastFFDeath(Controller Killer, Pawn Killed, class damageType) { local ExtPlayerController E; @@ -812,6 +823,7 @@ function NetDamage(int OriginalDamage, out int Damage, Pawn Injured, Controller } } } + final function CheckDamageDone() { local int Damage; @@ -829,6 +841,7 @@ final function CheckDamageDone() } LastDamageDealer = None; } + final function HackSetHistory(KFPawn C, Pawn Injured, Controller Player, int Damage, vector HitLocation) { local int i; @@ -884,6 +897,7 @@ function NotifyLogout(Controller Exiting) if (NextMutator != None) NextMutator.NotifyLogout(Exiting); } + function NotifyLogin(Controller NewPlayer) { if (ExtPlayerController(NewPlayer)!=None) @@ -906,6 +920,7 @@ function NotifyLogin(Controller NewPlayer) if (NextMutator != None) NextMutator.NotifyLogin(NewPlayer); } + final function InitializePerks(ExtPlayerController Other) { local ExtPerkManager PM; @@ -939,6 +954,7 @@ final function InitializePerks(ExtPlayerController Other) PM.ServerInitPerks(); PM.InitiateClientRep(); } + final function SendMOTD(ExtPlayerController PC) { local string S; @@ -955,6 +971,7 @@ final function SendMOTD(ExtPlayerController PC) for (i=0; i PlayerClass; @@ -1180,6 +1203,7 @@ final function Pawn SpawnDefaultPawnfor (Controller NewPlayer, Actor StartSpot) ResultPawn = Spawn(PlayerClass,,,StartSpot.Location,R,,true); return ResultPawn; } + final function bool RespawnPlayer(Controller NewPlayer) { local KFPlayerReplicationInfo KFPRI; @@ -1325,6 +1349,7 @@ function PlayerBuyStats(ExtPlayerController PC, class Perk, int iS if (!P.IncrementStat(iStat,Amount)) PC.ClientMessage("Failed to buy stat."); } + function PlayerChangePerk(ExtPlayerController PC, class NewPerk) { if (bGameHasEnded) @@ -1354,6 +1379,7 @@ function PlayerChangePerk(ExtPlayerController PC, class NewPerk) PC.PendingPerkClass = NewPerk; } } + function CheckPerkChange(ExtPlayerController PC) { if (PC.PendingPerkClass!=None) @@ -1367,6 +1393,7 @@ function CheckPerkChange(ExtPlayerController PC) PC.PendingPerkClass = None; } } + function Tick(float DeltaTime) { local bool bCheckedWave; @@ -1382,6 +1409,7 @@ function Tick(float DeltaTime) else if (bCheckedWave) bCheckedWave = false; } + function PlayerBoughtTrait(ExtPlayerController PC, class PerkClass, class Trait) { local Ext_PerkBase P; @@ -1426,6 +1454,7 @@ function PlayerBoughtTrait(ExtPlayerController PC, class PerkClass } } } + function PlayerUnloadInfo(ExtPlayerController PC, byte CallID, class PerkClass, bool bUnload) { local Ext_PerkBase P; @@ -1516,6 +1545,7 @@ final function bool HasPrivs(ExtPlayerReplicationInfo P) { return WorldInfo.NetMode==NM_StandAlone || (P!=None && P.ShowAdminName() && (P.AdminType<=1 || P.AdminType==255)); } + function AdminCommand(ExtPlayerController PC, int PlayerID, int Action) { local ExtPlayerController E; @@ -1643,6 +1673,7 @@ function AdminCommand(ExtPlayerController PC, int PlayerID, int Action) PC.ClientMessage("Unknown admin action.",'Priority'); } } + function AdminSetMOTD(ExtPlayerController PC, string S) { if (!HasPrivs(ExtPlayerReplicationInfo(PC.PlayerReplicationInfo))) @@ -1713,6 +1744,7 @@ function InitWebAdmin(ExtWebAdmin_UI UI) for (i=0; i Ar, int Index, const out string Value) { if (Value=="#DELETE") @@ -1790,6 +1823,7 @@ final function UpdateArray(out array Ar, int Index, const out string Val Ar[Index] = Value; } } + function WebAdminSetValue(name PropName, int ElementIndex, string Value) { switch (PropName) diff --git a/ServerExtMut/Classes/xMapVoteHistory.uc b/ServerExtMut/Classes/xMapVoteHistory.uc index 51f8721..81ccbeb 100644 --- a/ServerExtMut/Classes/xMapVoteHistory.uc +++ b/ServerExtMut/Classes/xMapVoteHistory.uc @@ -26,6 +26,7 @@ static final function int GetMapHistory(string MapName, string MapTitle) Default.N[i].T = MapTitle; return i; } + static final function GetHistory(int i, out int UpVotes, out int DownVotes, out int Seq, out int NumP, out string Title) { UpVotes = Default.N[i].U; @@ -49,6 +50,7 @@ static final function UpdateMapHistory(int iWon) else ++Default.N[i].S; } } + static final function AddMapKarma(int i, bool bUp) { if (bUp) diff --git a/ServerExtMut/Classes/xVoteWebApp.uc b/ServerExtMut/Classes/xVoteWebApp.uc index da2ef0b..70e5a30 100644 --- a/ServerExtMut/Classes/xVoteWebApp.uc +++ b/ServerExtMut/Classes/xVoteWebApp.uc @@ -8,14 +8,17 @@ function cleanup() { webadmin = None; } + function init(WebAdmin webapp) { webadmin = webapp; } + function registerMenuItems(WebAdminMenu menu) { menu.addMenu(MapVoterURL, "X - Mapvote", self, "Modify settings of mapvote.", -88); } + function bool handleQuery(WebAdminQuery q) { switch (q.request.URI) @@ -42,6 +45,7 @@ final function IncludeFile(WebAdminQuery q, string file) } q.response.IncludeUHTM(webadmin.Path $ "/" $ file); } + final function SendHeader(WebAdminQuery q, string Title) { local IQueryHandler handler; @@ -60,6 +64,7 @@ final function SendHeader(WebAdminQuery q, string Title) IncludeFile(q,"header.inc"); q.response.SendText("

"$Title$"

"); } + final function SendFooter(WebAdminQuery q) { IncludeFile(q,"navigation.inc"); @@ -76,10 +81,12 @@ final function AddConfigEditbox(WebAdminQuery q, string InfoStr, string CurVal, S = ""$S$""; q.response.SendText(S); } + final function AddInLineEditbox(WebAdminQuery q, string CurVal, int MaxLen, string ResponseVar, string Tooltip) { q.response.SendText(""); } + function handleMapVotes(WebAdminQuery q) { local int i; @@ -188,6 +195,7 @@ function bool producesXhtml() { return true; } + function bool unhandledQuery(WebAdminQuery q); function decoratePage(WebAdminQuery q); diff --git a/ServerExtMut/Classes/xVotingHandler.uc b/ServerExtMut/Classes/xVotingHandler.uc index 023f263..7a3a462 100644 --- a/ServerExtMut/Classes/xVotingHandler.uc +++ b/ServerExtMut/Classes/xVotingHandler.uc @@ -86,6 +86,7 @@ function PostBeginPlay() SetTimer(0.15,false,'SetupBroadcast'); SetTimer(1,true,'CheckEndGameEnded'); } + function AddMutator(Mutator M) { if (M!=Self) // Make sure we don't get added twice. @@ -126,6 +127,7 @@ function SetupBroadcast() else `Log("X-VoteWebAdmin ERROR: No WebServer object found!"); } } + final function AddVote(int Count, int MapIndex, int GameIndex) { local int i,j; @@ -156,6 +158,7 @@ final function AddVote(int Count, int MapIndex, int GameIndex) for (j=(ActiveVoters.Length-1); j>=0; --j) ActiveVoters[j].ClientReceiveVote(GameIndex,MapIndex,Count); } + final function LogoutPlayer(PlayerController PC) { local int i; @@ -167,6 +170,7 @@ final function LogoutPlayer(PlayerController PC) break; } } + final function LoginPlayer(PlayerController PC) { local xVotingReplication R; @@ -187,6 +191,7 @@ function NotifyLogout(Controller Exiting) if (NextMutator != None) NextMutator.NotifyLogout(Exiting); } + function NotifyLogin(Controller NewPlayer) { if (PlayerController(NewPlayer)!=None) @@ -233,6 +238,7 @@ function ClientDownloadInfo(xVotingReplication V) ++V.DownloadStage; V.DownloadIndex = 0; } + function ClientCastVote(xVotingReplication V, int GameIndex, int MapIndex, bool bAdminForce) { local int i; @@ -259,10 +265,12 @@ function ClientCastVote(xVotingReplication V, int GameIndex, int MapIndex, bool ActiveVoters[i].ClientNotifyVote(V.PlayerOwner.PlayerReplicationInfo,GameIndex,MapIndex); TallyVotes(); } + function ClientRankMap(xVotingReplication V, bool bUp) { class'xMapVoteHistory'.Static.AddMapKarma(iCurrentHistory,bUp); } + function ClientDisconnect(xVotingReplication V) { ActiveVoters.RemoveItem(V); @@ -278,6 +286,7 @@ final function float GetPctOf(int Nom, int Denom) R = float(Nom) / float(Denom); return R; } + final function TallyVotes(optional bool bForce) { local int i,NumVotees,c,j; @@ -351,6 +360,7 @@ final function TallyVotes(optional bool bForce) if (!bMapVoteTimer && NumVotees>0 && GetPctOf(c,NumVotees)>=MidGameVotePct) StartMidGameVote(true); } + final function StartMidGameVote(bool bMidGame) { local int i; @@ -367,6 +377,7 @@ final function StartMidGameVote(bool bMidGame) VoteTimeLeft = Max(VoteTime,10); SetTimer(1,true); } + function CheckEndGameEnded() { if (KF==None) @@ -383,12 +394,14 @@ function CheckEndGameEnded() WorldInfo.Game.ClearTimer('ShowPostGameMenu'); } } + function bool HandleRestartGame() { if (!bMapVoteTimer) StartMidGameVote(false); return true; } + function Timer() { local int i; @@ -433,6 +446,7 @@ function Timer() } } } + final function SwitchToLevel(int GameIndex, int MapIndex, bool bAdminForce) { local int i; @@ -466,6 +480,7 @@ final function SwitchToLevel(int GameIndex, int MapIndex, bool bAdminForce) `Log("MapVote: Switch map to "$PendingMapURL); SetTimer(FMax(MapChangeDelay,0.1),false,'PendingSwitch'); } + function Pendingswitch () { WorldInfo.ServerTravel(PendingMapURL,false); @@ -499,6 +514,7 @@ final function ParseCommand(string Cmd, PlayerController PC) else PC.ClientMessage("Map '"$Cmd$"' not found!"); } } + function ShowMapVote(PlayerController PC) { local int i; @@ -512,6 +528,7 @@ function ShowMapVote(PlayerController PC) return; } } + final function AddMap(string M) { if (Class'KFGameInfo'.Default.GameMapCycles.Length==0) @@ -519,6 +536,7 @@ final function AddMap(string M) Class'KFGameInfo'.Default.GameMapCycles[0].Maps.AddItem(M); Class'KFGameInfo'.Static.StaticSaveConfig(); } + final function bool RemoveMap(string M) { local int i,j;