style: empty line between functions

This commit is contained in:
GenZmeY 2020-11-29 00:54:57 +03:00
parent 8fa925e1e5
commit e68d21f1d9
137 changed files with 625 additions and 0 deletions

View File

@ -4,6 +4,7 @@ final function class<KFPerk> GetBasePerk()
{
return (ActivePerkManager!=None && ActivePerkManager.CurrentPerk!=None) ? ActivePerkManager.CurrentPerk.BasePerk : None;
}
final function Ext_PerkBase GetExtPerk()
{
return ActivePerkManager!=None ? ActivePerkManager.CurrentPerk : None;

View File

@ -27,6 +27,7 @@ final function FMyCustomChar LoadData()
R.AttachmentSkinIndices[2] = AttachmentSkin2;
return R;
}
final function SaveData(FMyCustomChar R)
{
HeadMeshIndex = R.HeadMeshIndex;

View File

@ -52,6 +52,7 @@ function UpdatePerk()
LastEXPValue = CurrentPerkEXP;
}
}
function ShowXPBark(int DeltaXP, string IconPath, bool bIsCurrentPerk)
{
ActionScriptVoid("showXPBark");

View File

@ -93,6 +93,7 @@ simulated function bool Died(Controller Killer, class<DamageType> 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> DamageType, vector HitLoc)
{
local TraceHitInfo HitInfo;
@ -693,6 +706,7 @@ simulated function PlayRagdollDeath(class<DamageType> DamageType, vector HitLoc)
}
}
}
simulated function StartFeignDeathRecoveryAnim()
{
if (FPBodyMesh!=None && !bFPLegsAttached && bOnFirstPerson && Class'ExtPlayerController'.Default.bShowFPLegs)
@ -740,6 +754,7 @@ simulated event FellOutOfWorld(class<DamageType> dmgType)
if (Role==ROLE_Authority && NextRedeemTimer<WorldInfo.TimeSeconds) // Make sure to not to spam deathmessages while ghosting.
Super.FellOutOfWorld(dmgType);
}
simulated event OutsideWorldBounds()
{
if (Role==ROLE_Authority && NextRedeemTimer<WorldInfo.TimeSeconds)

View File

@ -21,6 +21,7 @@ function InitializeMenu(KFGFxMoviePlayer_Manager InManager)
InitCharacterMenu();
// TraderItems = KFGameReplicationInfo(GetPC().WorldInfo.GRI).TraderItems;
}
function InitCharacterMenu()
{
ExtPRI = ExtPlayerReplicationInfo(GetPC().PlayerReplicationInfo);
@ -211,6 +212,7 @@ final function string GetMenuName(Object Obj)
{
return Obj==None ? "Empty" : Repl(string(Obj.Name),"_"," ");
}
final function string GetMenuNameStr(string ObjName)
{
local int i;

View File

@ -22,6 +22,7 @@ function OnOpen()
ExUpdateContainers(ExtPrevPerk);
SetBool("locked", true);
}
final function ExUpdateContainers(Ext_PerkBase PerkClass)
{
LastPerkLevel = PerkClass.CurrentLevel;
@ -68,6 +69,7 @@ function Callback_PerkSelected(byte NewPerkIndex, bool bClickedIndex)
ExtKFPC.PendingPerkClass = ExtPrevPerk.Class;
ExtKFPC.SwitchToPerk(ExtPrevPerk.Class);
}
function Callback_SkillSelectionOpened();
defaultproperties

View File

@ -8,10 +8,12 @@ function InitializeMenu(KFGFxMoviePlayer_Manager InManager)
Super.InitializeMenu(InManager);
ExtKFPC = ExtPlayerController (GetPC());
}
function int GetPerkIndex()
{
return (ExtKFPC.ActivePerkManager!=None ? Max(ExtKFPC.ActivePerkManager.UserPerks.Find(ExtKFPC.ActivePerkManager.CurrentPerk),0) : 0);
}
function UpdatePlayerInfo()
{
if (ExtKFPC != none && PlayerInfoContainer != none)

View File

@ -24,6 +24,7 @@ event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
return Super.WidgetInitialized(WidgetName,WidgetPath,Widget);
}
}
function LaunchMenus(optional bool bForceSkipLobby)
{
local GFxWidgetBinding WidgetBinding;

View File

@ -46,6 +46,7 @@ final function SetGrenadeCap(byte AddedCap)
if (RepState==REP_Done)
ClientSetGrenadeCap(MaxGrenadeCount);
}
simulated reliable client function ClientSetGrenadeCap(byte NewCap)
{
MaxGrenadeCount = NewCap;
@ -63,6 +64,7 @@ function bool ApplyPerkClass(class<Ext_PerkBase> 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<Ext_PerkBase> 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<KFDamageType> DamageType, optional int HitZoneIdx)
{
if (CurrentPerk!=None)
CurrentPerk.ModifyDamageGiven(InDamage,DamageCauser,MyKFPM,DamageInstigator,DamageType,HitZoneIdx);
}
simulated function ModifyDamageTaken(out int InDamage, optional class<DamageType> 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> DamageType, optional byte BodyPart, optional bool bIsSprinting=false)
{
return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f);
}
function float GetStumblePowerModifier(optional KFPawn KFP, optional class<KFDamageType> DamageType, optional out float CooldownModifier, optional byte BodyPart)
{
return (CurrentPerk!=None ? CurrentPerk.GetKnockdownPowerModifier() : 1.f);
}
function float GetStunPowerModifier(optional class<DamageType> 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<KFProj_Grenade> 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<KFPerk> > 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<KFPerk> 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> 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> DamageType, int NumHit)
{
if (CurrentPerk!=None)
CurrentPerk.UpdatePerkHeadShots(Impact,DamageType,NumHit);
}
function CheckForAirborneAgent(KFPawn HealTarget, class<DamageType> DamType, int HealAmount)
{
if (!bCurrentlyHealing && CurrentPerk!=None)
@ -642,6 +684,7 @@ function CheckForAirborneAgent(KFPawn HealTarget, class<DamageType> 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<KFDamageType> KFDT)
{
return (CurrentPerk!=None ? (CurrentPerk.bFireExplode && class<KFDT_Fire>(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<KFDamageType> 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> 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<KFDamageType> DamageType, optional bool bForce )
{
return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).GetPenetrationModifier(Level, DamageType, bForce) : 0.f);

View File

@ -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<HUD> 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<LocalMessage> Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)
@ -176,10 +184,12 @@ function AddSmallRadiusKill(byte Difficulty, class<KFPerk> 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<Pawn> Victim, optional bool bGlobal, optional PlayerReplicationInfo KillerPRI)
{
if (bHideKillMsg || (bGlobal && KillerPRI==None))
@ -291,11 +303,13 @@ reliable client function ReceiveKillMessage(class<Pawn> Victim, optional bool bG
else if (KFExtendedHUD(myHUD)!=None && Victim!=None)
KFExtendedHUD(myHUD).AddKillMessage(Victim,1,KillerPRI,byte(bGlobal));
}
unreliable client function ReceiveDamageMessage(class<Pawn> 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<DamageType> DamType, PlayerReplicationInfo Victim, PlayerReplicationInfo KillerPRI, optional class<Pawn> KillerPawn)
{
local string Msg,S;
@ -435,6 +451,7 @@ reliable client function ClientKillMessage(class<DamageType> DamType, PlayerRepl
KFExtendedHUD(myHUD).AddDeathMessage(Msg,S);
ClientMessage(S,'DeathMessage');
}
reliable client function ClientZedKillMessage(class<DamageType> DamType, string Victim, optional PlayerReplicationInfo KillerPRI, optional class<Pawn> KillerPawn, optional bool bFFKill)
{
local string Msg,S;
@ -471,6 +488,7 @@ reliable client function ClientZedKillMessage(class<DamageType> DamType, string
KFExtendedHUD(myHUD).AddDeathMessage(Msg,S);
ClientMessage(S,'DeathMessage');
}
simulated final function string ParseSuicideMsg(string Victim, class<DamageType> DamType)
{
local string S;
@ -487,6 +505,7 @@ simulated final function string ParseSuicideMsg(string Victim, class<DamageType>
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<DamageType> 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<Ext_PerkBase> 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<Ext_PerkBase> Pe
{
OnRequestUnload(Self,CallID,PerkClass,bUnload);
}
delegate OnRequestUnload(ExtPlayerController PC, byte CallID, class<Ext_PerkBase> 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 (NextCommTime<WorldInfo.TimeSeconds)
@ -771,6 +799,7 @@ exec function StartFire(optional byte FireModeNum)
bAltFire = 1;
Super.StartFire(FireModeNum);
}
exec function StopFire(optional byte FireModeNum)
{
if (FireModeNum==0)
@ -878,11 +907,13 @@ simulated function EndGameCamFocus(vector Pos)
else if (KFPawn(ViewTarget)!=None)
KFPawn(ViewTarget).SetMeshVisibility(true);
}
reliable client function ClientFocusView(vector Pos)
{
if (WorldInfo.NetMode==NM_Client)
EndGameCamFocus(Pos);
}
final function bool CalcEndGameCam()
{
local float T,RT;
@ -923,6 +954,7 @@ final function bool CalcEndGameCam()
}
return true;
}
simulated event GetPlayerViewPoint(out vector out_Location, out Rotator out_Rotation)
{
if (bEndGameCamFocus && CalcEndGameCam())
@ -933,6 +965,7 @@ simulated event GetPlayerViewPoint(out vector out_Location, out Rotator out_Rota
}
Super.GetPlayerViewPoint(out_Location,out_Rotation);
}
exec function DebugRenderMode()
{
if (WorldInfo.NetMode!=NM_Client)
@ -953,6 +986,7 @@ reliable server function ServerRequestStats(byte ListNum)
SetTimer(0.001,true,'SendNextList');
}
}
function SendNextList()
{
if (!OnClientGetStat(Self,TransitListNum,TransitIndex++))
@ -961,6 +995,7 @@ function SendNextList()
ClearTimer('SendNextList');
}
}
simulated reliable client function ClientGetStat(byte ListNum, bool bFinal, optional string N, optional UniqueNetId ID, optional int V)
{
OnClientReceiveStat(ListNum,bFinal,N,ID,V);
@ -973,10 +1008,12 @@ reliable server function ChangeSpectateMode(bool bSpectator)
{
OnSpectateChange(Self,bSpectator);
}
simulated reliable client function ClientSpectateMode(bool bSpectator)
{
UpdateURL("SpectatorOnly",(bSpectator ? "1" : "0"),false);
}
Delegate OnSpectateChange(ExtPlayerController PC, bool bSpectator);
state RagdollMove extends PlayerWalking

View File

@ -7,6 +7,7 @@ exec function StartCrouch()
{
bDuck = 1;
}
exec function ToggleCrouch()
{
bDuck = (bDuck == 0) ? 1 : 0;
@ -28,6 +29,7 @@ simulated exec function IronSights(optional bool bHoldButtonMode)
}
}
}
simulated exec function IronSightsRelease(optional bool bHoldButtonMode)
{
local KFWeapon KFW;

View File

@ -96,6 +96,7 @@ simulated final function bool CanUseSupply(Pawn P)
{
return (SupplierLimit.SuppliedPawn!=P || SupplierLimit.NextSupplyTimer<WorldInfo.TimeSeconds);
}
simulated final function UsedSupply(Pawn P, float NextTime)
{
SupplierLimit.SuppliedPawn = P;
@ -143,16 +144,19 @@ simulated event ReplicatedEvent(name VarName)
Super.ReplicatedEvent(VarName);
}
}
function SetPlayerName(string S)
{
Super.SetPlayerName(S);
UpdateNameTag();
}
function SetPlayerNameTag(string S)
{
NameTag = S;
UpdateNameTag();
}
function OverrideWith(PlayerReplicationInfo PRI)
{
Super.OverrideWith(PRI);
@ -161,12 +165,14 @@ function OverrideWith(PlayerReplicationInfo PRI)
AdminType = ExtPlayerReplicationInfo(PRI).AdminType;
UpdateNameTag();
}
simulated final function UpdateNameTag()
{
if (NameTag!="")
TaggedPlayerName = "["$NameTag$"] "$PlayerName;
else TaggedPlayerName = PlayerName;
}
final function SetLevelProgress(int CurLevel, int CurPrest, int MinLevel, int MaxLevel)
{
local float V;
@ -180,10 +186,12 @@ final function SetLevelProgress(int CurLevel, int CurPrest, int MinLevel, int Ma
if (WorldInfo.NetMode!=NM_DedicatedServer)
HUDPerkColor = PickPerkColor();
}
simulated final function string GetPerkLevelStr()
{
return (ECurrentPerkPrestige>0 ? (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<STraderItemWeaponStats> 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)
@ -572,6 +596,7 @@ simulated reliable client function AllCharReceived()
bClientInitChars = true;
}
}
simulated final function NotifyCharListDone()
{
local KFPawn_Human KFP;
@ -616,6 +641,7 @@ simulated final function bool ReallyUsingCustomChar()
return false;
return (CustomCharacter.CharacterIndex>=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<n; ++i)
Data.SkipBytes(3);
}
static final function DummySaveChar(ExtSaveDataBase Data)
{
Data.SaveStr("");

View File

@ -9,6 +9,7 @@ simulated function PostBeginPlay()
Super.PostBeginPlay();
SetTimer(FuseTime+FRand()*0.25, true, 'ExplodeTimer');
}
simulated function ExplodeTimer()
{
local Actor HitActor;
@ -24,6 +25,7 @@ simulated function ExplodeTimer()
TriggerExplosion(HitLocation, HitNormal, HitActor);
else SmallExplosion(HitLocation, HitNormal, HitActor);
}
simulated function SmallExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor)
{
local vector NudgedHitLocation, ExplosionDirection;
@ -81,9 +83,11 @@ simulated function SmallExplosion(Vector HitLocation, Vector HitNormal, Actor Hi
}
}
}
simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
{
}
simulated function Explode(vector HitLocation, vector HitNormal);
defaultproperties

View File

@ -13,6 +13,7 @@ static final function ExtSpawnPointHelper FindHelper(WorldInfo Level)
return H;
return Level.Spawn(class'ExtSpawnPointHelper');
}
final function Actor PickBestSpawn()
{
local Actor N,BestN;
@ -76,6 +77,7 @@ function PreBeginPlay()
{
SetTimer(0.2,false,'InitChecker');
}
function InitChecker()
{
local PlayerStart PS,Fallback;
@ -94,6 +96,7 @@ function InitChecker()
CheckSpawn(Fallback);
SetTimer(0.001,true,'NextCheck');
}
function NextCheck()
{
local NavigationPoint N;
@ -114,6 +117,7 @@ function NextCheck()
CheckedList.Length = 0;
}
}
final function CheckSpawn(NavigationPoint N)
{
local vector V;

View File

@ -40,6 +40,7 @@ final function Cleanup()
{
ConfigList.Length = 0;
}
final function AddSettingsPage(string PageName, class<Object> Obj, const out array<FWebAdminConfigInfo> Configs, delegate<OnGetValue> GetFunc, delegate<OnSetValue> SetFunc)
{
local int i;
@ -56,6 +57,7 @@ final function AddSettingsPage(string PageName, class<Object> Obj, const out arr
ConfigList[i].GetValue = GetFunc;
ConfigList[i].SetValue = SetFunc;
}
final function bool HasConfigfor (class<Object> Obj)
{
return (ConfigList.Find('ObjClass',Obj)>=0);

View File

@ -31,6 +31,7 @@ final function vector PickPointNearOwner()
OwnerPawn = None;
return V;
}
final function bool CanSeeOwner()
{
local Pawn P;

View File

@ -4,6 +4,7 @@ function SpecialMoveStarted(bool bForced, Name PrevMove)
{
KFPOwner.EndSpecialMove();
}
function SpecialMoveEnded(Name PrevMove, Name NextMove)
{
}

View File

@ -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<Ext_TraitBase> TC, byte Lvl)
{
if (PerkTraits.Length<=Index)
@ -306,11 +310,13 @@ reliable client simulated function ClientReceiveTrait(int Index, class<Ext_Trait
PerkTraits[Index].TraitType = TC;
PerkTraits[Index].CurrentLevel = Lvl;
}
reliable client simulated function ClientReceiveTraitData(int Index, string Data)
{
if (WorldInfo.NetMode==NM_Client)
PerkTraits[Index].TraitType.Static.ClientSetRepData(Data);
}
reliable client simulated function ClientReceiveTraitLvl(int Index, byte NewLevel)
{
PerkTraits[Index].CurrentLevel = NewLevel;
@ -324,6 +330,7 @@ final function SetPerkStat(name Type, int Value)
if (i>=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> DamageType, optional Controller InstigatedBy)
{
if (InDamage>0)
@ -1252,36 +1270,44 @@ simulated function ModifyDamageTaken(out int InDamage, optional class<DamageType
InDamage = Max(InDamage*Modifiers[18],1);
}
}
simulated function ModifyRecoil(out float CurrentRecoilModifier, KFWeapon KFW)
{
if (IsWeaponOnPerk(KFW))
CurrentRecoilModifier *= Modifiers[2];
}
simulated function ModifySpread(out float InSpread)
{
InSpread *= Modifiers[3];
}
simulated function ModifyRateOfFire(out float InRate, KFWeapon KFW)
{
if (IsWeaponOnPerk(KFW))
InRate *= Modifiers[4];
}
simulated function float GetReloadRateScale(KFWeapon KFW)
{
return (IsWeaponOnPerk(KFW) ? Modifiers[5] : 1.f);
}
function ModifyHealth(out int InHealth)
{
InHealth *= Modifiers[6];
}
function ModifyArmor(out byte MaxArmor)
{
MaxArmor = Min(MaxArmor+Modifiers[14],255);
}
function float GetKnockdownPowerModifier()
{
return Modifiers[7];
}
function float GetStunPowerModifier(optional class<DamageType> 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<KFPerk> > 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<KFPerk> WeaponPerkClass)
{
return (KFW==None ? WeaponPerkClass==BasePerk : IsWeaponOnPerk(KFW));

View File

@ -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))

View File

@ -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;

View File

@ -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> DamageType, in
UpdateDmgScale(true);
}
}
reliable client function HeadShotMessage(byte HeadShotNum, bool bMissed, byte MaxHits)
{
local AkEvent TempAkEvent;

View File

@ -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> DamageType, optional byte HitZoneIdx)
{
if (ZEDTimeStunPower>0 && HitZoneIdx==HZI_Head && WorldInfo.TimeDilation<1.f && (class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0))

View File

@ -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";

View File

@ -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";

View File

@ -11,6 +11,7 @@ function PostBeginPlay()
Destroy();
else SetTimer(29+FRand(),true);
}
function Timer()
{
local KFWeapon W;

View File

@ -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

View File

@ -11,6 +11,7 @@ function PostBeginPlay()
Destroy();
else SetTimer(9+FRand(),true);
}
function Timer()
{
if (PawnOwner==None || PawnOwner.Health<=0)

View File

@ -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;

View File

@ -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;

View File

@ -11,6 +11,7 @@ function PostBeginPlay()
Destroy();
else SetTimer(0.5+FRand()*0.1,true);
}
function Timer()
{
local KFPawn_Monster M;

View File

@ -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<KFPawn_Monster> 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<KFPawn_Monster> PickRandomMonster(byte Level, bool bNotBoss)
{
local byte i;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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();

View File

@ -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<Ext_TraitSupply>(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();

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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<Inventory> IC;

View File

@ -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;

View File

@ -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;

View File

@ -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<Ext_TraitZEDBase>(Perk.PerkTraits[i].TraitType)!=None && !Class<Ext_TraitZEDBase>(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)

View File

@ -33,6 +33,7 @@ static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level
if (Perk.PerkTraits[i].CurrentLevel>0 && Class<Ext_TraitZEDBase>(Perk.PerkTraits[i].TraitType)!=None && !Class<Ext_TraitZEDBase>(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;

View File

@ -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);

View File

@ -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<KFGUI_Page> MenuClass)
{
local int i;
@ -351,6 +353,7 @@ simulated function KFGUI_Page OpenMenu(class<KFGUI_Page> MenuClass)
M.ShowMenu();
return M;
}
simulated function CloseMenu(class<KFGUI_Page> MenuClass, optional bool bCloseAll)
{
local int i;
@ -380,6 +383,7 @@ simulated function CloseMenu(class<KFGUI_Page> 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<KFGUI_Page> MenuClass)
{
local int i;
@ -440,6 +446,7 @@ simulated final function bool MenuIsOpen(optional class<KFGUI_Page> 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;

View File

@ -8,6 +8,7 @@ function DrawHUD(HUD H)
{
//ControllerOwner.RenderMenu(H.Canvas);
}
function PostRender(Canvas Canvas)
{
if (ControllerOwner.bIsInMenuState)

View File

@ -16,6 +16,7 @@ static function OpenMenuForClient(PlayerController PC, class<KFGUI_Page> Page)
G = PC.Spawn(class'KF2GUINetwork',PC);
G.ClientOpenMenu(Page);
}
static function CloseMenuForClient(PlayerController PC, class<KFGUI_Page> Page, optional bool bCloseAll)
{
local KF2GUINetwork G;
@ -35,6 +36,7 @@ simulated reliable client function ClientOpenMenu(class<KFGUI_Page> Page)
GUIController = Class'KF2GUIController'.Static.GetGUIController(PlayerOwner);
GUIController.OpenMenu(Page);
}
simulated reliable client function ClientCloseMenu(class<KFGUI_Page> Page, bool bCloseAll)
{
if (!bLocalClient)

View File

@ -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;

View File

@ -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<Pawn> 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<Pawn> Other)
{
local string S;
@ -178,6 +184,7 @@ static final function string GetNameOf(class<Pawn> 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)

View File

@ -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<KFGUI_Base> 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];

View File

@ -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)

View File

@ -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;

View File

@ -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();

View File

@ -38,12 +38,14 @@ function HandleMouseClick(bool bRight)
Selection.YPosition-=((Selection.YPosition+Selection.YSize)-1.f);
Selection.GetInputFocus();
}
final function string GetCurrent()
{
if (SelectedIndex<Values.Length)
return Values[SelectedIndex];
return "";
}
final function bool SetValue(string S)
{
local int i;
@ -54,6 +56,7 @@ final function bool SetValue(string S)
SelectedIndex = i;
return true;
}
Delegate OnComboChanged(KFGUI_ComboBox Sender);
defaultproperties

View File

@ -112,6 +112,7 @@ function MouseLeave()
{
Super(KFGUI_Base).MouseLeave();
}
function MouseEnter()
{
Super(KFGUI_Base).MouseEnter();
@ -129,6 +130,7 @@ function bool CaptureMouse()
}
return Super.CaptureMouse();
}
function CloseMenu()
{
local int i;
@ -137,6 +139,7 @@ function CloseMenu()
ItemComponents[i].CloseMenu();
Super.CloseMenu();
}
function NotifyLevelChange()
{
local int i;
@ -145,6 +148,7 @@ function NotifyLevelChange()
ItemComponents[i].NotifyLevelChange();
Super.NotifyLevelChange();
}
function MenuTick(float DeltaTime)
{
local int i;

View File

@ -188,6 +188,7 @@ function bool NotifyInputKey(int ControllerId, name Key, EInputEvent Event, floa
}
return true;
}
final function PasteText()
{
local string S;
@ -207,6 +208,7 @@ final function PasteText()
else Value = Left(Value,TypePos) $ S $ Mid(Value,TypePos);
TypePos+=Len(S);
}
function bool NotifyInputChar(int ControllerId, string Unicode)
{
if ((!bAllSelected && Len(Value)>=MaxTextLength) || (bHoldCtrl && (Unicode~="C" || Unicode~="X" || Unicode~="V")))

View File

@ -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)

View File

@ -6,11 +6,13 @@ function PreDraw()
{
ComputeCoords();
}
function MouseClick(bool bRight)
{
if (!bRight)
KFGUI_FloatingWindow(ParentComponent).SetWindowDrag(true);
}
function MouseRelease(bool bRight)
{
if (!bRight)

View File

@ -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();

View File

@ -13,6 +13,7 @@ function InitMenu()
Components[i].InitMenu();
}
}
function ShowMenu()
{
local int i;
@ -20,6 +21,7 @@ function ShowMenu()
for (i=0; i<Components.Length; ++i)
Components[i].ShowMenu();
}
function PreDraw()
{
local int i;
@ -38,6 +40,7 @@ function PreDraw()
Components[i].PreDraw();
}
}
function MenuTick(float DeltaTime)
{
local int i;
@ -62,6 +65,7 @@ function CloseMenu()
for (i=0; i<Components.Length; ++i)
Components[i].CloseMenu();
}
function bool CaptureMouse()
{
local int i;
@ -75,6 +79,7 @@ function bool CaptureMouse()
MouseArea = None;
return Super.CaptureMouse(); // check with frame itself.
}
function KFGUI_Base FindComponentID(name InID)
{
local int i;
@ -89,6 +94,7 @@ function KFGUI_Base FindComponentID(name InID)
}
return Result;
}
function FindAllComponentID(name InID, out array<KFGUI_Base> Res)
{
local int i;
@ -98,6 +104,7 @@ function FindAllComponentID(name InID, out array<KFGUI_Base> Res)
for (i=0; i<Components.Length; ++i)
Components[i].FindAllComponentID(InID,Res);
}
function RemoveComponent(KFGUI_Base B)
{
local int i;
@ -112,6 +119,7 @@ function RemoveComponent(KFGUI_Base B)
for (i=0; i<Components.Length; ++i)
Components[i].RemoveComponent(B);
}
function NotifyLevelChange()
{
local int i;

View File

@ -8,10 +8,12 @@ function InitMenu()
Super.InitMenu();
ValidateValue();
}
final function int GetValueInt()
{
return int(Value);
}
final function float GetValueFloat()
{
return float(Value);
@ -22,6 +24,7 @@ function ChangeValue(string V)
Super.ChangeValue(V);
ValidateValue();
}
final function ValidateValue()
{
if (bFloatValue)

View File

@ -26,6 +26,7 @@ function OpenMenu(KFGUI_Base Menu)
YPosition-=((YPosition+YSize)-1.f); // Move up until fit on screen.
GetInputFocus();
}
final function ComputeSize()
{
local float XS,YS,Scalar;
@ -55,6 +56,7 @@ final function ComputeSize()
XSize = (XS+(EdgeSize*2)) / Owner.ScreenSize.X;
YSize = (YS+(EdgeSize*2)) / Owner.ScreenSize.Y;
}
final function AddRow(string Text, bool bDisable)
{
local int i;
@ -69,10 +71,12 @@ final function AddRow(string Text, bool bDisable)
ItemRows[i].bDisabled = bDisable;
}
}
function DrawMenu()
{
Owner.CurrentStyle.RenderRightClickMenu(Self);
}
function HandleMouseClick(bool bRight)
{
if (CurrentRow>=0 && (ItemRows[CurrentRow].bSplitter || ItemRows[CurrentRow].bDisabled))
@ -82,6 +86,7 @@ function HandleMouseClick(bool bRight)
if (CurrentRow>=0)
OnSelectedItem(CurrentRow);
}
function LostInputFocus()
{
OnBecameHidden(Self);

Some files were not shown because too many files have changed in this diff Show More