From 63b031b1116a93467f187e0e32ff42fd55bec6a8 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sat, 28 Nov 2020 22:53:57 +0300 Subject: [PATCH] style: replace spaces with tabs --- ServerExt/Classes/ExtAutoPurchaseHelper.uc | 10 +- ServerExt/Classes/ExtCharacterInfo.uc | 1114 ++++++++--------- ServerExt/Classes/ExtEmoteList.uc | 4 +- ServerExt/Classes/ExtHUD_PlayerStatus.uc | 8 +- ServerExt/Classes/ExtHUD_SpectatorInfo.uc | 8 +- ServerExt/Classes/ExtHUD_WaveInfo.uc | 16 +- .../Classes/ExtHUD_WeaponSelectWidget.uc | 130 +- ServerExt/Classes/ExtHumanPawn.uc | 68 +- ServerExt/Classes/ExtMenu_Gear.uc | 948 +++++++------- ServerExt/Classes/ExtMoviePlayer_HUD.uc | 18 +- ServerExt/Classes/ExtPawn_Customization.uc | 2 +- ServerExt/Classes/ExtPawn_ZedHans_Pet.uc | 2 +- ServerExt/Classes/ExtPerkManager.uc | 2 +- ServerExt/Classes/ExtPerksContainer_Header.uc | 12 +- .../Classes/ExtPerksContainer_Selection.uc | 10 +- ServerExt/Classes/ExtPlayerController.uc | 32 +- ServerExt/Classes/ExtPlayerReplicationInfo.uc | 22 +- ServerExt/Classes/ExtProj_CrackerGrenade.uc | 6 +- ServerExt/Classes/ExtProj_SUPERGrenade.uc | 8 +- ServerExt/Classes/ExtProj_SUPERMedGrenade.uc | 6 +- .../Classes/ExtTraderContainer_Filter.uc | 8 +- .../Classes/ExtTraderContainer_PlayerInfo.uc | 2 +- ServerExt/Classes/ExtTraderContainer_Store.uc | 2 +- ServerExt/Classes/ExtWeap_Pistol_9mm.uc | 2 +- ServerExt/Classes/ExtWeap_Pistol_Dual9mm.uc | 2 +- ServerExt/Classes/ExtWeap_Pistol_MedicS.uc | 2 +- ServerExt/Classes/ExtWeaponSkinList.uc | 4 +- ServerExt/Classes/ExtWidget_PartyInGame.uc | 2 +- ServerExt/Classes/Ext_PerkBase.uc | 36 +- ServerExt/Classes/Ext_PerkSupport.uc | 12 +- ServerExt/Classes/Ext_TraitMedicPistol.uc | 2 +- ServerExt/Classes/Ext_TraitWeapons.uc | 2 +- ServerExt/Classes/KFExtendedHUD.uc | 386 +++--- ServerExt/Classes/KFGUI_Button_CD.uc | 4 +- ServerExt/Classes/KFPawn_ZedSirenX.uc | 2 +- ServerExt/Classes/MS_Game.uc | 4 +- ServerExt/Classes/UI_Scoreboard_CD.uc | 98 +- ServerExt/Classes/VSZombie.uc | 2 +- ServerExt/Classes/VS_ZedClotBase.uc | 2 +- ServerExt/Classes/VS_ZedRecentZed.uc | 4 +- ServerExtMut/Classes/ServerExtMut.uc | 142 +-- 41 files changed, 1573 insertions(+), 1573 deletions(-) diff --git a/ServerExt/Classes/ExtAutoPurchaseHelper.uc b/ServerExt/Classes/ExtAutoPurchaseHelper.uc index ca12aca..368d9bc 100644 --- a/ServerExt/Classes/ExtAutoPurchaseHelper.uc +++ b/ServerExt/Classes/ExtAutoPurchaseHelper.uc @@ -131,13 +131,13 @@ function InitializeOwnedItemList() local Ext_PerkBase EP; EP = GetExtPerk(); - OwnedItemList.length = 0; + OwnedItemList.length = 0; TraderItems = KFGameReplicationInfo( WorldInfo.GRI ).TraderItems; KFP = KFPawn_Human( Pawn ); - if( KFP != none ) - { + if( KFP != none ) + { // init armor purchase values ArmorItem.SpareAmmoCount = KFP.Armor; ArmorItem.MaxSpareAmmo = KFP.GetMaxArmor(); @@ -160,7 +160,7 @@ function InitializeOwnedItemList() { // Set the weapon information and add it to the OwnedItemList SetWeaponInformation( KFW ); - } + } } if(MyGfxManager != none && MyGfxManager.TraderMenu != none) @@ -237,7 +237,7 @@ function bool CanCarry(const out STraderItem Item, optional int OverrideLevelVal Result = TotalBlocks + MyKFIM.GetDisplayedBlocksRequiredFor(Item); if (Result > MaxBlocks) { - return false; + return false; } return true; } diff --git a/ServerExt/Classes/ExtCharacterInfo.uc b/ServerExt/Classes/ExtCharacterInfo.uc index 0727753..30ffbe2 100644 --- a/ServerExt/Classes/ExtCharacterInfo.uc +++ b/ServerExt/Classes/ExtCharacterInfo.uc @@ -1,546 +1,546 @@ // Only a helper class to hold code. class ExtCharacterInfo extends Object - abstract; + abstract; // Hack fix for not being able to compile materials in run-time. static final function CloneMIC( MaterialInstanceConstant B ) { - local int i; - local MaterialInstanceConstant M; - local LinearColor C; - - M = MaterialInstanceConstant(B.Parent); - if( M==None ) - return; - B.SetParent(M.Parent); - - for( i=0; i 0 ) - { - // Assign a skin to the body mesh as a material override - CurrentBodyMeshIndex = (CurrentBodyMeshIndex < C.BodyVariants.length) ? CurrentBodyMeshIndex : 0; - - if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Body, CurrentBodyMeshIndex)) - { - return; - } + // Character Mesh + if( C.BodyVariants.length > 0 ) + { + // Assign a skin to the body mesh as a material override + CurrentBodyMeshIndex = (CurrentBodyMeshIndex < C.BodyVariants.length) ? CurrentBodyMeshIndex : 0; + + if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Body, CurrentBodyMeshIndex)) + { + return; + } - // Retrieve the name of the meshes to be used from the archetype - CharBodyMeshName = C.BodyVariants[CurrentBodyMeshIndex].MeshName; + // Retrieve the name of the meshes to be used from the archetype + CharBodyMeshName = C.BodyVariants[CurrentBodyMeshIndex].MeshName; - // Load the meshes - CharBodyMesh = SkeletalMesh(SafeLoadObject(CharBodyMeshName, class'SkeletalMesh')); + // Load the meshes + CharBodyMesh = SkeletalMesh(SafeLoadObject(CharBodyMeshName, class'SkeletalMesh')); - // Assign the body mesh to the pawn - if ( CharBodyMesh != KFP.Mesh.SkeletalMesh ) - { - KFP.Mesh.SetSkeletalMesh(CharBodyMesh); - KFP.OnCharacterMeshChanged(); - } + // Assign the body mesh to the pawn + if ( CharBodyMesh != KFP.Mesh.SkeletalMesh ) + { + KFP.Mesh.SetSkeletalMesh(CharBodyMesh); + KFP.OnCharacterMeshChanged(); + } - if (KFP.WorldInfo.NetMode != NM_DedicatedServer) - { - SetBodySkinMaterial(C, C.BodyVariants[CurrentBodyMeshIndex], CurrentBodySkinIndex, KFP); - } - } - else - { - `warn("Character does not have a valid mesh"); - } + if (KFP.WorldInfo.NetMode != NM_DedicatedServer) + { + SetBodySkinMaterial(C, C.BodyVariants[CurrentBodyMeshIndex], CurrentBodySkinIndex, KFP); + } + } + else + { + `warn("Character does not have a valid mesh"); + } } static final function SetBodySkinMaterial( KFCharacterInfo_Human C, OutfitVariants CurrentVariant, byte NewSkinIndex, KFPawn KFP) { - local int i; + local int i; - if (KFP.WorldInfo.NetMode != NM_DedicatedServer) - { - if( CurrentVariant.SkinVariations.length > 0 ) - { - // Assign a skin to the body mesh as a material override - NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0; - KFP.Mesh.SetMaterial(C.BodyMaterialID, CurrentVariant.SkinVariations[NewSkinIndex].Skin); - } - else - { - // Use material specified in the mesh asset - for( i=0; i 0 ) + { + // Assign a skin to the body mesh as a material override + NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0; + KFP.Mesh.SetMaterial(C.BodyMaterialID, CurrentVariant.SkinVariations[NewSkinIndex].Skin); + } + else + { + // Use material specified in the mesh asset + for( i=0; i 0 ) - { - // Assign a skin to the body mesh as a material override - NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0; - KFP.ThirdPersonHeadMeshComponent.SetMaterial(C.HeadMaterialID, CurrentVariant.SkinVariations[NewSkinIndex].Skin); - } - else - { - // Use material specified in the mesh asset - for( i=0; i 0 ) + { + // Assign a skin to the body mesh as a material override + NewSkinIndex = (NewSkinIndex < CurrentVariant.SkinVariations.length) ? NewSkinIndex : 0; + KFP.ThirdPersonHeadMeshComponent.SetMaterial(C.HeadMaterialID, CurrentVariant.SkinVariations[NewSkinIndex].Skin); + } + else + { + // Use material specified in the mesh asset + for( i=0; i 0 ) - { - CurrentHeadMeshIndex = (CurrentHeadMeshIndex < C.HeadVariants.length) ? CurrentHeadMeshIndex : 0; - - if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Head, CurrentHeadMeshIndex)) - { - return; - } + if ( C.HeadVariants.length > 0 ) + { + CurrentHeadMeshIndex = (CurrentHeadMeshIndex < C.HeadVariants.length) ? CurrentHeadMeshIndex : 0; + + if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Head, CurrentHeadMeshIndex)) + { + return; + } - CharHeadMeshName = C.HeadVariants[CurrentHeadMeshIndex].MeshName; - CharHeadMesh = SkeletalMesh(DynamicLoadObject(CharHeadMeshName, class'SkeletalMesh')); + CharHeadMeshName = C.HeadVariants[CurrentHeadMeshIndex].MeshName; + CharHeadMesh = SkeletalMesh(DynamicLoadObject(CharHeadMeshName, class'SkeletalMesh')); - // Parent the third person head mesh to the body mesh - KFP.ThirdPersonHeadMeshComponent.SetSkeletalMesh(CharHeadMesh); - KFP.ThirdPersonHeadMeshComponent.SetScale(C.DefaultMeshScale); + // Parent the third person head mesh to the body mesh + KFP.ThirdPersonHeadMeshComponent.SetSkeletalMesh(CharHeadMesh); + KFP.ThirdPersonHeadMeshComponent.SetScale(C.DefaultMeshScale); - KFP.ThirdPersonHeadMeshComponent.SetParentAnimComponent(KFP.Mesh); - KFP.ThirdPersonHeadMeshComponent.SetShadowParent(KFP.Mesh); - KFP.ThirdPersonHeadMeshComponent.SetLODParent(KFP.Mesh); + KFP.ThirdPersonHeadMeshComponent.SetParentAnimComponent(KFP.Mesh); + KFP.ThirdPersonHeadMeshComponent.SetShadowParent(KFP.Mesh); + KFP.ThirdPersonHeadMeshComponent.SetLODParent(KFP.Mesh); - KFP.AttachComponent(KFP.ThirdPersonHeadMeshComponent); + KFP.AttachComponent(KFP.ThirdPersonHeadMeshComponent); - if (KFP.WorldInfo.NetMode != NM_DedicatedServer) - { - SetHeadSkinMaterial(C, C.HeadVariants[CurrentHeadMeshIndex], CurrentHeadSkinIndex, KFP); - } - } + if (KFP.WorldInfo.NetMode != NM_DedicatedServer) + { + SetHeadSkinMaterial(C, C.HeadVariants[CurrentHeadMeshIndex], CurrentHeadSkinIndex, KFP); + } + } } static final function SetAttachmentSkinMaterial( KFCharacterInfo_Human C, - int PawnAttachmentIndex, - const out AttachmentVariants CurrentVariant, - byte NewSkinIndex, - KFPawn KFP, - optional bool bIsFirstPerson) + int PawnAttachmentIndex, + const out AttachmentVariants CurrentVariant, + byte NewSkinIndex, + KFPawn KFP, + optional bool bIsFirstPerson) { - local int i; - if (KFP.WorldInfo.NetMode != NM_DedicatedServer) - { - if( CurrentVariant.AttachmentItem.SkinVariations.length > 0 ) - { - // Assign a skin to the attachment mesh as a material override - if ( NewSkinIndex < CurrentVariant.AttachmentItem.SkinVariations.length ) - { - if (bIsFirstPerson) - { - if (KFP.FirstPersonAttachments[PawnAttachmentIndex] != none) - { - KFP.FirstPersonAttachments[PawnAttachmentIndex].SetMaterial( - CurrentVariant.AttachmentItem.SkinMaterialID, - CurrentVariant.AttachmentItem.SkinVariations[NewSkinIndex].Skin1p); - } - } - else - { - KFP.ThirdPersonAttachments[PawnAttachmentIndex].SetMaterial( - CurrentVariant.AttachmentItem.SkinMaterialID, - CurrentVariant.AttachmentItem.SkinVariations[NewSkinIndex].Skin); - } - } - else - { - `log("Out of bounds skin index for"@CurrentVariant.MeshName); - C.RemoveAttachmentMeshAndSkin(PawnAttachmentIndex, KFP); - } - } - else - { - if (bIsFirstPerson) - { - if (KFP.FirstPersonAttachments[PawnAttachmentIndex] != none) - { - for (i = 0; i < KFP.FirstPersonAttachments[PawnAttachmentIndex].GetNumElements(); i++) - { - KFP.FirstPersonAttachments[PawnAttachmentIndex].SetMaterial(i, none); - } - } - } - else - { - // Use material specified in the mesh asset - for( i=0; i < KFP.ThirdPersonAttachments[PawnAttachmentIndex].GetNumElements(); i++ ) - { - KFP.ThirdPersonAttachments[PawnAttachmentIndex].SetMaterial(i, none); - } - } - } - } + local int i; + if (KFP.WorldInfo.NetMode != NM_DedicatedServer) + { + if( CurrentVariant.AttachmentItem.SkinVariations.length > 0 ) + { + // Assign a skin to the attachment mesh as a material override + if ( NewSkinIndex < CurrentVariant.AttachmentItem.SkinVariations.length ) + { + if (bIsFirstPerson) + { + if (KFP.FirstPersonAttachments[PawnAttachmentIndex] != none) + { + KFP.FirstPersonAttachments[PawnAttachmentIndex].SetMaterial( + CurrentVariant.AttachmentItem.SkinMaterialID, + CurrentVariant.AttachmentItem.SkinVariations[NewSkinIndex].Skin1p); + } + } + else + { + KFP.ThirdPersonAttachments[PawnAttachmentIndex].SetMaterial( + CurrentVariant.AttachmentItem.SkinMaterialID, + CurrentVariant.AttachmentItem.SkinVariations[NewSkinIndex].Skin); + } + } + else + { + `log("Out of bounds skin index for"@CurrentVariant.MeshName); + C.RemoveAttachmentMeshAndSkin(PawnAttachmentIndex, KFP); + } + } + else + { + if (bIsFirstPerson) + { + if (KFP.FirstPersonAttachments[PawnAttachmentIndex] != none) + { + for (i = 0; i < KFP.FirstPersonAttachments[PawnAttachmentIndex].GetNumElements(); i++) + { + KFP.FirstPersonAttachments[PawnAttachmentIndex].SetMaterial(i, none); + } + } + } + else + { + // Use material specified in the mesh asset + for( i=0; i < KFP.ThirdPersonAttachments[PawnAttachmentIndex].GetNumElements(); i++ ) + { + KFP.ThirdPersonAttachments[PawnAttachmentIndex].SetMaterial(i, none); + } + } + } + } } static final function SetAttachmentMeshAndSkin( KFCharacterInfo_Human C, - int CurrentAttachmentMeshIndex, - int CurrentAttachmentSkinIndex, - KFPawn KFP, - KFPlayerReplicationInfo KFPRI, - optional bool bIsFirstPerson ) + int CurrentAttachmentMeshIndex, + int CurrentAttachmentSkinIndex, + KFPawn KFP, + KFPlayerReplicationInfo KFPRI, + optional bool bIsFirstPerson ) { - local string CharAttachmentMeshName; - local name CharAttachmentSocketName; - local int AttachmentSlotIndex; - local SkeletalMeshComponent AttachmentMesh; + local string CharAttachmentMeshName; + local name CharAttachmentSocketName; + local int AttachmentSlotIndex; + local SkeletalMeshComponent AttachmentMesh; - if (KFP.WorldInfo.NetMode == NM_DedicatedServer) - { - return; - } + if (KFP.WorldInfo.NetMode == NM_DedicatedServer) + { + return; + } - // Clear any previously attachments for the same slot - //DetachConflictingAttachments(CurrentAttachmentMeshIndex, KFP, KFPRI); - // Get a slot where this attachment could fit - AttachmentSlotIndex = GetAttachmentSlotIndex(C, CurrentAttachmentMeshIndex, KFP, KFPRI); - - if (AttachmentSlotIndex == INDEX_NONE) - { - return; - } + // Clear any previously attachments for the same slot + //DetachConflictingAttachments(CurrentAttachmentMeshIndex, KFP, KFPRI); + // Get a slot where this attachment could fit + AttachmentSlotIndex = GetAttachmentSlotIndex(C, CurrentAttachmentMeshIndex, KFP, KFPRI); + + if (AttachmentSlotIndex == INDEX_NONE) + { + return; + } - // Since cosmetic attachments are optional, do not choose index 0 if none is - // specified unlike the the head and body meshes - if ( C.CosmeticVariants.Length > 0 && - CurrentAttachmentMeshIndex < C.CosmeticVariants.Length ) - { - if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Attachment, CurrentAttachmentMeshIndex)) - { - return; - } - - // Cache values from character info - CharAttachmentMeshName = bIsFirstPerson ? C.Get1pMeshByIndex(CurrentAttachmentMeshIndex) : C.GetMeshByIndex(CurrentAttachmentMeshIndex); - CharAttachmentSocketName = bIsFirstPerson ? C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.SocketName1p : C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.SocketName; - AttachmentMesh = bIsFirstPerson ? KFP.ArmsMesh : KFP.Mesh; + // Since cosmetic attachments are optional, do not choose index 0 if none is + // specified unlike the the head and body meshes + if ( C.CosmeticVariants.Length > 0 && + CurrentAttachmentMeshIndex < C.CosmeticVariants.Length ) + { + if (KFPRI.StartLoadCosmeticContent(C, ECOSMETICTYPE_Attachment, CurrentAttachmentMeshIndex)) + { + return; + } + + // Cache values from character info + CharAttachmentMeshName = bIsFirstPerson ? C.Get1pMeshByIndex(CurrentAttachmentMeshIndex) : C.GetMeshByIndex(CurrentAttachmentMeshIndex); + CharAttachmentSocketName = bIsFirstPerson ? C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.SocketName1p : C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.SocketName; + AttachmentMesh = bIsFirstPerson ? KFP.ArmsMesh : KFP.Mesh; - // If previously attached and we could have changed outfits (e.g. local player UI) then re-validate - // required skeletal mesh socket. Must be after body mesh DLO, but before AttachComponent. - if ( KFP.IsLocallyControlled() ) - { - if ( CharAttachmentSocketName != '' && KFP.Mesh.GetSocketByName(CharAttachmentSocketName) == None ) - { - C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI); - return; - } - } + // If previously attached and we could have changed outfits (e.g. local player UI) then re-validate + // required skeletal mesh socket. Must be after body mesh DLO, but before AttachComponent. + if ( KFP.IsLocallyControlled() ) + { + if ( CharAttachmentSocketName != '' && KFP.Mesh.GetSocketByName(CharAttachmentSocketName) == None ) + { + C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI); + return; + } + } - // Set First Person Cosmetic if mesh exists for it. - if(CharAttachmentMeshName != "") - { - // Set Cosmetic Mesh - SetAttachmentMesh(C, CurrentAttachmentMeshIndex, AttachmentSlotIndex, CharAttachmentMeshName, CharAttachmentSocketName, AttachmentMesh, KFP, bIsFirstPerson); - } - else - { - // Make sure to clear out attachment if we're replacing with nothing. - if(bIsFirstPerson) - { - KFP.FirstPersonAttachments[AttachmentSlotIndex] = none; - KFP.FirstPersonAttachmentSocketNames[AttachmentSlotIndex] = ''; - } - } + // Set First Person Cosmetic if mesh exists for it. + if(CharAttachmentMeshName != "") + { + // Set Cosmetic Mesh + SetAttachmentMesh(C, CurrentAttachmentMeshIndex, AttachmentSlotIndex, CharAttachmentMeshName, CharAttachmentSocketName, AttachmentMesh, KFP, bIsFirstPerson); + } + else + { + // Make sure to clear out attachment if we're replacing with nothing. + if(bIsFirstPerson) + { + KFP.FirstPersonAttachments[AttachmentSlotIndex] = none; + KFP.FirstPersonAttachmentSocketNames[AttachmentSlotIndex] = ''; + } + } - // Set Cosmetic Skin - SetAttachmentSkinMaterial( - C, - AttachmentSlotIndex, - C.CosmeticVariants[CurrentAttachmentMeshIndex], - CurrentAttachmentSkinIndex, - KFP, - bIsFirstPerson); - } + // Set Cosmetic Skin + SetAttachmentSkinMaterial( + C, + AttachmentSlotIndex, + C.CosmeticVariants[CurrentAttachmentMeshIndex], + CurrentAttachmentSkinIndex, + KFP, + bIsFirstPerson); + } - // Treat `CLEARED_ATTACHMENT_INDEX as special value (for client detachment) - if( CurrentAttachmentMeshIndex == `CLEARED_ATTACHMENT_INDEX ) - { - C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI); - } + // Treat `CLEARED_ATTACHMENT_INDEX as special value (for client detachment) + if( CurrentAttachmentMeshIndex == `CLEARED_ATTACHMENT_INDEX ) + { + C.RemoveAttachmentMeshAndSkin(AttachmentSlotIndex, KFP, KFPRI); + } } static final function SetAttachmentMesh(KFCharacterInfo_Human C, int CurrentAttachmentMeshIndex, int AttachmentSlotIndex, string CharAttachmentMeshName, name CharAttachmentSocketName, SkeletalMeshComponent PawnMesh, KFPawn KFP, bool bIsFirstPerson = false) { - local StaticMeshComponent StaticAttachment; - local SkeletalMeshComponent SkeletalAttachment; - local bool bIsSkeletalAttachment; - local StaticMesh CharAttachmentStaticMesh; - local SkeletalMesh CharacterAttachmentSkelMesh; - local float MaxDrawDistance; - local SkeletalMeshSocket AttachmentSocket; - local vector AttachmentLocationRelativeToSocket, AttachmentScaleRelativeToSocket; - local rotator AttachmentRotationRelativeToSocket; + local StaticMeshComponent StaticAttachment; + local SkeletalMeshComponent SkeletalAttachment; + local bool bIsSkeletalAttachment; + local StaticMesh CharAttachmentStaticMesh; + local SkeletalMesh CharacterAttachmentSkelMesh; + local float MaxDrawDistance; + local SkeletalMeshSocket AttachmentSocket; + local vector AttachmentLocationRelativeToSocket, AttachmentScaleRelativeToSocket; + local rotator AttachmentRotationRelativeToSocket; - MaxDrawDistance = C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.MaxDrawDistance; - AttachmentLocationRelativeToSocket = C.CosmeticVariants[CurrentAttachmentMeshIndex].RelativeTranslation; - AttachmentRotationRelativeToSocket = C.CosmeticVariants[CurrentAttachmentMeshIndex].RelativeRotation; - AttachmentScaleRelativeToSocket = C.CosmeticVariants[CurrentAttachmentMeshIndex].RelativeScale; - bIsSkeletalAttachment = C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.bIsSkeletalAttachment; + MaxDrawDistance = C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.MaxDrawDistance; + AttachmentLocationRelativeToSocket = C.CosmeticVariants[CurrentAttachmentMeshIndex].RelativeTranslation; + AttachmentRotationRelativeToSocket = C.CosmeticVariants[CurrentAttachmentMeshIndex].RelativeRotation; + AttachmentScaleRelativeToSocket = C.CosmeticVariants[CurrentAttachmentMeshIndex].RelativeScale; + bIsSkeletalAttachment = C.CosmeticVariants[CurrentAttachmentMeshIndex].AttachmentItem.bIsSkeletalAttachment; - //`log("AttachmentLocationRelativeToSocket: x="$AttachmentLocationRelativeToSocket.x@"y="$AttachmentLocationRelativeToSocket.y@"z="$AttachmentLocationRelativeToSocket.z); - // If it is a skeletal attachment, parent anim it to the body mesh - if (bIsSkeletalAttachment) - { - if (bIsFirstPerson && (SkeletalMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]) != none)) - { - SkeletalAttachment = SkeletalMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]); - } - else if (!bIsFirstPerson && (SkeletalMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]) != none)) - { - SkeletalAttachment = SkeletalMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]); - } - else - { - SkeletalAttachment = new(KFP) class'KFSkeletalMeshComponent'; - if (bIsFirstPerson) - { - C.SetFirstPersonCosmeticAttachment(SkeletalAttachment); - } - SkeletalAttachment.SetActorCollision(false, false); + //`log("AttachmentLocationRelativeToSocket: x="$AttachmentLocationRelativeToSocket.x@"y="$AttachmentLocationRelativeToSocket.y@"z="$AttachmentLocationRelativeToSocket.z); + // If it is a skeletal attachment, parent anim it to the body mesh + if (bIsSkeletalAttachment) + { + if (bIsFirstPerson && (SkeletalMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]) != none)) + { + SkeletalAttachment = SkeletalMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]); + } + else if (!bIsFirstPerson && (SkeletalMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]) != none)) + { + SkeletalAttachment = SkeletalMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]); + } + else + { + SkeletalAttachment = new(KFP) class'KFSkeletalMeshComponent'; + if (bIsFirstPerson) + { + C.SetFirstPersonCosmeticAttachment(SkeletalAttachment); + } + SkeletalAttachment.SetActorCollision(false, false); - if(bIsFirstPerson) - { - KFP.FirstPersonAttachments[AttachmentSlotIndex] = SkeletalAttachment; - } - else - { - KFP.ThirdPersonAttachments[AttachmentSlotIndex] = SkeletalAttachment; - } - } + if(bIsFirstPerson) + { + KFP.FirstPersonAttachments[AttachmentSlotIndex] = SkeletalAttachment; + } + else + { + KFP.ThirdPersonAttachments[AttachmentSlotIndex] = SkeletalAttachment; + } + } - // Load and assign skeletal mesh - CharacterAttachmentSkelMesh = SkeletalMesh(DynamicLoadObject(CharAttachmentMeshName, class'SkeletalMesh')); - SkeletalAttachment.SetSkeletalMesh(CharacterAttachmentSkelMesh); + // Load and assign skeletal mesh + CharacterAttachmentSkelMesh = SkeletalMesh(DynamicLoadObject(CharAttachmentMeshName, class'SkeletalMesh')); + SkeletalAttachment.SetSkeletalMesh(CharacterAttachmentSkelMesh); - // Parent animation and LOD transitions to body mesh - SkeletalAttachment.SetParentAnimComponent(PawnMesh); - SkeletalAttachment.SetLODParent(PawnMesh); - SkeletalAttachment.SetScale(C.DefaultMeshScale); - SkeletalAttachment.SetCullDistance(MaxDrawDistance); - SkeletalAttachment.SetShadowParent(PawnMesh); - SkeletalAttachment.SetLightingChannels(KFP.PawnLightingChannel); + // Parent animation and LOD transitions to body mesh + SkeletalAttachment.SetParentAnimComponent(PawnMesh); + SkeletalAttachment.SetLODParent(PawnMesh); + SkeletalAttachment.SetScale(C.DefaultMeshScale); + SkeletalAttachment.SetCullDistance(MaxDrawDistance); + SkeletalAttachment.SetShadowParent(PawnMesh); + SkeletalAttachment.SetLightingChannels(KFP.PawnLightingChannel); - KFP.AttachComponent(SkeletalAttachment); - } - // Otherwise (if static), attach to a socket on the body mesh - else - { - if (!bIsFirstPerson && (StaticMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]) != none)) - { - StaticAttachment = StaticMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]); - } - else if (bIsFirstPerson && (StaticMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]) != none)) - { - StaticAttachment = StaticMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]); - } - else - { - StaticAttachment = new(KFP) class'StaticMeshComponent'; - StaticAttachment.SetActorCollision(false, false); + KFP.AttachComponent(SkeletalAttachment); + } + // Otherwise (if static), attach to a socket on the body mesh + else + { + if (!bIsFirstPerson && (StaticMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]) != none)) + { + StaticAttachment = StaticMeshComponent(KFP.ThirdPersonAttachments[AttachmentSlotIndex]); + } + else if (bIsFirstPerson && (StaticMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]) != none)) + { + StaticAttachment = StaticMeshComponent(KFP.FirstPersonAttachments[AttachmentSlotIndex]); + } + else + { + StaticAttachment = new(KFP) class'StaticMeshComponent'; + StaticAttachment.SetActorCollision(false, false); - if(bIsFirstPerson) - { - KFP.FirstPersonAttachments[AttachmentSlotIndex] = StaticAttachment; - } - else - { - KFP.ThirdPersonAttachments[AttachmentSlotIndex] = StaticAttachment; - } - } + if(bIsFirstPerson) + { + KFP.FirstPersonAttachments[AttachmentSlotIndex] = StaticAttachment; + } + else + { + KFP.ThirdPersonAttachments[AttachmentSlotIndex] = StaticAttachment; + } + } - // Load and assign static mesh - CharAttachmentStaticMesh = StaticMesh(DynamicLoadObject(CharAttachmentMeshName, class'StaticMesh')); - StaticAttachment.SetStaticMesh(CharAttachmentStaticMesh); + // Load and assign static mesh + CharAttachmentStaticMesh = StaticMesh(DynamicLoadObject(CharAttachmentMeshName, class'StaticMesh')); + StaticAttachment.SetStaticMesh(CharAttachmentStaticMesh); - // Set properties - StaticAttachment.SetScale(C.DefaultMeshScale); - StaticAttachment.SetCullDistance(MaxDrawDistance); - StaticAttachment.SetShadowParent(KFP.Mesh); - StaticAttachment.SetLightingChannels(KFP.PawnLightingChannel); + // Set properties + StaticAttachment.SetScale(C.DefaultMeshScale); + StaticAttachment.SetCullDistance(MaxDrawDistance); + StaticAttachment.SetShadowParent(KFP.Mesh); + StaticAttachment.SetLightingChannels(KFP.PawnLightingChannel); - // For static meshes, attach to given socket - AttachmentSocket = PawnMesh.GetSocketByName(CharAttachmentSocketName); - PawnMesh.AttachComponent( - StaticAttachment, - AttachmentSocket.BoneName, - AttachmentSocket.RelativeLocation + AttachmentLocationRelativeToSocket, - AttachmentSocket.RelativeRotation + AttachmentRotationRelativeToSocket, - AttachmentSocket.RelativeScale * AttachmentScaleRelativeToSocket); - } + // For static meshes, attach to given socket + AttachmentSocket = PawnMesh.GetSocketByName(CharAttachmentSocketName); + PawnMesh.AttachComponent( + StaticAttachment, + AttachmentSocket.BoneName, + AttachmentSocket.RelativeLocation + AttachmentLocationRelativeToSocket, + AttachmentSocket.RelativeRotation + AttachmentRotationRelativeToSocket, + AttachmentSocket.RelativeScale * AttachmentScaleRelativeToSocket); + } - if(bIsFirstPerson) - { - KFP.FirstPersonAttachmentSocketNames[AttachmentSlotIndex] = CharAttachmentSocketName; - } - else - { - KFP.ThirdPersonAttachmentSocketNames[AttachmentSlotIndex] = CharAttachmentSocketName; - } + if(bIsFirstPerson) + { + KFP.FirstPersonAttachmentSocketNames[AttachmentSlotIndex] = CharAttachmentSocketName; + } + else + { + KFP.ThirdPersonAttachmentSocketNames[AttachmentSlotIndex] = CharAttachmentSocketName; + } } /** @@ -549,134 +549,134 @@ static final function SetAttachmentMesh(KFCharacterInfo_Human C, int CurrentAtta */ static final function DetachConflictingAttachments( KFCharacterInfo_Human C, int NewAttachmentMeshIndex, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI) { - local name NewAttachmentSocketName; - local int i, CurrentAttachmentIdx; - local ExtPlayerReplicationInfo EPRI; + local name NewAttachmentSocketName; + local int i, CurrentAttachmentIdx; + local ExtPlayerReplicationInfo EPRI; - EPRI = ExtPlayerReplicationInfo(KFPRI); - if ( EPRI==none || !EPRI.UsesCustomChar() ) - return; + EPRI = ExtPlayerReplicationInfo(KFPRI); + if ( EPRI==none || !EPRI.UsesCustomChar() ) + return; - if ( C.CosmeticVariants.length > 0 && - NewAttachmentMeshIndex < C.CosmeticVariants.length ) - { - // The socket that this attachment requires - NewAttachmentSocketName = C.CosmeticVariants[NewAttachmentMeshIndex].AttachmentItem.SocketName; + if ( C.CosmeticVariants.length > 0 && + NewAttachmentMeshIndex < C.CosmeticVariants.length ) + { + // The socket that this attachment requires + NewAttachmentSocketName = C.CosmeticVariants[NewAttachmentMeshIndex].AttachmentItem.SocketName; - for( i=0; i < `MAX_COSMETIC_ATTACHMENTS; i++ ) - { - CurrentAttachmentIdx = EPRI.CustomCharacter.AttachmentMeshIndices[i]; - if ( CurrentAttachmentIdx == `CLEARED_ATTACHMENT_INDEX ) - continue; + for( i=0; i < `MAX_COSMETIC_ATTACHMENTS; i++ ) + { + CurrentAttachmentIdx = EPRI.CustomCharacter.AttachmentMeshIndices[i]; + if ( CurrentAttachmentIdx == `CLEARED_ATTACHMENT_INDEX ) + continue; - // Remove the object if it is taking up our desired slot - if( KFP.ThirdPersonAttachmentSocketNames[i] != '' && - KFP.ThirdPersonAttachmentSocketNames[i] == NewAttachmentSocketName ) - { - C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI); - continue; - } + // Remove the object if it is taking up our desired slot + if( KFP.ThirdPersonAttachmentSocketNames[i] != '' && + KFP.ThirdPersonAttachmentSocketNames[i] == NewAttachmentSocketName ) + { + C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI); + continue; + } - // Remove the object if it cannot exist at the same time as another equipped item - if( C.GetOverrideCase(CurrentAttachmentIdx, NewAttachmentMeshIndex) ) - { - C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI); - continue; - } + // Remove the object if it cannot exist at the same time as another equipped item + if( C.GetOverrideCase(CurrentAttachmentIdx, NewAttachmentMeshIndex) ) + { + C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI); + continue; + } - // Check inverse override - if( C.GetOverrideCase(NewAttachmentMeshIndex, CurrentAttachmentIdx) ) - { - C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI); - continue; - } - } - } + // Check inverse override + if( C.GetOverrideCase(NewAttachmentMeshIndex, CurrentAttachmentIdx) ) + { + C.RemoveAttachmentMeshAndSkin(i, KFP, KFPRI); + continue; + } + } + } } /** Assign an arm mesh and material to this pawn */ static final function SetFirstPersonArmsFromArch( KFCharacterInfo_Human C, KFPawn KFP, optional KFPlayerReplicationInfo KFPRI ) { - local MaterialInstanceConstant M; - local ExtPlayerReplicationInfo EPRI; - local bool bCustom; - local int AttachmentIdx, CosmeticMeshIdx; + local MaterialInstanceConstant M; + local ExtPlayerReplicationInfo EPRI; + local bool bCustom; + local int AttachmentIdx, CosmeticMeshIdx; - if ( KFPRI == none ) - { - `Warn("Does not have a KFPRI" @ C); - return; - } - EPRI = ExtPlayerReplicationInfo(KFPRI); - bCustom = (EPRI!=None ? EPRI.UsesCustomChar() : false); + if ( KFPRI == none ) + { + `Warn("Does not have a KFPRI" @ C); + return; + } + EPRI = ExtPlayerReplicationInfo(KFPRI); + bCustom = (EPRI!=None ? EPRI.UsesCustomChar() : false); - // First person arms mesh and skin are based on body mesh & skin. - // Index of 255 implies use index 0 (default). - C.SetArmsMeshAndSkin( - bCustom ? EPRI.CustomCharacter.BodyMeshIndex : KFPRI.RepCustomizationInfo.BodyMeshIndex, - bCustom ? EPRI.CustomCharacter.BodySkinIndex : KFPRI.RepCustomizationInfo.BodySkinIndex, - KFP, - KFPRI); - - for (AttachmentIdx = 0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++) - { - CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx]; - if (CosmeticMeshIdx != `CLEARED_ATTACHMENT_INDEX && CosmeticMeshIdx != INDEX_NONE) - { - // Attach all saved attachments to the character - SetAttachmentMeshAndSkin( - C, - CosmeticMeshIdx, - bCustom ? EPRI.CustomCharacter.AttachmentSkinIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentSkinIndices[AttachmentIdx], - KFP, KFPRI, true); - } - } - - // Hack fix for a material bug on KF2 - if( bCustom && KFP.ArmsMesh.SkeletalMesh!=None && KFP.ArmsMesh.GetMaterial(0)!=None ) - { - M = KFP.ArmsMesh.CreateAndSetMaterialInstanceConstant(0); - CloneMIC(M); - } + // First person arms mesh and skin are based on body mesh & skin. + // Index of 255 implies use index 0 (default). + C.SetArmsMeshAndSkin( + bCustom ? EPRI.CustomCharacter.BodyMeshIndex : KFPRI.RepCustomizationInfo.BodyMeshIndex, + bCustom ? EPRI.CustomCharacter.BodySkinIndex : KFPRI.RepCustomizationInfo.BodySkinIndex, + KFP, + KFPRI); + + for (AttachmentIdx = 0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++) + { + CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx]; + if (CosmeticMeshIdx != `CLEARED_ATTACHMENT_INDEX && CosmeticMeshIdx != INDEX_NONE) + { + // Attach all saved attachments to the character + SetAttachmentMeshAndSkin( + C, + CosmeticMeshIdx, + bCustom ? EPRI.CustomCharacter.AttachmentSkinIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentSkinIndices[AttachmentIdx], + KFP, KFPRI, true); + } + } + + // Hack fix for a material bug on KF2 + if( bCustom && KFP.ArmsMesh.SkeletalMesh!=None && KFP.ArmsMesh.GetMaterial(0)!=None ) + { + M = KFP.ArmsMesh.CreateAndSetMaterialInstanceConstant(0); + CloneMIC(M); + } } static function int GetAttachmentSlotIndex( - KFCharacterInfo_Human C, - int CurrentAttachmentMeshIndex, - KFPawn KFP, - KFPlayerReplicationInfo KFPRI) + KFCharacterInfo_Human C, + int CurrentAttachmentMeshIndex, + KFPawn KFP, + KFPlayerReplicationInfo KFPRI) { - local int AttachmentIdx,CosmeticMeshIdx; - local ExtPlayerReplicationInfo EPRI; - local bool bCustom; + local int AttachmentIdx,CosmeticMeshIdx; + local ExtPlayerReplicationInfo EPRI; + local bool bCustom; - if( KFPRI == None ) - { - `warn("GetAttachmentSlotIndex - NO KFPRI"); - return INDEX_NONE; - } - - EPRI = ExtPlayerReplicationInfo(KFPRI); - bCustom = (EPRI!=None ? EPRI.UsesCustomChar() : false); - - // Return the next available attachment index or the index that matches this mesh - for( AttachmentIdx = 0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++ ) - { - CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx]; - if( CosmeticMeshIdx == INDEX_NONE || CosmeticMeshIdx == CurrentAttachmentMeshIndex ) - { - return AttachmentIdx; - } - } - return INDEX_NONE; + if( KFPRI == None ) + { + `warn("GetAttachmentSlotIndex - NO KFPRI"); + return INDEX_NONE; + } + + EPRI = ExtPlayerReplicationInfo(KFPRI); + bCustom = (EPRI!=None ? EPRI.UsesCustomChar() : false); + + // Return the next available attachment index or the index that matches this mesh + for( AttachmentIdx = 0; AttachmentIdx < `MAX_COSMETIC_ATTACHMENTS; AttachmentIdx++ ) + { + CosmeticMeshIdx = bCustom ? EPRI.CustomCharacter.AttachmentMeshIndices[AttachmentIdx] : KFPRI.RepCustomizationInfo.AttachmentMeshIndices[AttachmentIdx]; + if( CosmeticMeshIdx == INDEX_NONE || CosmeticMeshIdx == CurrentAttachmentMeshIndex ) + { + return AttachmentIdx; + } + } + return INDEX_NONE; } static function bool IsAttachmentAvailable(KFCharacterInfo_Human C, const out AttachmentVariants Attachment, Pawn PreviewPawn) { - if ( Attachment.AttachmentItem.SocketName != '' && PreviewPawn.Mesh.GetSocketByName(Attachment.AttachmentItem.SocketName) == None ) - { - return false; - } + if ( Attachment.AttachmentItem.SocketName != '' && PreviewPawn.Mesh.GetSocketByName(Attachment.AttachmentItem.SocketName) == None ) + { + return false; + } - return true; + return true; } \ No newline at end of file diff --git a/ServerExt/Classes/ExtEmoteList.uc b/ServerExt/Classes/ExtEmoteList.uc index 988ddac..fb36db5 100644 --- a/ServerExt/Classes/ExtEmoteList.uc +++ b/ServerExt/Classes/ExtEmoteList.uc @@ -5,7 +5,7 @@ var const array Emotes; static final function name GetUnlockedEmote( int ItemId, ExtPlayerController PC ) { - local int i; + local int i; local name Anim; local ExtPlayerReplicationInfo PRI; @@ -44,7 +44,7 @@ static final function array GetEmoteArray() static final function byte GetEmoteIndex( int ItemId ) { - local int i; + local int i; i = default.Emotes.Find('Id', ItemId); if( i > -1 ) return i; diff --git a/ServerExt/Classes/ExtHUD_PlayerStatus.uc b/ServerExt/Classes/ExtHUD_PlayerStatus.uc index 12fb9fa..13e2b82 100644 --- a/ServerExt/Classes/ExtHUD_PlayerStatus.uc +++ b/ServerExt/Classes/ExtHUD_PlayerStatus.uc @@ -14,7 +14,7 @@ function UpdatePerk() { local int CurrentPerkLevel,CurrentPerkEXP; local Ext_PerkBase CurrentPerk; - local GFxObject PerkIconObject; + local GFxObject PerkIconObject; if( ExPC == none || ExPC.ActivePerkManager==None || ExPC.ActivePerkManager.CurrentPerk==None ) return; @@ -22,16 +22,16 @@ function UpdatePerk() CurrentPerk = ExPC.ActivePerkManager.CurrentPerk; CurrentPerkLevel = CurrentPerk.CurrentLevel; CurrentPerkEXP = CurrentPerk.CurrentEXP; - + // Update the perk class. if( ( ExLastPerkClass != CurrentPerk.Class ) || ( LastPerkLevel != CurrentPerkLevel ) ) { CurPerkPath = CurrentPerk.GetPerkIconPath(CurrentPerkLevel); - + PerkIconObject = CreateObject("Object"); PerkIconObject.SetString("perkIcon", CurPerkPath); SetObject("playerPerkIcon", PerkIconObject); - + SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f ); if( LastPerkLevel != CurrentPerkLevel && ExLastPerkClass==CurrentPerk.Class ) { diff --git a/ServerExt/Classes/ExtHUD_SpectatorInfo.uc b/ServerExt/Classes/ExtHUD_SpectatorInfo.uc index 6f49a38..1826e19 100644 --- a/ServerExt/Classes/ExtHUD_SpectatorInfo.uc +++ b/ServerExt/Classes/ExtHUD_SpectatorInfo.uc @@ -8,11 +8,11 @@ function LocalizeText() local GFxObject TempObject; TempObject = CreateObject("Object"); - TempObject.SetString("prevPlayer", "FREE CAMERA"); - TempObject.SetString("nextPlayer", PrevPlayerString); - TempObject.SetString("changeCamera", ChangeCameraString); + TempObject.SetString("prevPlayer", "FREE CAMERA"); + TempObject.SetString("nextPlayer", PrevPlayerString); + TempObject.SetString("changeCamera", ChangeCameraString); - SetObject("localizedText", TempObject); + SetObject("localizedText", TempObject); } function UpdatePlayerInfo( optional bool bForceUpdate ) diff --git a/ServerExt/Classes/ExtHUD_WaveInfo.uc b/ServerExt/Classes/ExtHUD_WaveInfo.uc index 163f488..126d626 100644 --- a/ServerExt/Classes/ExtHUD_WaveInfo.uc +++ b/ServerExt/Classes/ExtHUD_WaveInfo.uc @@ -4,12 +4,12 @@ function TickHud(float DeltaTime) { local int i; - if(KFGRI == none) - KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI); - else - { - if(KFGRI.bTraderIsOpen) - { + if(KFGRI == none) + KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI); + else + { + if(KFGRI.bTraderIsOpen) + { i = KFGRI.GetTraderTimeRemaining(); if(LastTraderTimeRemaining != i) { @@ -17,7 +17,7 @@ function TickHud(float DeltaTime) LastTraderTimeRemaining = i; } } - else + else { i = KFGRI.IsFinalWave() ? INDEX_NONE : Max(KFGRI.AIRemaining,0); if(LastZEDCount != i) @@ -45,7 +45,7 @@ function TickHud(float DeltaTime) } SetInt("currentWave",Min(LastWave,LastWaveMax)); } - } + } } function UpdateWaveCount(); diff --git a/ServerExt/Classes/ExtHUD_WeaponSelectWidget.uc b/ServerExt/Classes/ExtHUD_WeaponSelectWidget.uc index d9256b9..7600f4c 100644 --- a/ServerExt/Classes/ExtHUD_WeaponSelectWidget.uc +++ b/ServerExt/Classes/ExtHUD_WeaponSelectWidget.uc @@ -4,86 +4,86 @@ var transient array< class > WeaponGroup; simulated function UpdateWeaponGroupOnHUD( byte GroupIndex ) { - local Inventory Inv; - local KFWeapon KFW; - local byte i; - local int Index; - local array WeaponsList; - local KFGFxObject_TraderItems TraderItems; - local Pawn P; - local array< class > WPGroup; + local Inventory Inv; + local KFWeapon KFW; + local byte i; + local int Index; + local array WeaponsList; + local KFGFxObject_TraderItems TraderItems; + local Pawn P; + local array< class > WPGroup; - P = GetPC().Pawn; - if ( P == none || P.InvManager == none ) - return; + P = GetPC().Pawn; + if ( P == none || P.InvManager == none ) + return; - for ( Inv = P.InvManager.InventoryChain; Inv != none; Inv = Inv.Inventory ) - { - KFW = KFWeapon( Inv ); - if ( KFW != none && KFW.InventoryGroup == GroupIndex ) - WeaponsList.AddItem(KFW); - } + for ( Inv = P.InvManager.InventoryChain; Inv != none; Inv = Inv.Inventory ) + { + KFW = KFWeapon( Inv ); + if ( KFW != none && KFW.InventoryGroup == GroupIndex ) + WeaponsList.AddItem(KFW); + } - WPGroup.Length = WeaponsList.Length; - TraderItems = KFGameReplicationInfo( P.WorldInfo.GRI ).TraderItems; - for ( i = 0; i < WeaponsList.Length; i++ ) - { - Index = TraderItems.SaleItems.Find('ClassName', WeaponsList[i].Class.Name); - if( Index != -1 ) - WPGroup[i] = TraderItems.SaleItems[Index].WeaponDef; - } + WPGroup.Length = WeaponsList.Length; + TraderItems = KFGameReplicationInfo( P.WorldInfo.GRI ).TraderItems; + for ( i = 0; i < WeaponsList.Length; i++ ) + { + Index = TraderItems.SaleItems.Find('ClassName', WeaponsList[i].Class.Name); + if( Index != -1 ) + WPGroup[i] = TraderItems.SaleItems[Index].WeaponDef; + } - WeaponGroup = WPGroup; - SetWeaponGroupList(WeaponsList, GroupIndex); + WeaponGroup = WPGroup; + SetWeaponGroupList(WeaponsList, GroupIndex); } simulated function SetWeaponGroupList(out array WeaponList, byte GroupIndex) { - local byte i; - local GFxObject DataProvider; - local GFxObject TempObj; - local bool bUsesAmmo; + local byte i; + local GFxObject DataProvider; + local GFxObject TempObj; + local bool bUsesAmmo; - DataProvider = CreateArray(); - if ( DataProvider == None ) - return; // gfx has been shut down + DataProvider = CreateArray(); + if ( DataProvider == None ) + return; // gfx has been shut down - for (i = 0; i < WeaponList.length; i++) - { - TempObj = CreateObject( "Object" ); + for (i = 0; i < WeaponList.length; i++) + { + TempObj = CreateObject( "Object" ); - if( WeaponGroup[i] != None ) - { - TempObj.SetString( "weaponName", WeaponGroup[i].static.GetItemLocalization("ItemName") ); - TempObj.SetString( "texturePath", "img://"$WeaponGroup[i].static.GetImagePath() ); - } - else - { - TempObj.SetString( "weaponName", WeaponList[i].ItemName ); - TempObj.SetString( "texturePath", "img://"$PathName(WeaponList[i].WeaponSelectTexture)); - } + if( WeaponGroup[i] != None ) + { + TempObj.SetString( "weaponName", WeaponGroup[i].static.GetItemLocalization("ItemName") ); + TempObj.SetString( "texturePath", "img://"$WeaponGroup[i].static.GetImagePath() ); + } + else + { + TempObj.SetString( "weaponName", WeaponList[i].ItemName ); + TempObj.SetString( "texturePath", "img://"$PathName(WeaponList[i].WeaponSelectTexture)); + } - TempObj.SetInt("weaponTier", WeaponList[i].CurrentWeaponUpgradeIndex); - TempObj.SetInt( "ammoCount", WeaponList[i].AmmoCount[0]); - TempObj.SetInt( "spareAmmoCount", WeaponList[i].SpareAmmoCount[0]); - //secondary ammo shenanigans - TempObj.SetBool("bUsesSecondaryAmmo", WeaponList[i].UsesSecondaryAmmo()&&WeaponList[i].bCanRefillSecondaryAmmo); - TempObj.SetBool("bEnabled", WeaponList[i].HasAnyAmmo()); - if(WeaponList[i].UsesSecondaryAmmo() && WeaponList[i].bCanRefillSecondaryAmmo) - { - TempObj.SetBool("bCanRefillSecondaryAmmo", WeaponList[i].SpareAmmoCapacity[1] > 0); - TempObj.SetInt( "secondaryAmmoCount", WeaponList[i].AmmoCount[1]); - TempObj.SetInt( "secondarySpareAmmoCount", WeaponList[i].SpareAmmoCount[1]); - } + TempObj.SetInt("weaponTier", WeaponList[i].CurrentWeaponUpgradeIndex); + TempObj.SetInt( "ammoCount", WeaponList[i].AmmoCount[0]); + TempObj.SetInt( "spareAmmoCount", WeaponList[i].SpareAmmoCount[0]); + //secondary ammo shenanigans + TempObj.SetBool("bUsesSecondaryAmmo", WeaponList[i].UsesSecondaryAmmo()&&WeaponList[i].bCanRefillSecondaryAmmo); + TempObj.SetBool("bEnabled", WeaponList[i].HasAnyAmmo()); + if(WeaponList[i].UsesSecondaryAmmo() && WeaponList[i].bCanRefillSecondaryAmmo) + { + TempObj.SetBool("bCanRefillSecondaryAmmo", WeaponList[i].SpareAmmoCapacity[1] > 0); + TempObj.SetInt( "secondaryAmmoCount", WeaponList[i].AmmoCount[1]); + TempObj.SetInt( "secondarySpareAmmoCount", WeaponList[i].SpareAmmoCount[1]); + } - TempObj.SetBool( "throwable", WeaponList[i].CanThrow()); + TempObj.SetBool( "throwable", WeaponList[i].CanThrow()); - bUsesAmmo = (WeaponList[i].static.UsesAmmo()); - TempObj.SetBool( "bUsesAmmo", bUsesAmmo); - DataProvider.SetElementObject( i, TempObj ); - } + bUsesAmmo = (WeaponList[i].static.UsesAmmo()); + TempObj.SetBool( "bUsesAmmo", bUsesAmmo); + DataProvider.SetElementObject( i, TempObj ); + } - SetWeaponList(DataProvider, GroupIndex); + SetWeaponList(DataProvider, GroupIndex); } DefaultProperties diff --git a/ServerExt/Classes/ExtHumanPawn.uc b/ServerExt/Classes/ExtHumanPawn.uc index ecd1c67..3b9c240 100644 --- a/ServerExt/Classes/ExtHumanPawn.uc +++ b/ServerExt/Classes/ExtHumanPawn.uc @@ -115,8 +115,8 @@ event bool HealDamage(int Amount, Controller Healer, class DamageTyp local ExtPlayerController InstigatorPC, KFPC; local KFPerk InstigatorPerk; local class KFDT; - local int i; - local bool bRepairedArmor; + local int i; + local bool bRepairedArmor; local ExtPlayerReplicationInfo EPRI; local Ext_PerkBase InstigatorExtPerk; @@ -143,14 +143,14 @@ event bool HealDamage(int Amount, Controller Healer, class DamageTyp } } - if( Amount > 0 && IsAliveAndWell() && Health < HealthMax ) - { + if( Amount > 0 && IsAliveAndWell() && Health < HealthMax ) + { // Play any healing effects attached to this damage type KFDT = class(DamageType); if( KFDT != none && KFDT.default.bNoPain ) PlayHeal( KFDT ); - if( Role == ROLE_Authority ) + if( Role == ROLE_Authority ) { if( Healer==None || Healer.PlayerReplicationInfo == None ) return false; @@ -166,15 +166,15 @@ event bool HealDamage(int Amount, Controller Healer, class DamageTyp UsedHealAmount = Min(HealthMax - (Health + HealthToRegen),255-HealthToRegen); else UsedHealAmount = Min(UsedHealAmount,255-HealthToRegen); - HealthToRegen += UsedHealAmount; + HealthToRegen += UsedHealAmount; RepRegenHP = HealthToRegen; if( !IsTimerActive('GiveHealthOverTime') ) SetTimer(HealthRegenRate, true, 'GiveHealthOverTime'); // Give the healer money/XP for helping a teammate - if( Healer.Pawn != none && Healer.Pawn != self ) - { - DoshEarned = ( UsedHealAmount / float(HealthMax) ) * HealerRewardScaler; + if( Healer.Pawn != none && Healer.Pawn != self ) + { + DoshEarned = ( UsedHealAmount / float(HealthMax) ) * HealerRewardScaler; if( InstigatorPRI!=None ) InstigatorPRI.AddDosh(Max(DoshEarned, 0), true); if( InstigatorPC!=None ) @@ -184,7 +184,7 @@ event bool HealDamage(int Amount, Controller Healer, class DamageTyp if( Healer.bIsPlayer ) { if( Healer != Controller ) - { + { if( InstigatorPC!=None ) { if( !InstigatorPC.bClientHideNumbers ) @@ -205,20 +205,20 @@ event bool HealDamage(int Amount, Controller Healer, class DamageTyp `DialogManager.PlayHealingDialog( KFPawn(Healer.Pawn), self, float(Health + HealthToRegen) / float(HealthMax) ); } - // Reduce burn duration and damage in half if you heal while burning - for( i = 0; i < DamageOverTimeArray.Length; ++i ) - { - if( DamageOverTimeArray[i].DoT_Type == DOT_Fire ) - { - DamageOverTimeArray[i].Duration *= 0.5; - DamageOverTimeArray[i].Damage *= 0.5; - break; - } - } + // Reduce burn duration and damage in half if you heal while burning + for( i = 0; i < DamageOverTimeArray.Length; ++i ) + { + if( DamageOverTimeArray[i].DoT_Type == DOT_Fire ) + { + DamageOverTimeArray[i].Duration *= 0.5; + DamageOverTimeArray[i].Damage *= 0.5; + break; + } + } - return true; + return true; } - } + } return bRepairedArmor; } @@ -679,7 +679,7 @@ simulated function PlayRagdollDeath(class DamageType, vector HitLoc) // Call CheckHitInfo to give us a valid BoneName HitDirection = Normal(TearOffMomentum); - CheckHitInfo(HitInfo, Mesh, HitDirection, HitLoc); + CheckHitInfo(HitInfo, Mesh, HitDirection, HitLoc); // Play ragdoll death animation (bSkipReplication=TRUE) if( CanDoSpecialMove(SM_DeathAnim) && ClassIsChildOf(DamageType, class'KFDamageType') ) @@ -726,11 +726,11 @@ simulated function OnWakeUpFinished(); function AddDefaultInventory() { - local KFPerk MyPerk; + local KFPerk MyPerk; - MyPerk = GetPerk(); + MyPerk = GetPerk(); if( MyPerk != none ) - MyPerk.AddDefaultInventory(self); + MyPerk.AddDefaultInventory(self); Super(KFPawn).AddDefaultInventory(); } @@ -757,7 +757,7 @@ simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bFor { local KFPlayerReplicationInfo KFPRI; - KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo ); + KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo ); if (Info != CharacterArch || bForce) { // Set Family Info @@ -1017,7 +1017,7 @@ simulated final function InitFPLegs() FPBodyMesh.SetAnimTreeTemplate(CharacterArch.AnimTreeTemplate); FPBodyMesh.SetSkeletalMesh(Mesh.SkeletalMesh); - FPBodyMesh.SetActorCollision(false, false); + FPBodyMesh.SetActorCollision(false, false); FPBodyMesh.SetNotifyRigidBodyCollision(false); FPBodyMesh.SetTraceBlocking(false, false); @@ -1025,9 +1025,9 @@ simulated final function InitFPLegs() FPBodyMesh.SetMaterial(i, Mesh.Materials[i]); FPBodyMesh.HideBoneByName('neck', PBO_None); - FPBodyMesh.HideBoneByName('Spine2', PBO_None); - FPBodyMesh.HideBoneByName('RightShoulder', PBO_None); - FPBodyMesh.HideBoneByName('LeftShoulder', PBO_None); + FPBodyMesh.HideBoneByName('Spine2', PBO_None); + FPBodyMesh.HideBoneByName('RightShoulder', PBO_None); + FPBodyMesh.HideBoneByName('LeftShoulder', PBO_None); } // ForrestMarkX's third person backpack weapon and first person legs: @@ -1175,16 +1175,16 @@ simulated function SetCharacterAnimationInfo() simulated function SetMeshLightingChannels(LightingChannelContainer NewLightingChannels) { - Super.SetMeshLightingChannels(NewLightingChannels); + Super.SetMeshLightingChannels(NewLightingChannels); if (AttachedBackItem != none) - AttachedBackItem.SetLightingChannels(NewLightingChannels); + AttachedBackItem.SetLightingChannels(NewLightingChannels); FPBodyMesh.SetLightingChannels(NewLightingChannels); } simulated function PlayWeaponSwitch(Weapon OldWeapon, Weapon NewWeapon) { - Super.PlayWeaponSwitch(OldWeapon, NewWeapon); + Super.PlayWeaponSwitch(OldWeapon, NewWeapon); if( WorldInfo.NetMode!=NM_Client ) { diff --git a/ServerExt/Classes/ExtMenu_Gear.uc b/ServerExt/Classes/ExtMenu_Gear.uc index 6438123..5fa54a0 100644 --- a/ServerExt/Classes/ExtMenu_Gear.uc +++ b/ServerExt/Classes/ExtMenu_Gear.uc @@ -14,541 +14,541 @@ var bool bWaitingCharList,bIsCustomChar; function InitializeMenu( KFGFxMoviePlayer_Manager InManager ) { - super(KFGFxObject_Menu).InitializeMenu(InManager); - CheckForCustomizationPawn( GetPC() ); - LocalizeText(); - EmoteList = class'ExtEmoteList'.static.GetEmoteArray(); - InitCharacterMenu(); - // TraderItems = KFGameReplicationInfo( GetPC().WorldInfo.GRI ).TraderItems; + super(KFGFxObject_Menu).InitializeMenu(InManager); + CheckForCustomizationPawn( GetPC() ); + LocalizeText(); + EmoteList = class'ExtEmoteList'.static.GetEmoteArray(); + InitCharacterMenu(); + // TraderItems = KFGameReplicationInfo( GetPC().WorldInfo.GRI ).TraderItems; } function InitCharacterMenu() { - ExtPRI = ExtPlayerReplicationInfo(GetPC().PlayerReplicationInfo); - - if( ExtPRI!=None && ExtPRI.bClientInitChars ) - CharListRecieved(); - else if( ExtPRI==None ) - { - if( GetPC().PlayerReplicationInfo!=None ) // Faulty mod setup. - { - bWaitingCharList = true; - return; - } - GetPC().SetTimer(0.1,false,'InitCharacterMenu',Self); - } - else - { - ExtPRI.OnCharListDone = CharListRecieved; - bWaitingCharList = true; - } + ExtPRI = ExtPlayerReplicationInfo(GetPC().PlayerReplicationInfo); + + if( ExtPRI!=None && ExtPRI.bClientInitChars ) + CharListRecieved(); + else if( ExtPRI==None ) + { + if( GetPC().PlayerReplicationInfo!=None ) // Faulty mod setup. + { + bWaitingCharList = true; + return; + } + GetPC().SetTimer(0.1,false,'InitCharacterMenu',Self); + } + else + { + ExtPRI.OnCharListDone = CharListRecieved; + bWaitingCharList = true; + } } event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget) -{ - switch(WidgetName) - { - case 'perkSelectionContainer': - if ( PerkSelectionContainer == none ) - { - PerkSelectionContainer = KFGFxGearContainer_PerksSelection( Widget ); - PerkSelectionContainer.Initialize(self); - } - break; - } +{ + switch(WidgetName) + { + case 'perkSelectionContainer': + if ( PerkSelectionContainer == none ) + { + PerkSelectionContainer = KFGFxGearContainer_PerksSelection( Widget ); + PerkSelectionContainer.Initialize(self); + } + break; + } - return true; + return true; } function OnOpen() { - local PlayerController PC; + local PlayerController PC; - PC = GetPC(); - if( PC == none ) - return; - - CheckForCustomizationPawn( PC ); - //GetGameViewportClient().HandleInputAxis = OnAxisModified; + PC = GetPC(); + if( PC == none ) + return; + + CheckForCustomizationPawn( PC ); + //GetGameViewportClient().HandleInputAxis = OnAxisModified; - if ( PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun ) - { - // Players cannot change characters if they are in a game - SetBool("characterButtonEnabled", false); - } + if ( PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun ) + { + // Players cannot change characters if they are in a game + SetBool("characterButtonEnabled", false); + } } /** The customization pawn won't exist if this menu was opened mid-match */ function CheckForCustomizationPawn( PlayerController PC ) { - local KFPlayerController KFPC; + local KFPlayerController KFPC; - if( PC.Pawn == None || (!PC.Pawn.IsAliveAndWell() && KFPawn_Customization(PC.Pawn) == None) ) - { - KFPC = KFPlayerController( PC ); - if( KFPC != None ) - { - KFPC.SpawnMidGameCustomizationPawn(); - } - } + if( PC.Pawn == None || (!PC.Pawn.IsAliveAndWell() && KFPawn_Customization(PC.Pawn) == None) ) + { + KFPC = KFPlayerController( PC ); + if( KFPC != None ) + { + KFPC.SpawnMidGameCustomizationPawn(); + } + } } function LocalizeText() { - local GFxObject LocalizedObject; + local GFxObject LocalizedObject; - LocalizedObject = CreateObject("Object"); + LocalizedObject = CreateObject("Object"); - LocalizedObject.SetString("header", class'KFGFxMenu_Gear'.Default.GearHeaderString); - LocalizedObject.SetString("listButton", class'KFGFxMenu_Gear'.Default.BackString); - LocalizedObject.SetString("bioStringText", class'KFGFxMenu_Gear'.Default.BioString); - LocalizedObject.SetString("charactersString", class'KFGFxMenu_Gear'.Default.CharacterString); - LocalizedObject.SetString("headsString", class'KFGFxMenu_Gear'.Default.HeadString); - LocalizedObject.SetString("emoteString", Class'KFLocalMessage_VoiceComms'.default.VoiceCommsOptionStrings[8]); - LocalizedObject.SetString("bodiesString", class'KFGFxMenu_Gear'.Default.BodyString); - LocalizedObject.SetString("skinsString", class'KFGFxMenu_Gear'.Default.SkinsString); - LocalizedObject.SetString("attachmentsString", class'KFGFxMenu_Gear'.Default.AttachmentsString); + LocalizedObject.SetString("header", class'KFGFxMenu_Gear'.Default.GearHeaderString); + LocalizedObject.SetString("listButton", class'KFGFxMenu_Gear'.Default.BackString); + LocalizedObject.SetString("bioStringText", class'KFGFxMenu_Gear'.Default.BioString); + LocalizedObject.SetString("charactersString", class'KFGFxMenu_Gear'.Default.CharacterString); + LocalizedObject.SetString("headsString", class'KFGFxMenu_Gear'.Default.HeadString); + LocalizedObject.SetString("emoteString", Class'KFLocalMessage_VoiceComms'.default.VoiceCommsOptionStrings[8]); + LocalizedObject.SetString("bodiesString", class'KFGFxMenu_Gear'.Default.BodyString); + LocalizedObject.SetString("skinsString", class'KFGFxMenu_Gear'.Default.SkinsString); + LocalizedObject.SetString("attachmentsString", class'KFGFxMenu_Gear'.Default.AttachmentsString); - SetObject("localizeText", LocalizedObject); + SetObject("localizeText", LocalizedObject); } simulated function CharListRecieved() { - UpdateCharacterList(); - UpdateGear(); + UpdateCharacterList(); + UpdateGear(); } function UpdateEmoteList() { - local int ItemIndex, i; - local GFxObject DataProvider, SlotObject; - local string TexturePath; + local int ItemIndex, i; + local GFxObject DataProvider, SlotObject; + local string TexturePath; - ItemIndex = 0; - DataProvider = CreateArray(); + ItemIndex = 0; + DataProvider = CreateArray(); - for (i = 0; i < EmoteList.length; i++) - { - if ( class'ExtEmoteList'.static.GetUnlockedEmote(EmoteList[i].Id, ExtPlayerController(GetPC())) != 'NONE') - { - SlotObject = CreateObject( "Object" ); - SlotObject.SetInt("ItemIndex", i); - SlotObject.SetString("label", Localize(EmoteList[i].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)); - TexturePath = "img://"$EmoteList[i].IconPath; - SlotObject.SetBool("enabled", true); - SlotObject.SetString("source", TexturePath); - DataProvider.SetElementObject(ItemIndex, SlotObject); - ItemIndex++; - } - else - { - //`log(MyKFPRI.EmoteList[i] @ "is not purchased."); - } - } - - SetObject("emoteArray", DataProvider); + for (i = 0; i < EmoteList.length; i++) + { + if ( class'ExtEmoteList'.static.GetUnlockedEmote(EmoteList[i].Id, ExtPlayerController(GetPC())) != 'NONE') + { + SlotObject = CreateObject( "Object" ); + SlotObject.SetInt("ItemIndex", i); + SlotObject.SetString("label", Localize(EmoteList[i].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)); + TexturePath = "img://"$EmoteList[i].IconPath; + SlotObject.SetBool("enabled", true); + SlotObject.SetString("source", TexturePath); + DataProvider.SetElementObject(ItemIndex, SlotObject); + ItemIndex++; + } + else + { + //`log(MyKFPRI.EmoteList[i] @ "is not purchased."); + } + } + + SetObject("emoteArray", DataProvider); } function UpdateCharacterList() { - local int i, ItemIndex; - local GFxObject DataProvider, SlotObject; - local string TexturePath; + local int i, ItemIndex; + local GFxObject DataProvider, SlotObject; + local string TexturePath; - bWaitingCharList = false; - ItemIndex = 0; - DataProvider = CreateArray(); - for( i=0; i Outfits, string DataArrayString) { - local int i, ItemIndex; - local GFxObject DataProvider, SlotObject; - local string TexturePath, OutfitName; - local OutfitVariants Outfit; - local SkinVariant FirstSkin; - - ItemIndex = 0; - DataProvider = CreateArray(); - for (i = 0; i < Outfits.Length; i++) - { - Outfit = Outfits[i]; - - OutfitName = Localize(CharInfoPath, OutfitKey$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); - if( bIsCustomChar ) - OutfitName = GetMenuNameStr(Outfit.MeshName); - - if ( InStr(OutfitName, "?INT?") != -1 ) - continue; - - SlotObject = CreateObject( "Object" ); - SlotObject.SetInt("ItemIndex", i); - SlotObject.SetString("label", OutfitName); - SlotObject.SetBool("enabled", true); - FirstSkin = UpdateOutfitVariants( OutfitKey, SkinKey, Outfit.SkinVariations, i, SlotObject ); - if( string(FirstSkin.UITexture) == "Bad" ) - continue; - - TexturePath = "img://"$PathName(FirstSkin.UITexture); - SlotObject.SetString("source", TexturePath); + local int i, ItemIndex; + local GFxObject DataProvider, SlotObject; + local string TexturePath, OutfitName; + local OutfitVariants Outfit; + local SkinVariant FirstSkin; + + ItemIndex = 0; + DataProvider = CreateArray(); + for (i = 0; i < Outfits.Length; i++) + { + Outfit = Outfits[i]; + + OutfitName = Localize(CharInfoPath, OutfitKey$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); + if( bIsCustomChar ) + OutfitName = GetMenuNameStr(Outfit.MeshName); + + if ( InStr(OutfitName, "?INT?") != -1 ) + continue; + + SlotObject = CreateObject( "Object" ); + SlotObject.SetInt("ItemIndex", i); + SlotObject.SetString("label", OutfitName); + SlotObject.SetBool("enabled", true); + FirstSkin = UpdateOutfitVariants( OutfitKey, SkinKey, Outfit.SkinVariations, i, SlotObject ); + if( string(FirstSkin.UITexture) == "Bad" ) + continue; + + TexturePath = "img://"$PathName(FirstSkin.UITexture); + SlotObject.SetString("source", TexturePath); - DataProvider.SetElementObject(ItemIndex, SlotObject); - ItemIndex++; - } - - SetObject(DataArrayString, DataProvider); + DataProvider.SetElementObject(ItemIndex, SlotObject); + ItemIndex++; + } + + SetObject(DataArrayString, DataProvider); } function SkinVariant UpdateOutfitVariants(string OutfitKey, string KeyName, out array SkinVariations, int OutfitIndex, out GFxObject MeshObject) { - local int i, ItemIndex; - local GFxObject DataProvider, SlotObject; - local SkinVariant Skin; - local SkinVariant FirstSkin; - local string SectionPath; - local string TexturePath; - local bool bFoundFirst; + local int i, ItemIndex; + local GFxObject DataProvider, SlotObject; + local SkinVariant Skin; + local SkinVariant FirstSkin; + local string SectionPath; + local string TexturePath; + local bool bFoundFirst; - ItemIndex = 0; - DataProvider = CreateArray(); - SectionPath = CharInfoPath$"."$OutfitKey$OutfitIndex; + ItemIndex = 0; + DataProvider = CreateArray(); + SectionPath = CharInfoPath$"."$OutfitKey$OutfitIndex; - for (i = 0; i < SkinVariations.length; i++) - { - Skin = SkinVariations[i]; - if(!bFoundFirst) - { - FirstSkin = Skin; - bFoundFirst = true; - } - SlotObject = CreateObject( "Object" ); - SlotObject.SetInt("ItemIndex", i); - SlotObject.SetString("label", Localize(SectionPath, KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)); - TexturePath = "img://"$PathName(Skin.UITexture); - SlotObject.SetBool("enabled", true); - SlotObject.SetString("source", TexturePath); + for (i = 0; i < SkinVariations.length; i++) + { + Skin = SkinVariations[i]; + if(!bFoundFirst) + { + FirstSkin = Skin; + bFoundFirst = true; + } + SlotObject = CreateObject( "Object" ); + SlotObject.SetInt("ItemIndex", i); + SlotObject.SetString("label", Localize(SectionPath, KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)); + TexturePath = "img://"$PathName(Skin.UITexture); + SlotObject.SetBool("enabled", true); + SlotObject.SetString("source", TexturePath); - DataProvider.SetElementObject(ItemIndex, SlotObject); - ItemIndex++; - } - MeshObject.SetObject("skinInfo", DataProvider); + DataProvider.SetElementObject(ItemIndex, SlotObject); + ItemIndex++; + } + MeshObject.SetObject("skinInfo", DataProvider); - return FirstSkin; + return FirstSkin; } function UpdateAttachmentsList(array Attachments) { - local int i, ItemIndex; - local GFxObject DataProvider, SlotObject; - local string TexturePath; - local AttachmentVariants Variant; - local Pawn MyPawn; - local SkinVariant FirstSkin; - local string AttachmentName; - - ItemIndex = 0; - DataProvider = CreateArray(); - MyPawn = GetPC().Pawn; + local int i, ItemIndex; + local GFxObject DataProvider, SlotObject; + local string TexturePath; + local AttachmentVariants Variant; + local Pawn MyPawn; + local SkinVariant FirstSkin; + local string AttachmentName; + + ItemIndex = 0; + DataProvider = CreateArray(); + MyPawn = GetPC().Pawn; - // Insert blank object - SlotObject = CreateObject( "Object" ); - SlotObject.SetString("label", class'KFGFxMenu_Gear'.default.NoneString); - SlotObject.SetString("source", "img://"$class'KFGFxMenu_Gear'.default.ClearImagePath); - SlotObject.SetInt("ItemIndex", INDEX_NONE); - SlotObject.SetBool("enabled", true); - DataProvider.SetElementObject(ItemIndex, SlotObject); - ItemIndex++; + // Insert blank object + SlotObject = CreateObject( "Object" ); + SlotObject.SetString("label", class'KFGFxMenu_Gear'.default.NoneString); + SlotObject.SetString("source", "img://"$class'KFGFxMenu_Gear'.default.ClearImagePath); + SlotObject.SetInt("ItemIndex", INDEX_NONE); + SlotObject.SetBool("enabled", true); + DataProvider.SetElementObject(ItemIndex, SlotObject); + ItemIndex++; - for (i = 0; i < Attachments.Length; i++) - { - Variant = Attachments[i]; - if ( class'ExtCharacterInfo'.static.IsAttachmentAvailable(CurrentCharInfo, Variant, MyPawn) ) - { - SlotObject = CreateObject( "Object" ); - SlotObject.SetInt("ItemIndex", i); - FirstSkin = UpdateCosmeticVariants( class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.AttachmentSkinKey, Variant.AttachmentItem, i, SlotObject ); - AttachmentName = bIsCustomChar ? GetMenuNameStr(Variant.MeshName) : Localize(string(Variant.AttachmentItem.Name), class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.KFCharacterInfoString); - SlotObject.SetString("label", AttachmentName); - SlotObject.SetBool("enabled", true); - TexturePath = "img://"$PathName(FirstSkin.UITexture); - SlotObject.SetString("source", TexturePath); - - DataProvider.SetElementObject(ItemIndex, SlotObject); - ItemIndex++; - } - } - - SetObject("attachmentsArray", DataProvider); + for (i = 0; i < Attachments.Length; i++) + { + Variant = Attachments[i]; + if ( class'ExtCharacterInfo'.static.IsAttachmentAvailable(CurrentCharInfo, Variant, MyPawn) ) + { + SlotObject = CreateObject( "Object" ); + SlotObject.SetInt("ItemIndex", i); + FirstSkin = UpdateCosmeticVariants( class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.AttachmentSkinKey, Variant.AttachmentItem, i, SlotObject ); + AttachmentName = bIsCustomChar ? GetMenuNameStr(Variant.MeshName) : Localize(string(Variant.AttachmentItem.Name), class'KFGFxMenu_Gear'.default.AttachmentKey, class'KFGFxMenu_Gear'.default.KFCharacterInfoString); + SlotObject.SetString("label", AttachmentName); + SlotObject.SetBool("enabled", true); + TexturePath = "img://"$PathName(FirstSkin.UITexture); + SlotObject.SetString("source", TexturePath); + + DataProvider.SetElementObject(ItemIndex, SlotObject); + ItemIndex++; + } + } + + SetObject("attachmentsArray", DataProvider); } function SkinVariant UpdateCosmeticVariants(string OutfitKey, string KeyName, KFCharacterAttachment Attachment, int OutfitIndex, out GFxObject MeshObject) { - local int i, ItemIndex; - local GFxObject DataProvider, SlotObject; - local SkinVariant Skin; - local SkinVariant FirstSkin; - local string TexturePath; - local bool bFoundFirst; - local string SkinName; + local int i, ItemIndex; + local GFxObject DataProvider, SlotObject; + local SkinVariant Skin; + local SkinVariant FirstSkin; + local string TexturePath; + local bool bFoundFirst; + local string SkinName; - ItemIndex = 0; - DataProvider = CreateArray(); + ItemIndex = 0; + DataProvider = CreateArray(); - for (i = 0; i < Attachment.SkinVariations.length; i++) - { - Skin = Attachment.SkinVariations[i]; - if(!bFoundFirst) - { - FirstSkin = Skin; - bFoundFirst = true; - } - SlotObject = CreateObject( "Object" ); - SlotObject.SetInt("ItemIndex", i); - SkinName = Localize(string(Attachment.Name), KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); - SlotObject.SetString("label", SkinName); - TexturePath = "img://"$PathName(Skin.UITexture); - SlotObject.SetBool("enabled", true); - SlotObject.SetString("source", TexturePath); + for (i = 0; i < Attachment.SkinVariations.length; i++) + { + Skin = Attachment.SkinVariations[i]; + if(!bFoundFirst) + { + FirstSkin = Skin; + bFoundFirst = true; + } + SlotObject = CreateObject( "Object" ); + SlotObject.SetInt("ItemIndex", i); + SkinName = Localize(string(Attachment.Name), KeyName$i, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); + SlotObject.SetString("label", SkinName); + TexturePath = "img://"$PathName(Skin.UITexture); + SlotObject.SetBool("enabled", true); + SlotObject.SetString("source", TexturePath); - DataProvider.SetElementObject(ItemIndex, SlotObject); - ItemIndex++; - } - MeshObject.SetObject("skinInfo", DataProvider); + DataProvider.SetElementObject(ItemIndex, SlotObject); + ItemIndex++; + } + MeshObject.SetObject("skinInfo", DataProvider); - return FirstSkin; + return FirstSkin; } function SetCurrentCharacterButtons() { - local bool bCustom; - local GFxObject DataObject; - local byte CharacterIndex, HeadMeshIndex, HeadSkinIndex, BodyMeshIndex, BodySkinIndex; + local bool bCustom; + local GFxObject DataObject; + local byte CharacterIndex, HeadMeshIndex, HeadSkinIndex, BodyMeshIndex, BodySkinIndex; - bCustom = ExtPRI.UsesCustomChar(); - DataObject = CreateObject("Object"); - - CharacterIndex = ExtPRI.RepCustomizationInfo.CharacterIndex; - HeadMeshIndex = ExtPRI.RepCustomizationInfo.HeadMeshIndex; - HeadSkinIndex = ExtPRI.RepCustomizationInfo.HeadSkinIndex; - BodyMeshIndex = ExtPRI.RepCustomizationInfo.BodyMeshIndex; - BodySkinIndex = ExtPRI.RepCustomizationInfo.BodySkinIndex; - if( bCustom ) - { - CharacterIndex = ExtPRI.CustomCharacter.CharacterIndex; - HeadMeshIndex = ExtPRI.CustomCharacter.HeadMeshIndex; - HeadSkinIndex = ExtPRI.CustomCharacter.HeadSkinIndex; - BodyMeshIndex = ExtPRI.CustomCharacter.BodyMeshIndex; - BodySkinIndex = ExtPRI.CustomCharacter.BodySkinIndex; - } + bCustom = ExtPRI.UsesCustomChar(); + DataObject = CreateObject("Object"); + + CharacterIndex = ExtPRI.RepCustomizationInfo.CharacterIndex; + HeadMeshIndex = ExtPRI.RepCustomizationInfo.HeadMeshIndex; + HeadSkinIndex = ExtPRI.RepCustomizationInfo.HeadSkinIndex; + BodyMeshIndex = ExtPRI.RepCustomizationInfo.BodyMeshIndex; + BodySkinIndex = ExtPRI.RepCustomizationInfo.BodySkinIndex; + if( bCustom ) + { + CharacterIndex = ExtPRI.CustomCharacter.CharacterIndex; + HeadMeshIndex = ExtPRI.CustomCharacter.HeadMeshIndex; + HeadSkinIndex = ExtPRI.CustomCharacter.HeadSkinIndex; + BodyMeshIndex = ExtPRI.CustomCharacter.BodyMeshIndex; + BodySkinIndex = ExtPRI.CustomCharacter.BodySkinIndex; + } - DataObject.SetString( "selectedCharacter", (bIsCustomChar ? Repl(string(CurrentCharInfo.Name),"_"," ") : Localize(CharInfoPath, "CharacterName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)) ); - DataObject.SetString( "characterBio", (bIsCustomChar ? Repl(CurrentCharInfo.ArmMeshPackageName,"|","\n") : Localize(CharInfoPath, "Description", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)) ); - DataObject.SetInt( "selectedCharacterIndex", CharacterIndex ); + DataObject.SetString( "selectedCharacter", (bIsCustomChar ? Repl(string(CurrentCharInfo.Name),"_"," ") : Localize(CharInfoPath, "CharacterName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)) ); + DataObject.SetString( "characterBio", (bIsCustomChar ? Repl(CurrentCharInfo.ArmMeshPackageName,"|","\n") : Localize(CharInfoPath, "Description", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)) ); + DataObject.SetInt( "selectedCharacterIndex", CharacterIndex ); - SetObject( "selectedCharacter", DataObject); + SetObject( "selectedCharacter", DataObject); - //set head - SetGearButtons(HeadMeshIndex, HeadSkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey); - //set body - SetGearButtons(BodyMeshIndex, BodySkinIndex, class'KFGFxMenu_Gear'.Default.BodyMeshKey, class'KFGFxMenu_Gear'.Default.BodySkinKey, class'KFGFxMenu_Gear'.Default.BodyFunctionKey); - //set attachments - SetAttachmentButtons(class'KFGFxMenu_Gear'.Default.AttachmentKey, class'KFGFxMenu_Gear'.Default.AttachmentFunctionKey); - - SetEmoteButton(); + //set head + SetGearButtons(HeadMeshIndex, HeadSkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey); + //set body + SetGearButtons(BodyMeshIndex, BodySkinIndex, class'KFGFxMenu_Gear'.Default.BodyMeshKey, class'KFGFxMenu_Gear'.Default.BodySkinKey, class'KFGFxMenu_Gear'.Default.BodyFunctionKey); + //set attachments + SetAttachmentButtons(class'KFGFxMenu_Gear'.Default.AttachmentKey, class'KFGFxMenu_Gear'.Default.AttachmentFunctionKey); + + SetEmoteButton(); } function SetEmoteButton() { - local GFxObject DataObject; - local int EmoteIndex; + local GFxObject DataObject; + local int EmoteIndex; - EmoteIndex = class'ExtEmoteList'.static.GetEmoteIndex( class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(GetPC()))); + EmoteIndex = class'ExtEmoteList'.static.GetEmoteIndex( class'ExtEmoteList'.static.GetEquippedEmoteId(ExtPlayerController(GetPC()))); - DataObject = CreateObject("Object"); - if(EmoteIndex == 255) - { - DataObject.SetString( "selectedEmote", ""); - DataObject.SetInt( "selectedEmoteIndex", 0 ); - } - else - { - DataObject.SetString( "selectedEmote", Localize(EmoteList[EmoteIndex].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)); - DataObject.SetInt( "selectedEmoteIndex", 0 ); - } - + DataObject = CreateObject("Object"); + if(EmoteIndex == 255) + { + DataObject.SetString( "selectedEmote", ""); + DataObject.SetInt( "selectedEmoteIndex", 0 ); + } + else + { + DataObject.SetString( "selectedEmote", Localize(EmoteList[EmoteIndex].ItemName, "EmoteName", class'KFGFxMenu_Gear'.Default.KFCharacterInfoString)); + DataObject.SetInt( "selectedEmoteIndex", 0 ); + } + - SetObject("selectedEmote", DataObject); + SetObject("selectedEmote", DataObject); } /** Update the labels for our gear buttons */ function SetGearButtons(int MeshIndex, int SkinIndex, string MeshKey, string SkinKey, string sectionFunctionName) { - local string SectionPath; - local string CurrentMesh; - local string SkinName, MeshName; - local GFxObject DataObject; + local string SectionPath; + local string CurrentMesh; + local string SkinName, MeshName; + local GFxObject DataObject; - if( bWaitingCharList ) - return; + if( bWaitingCharList ) + return; - DataObject = CreateObject("Object"); + DataObject = CreateObject("Object"); - if(MeshIndex == `CLEARED_ATTACHMENT_INDEX) - { - DataObject.SetString( sectionFunctionName, class'KFGFxMenu_Gear'.Default.NoneString ); - } - else if( bIsCustomChar ) - { - if( MeshKey==class'KFGFxMenu_Gear'.Default.HeadMeshKey ) - { - SkinName = GetMenuName(CurrentCharInfo.HeadVariants[MeshIndex].SkinVariations[SkinIndex].Skin); - MeshName = GetMenuNameStr(CurrentCharInfo.HeadVariants[MeshIndex].MeshName); - } - else - { - SkinName = GetMenuName(CurrentCharInfo.BodyVariants[MeshIndex].SkinVariations[SkinIndex].Skin); - MeshName = GetMenuNameStr(CurrentCharInfo.BodyVariants[MeshIndex].MeshName); - } - - DataObject.SetString( sectionFunctionName, MeshName @"\n" @SkinName ); - } - else - { - CurrentMesh = MeshKey$MeshIndex; - SectionPath = CharInfoPath$"."$CurrentMesh; + if(MeshIndex == `CLEARED_ATTACHMENT_INDEX) + { + DataObject.SetString( sectionFunctionName, class'KFGFxMenu_Gear'.Default.NoneString ); + } + else if( bIsCustomChar ) + { + if( MeshKey==class'KFGFxMenu_Gear'.Default.HeadMeshKey ) + { + SkinName = GetMenuName(CurrentCharInfo.HeadVariants[MeshIndex].SkinVariations[SkinIndex].Skin); + MeshName = GetMenuNameStr(CurrentCharInfo.HeadVariants[MeshIndex].MeshName); + } + else + { + SkinName = GetMenuName(CurrentCharInfo.BodyVariants[MeshIndex].SkinVariations[SkinIndex].Skin); + MeshName = GetMenuNameStr(CurrentCharInfo.BodyVariants[MeshIndex].MeshName); + } + + DataObject.SetString( sectionFunctionName, MeshName @"\n" @SkinName ); + } + else + { + CurrentMesh = MeshKey$MeshIndex; + SectionPath = CharInfoPath$"."$CurrentMesh; - SkinName = Localize(SectionPath, SkinKey$SkinIndex, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); - MeshName = Localize(CharInfoPath, CurrentMesh, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); - DataObject.SetString( sectionFunctionName, MeshName @"\n" @SkinName ); - } + SkinName = Localize(SectionPath, SkinKey$SkinIndex, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); + MeshName = Localize(CharInfoPath, CurrentMesh, class'KFGFxMenu_Gear'.Default.KFCharacterInfoString); + DataObject.SetString( sectionFunctionName, MeshName @"\n" @SkinName ); + } - DataObject.SetInt( (sectionFunctionName$"Index"), MeshIndex); - DataObject.SetInt( (sectionFunctionName$"SkinIndex"), SkinIndex); + DataObject.SetInt( (sectionFunctionName$"Index"), MeshIndex); + DataObject.SetInt( (sectionFunctionName$"SkinIndex"), SkinIndex); - SetObject( sectionFunctionName, DataObject); + SetObject( sectionFunctionName, DataObject); } /** Update the labels for our currently equipped attachments */ function SetAttachmentButtons(string AttachmentMeshKey, string sectionFunctionName) { - local GFxObject DataObject; - local int i, AttachmentIndex; - local bool bCustom; - - if( bWaitingCharList ) - return; - - bCustom = ExtPRI.UsesCustomChar(); - DataObject = CreateObject("Object"); + local GFxObject DataObject; + local int i, AttachmentIndex; + local bool bCustom; + + if( bWaitingCharList ) + return; + + bCustom = ExtPRI.UsesCustomChar(); + DataObject = CreateObject("Object"); - for(i = 0; i < `MAX_COSMETIC_ATTACHMENTS; i++) - { - AttachmentIndex = bCustom ? ExtPRI.CustomCharacter.AttachmentMeshIndices[i] : ExtPRI.RepCustomizationInfo.AttachmentMeshIndices[i]; - if( AttachmentIndex == `CLEARED_ATTACHMENT_INDEX ) - { - DataObject.SetString("selectedAttachment_"$i, "----"); - } - else - { - DataObject.SetString("selectedAttachment_"$i, bIsCustomChar ? GetMenuNameStr(CurrentCharInfo.CosmeticVariants[AttachmentIndex].MeshName) : Localize(string(CurrentCharInfo.CosmeticVariants[AttachmentIndex].AttachmentItem.Name), AttachmentMeshKey, class'KFGFxMenu_Gear'.default.KFCharacterInfoString)); - } - } + for(i = 0; i < `MAX_COSMETIC_ATTACHMENTS; i++) + { + AttachmentIndex = bCustom ? ExtPRI.CustomCharacter.AttachmentMeshIndices[i] : ExtPRI.RepCustomizationInfo.AttachmentMeshIndices[i]; + if( AttachmentIndex == `CLEARED_ATTACHMENT_INDEX ) + { + DataObject.SetString("selectedAttachment_"$i, "----"); + } + else + { + DataObject.SetString("selectedAttachment_"$i, bIsCustomChar ? GetMenuNameStr(CurrentCharInfo.CosmeticVariants[AttachmentIndex].MeshName) : Localize(string(CurrentCharInfo.CosmeticVariants[AttachmentIndex].AttachmentItem.Name), AttachmentMeshKey, class'KFGFxMenu_Gear'.default.KFCharacterInfoString)); + } + } - SetObject( sectionFunctionName, DataObject); + SetObject( sectionFunctionName, DataObject); } event OnClose() { - local PlayerController PC; + local PlayerController PC; - super.OnClose(); + super.OnClose(); - //GetGameViewportClient().HandleInputAxis = none; + //GetGameViewportClient().HandleInputAxis = none; - if ( class'WorldInfo'.static.IsMenuLevel() ) - { - Manager.ManagerObject.SetBool("backgroundVisible", true); - } + if ( class'WorldInfo'.static.IsMenuLevel() ) + { + Manager.ManagerObject.SetBool("backgroundVisible", true); + } - // If we are alive, in game, with a playable pawn. switch back to first person view when leaving this menu - PC = GetPC(); - if( PC != none && PC.WorldInfo.GRI.bMatchHasBegun && PC.Pawn != none && !PC.Pawn.IsA('KFPawn_Customization') ) - { - PC.ServerCamera( 'FirstPerson' ); - } + // If we are alive, in game, with a playable pawn. switch back to first person view when leaving this menu + PC = GetPC(); + if( PC != none && PC.WorldInfo.GRI.bMatchHasBegun && PC.Pawn != none && !PC.Pawn.IsA('KFPawn_Customization') ) + { + PC.ServerCamera( 'FirstPerson' ); + } } event bool OnAxisModified( int ControllerId, name Key, float Delta, float DeltaTime, bool bGamepad ) { - if ( GetPC().PlayerInput.bUsingGamepad ) - { - if ( Key == 'XboxTypeS_RightX' && Abs(Delta) > class'KFGFxMenu_Gear'.Default.ControllerRotationThreshold) - { - Callback_RotateCamera(Delta * class'KFGFxMenu_Gear'.Default.ControllerRotationRate); - } - } - return false; + if ( GetPC().PlayerInput.bUsingGamepad ) + { + if ( Key == 'XboxTypeS_RightX' && Abs(Delta) > class'KFGFxMenu_Gear'.Default.ControllerRotationThreshold) + { + Callback_RotateCamera(Delta * class'KFGFxMenu_Gear'.Default.ControllerRotationRate); + } + } + return false; } //============================================================== @@ -557,117 +557,117 @@ event bool OnAxisModified( int ControllerId, name Key, float Delta, float DeltaT function Callback_Emote(int Index) { - local KFPlayerController KFPC; + local KFPlayerController KFPC; - KFPC = KFPlayerController(GetPC()); - if( KFPC != none ) - { - class'ExtEmoteList'.static.SaveEquippedEmote(EmoteList[Index].ID, ExtPlayerController(KFPC)); + KFPC = KFPlayerController(GetPC()); + if( KFPC != none ) + { + class'ExtEmoteList'.static.SaveEquippedEmote(EmoteList[Index].ID, ExtPlayerController(KFPC)); - if ( ExtPawn_Customization(KFPC.Pawn) != none ) - { - ExtPawn_Customization(KFPC.Pawn).PlayEmoteAnimation(); - } - } + if ( ExtPawn_Customization(KFPC.Pawn) != none ) + { + ExtPawn_Customization(KFPC.Pawn).PlayEmoteAnimation(); + } + } - SetEmoteButton(); + SetEmoteButton(); } function Callback_RotateCamera( int RotationDirection ) { - local KFPlayerCamera PlayerCamera; - - PlayerCamera = KFPlayerCamera( GetPC().PlayerCamera ); - if ( PlayerCamera != none ) - PlayerCamera.CustomizationCam.RotatedCamera( RotationDirection ); + local KFPlayerCamera PlayerCamera; + + PlayerCamera = KFPlayerCamera( GetPC().PlayerCamera ); + if ( PlayerCamera != none ) + PlayerCamera.CustomizationCam.RotatedCamera( RotationDirection ); } function Callback_EndRotateCamera() { - local KFPlayerCamera PlayerCamera; + local KFPlayerCamera PlayerCamera; - PlayerCamera = KFPlayerCamera( GetPC().PlayerCamera ); - if ( PlayerCamera != none ) - PlayerCamera.CustomizationCam.StartFadeRotation(); + PlayerCamera = KFPlayerCamera( GetPC().PlayerCamera ); + if ( PlayerCamera != none ) + PlayerCamera.CustomizationCam.StartFadeRotation(); } function Callback_Weapon( int ItemIndex, int SkinIndex ) { - local KFPawn_Customization KFP; + local KFPawn_Customization KFP; - KFP = KFPawn_Customization(GetPC().Pawn); - if(KFP != none) - KFP.AttachWeaponByItemDefinition(SkinIndex); + KFP = KFPawn_Customization(GetPC().Pawn); + if(KFP != none) + KFP.AttachWeaponByItemDefinition(SkinIndex); } function Callback_BodyCamera() { - if ( KFPlayerCamera( GetPC().PlayerCamera ) != none ) - KFPlayerCamera( GetPC().PlayerCamera ).CustomizationCam.SetBodyView( 0 ); + if ( KFPlayerCamera( GetPC().PlayerCamera ) != none ) + KFPlayerCamera( GetPC().PlayerCamera ).CustomizationCam.SetBodyView( 0 ); } function Callback_HeadCamera() { - if ( KFPlayerCamera( GetPC().PlayerCamera ) != none ) - KFPlayerCamera( GetPC().PlayerCamera ).CustomizationCam.SetBodyView( 1 ); + if ( KFPlayerCamera( GetPC().PlayerCamera ) != none ) + KFPlayerCamera( GetPC().PlayerCamera ).CustomizationCam.SetBodyView( 1 ); } function Callback_Character(int Index) { - ExtPRI.ChangeCharacter(Index,!ExtPRI.UsesCustomChar()); - UpdateGear(); + ExtPRI.ChangeCharacter(Index,!ExtPRI.UsesCustomChar()); + UpdateGear(); } function Callback_Head( int MeshIndex, int SkinIndex ) { - if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server. - ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true); - ExtPRI.UpdateCustomization(CO_Head, MeshIndex, SkinIndex); - SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey); + if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server. + ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true); + ExtPRI.UpdateCustomization(CO_Head, MeshIndex, SkinIndex); + SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.HeadMeshKey, class'KFGFxMenu_Gear'.Default.HeadSkinKey, class'KFGFxMenu_Gear'.Default.HeadFunctionKey); } function Callback_Body( int MeshIndex, int SkinIndex ) { - if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server. - ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true); - - ExtPRI.UpdateCustomization(CO_Body, MeshIndex, SkinIndex); - - // When assigning a new body mesh we may need to remove certain attachments - // refresh filters, and update the equipped accessories list - UpdateAttachmentsList(CurrentCharInfo.CosmeticVariants); - SetAttachmentButtons(class'KFGFxMenu_Gear'.Default.AttachmentKey, class'KFGFxMenu_Gear'.Default.AttachmentFunctionKey); + if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server. + ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true); + + ExtPRI.UpdateCustomization(CO_Body, MeshIndex, SkinIndex); + + // When assigning a new body mesh we may need to remove certain attachments + // refresh filters, and update the equipped accessories list + UpdateAttachmentsList(CurrentCharInfo.CosmeticVariants); + SetAttachmentButtons(class'KFGFxMenu_Gear'.Default.AttachmentKey, class'KFGFxMenu_Gear'.Default.AttachmentFunctionKey); - SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.BodyMeshKey, class'KFGFxMenu_Gear'.Default.BodySkinKey, class'KFGFxMenu_Gear'.Default.BodyFunctionKey); + SetGearButtons(MeshIndex, SkinIndex, class'KFGFxMenu_Gear'.Default.BodyMeshKey, class'KFGFxMenu_Gear'.Default.BodySkinKey, class'KFGFxMenu_Gear'.Default.BodyFunctionKey); } function Callback_Attachment( int MeshIndex, int SkinIndex ) { - local int SlotIndex; - local KFPawn KFP; + local int SlotIndex; + local KFPawn KFP; - if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server. - ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true); + if( !ExtPRI.UsesCustomChar() ) // Force client to setup custom character now for this server. + ExtPRI.ChangeCharacter(ExtPRI.RepCustomizationInfo.CharacterIndex,true); - KFP = KFPawn(GetPC().Pawn); - if( KFP!=None && ExtPRI!=None ) - { - if( MeshIndex==`CLEARED_ATTACHMENT_INDEX ) - ExtPRI.RemoveAttachments(); - else - { - class'ExtCharacterInfo'.Static.DetachConflictingAttachments(CurrentCharInfo, MeshIndex, KFP, ExtPRI); - SlotIndex = class'ExtCharacterInfo'.Static.GetAttachmentSlotIndex(CurrentCharInfo, MeshIndex, KFP, ExtPRI); - if(SlotIndex == INDEX_NONE) - { - return; - } - - ExtPRI.UpdateCustomization(CO_Attachment, MeshIndex, SkinIndex, SlotIndex); - } + KFP = KFPawn(GetPC().Pawn); + if( KFP!=None && ExtPRI!=None ) + { + if( MeshIndex==`CLEARED_ATTACHMENT_INDEX ) + ExtPRI.RemoveAttachments(); + else + { + class'ExtCharacterInfo'.Static.DetachConflictingAttachments(CurrentCharInfo, MeshIndex, KFP, ExtPRI); + SlotIndex = class'ExtCharacterInfo'.Static.GetAttachmentSlotIndex(CurrentCharInfo, MeshIndex, KFP, ExtPRI); + if(SlotIndex == INDEX_NONE) + { + return; + } + + ExtPRI.UpdateCustomization(CO_Attachment, MeshIndex, SkinIndex, SlotIndex); + } - SetAttachmentButtons(class'KFGFxMenu_Gear'.Default.AttachmentKey, class'KFGFxMenu_Gear'.Default.AttachmentFunctionKey); - } + SetAttachmentButtons(class'KFGFxMenu_Gear'.Default.AttachmentKey, class'KFGFxMenu_Gear'.Default.AttachmentFunctionKey); + } } defaultproperties diff --git a/ServerExt/Classes/ExtMoviePlayer_HUD.uc b/ServerExt/Classes/ExtMoviePlayer_HUD.uc index 690ef7e..13114d8 100644 --- a/ServerExt/Classes/ExtMoviePlayer_HUD.uc +++ b/ServerExt/Classes/ExtMoviePlayer_HUD.uc @@ -11,16 +11,16 @@ function TickHud(float DeltaTime) final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInfo PRI2, optional string VictimStr, optional bool bDeathMessage = false, optional class PawnOther ) { - local GFxObject DataObject; - local bool bHumanDeath; - local string KilledName, KillerName, KilledIconpath, KillerIconPath; - local string KillerTextColor, KilledTextColor; + local GFxObject DataObject; + local bool bHumanDeath; + local string KilledName, KillerName, KilledIconpath, KillerIconPath; + local string KillerTextColor, KilledTextColor; - if(KFPC == none) - return; + if(KFPC == none) + return; - if( KFGXHUDManager != none ) - { + if( KFGXHUDManager != none ) + { if(PawnOther != none) { if( bDeathMessage ) @@ -47,7 +47,7 @@ final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInf if( ExtPlayerReplicationInfo(PRI1)!=None && ExtPlayerReplicationInfo(PRI1).ECurrentPerk!=None ) KillerIconpath = ExtPlayerReplicationInfo(PRI1).ECurrentPerk.static.GetPerkIconPath(0); } - KillerName = PRI1.PlayerName; + KillerName = PRI1.PlayerName; } if(PRI2 != none) diff --git a/ServerExt/Classes/ExtPawn_Customization.uc b/ServerExt/Classes/ExtPawn_Customization.uc index 6674753..a7924e5 100644 --- a/ServerExt/Classes/ExtPawn_Customization.uc +++ b/ServerExt/Classes/ExtPawn_Customization.uc @@ -11,7 +11,7 @@ simulated function SetCharacterArch( KFCharacterInfoBase Info, optional bool bFo { local KFPlayerReplicationInfo KFPRI; - KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo ); + KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo ); if (Info != CharacterArch || bForce) { // Set Family Info diff --git a/ServerExt/Classes/ExtPawn_ZedHans_Pet.uc b/ServerExt/Classes/ExtPawn_ZedHans_Pet.uc index 75e7c21..4d849fa 100644 --- a/ServerExt/Classes/ExtPawn_ZedHans_Pet.uc +++ b/ServerExt/Classes/ExtPawn_ZedHans_Pet.uc @@ -2,7 +2,7 @@ class ExtPawn_ZedHans_Pet extends KFPawn_ZedHansFriendlyTest; static simulated event bool IsABoss() { - return false; + return false; } defaultproperties diff --git a/ServerExt/Classes/ExtPerkManager.uc b/ServerExt/Classes/ExtPerkManager.uc index acf365d..6618bfb 100644 --- a/ServerExt/Classes/ExtPerkManager.uc +++ b/ServerExt/Classes/ExtPerkManager.uc @@ -540,7 +540,7 @@ simulated function ModifyMeleeAttackSpeed( out float InDuration, KFWeapon KFW ) } simulated function class GetGrenadeClass() { - return (CurrentPerk!=None ? CurrentPerk.GrenadeClass : GrenadeClass); + return (CurrentPerk!=None ? CurrentPerk.GrenadeClass : GrenadeClass); } simulated function ModifyWeldingRate( out float FastenRate, out float UnfastenRate ) { diff --git a/ServerExt/Classes/ExtPerksContainer_Header.uc b/ServerExt/Classes/ExtPerksContainer_Header.uc index a16fdf7..9ad28b5 100644 --- a/ServerExt/Classes/ExtPerksContainer_Header.uc +++ b/ServerExt/Classes/ExtPerksContainer_Header.uc @@ -5,12 +5,12 @@ final function ExUpdatePerkHeader( Ext_PerkBase PerkClass ) local GFxObject PerkDataProvider; PerkDataProvider = CreateObject( "Object" ); - PerkDataProvider.SetString( "perkTitle", PerkClass.PerkName ); - PerkDataProvider.SetString( "perkLevel", LevelString@PerkClass.CurrentLevel); - PerkDataProvider.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) ); - PerkDataProvider.SetString( "prestigeLevel", ""); //not used yet so not point to populating with data - PerkDataProvider.SetString( "xpString", PerkClass.CurrentEXP$"/"$PerkClass.NextLevelEXP ); - PerkDataProvider.SetFloat( "xpPercent", PerkClass.GetProgressPercent() ); + PerkDataProvider.SetString( "perkTitle", PerkClass.PerkName ); + PerkDataProvider.SetString( "perkLevel", LevelString@PerkClass.CurrentLevel); + PerkDataProvider.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) ); + PerkDataProvider.SetString( "prestigeLevel", ""); //not used yet so not point to populating with data + PerkDataProvider.SetString( "xpString", PerkClass.CurrentEXP$"/"$PerkClass.NextLevelEXP ); + PerkDataProvider.SetFloat( "xpPercent", PerkClass.GetProgressPercent() ); SetObject( "perkData", PerkDataProvider ); } diff --git a/ServerExt/Classes/ExtPerksContainer_Selection.uc b/ServerExt/Classes/ExtPerksContainer_Selection.uc index f0dbf04..019419f 100644 --- a/ServerExt/Classes/ExtPerksContainer_Selection.uc +++ b/ServerExt/Classes/ExtPerksContainer_Selection.uc @@ -17,19 +17,19 @@ function UpdatePerkSelection(byte SelectedPerkIndex) for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++) { PerkClass = KFPC.ActivePerkManager.UserPerks[i]; - TempObj = CreateObject( "Object" ); - TempObj.SetInt( "PerkLevel", PerkClass.CurrentLevel ); - TempObj.SetString( "Title", PerkClass.PerkName ); + TempObj = CreateObject( "Object" ); + TempObj.SetInt( "PerkLevel", PerkClass.CurrentLevel ); + TempObj.SetString( "Title", PerkClass.PerkName ); TempObj.SetString( "iconSource", PerkClass.GetPerkIconPath(PerkClass.CurrentLevel) ); TempObj.SetBool("bTierUnlocked", true); - DataProvider.SetElementObject( i, TempObj ); + DataProvider.SetElementObject( i, TempObj ); } SetObject( "perkData", DataProvider ); SetInt("SelectedIndex", SelectedPerkIndex); UpdatePendingPerkInfo(SelectedPerkIndex); - } + } } function UpdatePendingPerkInfo(byte SelectedPerkIndex) diff --git a/ServerExt/Classes/ExtPlayerController.uc b/ServerExt/Classes/ExtPlayerController.uc index e062304..84c6f7a 100644 --- a/ServerExt/Classes/ExtPlayerController.uc +++ b/ServerExt/Classes/ExtPlayerController.uc @@ -316,13 +316,13 @@ reliable client event TeamMessage( PlayerReplicationInfo PRI, coerce string S, n } if (MyGFxManager != none && MyGFxManager.PartyWidget != none) - { - if( !MyGFxManager.PartyWidget.ReceiveMessage(S) ) //Fails if message is for updating perks in a steam lobby - return; - } + { + if( !MyGFxManager.PartyWidget.ReceiveMessage(S) ) //Fails if message is for updating perks in a steam lobby + return; + } - if( MyGFxHUD != none ) - { + if( MyGFxHUD != none ) + { switch( Type ) { case 'Log': @@ -340,7 +340,7 @@ reliable client event TeamMessage( PlayerReplicationInfo PRI, coerce string S, n case 'TeamSay': if( ExtPlayerReplicationInfo(PRI)!=None && ExtPlayerReplicationInfo(PRI).ShowAdminName() ) MyGFxHUD.HudChatBox.AddChatMessage("("$ExtPlayerReplicationInfo(PRI).GetAdminNameAbr()$")"$S, ExtPlayerReplicationInfo(PRI).GetAdminColor()); - else MyGFxHUD.HudChatBox.AddChatMessage(S, "64FE2E"); + else MyGFxHUD.HudChatBox.AddChatMessage(S, "64FE2E"); break; case 'Priority': MyGFxHUD.HudChatBox.AddChatMessage(S, class 'KFLocalMessage'.default.PriorityColor); @@ -509,9 +509,9 @@ reliable server function ServerCamera( name NewMode ) { // <- REMOVED CAMERA LOGGING (PlayerController) if ( NewMode == '1st' ) - NewMode = 'FirstPerson'; - else if ( NewMode == '3rd' ) - NewMode = 'ThirdPerson'; + NewMode = 'FirstPerson'; + else if ( NewMode == '3rd' ) + NewMode = 'ThirdPerson'; SetCameraMode( NewMode ); } exec function Camera( name NewMode ) @@ -582,12 +582,12 @@ simulated reliable client event bool ShowConnectionProgressPopup( EProgressMessa { switch(ProgressType) { - case PMT_ConnectionFailure : - case PMT_PeerConnectionFailure : + case PMT_ConnectionFailure : + case PMT_PeerConnectionFailure : KFExtendedHUD(myHUD).NotifyLevelChange(); KFExtendedHUD(myHUD).ShowProgressMsg("Connection Error: "$ProgressTitle$"|"$ProgressDescription$"|Disconnecting...",true); return true; - case PMT_DownloadProgress : + case PMT_DownloadProgress : KFExtendedHUD(myHUD).NotifyLevelChange(); case PMT_AdminMessage : KFExtendedHUD(myHUD).ShowProgressMsg(ProgressTitle$"|"$ProgressDescription); @@ -1127,7 +1127,7 @@ state Dead KFPawn(ViewTarget).SetMeshVisibility(true); } - // Deactivate any post process effects when we die + // Deactivate any post process effects when we die ResetGameplayPostProcessFX(); if(CurrentPerk != none) @@ -1169,12 +1169,12 @@ state Dead exec function RequestSwitchTeam() { - ConsoleCommand("disconnect"); + ConsoleCommand("disconnect"); } exec function SwitchTeam() { - ConsoleCommand("disconnect"); + ConsoleCommand("disconnect"); } defaultproperties diff --git a/ServerExt/Classes/ExtPlayerReplicationInfo.uc b/ServerExt/Classes/ExtPlayerReplicationInfo.uc index b457582..7728ce0 100644 --- a/ServerExt/Classes/ExtPlayerReplicationInfo.uc +++ b/ServerExt/Classes/ExtPlayerReplicationInfo.uc @@ -8,14 +8,14 @@ struct FCustomCharEntry }; struct FMyCustomChar // Now without constant. { - var int CharacterIndex,HeadMeshIndex,HeadSkinIndex,BodyMeshIndex,BodySkinIndex,AttachmentMeshIndices[`MAX_COSMETIC_ATTACHMENTS],AttachmentSkinIndices[`MAX_COSMETIC_ATTACHMENTS]; - - structdefaultproperties - { - AttachmentMeshIndices[0]=`CLEARED_ATTACHMENT_INDEX - AttachmentMeshIndices[1]=`CLEARED_ATTACHMENT_INDEX - AttachmentMeshIndices[2]=`CLEARED_ATTACHMENT_INDEX - } + var int CharacterIndex,HeadMeshIndex,HeadSkinIndex,BodyMeshIndex,BodySkinIndex,AttachmentMeshIndices[`MAX_COSMETIC_ATTACHMENTS],AttachmentSkinIndices[`MAX_COSMETIC_ATTACHMENTS]; + + structdefaultproperties + { + AttachmentMeshIndices[0]=`CLEARED_ATTACHMENT_INDEX + AttachmentMeshIndices[1]=`CLEARED_ATTACHMENT_INDEX + AttachmentMeshIndices[2]=`CLEARED_ATTACHMENT_INDEX + } }; // For custom trader inventory. @@ -537,10 +537,10 @@ reliable server final function ServerSetCharacterX( FMyCustomChar NewMeshInfo ) CustomCharacter = NewMeshInfo; - if ( Role == Role_Authority ) - { + if ( Role == Role_Authority ) + { CharacterCustomizationChanged(); - } + } } simulated final function bool IsClientCharLocked( byte Index ) { diff --git a/ServerExt/Classes/ExtProj_CrackerGrenade.uc b/ServerExt/Classes/ExtProj_CrackerGrenade.uc index caf2202..8f96c88 100644 --- a/ServerExt/Classes/ExtProj_CrackerGrenade.uc +++ b/ServerExt/Classes/ExtProj_CrackerGrenade.uc @@ -11,15 +11,15 @@ simulated function PostBeginPlay() } simulated function ExplodeTimer() { - local Actor HitActor; - local vector HitLocation, HitNormal; + local Actor HitActor; + local vector HitLocation, HitNormal; if( WorldInfo.NetMode!=NM_Client && InstigatorController==none ) { Destroy(); return; } - GetExplodeEffectLocation(HitLocation, HitNormal, HitActor); + GetExplodeEffectLocation(HitLocation, HitNormal, HitActor); if( --NumCrackers==0 ) TriggerExplosion(HitLocation, HitNormal, HitActor); else SmallExplosion(HitLocation, HitNormal, HitActor); diff --git a/ServerExt/Classes/ExtProj_SUPERGrenade.uc b/ServerExt/Classes/ExtProj_SUPERGrenade.uc index f1a08c3..46eb9a4 100644 --- a/ServerExt/Classes/ExtProj_SUPERGrenade.uc +++ b/ServerExt/Classes/ExtProj_SUPERGrenade.uc @@ -32,7 +32,7 @@ simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNorma { // For opposing team, make the grenade explode instantly GetExplodeEffectLocation( HitLocation, HitNormal, Other ); - TriggerExplosion( HitLocation, HitNormal, Other ); + TriggerExplosion( HitLocation, HitNormal, Other ); } else super.ProcessTouch( Other, HitLocation, HitNormal ); } @@ -69,14 +69,14 @@ simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor simulated function Destroyed() { - local Actor HitActor; - local vector HitLocation, HitNormal; + local Actor HitActor; + local vector HitLocation, HitNormal; // Final Failsafe check for explosion effect if( !bHasExploded && WorldInfo.NetMode==NM_Client ) { GetExplodeEffectLocation(HitLocation, HitNormal, HitActor); - TriggerExplosion(HitLocation, HitNormal, HitActor); + TriggerExplosion(HitLocation, HitNormal, HitActor); } } diff --git a/ServerExt/Classes/ExtProj_SUPERMedGrenade.uc b/ServerExt/Classes/ExtProj_SUPERMedGrenade.uc index 0be74a4..c5edd3a 100644 --- a/ServerExt/Classes/ExtProj_SUPERMedGrenade.uc +++ b/ServerExt/Classes/ExtProj_SUPERMedGrenade.uc @@ -36,14 +36,14 @@ simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor simulated function Destroyed() { - local Actor HitActor; - local vector HitLocation, HitNormal; + local Actor HitActor; + local vector HitLocation, HitNormal; // Final Failsafe check for explosion effect if( !bHasExploded && WorldInfo.NetMode==NM_Client ) { GetExplodeEffectLocation(HitLocation, HitNormal, HitActor); - TriggerExplosion(HitLocation, HitNormal, HitActor); + TriggerExplosion(HitLocation, HitNormal, HitActor); } } diff --git a/ServerExt/Classes/ExtTraderContainer_Filter.uc b/ServerExt/Classes/ExtTraderContainer_Filter.uc index 929f667..d642fea 100644 --- a/ServerExt/Classes/ExtTraderContainer_Filter.uc +++ b/ServerExt/Classes/ExtTraderContainer_Filter.uc @@ -11,7 +11,7 @@ function SetPerkFilterData(byte FilterIndex) SetBool("filterVisibliity", true); - KFPC = ExtPlayerController( GetPC() ); + KFPC = ExtPlayerController( GetPC() ); if ( KFPC != none ) { PrM = KFPC.ActivePerkManager; @@ -36,7 +36,7 @@ function SetPerkFilterData(byte FilterIndex) { FilterObject = CreateObject( "Object" ); FilterObject.SetString("source", PrM.UserPerks[i].GetPerkIconPath(PrM.UserPerks[i].CurrentLevel)); - DataProvider.SetElementObject( i, FilterObject ); + DataProvider.SetElementObject( i, FilterObject ); } FilterObject = CreateObject( "Object" ); @@ -44,8 +44,8 @@ function SetPerkFilterData(byte FilterIndex) DataProvider.SetElementObject( i, FilterObject ); SetObject( "filterSource", DataProvider ); - } - } + } + } } defaultproperties diff --git a/ServerExt/Classes/ExtTraderContainer_PlayerInfo.uc b/ServerExt/Classes/ExtTraderContainer_PlayerInfo.uc index 5df70fe..4e5aa86 100644 --- a/ServerExt/Classes/ExtTraderContainer_PlayerInfo.uc +++ b/ServerExt/Classes/ExtTraderContainer_PlayerInfo.uc @@ -30,7 +30,7 @@ function SetPerkList() KFPC = ExtPlayerController(GetPC()); if( KFPC != none && KFPC.ActivePerkManager!=None ) { - DataProvider = CreateArray(); + DataProvider = CreateArray(); for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++) { diff --git a/ServerExt/Classes/ExtTraderContainer_Store.uc b/ServerExt/Classes/ExtTraderContainer_Store.uc index f7334ee..158df19 100644 --- a/ServerExt/Classes/ExtTraderContainer_Store.uc +++ b/ServerExt/Classes/ExtTraderContainer_Store.uc @@ -15,7 +15,7 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array TargetPerkClass = EKFPC.ActivePerkManager.UserPerks[FilterIndex].BasePerk; SlotIndex = 0; - ItemDataArray = CreateArray(); + ItemDataArray = CreateArray(); for (i = 0; i < ItemList.Length; i++) { diff --git a/ServerExt/Classes/ExtWeap_Pistol_9mm.uc b/ServerExt/Classes/ExtWeap_Pistol_9mm.uc index 772b89e..780d15e 100644 --- a/ServerExt/Classes/ExtWeap_Pistol_9mm.uc +++ b/ServerExt/Classes/ExtWeap_Pistol_9mm.uc @@ -14,7 +14,7 @@ defaultproperties simulated static function bool AllowedForAllPerks() { - return true; + return true; } simulated function ConsumeAmmo( byte FireModeNum ) diff --git a/ServerExt/Classes/ExtWeap_Pistol_Dual9mm.uc b/ServerExt/Classes/ExtWeap_Pistol_Dual9mm.uc index 44efa3a..eb36097 100644 --- a/ServerExt/Classes/ExtWeap_Pistol_Dual9mm.uc +++ b/ServerExt/Classes/ExtWeap_Pistol_Dual9mm.uc @@ -14,7 +14,7 @@ defaultproperties simulated static function bool AllowedForAllPerks() { - return true; + return true; } simulated function ConsumeAmmo( byte FireModeNum ) diff --git a/ServerExt/Classes/ExtWeap_Pistol_MedicS.uc b/ServerExt/Classes/ExtWeap_Pistol_MedicS.uc index 2cafaf6..81164bc 100644 --- a/ServerExt/Classes/ExtWeap_Pistol_MedicS.uc +++ b/ServerExt/Classes/ExtWeap_Pistol_MedicS.uc @@ -21,7 +21,7 @@ defaultproperties simulated static function bool AllowedForAllPerks() { - return true; + return true; } simulated function ConsumeAmmo( byte FireModeNum ) diff --git a/ServerExt/Classes/ExtWeaponSkinList.uc b/ServerExt/Classes/ExtWeaponSkinList.uc index 661d882..831c6b1 100644 --- a/ServerExt/Classes/ExtWeaponSkinList.uc +++ b/ServerExt/Classes/ExtWeaponSkinList.uc @@ -21,7 +21,7 @@ var array Skins; static function array GetWeaponSkin(int ItemId, EWeaponSkinType Type, ExtPlayerController PC) { - local int i; + local int i; local array Mats; local MaterialInterface LoadedMat; local string FirstPMat; @@ -75,7 +75,7 @@ static function SaveWeaponSkin(class WeaponDef, int ID, ExtP static function bool IsSkinEquip(class WeaponDef, int ID, ExtPlayerController PC) { - local int i; + local int i; i = PC.SavedWeaponSkins.Find('ID', ID); if( i > -1 ) return true; diff --git a/ServerExt/Classes/ExtWidget_PartyInGame.uc b/ServerExt/Classes/ExtWidget_PartyInGame.uc index 6125c3b..04741a2 100644 --- a/ServerExt/Classes/ExtWidget_PartyInGame.uc +++ b/ServerExt/Classes/ExtWidget_PartyInGame.uc @@ -45,7 +45,7 @@ function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI ) PerkIconObject = CreateObject("Object"); PerkIconObject.SetString("perkIcon", ExtMemberSlots[SlotIndex].PerkClass.static.GetPerkIconPath(EPRI.ECurrentPerkLevel)); PlayerInfoObject.SetObject("perkImageSource", PerkIconObject); - + PlayerInfoObject.SetString("perkLevel", string(EPRI.ECurrentPerkLevel)); } if( !bIsMyPlayer ) diff --git a/ServerExt/Classes/Ext_PerkBase.uc b/ServerExt/Classes/Ext_PerkBase.uc index 4b87878..160f80f 100644 --- a/ServerExt/Classes/Ext_PerkBase.uc +++ b/ServerExt/Classes/Ext_PerkBase.uc @@ -114,25 +114,25 @@ reliable client simulated function string UIName(FDefPerkStat DefPerkStat) { switch( DefPerkStat.StatType ) { - case name("Speed"): return StatSpeed; - case name("Damage"): return StatDamage; - case name("Recoil"): return StatRecoil; - case name("Spread"): return StatSpread; - case name("Rate"): return StatRate; - case name("Reload"): return StatReload; - case name("Health"): return StatHealth; - case name("KnockDown"): return StatKnockDown; - case name("Welder"): return StatWelder; - case name("Heal"): return StatHeal; - case name("Mag"): return StatMag; - case name("Spare"): return StatSpare; - case name("OffDamage"): return StatOffDamage; + case name("Speed"): return StatSpeed; + case name("Damage"): return StatDamage; + case name("Recoil"): return StatRecoil; + case name("Spread"): return StatSpread; + case name("Rate"): return StatRate; + case name("Reload"): return StatReload; + case name("Health"): return StatHealth; + case name("KnockDown"): return StatKnockDown; + case name("Welder"): return StatWelder; + case name("Heal"): return StatHeal; + case name("Mag"): return StatMag; + case name("Spare"): return StatSpare; + case name("OffDamage"): return StatOffDamage; case name("SelfDamage"): return StatSelfDamage; - case name("Armor"): return StatArmor; - case name("PoisonDmg"): return StatPoisonDmg; - case name("SonicDmg"): return StatSonicDmg; - case name("FireDmg"): return StatFireDmg; - case name("AllDmg"): return StatAllDmg; + case name("Armor"): return StatArmor; + case name("PoisonDmg"): return StatPoisonDmg; + case name("SonicDmg"): return StatSonicDmg; + case name("FireDmg"): return StatFireDmg; + case name("AllDmg"): return StatAllDmg; case name("HeadDamage"): return StatHeadDamage; case name("HealRecharge"): return StatHealRecharge; } diff --git a/ServerExt/Classes/Ext_PerkSupport.uc b/ServerExt/Classes/Ext_PerkSupport.uc index 935e603..b0de476 100644 --- a/ServerExt/Classes/Ext_PerkSupport.uc +++ b/ServerExt/Classes/Ext_PerkSupport.uc @@ -22,14 +22,14 @@ simulated function bool CanRepairDoors() simulated function float GetPenetrationModifier( byte Level, class DamageType, optional bool bForce ) { - local float PenetrationPower; - if( !bForce && (DamageType == none || ( DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk) == INDEX_NONE ))) - return 0; + local float PenetrationPower; + if( !bForce && (DamageType == none || ( DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk) == INDEX_NONE ))) + return 0; - PenetrationPower = bUseAPShot ? APShotMul : 0.f; - PenetrationPower = IsPerforateActive() ? 40.f : PenetrationPower; + PenetrationPower = bUseAPShot ? APShotMul : 0.f; + PenetrationPower = IsPerforateActive() ? 40.f : PenetrationPower; - return PenetrationPower; + return PenetrationPower; } simulated function bool IsPerforateActive() diff --git a/ServerExt/Classes/Ext_TraitMedicPistol.uc b/ServerExt/Classes/Ext_TraitMedicPistol.uc index 85a5b6a..7cc8d56 100644 --- a/ServerExt/Classes/Ext_TraitMedicPistol.uc +++ b/ServerExt/Classes/Ext_TraitMedicPistol.uc @@ -20,7 +20,7 @@ static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Leve { Inv = Player.CreateInventory(class'ExtWeap_Pistol_MedicS',Player.Weapon!=None); if ( KFWeapon(Inv)!=None ) - KFWeapon(Inv).bGivenAtStart = true; + KFWeapon(Inv).bGivenAtStart = true; } } diff --git a/ServerExt/Classes/Ext_TraitWeapons.uc b/ServerExt/Classes/Ext_TraitWeapons.uc index e0a4f76..d74df01 100644 --- a/ServerExt/Classes/Ext_TraitWeapons.uc +++ b/ServerExt/Classes/Ext_TraitWeapons.uc @@ -50,7 +50,7 @@ static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Leve { Inv = Player.CreateInventory(IC,Player.Weapon!=None); if ( KFWeapon(Inv)!=None ) - KFWeapon(Inv).bGivenAtStart = true; + KFWeapon(Inv).bGivenAtStart = true; } } if( M!=None ) diff --git a/ServerExt/Classes/KFExtendedHUD.uc b/ServerExt/Classes/KFExtendedHUD.uc index 77fc5aa..87194e6 100644 --- a/ServerExt/Classes/KFExtendedHUD.uc +++ b/ServerExt/Classes/KFExtendedHUD.uc @@ -28,12 +28,12 @@ var transient float BestPetXL, BestPetYL; struct PopupDamageInfo { - var int Damage; - var float HitTime; - var Vector HitLocation; - var byte Type; - var float RandX, RandY; - var color FontColor; + var int Damage; + var float HitTime; + var Vector HitLocation; + var byte Type; + var float RandX, RandY; + var color FontColor; }; const DAMAGEPOPUP_COUNT = 32; var PopupDamageInfo DamagePopups[32]; @@ -450,8 +450,8 @@ function DrawHUD() local KFPawn_Scripted KFPS; local vector ViewLocation, ViewVector, PlayerPartyInfoLocation, PawnLocation; local rotator ViewRotation; - local array VisibleHumanPlayers; - local array HiddenHumanPlayers; + local array VisibleHumanPlayers; + local array HiddenHumanPlayers; local float ThisDot,DotScale; local vector TargetLocation; local Actor LocActor; @@ -459,21 +459,21 @@ function DrawHUD() local vector V; local bool bSpec; - // Draw weapon HUD underneath everything else - if( KFPlayerOwner != none && KFPlayerOwner.Pawn != none && KFPlayerOwner.Pawn.Weapon != none ) - { - KFPlayerOwner.Pawn.Weapon.DrawHUD( self, Canvas ); - } + // Draw weapon HUD underneath everything else + if( KFPlayerOwner != none && KFPlayerOwner.Pawn != none && KFPlayerOwner.Pawn.Weapon != none ) + { + KFPlayerOwner.Pawn.Weapon.DrawHUD( self, Canvas ); + } super.DrawHUD(); - // Cache GRI - if( KFGRI == none ) - { - KFGRI = KFGameReplicationInfo( WorldInfo.GRI ); - } + // Cache GRI + if( KFGRI == none ) + { + KFGRI = KFGameReplicationInfo( WorldInfo.GRI ); + } - // Don't draw canvas HUD in cinematic mode + // Don't draw canvas HUD in cinematic mode if( KFPlayerOwner != none && KFPlayerOwner.bCinematicMode ) { return; @@ -483,86 +483,86 @@ function DrawHUD() // Draw the crosshair for casual mode if( KFPlayerOwner != none && (bDrawCrosshair || bForceDrawCrosshair || KFPlayerOwner.GetTeamNum() == 255) ) { - DrawCrosshair(); - } + DrawCrosshair(); + } - // Friendly player status + // Friendly player status bSpec = (PlayerOwner.PlayerReplicationInfo!=None && PlayerOwner.PlayerReplicationInfo.bOnlySpectator); if( bSpec || PlayerOwner.GetTeamNum()==0 ) { //Friendly player status if( !class'ExtPlayerController'.Default.bHideNameBeacons ) - { - if( KFPlayerOwner != none ) - { - KFPlayerOwner.GetPlayerViewPoint( ViewLocation, ViewRotation ); - } - ViewVector = vector(ViewRotation); + { + if( KFPlayerOwner != none ) + { + KFPlayerOwner.GetPlayerViewPoint( ViewLocation, ViewRotation ); + } + ViewVector = vector(ViewRotation); - Canvas.EnableStencilTest(true); - foreach WorldInfo.AllPawns( class'KFPawn_Human', KFPH ) - { - if( KFPH.IsAliveAndWell() && KFPH != KFPlayerOwner.Pawn && KFPH.Mesh.SkeletalMesh != none && KFPH.Mesh.bAnimTreeInitialised ) - { - PlayerPartyInfoLocation = KFPH.Mesh.GetPosition() + ( KFPH.CylinderComponent.CollisionHeight * vect(0,0,1) ); - if(`TimeSince(KFPH.Mesh.LastRenderTime) < 0.2f && Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector > 0.f ) - { - if( DrawFriendlyHumanPlayerInfo(KFPH) ) - { - VisibleHumanPlayers.AddItem( KFPH.PlayerReplicationInfo ); - } - else - { - HiddenHumanPlayers.Insert( 0, 1 ); - HiddenHumanPlayers[0].HumanPawn = KFPH; - HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo; - } - } - else - { - HiddenHumanPlayers.Insert( 0, 1 ); - HiddenHumanPlayers[0].HumanPawn = KFPH; - HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo; - } - } - } + Canvas.EnableStencilTest(true); + foreach WorldInfo.AllPawns( class'KFPawn_Human', KFPH ) + { + if( KFPH.IsAliveAndWell() && KFPH != KFPlayerOwner.Pawn && KFPH.Mesh.SkeletalMesh != none && KFPH.Mesh.bAnimTreeInitialised ) + { + PlayerPartyInfoLocation = KFPH.Mesh.GetPosition() + ( KFPH.CylinderComponent.CollisionHeight * vect(0,0,1) ); + if(`TimeSince(KFPH.Mesh.LastRenderTime) < 0.2f && Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector > 0.f ) + { + if( DrawFriendlyHumanPlayerInfo(KFPH) ) + { + VisibleHumanPlayers.AddItem( KFPH.PlayerReplicationInfo ); + } + else + { + HiddenHumanPlayers.Insert( 0, 1 ); + HiddenHumanPlayers[0].HumanPawn = KFPH; + HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo; + } + } + else + { + HiddenHumanPlayers.Insert( 0, 1 ); + HiddenHumanPlayers[0].HumanPawn = KFPH; + HiddenHumanPlayers[0].HumanPRI = KFPH.PlayerReplicationInfo; + } + } + } - foreach WorldInfo.AllPawns(class'KFPawn_Scripted', KFPS) - { - if (KFPS.ShouldShowOnHUD()) - { - PlayerPartyInfoLocation = KFPS.Mesh.GetPosition() + (KFPS.CylinderComponent.CollisionHeight * vect(0,0,1)); - DrawScriptedPawnInfo(KFPS, Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector, `TimeSince(KFPS.Mesh.LastRenderTime) < 0.2f); - } - } + foreach WorldInfo.AllPawns(class'KFPawn_Scripted', KFPS) + { + if (KFPS.ShouldShowOnHUD()) + { + PlayerPartyInfoLocation = KFPS.Mesh.GetPosition() + (KFPS.CylinderComponent.CollisionHeight * vect(0,0,1)); + DrawScriptedPawnInfo(KFPS, Normal(PlayerPartyInfoLocation - ViewLocation) dot ViewVector, `TimeSince(KFPS.Mesh.LastRenderTime) < 0.2f); + } + } - if( !KFGRI.bHidePawnIcons ) - { - // Draw hidden players - CheckAndDrawHiddenPlayerIcons( VisibleHumanPlayers, HiddenHumanPlayers ); + if( !KFGRI.bHidePawnIcons ) + { + // Draw hidden players + CheckAndDrawHiddenPlayerIcons( VisibleHumanPlayers, HiddenHumanPlayers ); - // Draw last remaining zeds - CheckAndDrawRemainingZedIcons(); + // Draw last remaining zeds + CheckAndDrawRemainingZedIcons(); - //Draw our current objective location - if(KFGRI.CurrentObjective != none && KFGRI.ObjectiveInterface != none) - { - KFGRI.ObjectiveInterface.DrawHUD(self, Canvas); + //Draw our current objective location + if(KFGRI.CurrentObjective != none && KFGRI.ObjectiveInterface != none) + { + KFGRI.ObjectiveInterface.DrawHUD(self, Canvas); - TargetLocation = KFGRI.ObjectiveInterface.GetIconLocation(); - ThisDot = Normal((TargetLocation + (class'KFPawn_Human'.default.CylinderComponent.CollisionHeight * vect(0, 0, 1))) - ViewLocation) dot ViewVector; + TargetLocation = KFGRI.ObjectiveInterface.GetIconLocation(); + ThisDot = Normal((TargetLocation + (class'KFPawn_Human'.default.CylinderComponent.CollisionHeight * vect(0, 0, 1))) - ViewLocation) dot ViewVector; - if (ThisDot > 0 && - KFGRI.ObjectiveInterface.ShouldShowObjectiveHUD() && - (!KFGRI.ObjectiveInterFace.HasObjectiveDrawDistance() || VSizeSq(TargetLocation - LocActor.Location) < MaxDrawDistanceObjective)) - { - DrawObjectiveHUD(); - } - } - } + if (ThisDot > 0 && + KFGRI.ObjectiveInterface.ShouldShowObjectiveHUD() && + (!KFGRI.ObjectiveInterFace.HasObjectiveDrawDistance() || VSizeSq(TargetLocation - LocActor.Location) < MaxDrawDistanceObjective)) + { + DrawObjectiveHUD(); + } + } + } - Canvas.EnableStencilTest(false); - } + Canvas.EnableStencilTest(false); + } } else if( KFPawn_Monster(PlayerOwner.Pawn)!=None ) { @@ -594,7 +594,7 @@ function DrawHUD() if( !class'ExtPlayerController'.Default.bHideNameBeacons ) { - Canvas.EnableStencilTest(true); + Canvas.EnableStencilTest(true); // Draw zed health bars. foreach WorldInfo.AllPawns(class'KFPawn_Monster', M) { @@ -602,7 +602,7 @@ function DrawHUD() if( ThisDot>0 && ThisDot<8000.f && M.IsAliveAndWell() && M.PlayerReplicationInfo!=None && M!=PlayerOwner.Pawn && (WorldInfo.TimeSeconds - M.Mesh.LastRenderTime) < 0.4f ) DrawFriendlyHUDZ(M); } - Canvas.EnableStencilTest(false); + Canvas.EnableStencilTest(false); } } } @@ -634,10 +634,10 @@ simulated function DrawFriendlyHUDZ( KFPawn_Monster KFPH ) local vector ScreenPos, TargetLocation; local FontRenderInfo MyFontRenderInfo; local float FontScale; - local byte FadeAlpha; + local byte FadeAlpha; MyFontRenderInfo = Canvas.CreateFontRenderInfo( true ); - FadeAlpha = DrawToDistance(KFPH); + FadeAlpha = DrawToDistance(KFPH); BarLength = FMin(PlayerStatusBarLengthMax * (float(Canvas.SizeX) / 1024.f), PlayerStatusBarLengthMax) * FriendlyHudScale; BarHeight = FMin(8.f * (float(Canvas.SizeX) / 1024.f), 8.f) * FriendlyHudScale; @@ -655,10 +655,10 @@ simulated function DrawFriendlyHUDZ( KFPawn_Monster KFPH ) //Draw player name (Top) FontScale = class'KFGameEngine'.Static.GetKFFontScale() * FriendlyHudScale; Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont(); - - Canvas.DrawColor = PlayerBarTextColor; - Canvas.DrawColor.A = FadeAlpha; - + + Canvas.DrawColor = PlayerBarTextColor; + Canvas.DrawColor.A = FadeAlpha; + Canvas.SetPos(ScreenPos.X - (BarLength *0.5f), ScreenPos.Y - BarHeight * 2); Canvas.DrawText( KFPH.PlayerReplicationInfo.PlayerName,,FontScale,FontScale, MyFontRenderInfo ); } @@ -673,8 +673,8 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH ) local float ResModifier; local float PerkIconPosX, PerkIconPosY, SupplyIconPosX, SupplyIconPosY, PerkIconSize; local color CurrentArmorColor, CurrentHealthColor, TextColor; - local string S; - local byte FadeAlpha; + local string S; + local byte FadeAlpha; ResModifier = WorldInfo.static.GetResolutionBasedHUDScale() * FriendlyHudScale; KFPRI = ExtPlayerReplicationInfo(KFPH.PlayerReplicationInfo); @@ -684,7 +684,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH ) return false; } - FadeAlpha = DrawToDistance(KFPH); + FadeAlpha = DrawToDistance(KFPH); MyFontRenderInfo = Canvas.CreateFontRenderInfo( true ); BarLength = FMin(PlayerStatusBarLengthMax * (Canvas.ClipX / 1024.f), PlayerStatusBarLengthMax) * ResModifier; BarHeight = FMin(8.f * (Canvas.ClipX / 1024.f), 8.f) * ResModifier; @@ -701,7 +701,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH ) Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont(); // drop shadow for player name text - S = KFPRI.PlayerName; + S = KFPRI.PlayerName; if( KFPRI.bBot ) { S = S$" (Bot)"; @@ -713,34 +713,34 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH ) TextColor = KFPRI.GetAdminColorC(); } else TextColor = PlayerBarTextColor; - + if( bMeAdmin && KFPRI.FixedData>0 ) { - TextColor = MakeColor(255,0,0,255); + TextColor = MakeColor(255,0,0,255); S @= "-"$KFPRI.GetDesc(); } - - TextColor.A = FadeAlpha; - - Canvas.DrawColor = PlayerBarShadowColor; - Canvas.DrawColor.A = FadeAlpha; + + TextColor.A = FadeAlpha; + + Canvas.DrawColor = PlayerBarShadowColor; + Canvas.DrawColor.A = FadeAlpha; Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f) + 1, ScreenPos.Y + 8); Canvas.DrawText(S, , FontScale, FontScale, MyFontRenderInfo); - Canvas.DrawColor = TextColor; + Canvas.DrawColor = TextColor; Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + 7); Canvas.DrawText(S, , FontScale, FontScale, MyFontRenderInfo); //Draw armor bar Percentage = FMin(float(KFPH.Armor) / float(KFPH.MaxArmor), 100); CurrentArmorColor = ClassicPlayerInfo ? ClassicArmorColor : ArmorColor; - CurrentArmorColor.A = FadeAlpha; + CurrentArmorColor.A = FadeAlpha; DrawPlayerInfoBar(KFPH, Percentage, BarLength, BarHeight, ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight + (36 * FontScale * ResModifier), CurrentArmorColor, FadeAlpha); //Draw health bar Percentage = FMin(float(KFPH.Health) / float(KFPH.HealthMax), 100); CurrentHealthColor = ClassicPlayerInfo ? ClassicHealthColor : HealthColor; - CurrentHealthColor.A = FadeAlpha; + CurrentHealthColor.A = FadeAlpha; DrawPlayerInfoBar(KFPH, Percentage, BarLength, BarHeight, ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight * 2 + (36 * FontScale * ResModifier), CurrentHealthColor, FadeAlpha, true); if( KFPRI.ECurrentPerk == None ) @@ -749,19 +749,19 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH ) } // drop shadow for perk name text - Canvas.DrawColor = PlayerBarShadowColor; - Canvas.DrawColor.A = FadeAlpha; + Canvas.DrawColor = PlayerBarShadowColor; + Canvas.DrawColor.A = FadeAlpha; Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f) + 1, ScreenPos.Y + BarHeight * 3 + (36 * FontScale * ResModifier) + 1); Canvas.DrawText(KFPRI.GetPerkLevelStr()@KFPRI.ECurrentPerk.default.PerkName, , FontScale, FontScale, MyFontRenderInfo); //Draw perk level and name text Canvas.DrawColor = PlayerBarTextColor; - Canvas.DrawColor.A = FadeAlpha; + Canvas.DrawColor.A = FadeAlpha; Canvas.SetPos(ScreenPos.X - (BarLength * 0.5f), ScreenPos.Y + BarHeight * 3 + (36 * FontScale * ResModifier)); Canvas.DrawText(KFPRI.GetPerkLevelStr()@KFPRI.ECurrentPerk.default.PerkName, , FontScale, FontScale, MyFontRenderInfo); // drop shadow for perk icon - Canvas.DrawColor = PlayerBarShadowColor; + Canvas.DrawColor = PlayerBarShadowColor; Canvas.DrawColor.A = FadeAlpha; PerkIconSize = PlayerStatusIconSize * ResModifier; PerkIconPosX = ScreenPos.X - (BarLength * 0.5f) - PerkIconSize + 1; @@ -771,7 +771,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH ) DrawPerkIcons(KFPH, PerkIconSize, PerkIconPosX, PerkIconPosY, SupplyIconPosX, SupplyIconPosY, true); //draw perk icon - Canvas.DrawColor = PlayerBarIconColor; + Canvas.DrawColor = PlayerBarIconColor; Canvas.DrawColor.A = FadeAlpha; PerkIconPosX = ScreenPos.X - (BarLength * 0.5f) - PerkIconSize; PerkIconPosY = ScreenPos.Y + (36 * FontScale * ResModifier); @@ -785,7 +785,7 @@ simulated final function DrawPlayerInfoBar( KFPawn P, float BarPercentage, float { //background for status bar Canvas.DrawColor = PlayerBarBGColor; - Canvas.DrawColor.A = FadeAlpha; + Canvas.DrawColor.A = FadeAlpha; Canvas.SetPos(XPos, YPos); Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength, BarHeight, 0, 0, 32, 32); @@ -796,7 +796,7 @@ simulated final function DrawPlayerInfoBar( KFPawn P, float BarPercentage, float //Forground for status bar. Canvas.DrawColor = BarColor; - Canvas.DrawColor.A = FadeAlpha; + Canvas.DrawColor.A = FadeAlpha; Canvas.SetPos(XPos, YPos); Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32); @@ -806,7 +806,7 @@ simulated final function DrawPlayerInfoBar( KFPawn P, float BarPercentage, float XPos+=(BarLength * BarPercentage); BarPercentage = FMin(float(ExtHumanPawn(P).RepRegenHP) / float(P.HealthMax),1.f-BarPercentage); - Canvas.DrawColor = MakeColor(255,128,128,FadeAlpha); + Canvas.DrawColor = MakeColor(255,128,128,FadeAlpha); Canvas.SetPos(XPos, YPos); Canvas.DrawTileStretched(PlayerStatusBarBGTexture, BarLength * BarPercentage, BarHeight, 0, 0, 32, 32); } @@ -884,13 +884,13 @@ simulated function DrawMonsterHUD( KFPawn KFPH ) local Ext_T_MonsterPRI PRI; local FontRenderInfo MyFontRenderInfo; local float FontScale; - local byte FadeAlpha; + local byte FadeAlpha; PRI = Ext_T_MonsterPRI(KFPH.PlayerReplicationInfo); if( PRI==None ) return; - FadeAlpha = DrawToDistance(KFPH); + FadeAlpha = DrawToDistance(KFPH); MyFontRenderInfo = Canvas.CreateFontRenderInfo( true ); BarLength = FMin(PlayerStatusBarLengthMax * (float(Canvas.SizeX) / 1024.f), PlayerStatusBarLengthMax) * FriendlyHudScale; @@ -964,73 +964,73 @@ simulated function DrawPetInfo() function byte DrawToDistance(Actor A, optional float StartAlpha=255.f, optional float MinAlpha=90.f) { - local float Dist, fZoom; + local float Dist, fZoom; - Dist = VSize(A.Location - PLCameraLoc); - if ( Dist <= HealthBarFullVisDist || PlayerOwner.PlayerReplicationInfo.bOnlySpectator ) - fZoom = 1.0; - else fZoom = FMax(1.0 - (Dist - HealthBarFullVisDist) / (HealthBarCutoffDist - HealthBarFullVisDist), 0.0); - - return Clamp(StartAlpha * fZoom, MinAlpha, StartAlpha); + Dist = VSize(A.Location - PLCameraLoc); + if ( Dist <= HealthBarFullVisDist || PlayerOwner.PlayerReplicationInfo.bOnlySpectator ) + fZoom = 1.0; + else fZoom = FMax(1.0 - (Dist - HealthBarFullVisDist) / (HealthBarCutoffDist - HealthBarFullVisDist), 0.0); + + return Clamp(StartAlpha * fZoom, MinAlpha, StartAlpha); } final function AddNumberMsg( int Amount, vector Pos, byte Type ) { - local Color C; + local Color C; - DamagePopups[NextDamagePopupIndex].Damage = Amount; - DamagePopups[NextDamagePopupIndex].HitTime = WorldInfo.TimeSeconds; - DamagePopups[NextDamagePopupIndex].Type = Type; - DamagePopups[NextDamagePopupIndex].HitLocation = Pos; - //ser random speed of fading out, so multiple damages in the same hit location don't overlap each other - DamagePopups[NextDamagePopupIndex].RandX = 2.0 * FRand(); - DamagePopups[NextDamagePopupIndex].RandY = 1.0 + FRand(); + DamagePopups[NextDamagePopupIndex].Damage = Amount; + DamagePopups[NextDamagePopupIndex].HitTime = WorldInfo.TimeSeconds; + DamagePopups[NextDamagePopupIndex].Type = Type; + DamagePopups[NextDamagePopupIndex].HitLocation = Pos; + //ser random speed of fading out, so multiple damages in the same hit location don't overlap each other + DamagePopups[NextDamagePopupIndex].RandX = 2.0 * FRand(); + DamagePopups[NextDamagePopupIndex].RandY = 1.0 + FRand(); - C.A = 255; - if ( Type == 0 && Amount < 100 ) { - C.R = 220; - C.G = 0; - C.B = 0; - } + C.A = 255; + if ( Type == 0 && Amount < 100 ) { + C.R = 220; + C.G = 0; + C.B = 0; + } else if ( Type == 1 ) { - C.R = 255; - C.G = 255; - C.B = 25; - } - else if ( Type == 2 ) { - C.R = 32; - C.G = 240; - C.B = 32; - } - else if ( Amount >= 300 ) { - C.R = 0; - C.G = 206; - C.B = 0; - } - else if ( Amount >= 100 ) { - C.R = 206; - C.G = 206; - C.B = 0; - } - else { - C.R = 127; - C.G = 127; - C.B = 127; - } - DamagePopups[NextDamagePopupIndex].FontColor = C; + C.R = 255; + C.G = 255; + C.B = 25; + } + else if ( Type == 2 ) { + C.R = 32; + C.G = 240; + C.B = 32; + } + else if ( Amount >= 300 ) { + C.R = 0; + C.G = 206; + C.B = 0; + } + else if ( Amount >= 100 ) { + C.R = 206; + C.G = 206; + C.B = 0; + } + else { + C.R = 127; + C.G = 127; + C.B = 127; + } + DamagePopups[NextDamagePopupIndex].FontColor = C; - if( ++NextDamagePopupIndex >= DAMAGEPOPUP_COUNT) - NextDamagePopupIndex=0; + if( ++NextDamagePopupIndex >= DAMAGEPOPUP_COUNT) + NextDamagePopupIndex=0; } final function DrawDamage() { - local int i; - local float TimeSinceHit; - local vector CameraLocation, CamDir; - local rotator CameraRotation; - local vector HBScreenPos; - local float TextWidth, TextHeight, x, Sc; + local int i; + local float TimeSinceHit; + local vector CameraLocation, CamDir; + local rotator CameraRotation; + local vector HBScreenPos; + local float TextWidth, TextHeight, x, Sc; local string S; Canvas.Font = class'Engine'.Static.GetMediumFont(); @@ -1039,12 +1039,12 @@ final function DrawDamage() KFPlayerController(Owner).GetPlayerViewPoint(CameraLocation, CameraRotation); CamDir = vector(CameraRotation); - for( i=0; i < DAMAGEPOPUP_COUNT ; i++ ) + for( i=0; i < DAMAGEPOPUP_COUNT ; i++ ) { - TimeSinceHit = WorldInfo.TimeSeconds - DamagePopups[i].HitTime; - if( TimeSinceHit > DamagePopupFadeOutTime - || ( Normal(DamagePopups[i].HitLocation - CameraLocation) dot Normal(CamDir) < 0.1 ) ) //don't draw if player faced back to the hit location - continue; + TimeSinceHit = WorldInfo.TimeSeconds - DamagePopups[i].HitTime; + if( TimeSinceHit > DamagePopupFadeOutTime + || ( Normal(DamagePopups[i].HitLocation - CameraLocation) dot Normal(CamDir) < 0.1 ) ) //don't draw if player faced back to the hit location + continue; switch( DamagePopups[i].Type ) { @@ -1059,27 +1059,27 @@ final function DrawDamage() break; } - HBScreenPos = Canvas.Project(DamagePopups[i].HitLocation); + HBScreenPos = Canvas.Project(DamagePopups[i].HitLocation); Canvas.TextSize(S,TextWidth,TextHeight,Sc,Sc); - //draw just on the hit location - HBScreenPos.Y -= TextHeight/2; - HBScreenPos.X -= TextWidth/2; + //draw just on the hit location + HBScreenPos.Y -= TextHeight/2; + HBScreenPos.X -= TextWidth/2; - //let numbers to fly up - HBScreenPos.Y -= TimeSinceHit * TextHeight * DamagePopups[i].RandY; - x = Sin(2*Pi * TimeSinceHit/DamagePopupFadeOutTime) * TextWidth * DamagePopups[i].RandX; - // odd numbers start to flying to the right side, even - left - // So in situations of decapitaion player could see both damages - if ( i % 2 == 0) - x *= -1.0; - HBScreenPos.X += x; + //let numbers to fly up + HBScreenPos.Y -= TimeSinceHit * TextHeight * DamagePopups[i].RandY; + x = Sin(2*Pi * TimeSinceHit/DamagePopupFadeOutTime) * TextWidth * DamagePopups[i].RandX; + // odd numbers start to flying to the right side, even - left + // So in situations of decapitaion player could see both damages + if ( i % 2 == 0) + x *= -1.0; + HBScreenPos.X += x; - Canvas.DrawColor = DamagePopups[i].FontColor; - Canvas.DrawColor.A = 255 * Cos(0.5*Pi * TimeSinceHit/DamagePopupFadeOutTime); + Canvas.DrawColor = DamagePopups[i].FontColor; + Canvas.DrawColor.A = 255 * Cos(0.5*Pi * TimeSinceHit/DamagePopupFadeOutTime); - Canvas.SetPos( HBScreenPos.X, HBScreenPos.Y); - Canvas.DrawText( S ); - } + Canvas.SetPos( HBScreenPos.X, HBScreenPos.Y); + Canvas.DrawText( S ); + } } // Search for new inventory! diff --git a/ServerExt/Classes/KFGUI_Button_CD.uc b/ServerExt/Classes/KFGUI_Button_CD.uc index ee2edc9..729d11c 100644 --- a/ServerExt/Classes/KFGUI_Button_CD.uc +++ b/ServerExt/Classes/KFGUI_Button_CD.uc @@ -17,8 +17,8 @@ function DrawMenu() if( bIsHighlighted ) { Canvas.DrawColor.R = Min(Canvas.DrawColor.R + 25, FrameOpacity); - Canvas.DrawColor.G = Min(Canvas.DrawColor.G + 25, FrameOpacity); - Canvas.DrawColor.B = Min(Canvas.DrawColor.B + 25, FrameOpacity); + Canvas.DrawColor.G = Min(Canvas.DrawColor.G + 25, FrameOpacity); + Canvas.DrawColor.B = Min(Canvas.DrawColor.B + 25, FrameOpacity); } Canvas.SetPos(0.f,0.f); diff --git a/ServerExt/Classes/KFPawn_ZedSirenX.uc b/ServerExt/Classes/KFPawn_ZedSirenX.uc index 41b1d44..da88085 100644 --- a/ServerExt/Classes/KFPawn_ZedSirenX.uc +++ b/ServerExt/Classes/KFPawn_ZedSirenX.uc @@ -2,7 +2,7 @@ class KFPawn_ZedSirenX extends KFPawn_ZedSiren; function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab) { - return false; + return false; } defaultproperties diff --git a/ServerExt/Classes/MS_Game.uc b/ServerExt/Classes/MS_Game.uc index 871a3e6..0c54e94 100644 --- a/ServerExt/Classes/MS_Game.uc +++ b/ServerExt/Classes/MS_Game.uc @@ -5,8 +5,8 @@ event Timer(); event InitGame( string Options, out string ErrorMessage ) { - MaxPlayers = 99; - MaxSpectators = 99; + MaxPlayers = 99; + MaxSpectators = 99; class'MS_TMPUI'.Static.Remove(); } diff --git a/ServerExt/Classes/UI_Scoreboard_CD.uc b/ServerExt/Classes/UI_Scoreboard_CD.uc index efae702..a2913c8 100644 --- a/ServerExt/Classes/UI_Scoreboard_CD.uc +++ b/ServerExt/Classes/UI_Scoreboard_CD.uc @@ -33,70 +33,70 @@ function InitMenu() static final function string FormatTimeSMH (float Sec) { - local int Hours, Seconds, Minutes; + local int Hours, Seconds, Minutes; - Sec = Abs (Sec); - Seconds = int (Sec); - Minutes = Seconds / 60; - Seconds -= Minutes * 60; - Hours = Minutes / 60; + Sec = Abs (Sec); + Seconds = int (Sec); + Minutes = Seconds / 60; + Seconds -= Minutes * 60; + Hours = Minutes / 60; - return ((Hours < 1) ? "0" $Hours : string (Hours)) @":" @((Minutes < 10) ? "0" $Minutes : string (Minutes)) @":" @((Seconds < 10) ? "0" $Seconds : string (Seconds)); + return ((Hours < 1) ? "0" $Hours : string (Hours)) @":" @((Minutes < 10) ? "0" $Minutes : string (Minutes)) @":" @((Seconds < 10) ? "0" $Seconds : string (Seconds)); } function DrawMenu() { - local string S; - local PlayerController PC; - local PlayerReplicationInfo PRI; - local ExtPlayerReplicationInfo KFPRI; - local float XPos, YPos, XL, YL, FontScalar, XPosCenter, CurrentBoxY; - local int i, j, NumSpec, NumPlayer, NumAlivePlayer, Width, NotShownCount; + local string S; + local PlayerController PC; + local PlayerReplicationInfo PRI; + local ExtPlayerReplicationInfo KFPRI; + local float XPos, YPos, XL, YL, FontScalar, XPosCenter, CurrentBoxY; + local int i, j, NumSpec, NumPlayer, NumAlivePlayer, Width, NotShownCount; local byte DefFont; - PC = GetPlayer (); - if (KFGRI == None) { - KFGRI = KFGameReplicationInfo (PC.WorldInfo.GRI); - if (KFGRI == None) - return; - } + PC = GetPlayer (); + if (KFGRI == None) { + KFGRI = KFGameReplicationInfo (PC.WorldInfo.GRI); + if (KFGRI == None) + return; + } - // Sort player list. - for (i = (KFGRI.PRIArray.Length - 1); i > 0; --i) { - for (j = i - 1; j >= 0; --j) { - if (!InOrder (KFGRI.PRIArray [i], KFGRI.PRIArray [j])) { - PRI = KFGRI.PRIArray [i]; - KFGRI.PRIArray [i] = KFGRI.PRIArray [j]; - KFGRI.PRIArray [j] = PRI; - } - } - } + // Sort player list. + for (i = (KFGRI.PRIArray.Length - 1); i > 0; --i) { + for (j = i - 1; j >= 0; --j) { + if (!InOrder (KFGRI.PRIArray [i], KFGRI.PRIArray [j])) { + PRI = KFGRI.PRIArray [i]; + KFGRI.PRIArray [i] = KFGRI.PRIArray [j]; + KFGRI.PRIArray [j] = PRI; + } + } + } - // Check players. - NumPlayer = 0; - for (i = (KFGRI.PRIArray.Length - 1); i >= 0; --i) { - KFPRI = ExtPlayerReplicationInfo (KFGRI.PRIArray [i]); - if (KFPRI == None) - continue; + // Check players. + NumPlayer = 0; + for (i = (KFGRI.PRIArray.Length - 1); i >= 0; --i) { + KFPRI = ExtPlayerReplicationInfo (KFGRI.PRIArray [i]); + if (KFPRI == None) + continue; - if (KFPRI.bOnlySpectator) { - ++NumSpec; - continue; - } + if (KFPRI.bOnlySpectator) { + ++NumSpec; + continue; + } - if (KFPRI.PlayerHealth > 0 && KFPRI.PlayerHealthPercent > 0 && KFPRI.GetTeamNum () == 0) - ++NumAlivePlayer; - ++NumPlayer; - } + if (KFPRI.PlayerHealth > 0 && KFPRI.PlayerHealthPercent > 0 && KFPRI.GetTeamNum () == 0) + ++NumAlivePlayer; + ++NumPlayer; + } - //`Log ("DrawMenu (): PlayList.Length = " @PRIList.Length); + //`Log ("DrawMenu (): PlayList.Length = " @PRIList.Length); - // Header font info. + // Header font info. DefFont = Owner.CurrentStyle.DefaultFontSize; - Canvas.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar); + Canvas.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar); - YL = Owner.CurrentStyle.DefaultHeight; - XPosCenter = (Canvas.ClipX * 0.5); + YL = Owner.CurrentStyle.DefaultHeight; + XPosCenter = (Canvas.ClipX * 0.5); // ServerName @@ -282,7 +282,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa bFocus = bFocus || (bHasSelectedPlayer && RightClickPlayer==KFPRI); DefFont = Owner.CurrentStyle.DefaultFontSize; - C.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar); + C.Font = Owner.CurrentStyle.PickFont(DefFont, FontScalar); if (KFPRI == GetPlayer().PlayerReplicationInfo) { diff --git a/ServerExt/Classes/VSZombie.uc b/ServerExt/Classes/VSZombie.uc index b4d6d31..fa78034 100644 --- a/ServerExt/Classes/VSZombie.uc +++ b/ServerExt/Classes/VSZombie.uc @@ -431,7 +431,7 @@ function bool DoJump( bool bUpdating ) // Nope. function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab) { - return false; + return false; } // UI stuff. diff --git a/ServerExt/Classes/VS_ZedClotBase.uc b/ServerExt/Classes/VS_ZedClotBase.uc index d1a6807..960d15e 100644 --- a/ServerExt/Classes/VS_ZedClotBase.uc +++ b/ServerExt/Classes/VS_ZedClotBase.uc @@ -8,7 +8,7 @@ simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp) if( bCanHeadTrack ) { IK_Look_Head = SkelControlLookAt(Mesh.FindSkelControl('HeadLook')); - //IK_Look_Spine = SkelControlLookAt(Mesh.FindSkelControl('SpineLook')); + //IK_Look_Spine = SkelControlLookAt(Mesh.FindSkelControl('SpineLook')); } } diff --git a/ServerExt/Classes/VS_ZedRecentZed.uc b/ServerExt/Classes/VS_ZedRecentZed.uc index 4e47100..f6356f2 100644 --- a/ServerExt/Classes/VS_ZedRecentZed.uc +++ b/ServerExt/Classes/VS_ZedRecentZed.uc @@ -82,7 +82,7 @@ simulated function SetCharacterAnimationInfo() // Keep monster animations. M = KFCharacterInfo_Monster'ZED_ARCH.ZED_Clot_UnDev_Archetype'; - Mesh.AnimSets = M.AnimSets; + Mesh.AnimSets = M.AnimSets; if ( Mesh.AnimTreeTemplate != M.AnimTreeTemplate ) Mesh.SetAnimTreeTemplate(M.AnimTreeTemplate); if ( M.AnimArchetype != None ) @@ -100,7 +100,7 @@ simulated function SetCharacterArch(KFCharacterInfoBase Info, optional bool bFor { local KFPlayerReplicationInfo KFPRI; - KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo ); + KFPRI = KFPlayerReplicationInfo( PlayerReplicationInfo ); if (Info != CharacterArch) { // Set Family Info diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index c3e7591..c2d5e4f 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -545,30 +545,30 @@ function AddMutator(Mutator M) function bool IsFromMod(Object O) { - local string PackageName; - - if( O == None ) - return false; - - PackageName = string(O.GetPackageName()); - if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0) - { - PackageName = string(O); - if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0) - return false; - } - - return true; + local string PackageName; + + if( O == None ) + return false; + + PackageName = string(O.GetPackageName()); + if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0) + { + PackageName = string(O); + if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0) + return false; + } + + return true; } function ScoreKill(Controller Killer, Controller Killed) { local KFPawn_Monster KFM; - local int i, j; - local KFPlayerReplicationInfo DamagerKFPRI; - local float XP; - local KFPerk InstigatorPerk; - local bool cont; + local int i, j; + local KFPlayerReplicationInfo DamagerKFPRI; + local float XP; + local KFPerk InstigatorPerk; + local bool cont; local KFPlayerController KFPC; local ExtPerkManager KillersPerk; @@ -583,64 +583,64 @@ function ScoreKill(Controller Killer, Controller Killed) if( bKillMessages && Killer.PlayerReplicationInfo!=None ) BroadcastKillMessage(Killed.Pawn,Killer); if( KFM.DamageHistory.Length > 0 ) - { - for( i = 0; i