diff --git a/Engine/Classes/PlayerController.uc b/Engine/Classes/PlayerController.uc index 00faf02..031bd03 100644 --- a/Engine/Classes/PlayerController.uc +++ b/Engine/Classes/PlayerController.uc @@ -7480,6 +7480,9 @@ final function UIInteraction GetUIController() */ native final function bool IsPlayerMuted(const out UniqueNetId Sender); +native final function bool IsClientMinimized(); +native final function bool IsClientInForeground(); + `if(`__TW_) native final function bool ShouldReplicateVoicePacketFrom(const out UniqueNetId Sender); native final function bool ShouldReplicateVoicePacketTo(const out UniqueNetId Receiver); diff --git a/KFGame/Classes/KFDT_GoompaStomp.uc b/KFGame/Classes/KFDT_GoompaStomp.uc index 7175735..e58c45c 100644 --- a/KFGame/Classes/KFDT_GoompaStomp.uc +++ b/KFGame/Classes/KFDT_GoompaStomp.uc @@ -21,4 +21,6 @@ defaultproperties ObliterationHealthThreshold = 0 ObliterationDamageThreshold = 1 bIgnoreAggroOnDamage=true + + bAnyPerk = true } diff --git a/KFGame/Classes/KFDT_Toxic_HRG_Locust.uc b/KFGame/Classes/KFDT_Toxic_HRG_Locust.uc index 7f24ec9..ed9b584 100644 --- a/KFGame/Classes/KFDT_Toxic_HRG_Locust.uc +++ b/KFGame/Classes/KFDT_Toxic_HRG_Locust.uc @@ -33,4 +33,6 @@ defaultproperties WeaponDef=class'KFWeapDef_HRG_Locust' SpreadOnTouchDamage=25 + + SelfDamageReductionValue=0.f } \ No newline at end of file diff --git a/KFGame/Classes/KFDamageType.uc b/KFGame/Classes/KFDamageType.uc index a748f91..b5537f1 100644 --- a/KFGame/Classes/KFDamageType.uc +++ b/KFGame/Classes/KFDamageType.uc @@ -248,6 +248,9 @@ var bool bCanEnrage; // If applies radial impulse an it affect the affliction power as well? var bool bCanApplyRadialCalculationtoAffliction; +/** Reduction for the amount of damage dealt to the instigator */ +var float SelfDamageReductionValue; + /** * Take the primary HitDirection and modify it to add more spread. * Use the BloodSpread property to calculate the spread amount @@ -478,4 +481,6 @@ Defaultproperties bCanEnrage=true bCanApplyRadialCalculationtoAffliction=true + + SelfDamageReductionValue = 1.0f } \ No newline at end of file diff --git a/KFGame/Classes/KFDoorActor.uc b/KFGame/Classes/KFDoorActor.uc index 1468442..e9d74f4 100644 --- a/KFGame/Classes/KFDoorActor.uc +++ b/KFGame/Classes/KFDoorActor.uc @@ -605,7 +605,7 @@ simulated private function OpenSwingingDoor(Pawn P) } /** To close the door, just reverse the animation */ -simulated private function CloseDoor() +simulated function CloseDoor() { if( bIsDestroyed || !bLocalIsDoorOpen || !bCanCloseDoor) { diff --git a/KFGame/Classes/KFDroppedPickup.uc b/KFGame/Classes/KFDroppedPickup.uc index 0b11e53..93ea593 100644 --- a/KFGame/Classes/KFDroppedPickup.uc +++ b/KFGame/Classes/KFDroppedPickup.uc @@ -390,6 +390,9 @@ function GiveTo(Pawn P) local KFInventoryManager KFIM; local KFGameReplicationInfo KFGRI; local class NewInventoryClass; + local bool bIsSecondaryPistol; + local bool bIs9mmInInventory; + local bool bIsHRG93InInventory; NewInventoryClass = InventoryClass; @@ -404,28 +407,42 @@ function GiveTo(Pawn P) KFIM = KFInventoryManager(P.InvManager); if (KFIM != None) { - if (KFIM.Is9mmInInventory()) + bIsSecondaryPistol = InventoryClass.name == 'KFWeap_HRG_93R' || + InventoryClass.name == 'KFWeap_HRG_93R_Dual' || + InventoryClass.name == 'KFWeap_Pistol_9mm' || + InventoryClass.name == 'KFWeap_Pistol_Dual9mm'; + + if (bIsSecondaryPistol) { - if (InventoryClass.name == 'KFWeap_HRG_93R') + bIs9mmInInventory = KFIM.Is9mmInInventory(); + bIsHRG93InInventory = KFIM.IsHRG93InInventory(); + if (!(bIs9mmInInventory && bIsHRG93InInventory)) { - NewInventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mm'.default.WeaponClassPath, class'Class')); - } - else if (InventoryClass.name == 'KFWeap_HRG_93R_Dual') - { - NewInventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mmDual'.default.WeaponClassPath, class'Class')); - } - } - else - { - if(InventoryClass.name == 'KFWeap_Pistol_9mm') - { - NewInventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R'.default.WeaponClassPath, class'Class')); - } - else if (InventoryClass.name == 'KFWeap_Pistol_Dual9mm') - { - NewInventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R_Dual'.default.WeaponClassPath, class'Class')); + if (bIs9mmInInventory) + { + if (InventoryClass.name == 'KFWeap_HRG_93R') + { + NewInventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mm'.default.WeaponClassPath, class'Class')); + } + else if (InventoryClass.name == 'KFWeap_HRG_93R_Dual') + { + NewInventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mmDual'.default.WeaponClassPath, class'Class')); + } + } + else + { + if(InventoryClass.name == 'KFWeap_Pistol_9mm') + { + NewInventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R'.default.WeaponClassPath, class'Class')); + } + else if (InventoryClass.name == 'KFWeap_Pistol_Dual9mm') + { + NewInventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R_Dual'.default.WeaponClassPath, class'Class')); + } + } } } + KFWInvClass = class(NewInventoryClass); foreach KFIM.InventoryActors(class'KFWeapon', KFW) diff --git a/KFGame/Classes/KFGFxHUD_ObjectiveConatiner.uc b/KFGame/Classes/KFGFxHUD_ObjectiveConatiner.uc index 23b8349..3a14fa8 100644 --- a/KFGame/Classes/KFGFxHUD_ObjectiveConatiner.uc +++ b/KFGame/Classes/KFGFxHUD_ObjectiveConatiner.uc @@ -145,18 +145,12 @@ simulated function SetActive(bool bActive) function SetCompleted(bool bComplete) { local GFxObject DataObject; - local KFGameReplicationInfo KFGRI; - KFGRI=KFGameReplicationInfo(KFPC.WorldInfo.GRI); + DataObject = CreateObject("Object"); - if (KFGRI.IsContaminationMode() == false) - { - DataObject = CreateObject("Object"); - - DataObject.SetBool("bComplete", bComplete); - DataObject.SetString("completeString", bComplete ? Localize("Objectives", "SuccessString", "KFGame") : ""); - SetObject("completeStatus", DataObject); - } + DataObject.SetBool("bComplete", bComplete); + DataObject.SetString("completeString", bComplete ? Localize("Objectives", "SuccessString", "KFGame") : ""); + SetObject("completeStatus", DataObject); if (!bComplete) { @@ -272,15 +266,6 @@ function ClearObjectiveUI() //pass a value from 0-1 function SetCurrentProgress(float CurrentProgress) { - local KFGameReplicationInfo KFGRI; - - KFGRI=KFGameReplicationInfo(KFPC.WorldInfo.GRI); - - if (KFGRI.IsContaminationMode()) - { - return; - } - if (LastProgress != CurrentProgress) { CurrentProgress = FClamp(CurrentProgress, 0, 1); diff --git a/KFGame/Classes/KFGFxHUD_PlayerBackpack.uc b/KFGame/Classes/KFGFxHUD_PlayerBackpack.uc index ea689b9..175bac5 100644 --- a/KFGame/Classes/KFGFxHUD_PlayerBackpack.uc +++ b/KFGame/Classes/KFGFxHUD_PlayerBackpack.uc @@ -366,4 +366,5 @@ DefaultProperties LastWeight=-1 bLastDoshVisibility=true LastGrenadeIndex=0 + LastSecondaryAmmo=255 } diff --git a/KFGame/Classes/KFGFxMenu_Inventory.uc b/KFGame/Classes/KFGFxMenu_Inventory.uc index 33055a0..2c654cd 100644 --- a/KFGame/Classes/KFGFxMenu_Inventory.uc +++ b/KFGame/Classes/KFGFxMenu_Inventory.uc @@ -157,7 +157,7 @@ struct InventoryHelper var bool IsKey; }; -struct WeaponSkinListCacheState +struct GenericCacheState { var array SearchCache; @@ -165,27 +165,19 @@ struct WeaponSkinListCacheState var bool NeedToRegenerate; - var EInventoryWeaponType_Filter WeaponTypeFilter; - var int PerkIndexFilter; - var ItemRarity RarityFilter; - structdefaultproperties { NeedToRegenerate = false - - WeaponTypeFilter = EInvWT_None - PerkIndexFilter = 0 - RarityFilter = ITR_NONE } }; -var WeaponSkinListCacheState WeaponSkinListCache; +var GenericCacheState WeaponSkinListCache; -var array CosmeticSkinListSearchCache; +var GenericCacheState CosmeticSkinListCache; -var array CraftingListSearchCache; +var GenericCacheState CraftingListCache; -var array ItemListSearchCache; +var GenericCacheState ItemListCache; struct ByTypeItemsHelper { @@ -460,13 +452,12 @@ function InitInventory() HelperItem.ItemDefinition = onlineSub.CurrentInventory[i].Definition; HelperItem.ItemCount = onlineSub.CurrentInventory[i].Quantity; - if (TempItemDetailsHolder.Type == ITP_WeaponSkin) + switch (TempItemDetailsHolder.Type) { - HelperItem.Rarity = TempItemDetailsHolder.Rarity; - HelperItem.Quality = TempItemDetailsHolder.Quality; - + case ITP_WeaponSkin: if (bool(OnlineSub.CurrentInventory[i].NewlyAdded)) { + // We need to sort again WeaponSkinListCache.NeedToRegenerate = true; } @@ -477,12 +468,17 @@ function InitInventory() if (ItemID != INDEX_NONE) { + HelperItem.Rarity = WeaponSkinListCache.SearchCache[ItemID].Rarity; + HelperItem.Quality = WeaponSkinListCache.SearchCache[ItemID].Quality; HelperItem.WeaponDef = WeaponSkinListCache.SearchCache[ItemID].WeaponDef; HelperItem.Price = WeaponSkinListCache.SearchCache[ItemID].Price; HelperItem.SkinType = WeaponSkinListCache.SearchCache[ItemID].SkinType; } else { + HelperItem.Rarity = TempItemDetailsHolder.Rarity; + HelperItem.Quality = TempItemDetailsHolder.Quality; + // Skin Type // Get right part of the string without from the first "| " @@ -513,17 +509,24 @@ function InitInventory() WeaponSkinListCache.SearchCache.AddItem(HelperItem); } - } - else if (TempItemDetailsHolder.Type == ITP_CharacterSkin) - { + + break; + + case ITP_CharacterSkin: + if (bool(OnlineSub.CurrentInventory[i].NewlyAdded)) + { + // We need to sort again + CosmeticSkinListCache.NeedToRegenerate = true; + } + // Search on the cache, to speed up - ItemID = CosmeticSkinListSearchCache.Find('ItemDefinition', HelperItem.ItemDefinition); + ItemID = CosmeticSkinListCache.SearchCache.Find('ItemDefinition', HelperItem.ItemDefinition); if (ItemID != INDEX_NONE) { - HelperItem.Rarity = CosmeticSkinListSearchCache[ItemID].Rarity; - HelperItem.CosmeticType = CosmeticSkinListSearchCache[ItemID].CosmeticType; - HelperItem.SkinType = CosmeticSkinListSearchCache[ItemID].SkinType; + HelperItem.Rarity = CosmeticSkinListCache.SearchCache[ItemID].Rarity; + HelperItem.CosmeticType = CosmeticSkinListCache.SearchCache[ItemID].CosmeticType; + HelperItem.SkinType = CosmeticSkinListCache.SearchCache[ItemID].SkinType; } else { @@ -561,18 +564,25 @@ function InitInventory() HelperItem.SkinType = CrC(SkinType); } - CosmeticSkinListSearchCache.AddItem(HelperItem); + CosmeticSkinListCache.SearchCache.AddItem(HelperItem); } - } - else if (TempItemDetailsHolder.Type == ITP_CraftingComponent) - { - ItemId = CraftingListSearchCache.Find('ItemDefinition', HelperItem.ItemDefinition); + + break; + + case ITP_CraftingComponent: + if (bool(OnlineSub.CurrentInventory[i].NewlyAdded)) + { + // We need to sort again + CraftingListCache.NeedToRegenerate = true; + } + + ItemId = CraftingListCache.SearchCache.Find('ItemDefinition', HelperItem.ItemDefinition); if (ItemID != INDEX_NONE) { - HelperItem.CraftingType = CraftingListSearchCache[ItemID].CraftingType; - HelperItem.CraftingRarity = CraftingListSearchCache[ItemID].CraftingRarity; - HelperItem.CraftingTicketType = CraftingListSearchCache[ItemID].CraftingTicketType; + HelperItem.CraftingType = CraftingListCache.SearchCache[ItemID].CraftingType; + HelperItem.CraftingRarity = CraftingListCache.SearchCache[ItemID].CraftingRarity; + HelperItem.CraftingTicketType = CraftingListCache.SearchCache[ItemID].CraftingTicketType; } else { @@ -674,16 +684,23 @@ function InitInventory() } } - CraftingListSearchCache.AddItem(HelperItem); + CraftingListCache.SearchCache.AddItem(HelperItem); } - } - else if (TempItemDetailsHolder.Type == ITP_KeyCrate) - { - ItemId = ItemListSearchCache.Find('ItemDefinition', HelperItem.ItemDefinition); + + break; + + case ITP_KeyCrate: + if (bool(OnlineSub.CurrentInventory[i].NewlyAdded)) + { + // We need to sort again + ItemListCache.NeedToRegenerate = true; + } + + ItemId = ItemListCache.SearchCache.Find('ItemDefinition', HelperItem.ItemDefinition); if (ItemID != INDEX_NONE) { - HelperItem.IsKey = ItemListSearchCache[ItemID].IsKey; + HelperItem.IsKey = ItemListCache.SearchCache[ItemID].IsKey; } else { @@ -705,11 +722,14 @@ function InitInventory() HelperItem.IsKey = false; } - ItemListSearchCache.AddItem(HelperItem); + ItemListCache.SearchCache.AddItem(HelperItem); } + + break; } ByTypeItems[TempItemDetailsHolder.Type].ItemsOnType.AddItem(HelperItem); + HelperIndex = ByTypeItems[TempItemDetailsHolder.Type].ItemsOnType.Length - 1; } else @@ -757,37 +777,108 @@ function InitInventory() if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_WeaponSkins) { - // If need to refresh... we regenerate the list, if not reuse our Cache + // Cache for Weapon Skin List only if no more filters are used, the reordering for those should be fast enough - if (WeaponSkinListCache.NeedToRegenerate - || WeaponSkinListCache.WeaponTypeFilter != CurrentWeaponTypeFilter - || WeaponSkinListCache.PerkIndexFilter != CurrentPerkIndexFilter - || WeaponSkinListCache.RarityFilter != CurrentRarityFilter - || ByTypeItems[ITP_WeaponSkin].ItemsOnType.Length != WeaponSkinListCache.OrderedCache.Length) + if (CurrentWeaponTypeFilter == EInvWT_None + && CurrentPerkIndexFilter == KFPC.PerkList.Length + && CurrentRarityFilter == ITR_NONE) { - WeaponSkinListCache.NeedToRegenerate = false; + if (WeaponSkinListCache.NeedToRegenerate + || ByTypeItems[ITP_WeaponSkin].ItemsOnType.Length != WeaponSkinListCache.OrderedCache.Length) + { + WeaponSkinListCache.NeedToRegenerate = false; - WeaponSkinListCache.WeaponTypeFilter = CurrentWeaponTypeFilter; - WeaponSkinListCache.PerkIndexFilter = CurrentPerkIndexFilter; - WeaponSkinListCache.RarityFilter = CurrentRarityFilter; + ByTypeItems[ITP_WeaponSkin].ItemsOnType.Sort(SortWeaponSkinList); - // We want to order by Price - Weapon Def - Rarity - Quality + WeaponSkinListCache.OrderedCache = ByTypeItems[ITP_WeaponSkin].ItemsOnType; + /*`Log("----------"); + + for (i = 0 ; i < ByTypeItems[ITP_WeaponSkin].ItemsOnType.Length; i++) + { + `Log("ID : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].ItemDefinition); + `Log("Weapon Def : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].WeaponDef); + `Log("Price : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].Price); + `Log("Full Name : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].FullName); + `Log("Skin : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].SkinType); + `Log("Rarity : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].Rarity); + `Log("Quality : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].Quality); + `Log("----------"); + } + + `Log("----------");*/ + } + else + { + //`Log("USING WEAPON SKIN LIST CACHE!!!"); + + ByTypeItems[ITP_WeaponSkin].ItemsOnType = WeaponSkinListCache.OrderedCache; + } + } + else + { ByTypeItems[ITP_WeaponSkin].ItemsOnType.Sort(SortWeaponSkinList); + } + } - WeaponSkinListCache.OrderedCache = ByTypeItems[ITP_WeaponSkin].ItemsOnType; + if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_Cosmetics) + { + // Cache for Cosmetic Skin List only if no more filters are used, the reordering for those should be fast enough + + if (CurrentRarityFilter == ITR_NONE) + { + if (CosmeticSkinListCache.NeedToRegenerate + || ByTypeItems[ITP_CharacterSkin].ItemsOnType.Length != CosmeticSkinListCache.OrderedCache.Length) + { + CosmeticSkinListCache.NeedToRegenerate = false; + + ByTypeItems[ITP_CharacterSkin].ItemsOnType.Sort(SortCosmeticsList); + + CosmeticSkinListCache.OrderedCache = ByTypeItems[ITP_CharacterSkin].ItemsOnType; + + /*`Log("----------"); + + for (i = 0 ; i < ByTypeItems[ITP_CharacterSkin].ItemsOnType.Length; i++) + { + `Log("Cosmetic Name : " $ByTypeItems[ITP_CharacterSkin].ItemsOnType[i].CosmeticType); + `Log("Skin : " $ByTypeItems[ITP_CharacterSkin].ItemsOnType[i].SkinType); + `Log("Rarity : " $ByTypeItems[ITP_CharacterSkin].ItemsOnType[i].Rarity); + `Log("----------"); + } + + `Log("----------");*/ + } + else + { + //`Log("USING COSMETIC SKIN LIST CACHE!!!"); + + ByTypeItems[ITP_CharacterSkin].ItemsOnType = CosmeticSkinListCache.OrderedCache; + } + } + else + { + ByTypeItems[ITP_CharacterSkin].ItemsOnType.Sort(SortCosmeticsList); + } + } + + if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_CraftingMats) + { + if (CraftingListCache.NeedToRegenerate + || ByTypeItems[ITP_CraftingComponent].ItemsOnType.Length != CraftingListCache.OrderedCache.Length) + { + CraftingListCache.NeedToRegenerate = false; + + ByTypeItems[ITP_CraftingComponent].ItemsOnType.Sort(SortCraftingList); + + CraftingListCache.OrderedCache = ByTypeItems[ITP_CraftingComponent].ItemsOnType; /*`Log("----------"); - for (i = 0 ; i < ByTypeItems[ITP_WeaponSkin].ItemsOnType.Length; i++) + for (i = 0 ; i < ByTypeItems[ITP_CraftingComponent].ItemsOnType.Length; i++) { - `Log("ID : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].ItemDefinition); - `Log("Weapon Def : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].WeaponDef); - `Log("Price : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].Price); - `Log("Full Name : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].FullName); - `Log("Skin : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].SkinType); - `Log("Rarity : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].Rarity); - `Log("Quality : " $ByTypeItems[ITP_WeaponSkin].ItemsOnType[i].Quality); + `Log("Crafting Type : " $ByTypeItems[ITP_CraftingComponent].ItemsOnType[i].CraftingType); + `Log("Rarity : " $ByTypeItems[ITP_CraftingComponent].ItemsOnType[i].CraftingRarity); + `Log("Ticket Type : " $ByTypeItems[ITP_CraftingComponent].ItemsOnType[i].CraftingTicketType); `Log("----------"); } @@ -795,60 +886,40 @@ function InitInventory() } else { - //`Log("USING SKIN LIST CACHE!!!"); + //`Log("USING CRAFTING LIST CACHE!!!"); - ByTypeItems[ITP_WeaponSkin].ItemsOnType = WeaponSkinListCache.OrderedCache; + ByTypeItems[ITP_CraftingComponent].ItemsOnType = CraftingListCache.OrderedCache; } } - if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_Cosmetics) - { - ByTypeItems[ITP_CharacterSkin].ItemsOnType.Sort(SortCosmeticsList); - - /*`Log("----------"); - - for (i = 0 ; i < ByTypeItems[ITP_CharacterSkin].ItemsOnType.Length; i++) - { - `Log("Cosmetic Name : " $ByTypeItems[ITP_CharacterSkin].ItemsOnType[i].CosmeticType); - `Log("Skin : " $ByTypeItems[ITP_CharacterSkin].ItemsOnType[i].SkinType); - `Log("Rarity : " $ByTypeItems[ITP_CharacterSkin].ItemsOnType[i].Rarity); - `Log("----------"); - } - - `Log("----------");*/ - } - - if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_CraftingMats) - { - ByTypeItems[ITP_CraftingComponent].ItemsOnType.Sort(SortCraftingList); - - /*`Log("----------"); - - for (i = 0 ; i < ByTypeItems[ITP_CraftingComponent].ItemsOnType.Length; i++) - { - `Log("Crafting Type : " $ByTypeItems[ITP_CraftingComponent].ItemsOnType[i].CraftingType); - `Log("Rarity : " $ByTypeItems[ITP_CraftingComponent].ItemsOnType[i].CraftingRarity); - `Log("Ticket Type : " $ByTypeItems[ITP_CraftingComponent].ItemsOnType[i].CraftingTicketType); - `Log("----------"); - } - - `Log("----------");*/ - } - if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_Consumables) { - // Consumables is the type for the "Items" category on the UI - ByTypeItems[ITP_KeyCrate].ItemsOnType.Sort(SortItemList); - - /*`Log("----------"); - - for (i = 0 ; i < ByTypeItems[ITP_KeyCrate].ItemsOnType.Length; i++) + if (ItemListCache.NeedToRegenerate + || ByTypeItems[ITP_KeyCrate].ItemsOnType.Length != ItemListCache.OrderedCache.Length) { - `Log("Is Key : " $ByTypeItems[ITP_KeyCrate].ItemsOnType[i].IsKey); - `Log("----------"); - } + ItemListCache.NeedToRegenerate = false; - `Log("----------");*/ + // Consumables is the type for the "Items" category on the UI + ByTypeItems[ITP_KeyCrate].ItemsOnType.Sort(SortItemList); + + ItemListCache.OrderedCache = ByTypeItems[ITP_KeyCrate].ItemsOnType; + + /*`Log("----------"); + + for (i = 0 ; i < ByTypeItems[ITP_KeyCrate].ItemsOnType.Length; i++) + { + `Log("Is Key : " $ByTypeItems[ITP_KeyCrate].ItemsOnType[i].IsKey); + `Log("----------"); + } + + `Log("----------");*/ + } + else + { + //`Log("USING ITEMS LIST CACHE!!!"); + + ByTypeItems[ITP_KeyCrate].ItemsOnType = ItemListCache.OrderedCache; + } } //`Log("--------------------------------"); @@ -898,10 +969,15 @@ function bool DoesMatchFilter(ItemProperties InventoryItem) return false; } - // doesn't match filter if the perk id doesn't match (unless it's set to any or survivalist) - if (CurrentPerkIndexFilter != KFPC.PerkList.length && !(CurrentPerkIndexFilter == InventoryItem.PerkId || CurrentPerkIndexFilter == InventoryItem.AltPerkId) && KFPC.PerkList[CurrentPerkIndexFilter].PerkClass != class'KFPerk_Survivalist') //perk + // Skip perk check for 9mm + if (!(InventoryItem.WeaponType == 0 && Is9mm(InventoryItem))) { - return false; + // doesn't match filter if the perk id doesn't match (unless it's set to any or survivalist) + if (CurrentPerkIndexFilter != KFPC.PerkList.length + && !(CurrentPerkIndexFilter == InventoryItem.PerkId || CurrentPerkIndexFilter == InventoryItem.AltPerkId)) + { + return false; + } } } @@ -917,6 +993,13 @@ function bool DoesMatchFilter(ItemProperties InventoryItem) return true; } +function bool Is9mm(ItemProperties InventoryItem) +{ + local int ItemID; + ItemID = class'KFWeaponSkinList'.default.Skins.Find('Id', InventoryItem.Definition); + return class'KFWeaponSkinList'.default.Skins[ItemID].WeaponDef != none && class'KFWeaponSkinList'.default.Skins[ItemID].WeaponDef.name == 'KFWeapDef_9mm'; +} + function OnItemExhangeTimeOut() { if( !class'WorldInfo'.static.IsConsoleBuild() ) @@ -1906,7 +1989,6 @@ function Callback_PerkTypeFilterChanged(int NewFilterIndex) InitInventory(); } - function CallBack_RequestCosmeticCraftInfo() { SetCosmeticCraftDetails(); diff --git a/KFGame/Classes/KFGFxMenu_Perks.uc b/KFGame/Classes/KFGFxMenu_Perks.uc index 21c8eb9..b976051 100644 --- a/KFGame/Classes/KFGFxMenu_Perks.uc +++ b/KFGame/Classes/KFGFxMenu_Perks.uc @@ -231,6 +231,8 @@ event OnClose() Manager.CachedProfile.SetProfileSettingValueInt( KFID_SurvivalStartingWeapIdx, KFPC.SurvivalPerkWeapIndex ); Manager.CachedProfile.SetProfileSettingValueInt( KFID_SurvivalStartingSecondaryWeapIdx, KFPC.SurvivalPerkSecondaryWeapIndex ); Manager.CachedProfile.SetProfileSettingValueInt( KFID_SurvivalStartingGrenIdx, KFPC.SurvivalPerkGrenIndex ); + + KFPC.CurrentPerk.SetWeaponSelectedIndex(KFPC.SurvivalPerkWeapIndex); } bModifiedPerk = false; diff --git a/KFGame/Classes/KFGFxMenu_PostGameReport.uc b/KFGame/Classes/KFGFxMenu_PostGameReport.uc index 6450d53..7d6e40f 100644 --- a/KFGame/Classes/KFGFxMenu_PostGameReport.uc +++ b/KFGame/Classes/KFGFxMenu_PostGameReport.uc @@ -170,7 +170,9 @@ function SearchInventoryForNewItem() local int ItemIndex, InventoryIndex; local CurrentInventoryEntry TempInventoryDetailsHolder; local ItemProperties TempItemDetailsHolder; - + local int i, IndexInReward; + local array NewlyAddedItems, RewardIDs; + local KFGameReplicationInfo KFGRI; ItemIndex = INDEX_NONE; InventoryIndex = INDEX_NONE; @@ -181,13 +183,50 @@ function SearchInventoryForNewItem() return; } - InventoryIndex = OnlineSub.CurrentInventory.Find('NewlyAdded', 1); + // If weekly check for weekly rewards,.. + KFGRI = KFGameReplicationInfo(GetPC().Worldinfo.GRI); + if(KFGRI != none) + { + if (KFGRI.bIsWeeklyMode) + { + // Gather all newly added items + for (i = 0; i < OnlineSub.CurrentInventory.Length; ++i) + { + if (OnlineSub.CurrentInventory[i].NewlyAdded != 0) + { + NewlyAddedItems.AddItem(i); + } + } + + // If more than 1, we prioritise the weekly if any.. + if (NewlyAddedItems.Length > 1) + { + RewardIDs = class'KFOnlineStatsWrite'.static.GetWeeklyOutbreakRewards(class'KFGameEngine'.static.GetIntendedWeeklyEventIndexMod()); + + for (i = 0; i < NewlyAddedItems.length; i++) + { + TempInventoryDetailsHolder = OnlineSub.CurrentInventory[NewlyAddedItems[i]]; + IndexInReward = RewardIDs.Find(TempInventoryDetailsHolder.Definition); + + if (IndexInReward != INDEX_NONE) + { + InventoryIndex = NewlyAddedItems[i]; + break; + } + } + } + } + } + + if(InventoryIndex == INDEX_NONE) + { + InventoryIndex = OnlineSub.CurrentInventory.Find('NewlyAdded', 1); + } if(InventoryIndex != INDEX_NONE) { TempInventoryDetailsHolder = OnlineSub.CurrentInventory[InventoryIndex]; - ItemIndex = OnlineSub.ItemPropertiesList.Find('Definition', TempInventoryDetailsHolder.Definition); if(ItemIndex != INDEX_NONE) diff --git a/KFGame/Classes/KFGFxMenu_Store.uc b/KFGame/Classes/KFGFxMenu_Store.uc index 43ed397..24c80eb 100644 --- a/KFGame/Classes/KFGFxMenu_Store.uc +++ b/KFGame/Classes/KFGFxMenu_Store.uc @@ -307,7 +307,35 @@ function CheckForEmptyStore() } } +function Callback_StoreSearch(string searchStr) +{ + MainContainer.StoreSearch(searchStr, true); +} +function Callback_Log(string str) +{ + `Log("From AS: " $str); +} + +function Callback_OpenKeyboard() +{ + OnlineSub = Class'GameEngine'.static.GetOnlineSubsystem(); + OnlineSub.PlayerInterface.AddKeyboardInputDoneDelegate(KeyboardInputComplete); + OnlineSub.PlayerInterface.ShowKeyboardUI(0, "Search", "Search"); +} + +function KeyboardInputComplete(bool bWasSuccessful) +{ + local byte bWasCancelled; + local string UserInput; + + OnlineSub = Class'GameEngine'.static.GetOnlineSubsystem(); + UserInput = OnlineSub.PlayerInterface.GetKeyboardInputResults(bWasCancelled); + + Callback_StoreSearch(UserInput); + + OnlineSub.PlayerInterface.ClearKeyboardInputDoneDelegate(KeyboardInputComplete); +} defaultproperties { diff --git a/KFGame/Classes/KFGFxPerksContainer_Details.uc b/KFGame/Classes/KFGFxPerksContainer_Details.uc index 820ba67..baa52dc 100644 --- a/KFGame/Classes/KFGFxPerksContainer_Details.uc +++ b/KFGame/Classes/KFGFxPerksContainer_Details.uc @@ -191,7 +191,7 @@ function UpdateAndGetCurrentWeaponIndexes(class PerkClass, KFPlayerContr KFPerk_Survivalist(KFPC.CurrentPerk).StartingGrenadeClassIndex = GrenadeIdx; // If we are in no gameplay time insta change - if (!KFGRI.bWaveIsActive) + if (!KFGRI.bWaveIsActive || KFPC.PlayerReplicationInfo.bIsSpectator) { KFPerk_Survivalist(KFPC.CurrentPerk).UpdateCurrentGrenade(); } diff --git a/KFGame/Classes/KFGFxPostGameContainer_MapVote.uc b/KFGame/Classes/KFGFxPostGameContainer_MapVote.uc index 22eeb1d..2f68da2 100644 --- a/KFGame/Classes/KFGFxPostGameContainer_MapVote.uc +++ b/KFGame/Classes/KFGFxPostGameContainer_MapVote.uc @@ -55,99 +55,68 @@ function SetMapOptions() local array ServerMapList; local KFGameReplicationInfo KFGRI; local bool IsWeeklyMode; - local bool bShouldSkipMaps; - local bool bWeeklyNoSanta; - - local bool IsBoom, IsCraniumCracker, IsTinyTerror, IsBobbleZed, IsPoundemonium, IsUpUpAndDecay, IsZedTime, IsBeefcake; - local bool IsBloodThirst, IsColiseum, IsArachnophobia, IsScavenger, IsWW, IsAbandon, IsBossRush, IsShrunkenHeads; - local bool IsGunGame, /*IsVIP,*/ IsPerkRoulette, IsContaminationMode, IsBountyHunt; - + local bool IsBoom, IsScavenger, IsBossRush, IsGunGame, IsContaminationMode, IsBountyHunt; local name MapName; KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI); - bShouldSkipMaps = false; Counter = 0; - if(KFGRI != none && KFGRI.VoteCollector != none) + if (KFGRI != none && KFGRI.VoteCollector != none) { - ServerMapList = KFGRI.VoteCollector.MapList; + ServerMapList = KFGRI.VoteCollector.MapList; - IsWeeklyMode = KFGRI.bIsWeeklyMode; + IsWeeklyMode = KFGRI.bIsWeeklyMode; IsBoom = false; - IsCraniumCracker = false; - IsTinyTerror = false; - IsBobbleZed = false; - IsPoundemonium = false; - IsUpUpAndDecay = false; - IsZedTime = false; - IsBeefcake = false; - IsBloodThirst = false; - IsColiseum = false; - IsArachnophobia = false; IsScavenger = false; - IsWW = false; - IsAbandon = false; IsBossRush = false; - IsShrunkenHeads = false; IsGunGame = false; - //IsVIP = false; - IsPerkRoulette = false; IsContaminationMode = false; IsBountyHunt = false; switch (KFGRI.CurrentWeeklyIndex) { - case 0: IsBoom = true; break; - case 1: IsCraniumCracker = true; break; - case 2: IsTinyTerror = true; break; - case 3: IsBobbleZed = true; break; - case 4: IsPoundemonium = true; break; - case 5: IsUpUpAndDecay = true; break; - case 6: IsZedTime = true; break; - case 7: IsBeefcake = true; break; - case 8: IsBloodThirst = true; break; - case 9: IsColiseum = true; break; - case 10: IsArachnophobia = true; break; + case 0: IsBoom = true; break; case 11: IsScavenger = true; break; - case 12: IsWW = true; break; - case 13: IsAbandon = true; break; case 14: IsBossRush = true; break; - case 15: IsShrunkenHeads = true; break; case 16: IsGunGame = true; break; - //case 17: IsVIP = true; break; - case 18: IsPerkRoulette = true; break; case 19: IsContaminationMode = true; break; case 20: IsBountyHunt = true; break; } - bShouldSkipMaps = IsWeeklyMode && (IsScavenger || IsBossRush || IsGunGame); - - bWeeklyNoSanta = IsWeeklyMode && ( IsBoom || IsCraniumCracker || IsTinyTerror || IsBobbleZed - || IsPoundemonium || IsUpUpAndDecay || IsZedTime || IsBeefcake - || IsBloodThirst || IsColiseum || IsArachnophobia || IsScavenger - || IsWW || IsAbandon || IsShrunkenHeads || IsPerkRoulette); - - //gfx MapList = CreateArray(); for (i = 0; i < ServerMapList.length; i++) { MapName = name(ServerMapList[i]); - if (bWeeklyNoSanta && MapName == MapSantas) + if (IsWeeklyMode) { - continue; + if (MapName == MapSantas) + { + continue; + } } - if ( bShouldSkipMaps && ( MapName == MapBiolapse || - MapName == MapNightmare || - MapName == MapPowerCore || - MapName == MapDescent || - MapName == MapKrampus)) + if (IsWeeklyMode && IsBoom) { - continue; + if (MapName == MapSteam) + { + continue; + } + } + + if (IsWeeklyMode && (IsScavenger || IsBossRush || IsGunGame)) + { + if (MapName == MapBiolapse || + MapName == MapNightmare || + MapName == MapPowerCore || + MapName == MapDescent || + MapName == MapKrampus) + { + continue; + } } if (IsWeeklyMode && IsContaminationMode) @@ -178,9 +147,12 @@ function SetMapOptions() } } - if (IsWeeklyMode && IsBossRush && MapName == MapSteam) + if (IsWeeklyMode && IsBossRush) { - continue; + if (MapName == MapSteam) + { + continue; + } } MapObject = CreateObject("Object"); diff --git a/KFGame/Classes/KFGFxServerBrowser_Filters.uc b/KFGame/Classes/KFGFxServerBrowser_Filters.uc index b19ff92..8588686 100644 --- a/KFGame/Classes/KFGFxServerBrowser_Filters.uc +++ b/KFGame/Classes/KFGFxServerBrowser_Filters.uc @@ -28,6 +28,7 @@ var transient int CachedDifficulty, CachedLength; var transient array MapList; var int NumDifficultyStrings; +var int MaxNumberMapList; // if you change this also update ServerBrowserFilterContainer.as -> NUM_OF_FILTERS @@ -55,15 +56,24 @@ enum EFilter_Key function Initialize( KFGFxObject_Menu NewParentMenu ) { super.Initialize( NewParentMenu ); + ServerMenu = KFGFxMenu_ServerBrowser(NewParentMenu); + if (SavedGameModeIndex < 0 || SavedGameModeIndex >= class'KFGameInfo'.default.GameModes.length) { SavedGameModeIndex = 255; } + SavedGameModeIndexPending = SavedGameModeIndex; + NumDifficultyStrings = class'KFCommon_LocalizedStrings'.static.GetDifficultyStringsArray().Length; + AdjustSavedFiltersToMode(); - ServerMenu.Manager.StartMenu.GetMapList(MapList, SavedGameModeIndexPending); + + MaxNumberMapList = -1; + + UpdateMapList(); + InitFiltersArray(); LocalizeText(); ClearPendingValues(); @@ -88,6 +98,7 @@ function AdjustSavedFiltersToMode() SavedDifficultyIndex = 255; } SavedDifficultyIndexPending = SavedDifficultyIndex; + if (SavedLengthIndex >= class'KFGameInfo'.default.GameModes[GetUsableGameMode(SavedGameModeIndex)].Lengths) { SavedLengthIndex = 255; @@ -174,8 +185,8 @@ function LocalizeCheckBoxes() bShowAllowSeasonalSkins = true; if (ServerMenu.Manager.StartMenu.GetStartMenuState() == EMatchmaking - || class'KFGameEngine'.static.GetSeasonalEventID() == SEI_None - || class'KFGameEngine'.static.GetSeasonalEventID() == SEI_Spring) + || class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() == SEI_None + || class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() == SEI_Spring) { bShowAllowSeasonalSkins = false; // Default if we don't have a season or it's find a match menu } @@ -237,8 +248,10 @@ function SetModeMenus(string DifficultyListString, string LengthListString, int CreateList(LengthListString, class'KFCommon_LocalizedStrings'.static.GetLengthStringsArray(), NewLengthIndex, class'KFGameInfo'.default.GameModes[UseModeIndex].Lengths); } -function CreateList( string ListString, array TextArray, int SelectedIndex - , optional int MaxListLength = -1 +function CreateList( string ListString + , array TextArray + , int SelectedIndex + , optional int MaxListLength = 0 , optional bool bAnyIsFirst = false , optional bool bEnabled = true) { @@ -250,9 +263,11 @@ function CreateList( string ListString, array TextArray, int SelectedInd local int ListLength; OptionList = GetObject(ListString); + DataProvider = OptionList.GetObject("dataProvider"); //`log("MaxListLength:"$MaxListLength$", Length:"$TextArray.length); + if (MaxListLength > 0) { ListLength = Min(MaxListLength, TextArray.length); @@ -261,6 +276,7 @@ function CreateList( string ListString, array TextArray, int SelectedInd { ListLength = TextArray.length; } + if (MaxListLength >= ListLength) { SelectedIndex = 255; @@ -334,6 +350,47 @@ function CreateList( string ListString, array TextArray, int SelectedInd } } +function UpdateMapList() +{ + ServerMenu.Manager.StartMenu.GetMapList(MapList, SavedGameModeIndexPending); + + if (MapList.Length > MaxNumberMapList) + { + MaxNumberMapList = MapList.Length + 1; + } +} + +function ClearExtraMaps() +{ + local int i; + local GFxObject OptionList; + local GFxObject DataProvider; + local GFxObject TempObj; + + OptionList = GetObject("mapScrollingList"); + + DataProvider = OptionList.GetObject("dataProvider"); + + for ( i = 0 ; i < MaxNumberMapList; i++ ) + { + TempObj = DataProvider.GetElementObject(i); + if (TempObj == none) + { + break; + } + + DataProvider.SetElementObject(i, none); + } + + OptionList.SetInt("selectedIndex", 0); + + OptionList.SetObject("dataProvider", DataProvider); + + OptionList.GetObject("associatedButton").SetString("label", "-"); + + OptionList.ActionScriptVoid("invalidateData"); +} + function ModeChanged(int index) { if (index >= 0 && index < class'KFGameInfo'.default.GameModes.length) @@ -345,7 +402,13 @@ function ModeChanged(int index) SavedGameModeIndexPending = 255; } - ServerMenu.Manager.StartMenu.GetMapList(MapList, SavedGameModeIndexPending); + // Reset Saved Map + SavedMapIndexPending = 255; + + UpdateMapList(); + + // Reset Map Filter List (we need to do because the previous ElementObject are still there, we have to clear their state and then feed with new data) + ClearExtraMaps(); //`log("Adjusting difficulty"); AdjustSavedFiltersToMode(); @@ -464,6 +527,9 @@ function ResetFilters() ClearPendingValues(); SaveConfig(); + + UpdateMapList(); + //reinit values LocalizeCheckBoxes(); LocalizeText(); diff --git a/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc b/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc index 8872022..03178eb 100644 --- a/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc +++ b/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc @@ -75,7 +75,7 @@ function SetDetails(KFOnlineGameSettings ServerResult) TempObj = CreateObject("Object"); TempObj.SetString("serverName", TempOnlingGamesSettings.OwningPlayerName); - PlayerCount = TempOnlingGamesSettings.NumPublicConnections-TempOnlingGamesSettings.NumOpenPublicConnections; + PlayerCount = TempOnlingGamesSettings.NumPublicConnections - TempOnlingGamesSettings.NumOpenPublicConnections; if (PlayerCount < 0) { @@ -95,8 +95,8 @@ function SetDetails(KFOnlineGameSettings ServerResult) TempObj.SetBool("ranked", TempOnlingGamesSettings.bUsesStats); TempObj.SetBool("seasonalSkins", TempOnlingGamesSettings.bNoSeasonalSkins == false); - bShowSeasonalSkins = class'KFGameEngine'.static.GetSeasonalEventID() != SEI_None - && class'KFGameEngine'.static.GetSeasonalEventID() != SEI_Spring; + bShowSeasonalSkins = class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() != SEI_None + && class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() != SEI_Spring; TempObj.SetBool("showSeasonalSkins", bShowSeasonalSkins); diff --git a/KFGame/Classes/KFGFxServerBrowser_ServerList.uc b/KFGame/Classes/KFGFxServerBrowser_ServerList.uc index b0a3620..8049af5 100644 --- a/KFGame/Classes/KFGFxServerBrowser_ServerList.uc +++ b/KFGame/Classes/KFGFxServerBrowser_ServerList.uc @@ -283,8 +283,8 @@ function BuildServerFilters(KFGFxServerBrowser_Filters Filters, OnlineGameSearch DisableSeasonalSkins = Filters.bNoSeasonalSkins; - if (class'KFGameEngine'.static.GetSeasonalEventID() == SEI_None - || class'KFGameEngine'.static.GetSeasonalEventID() == SEI_Spring) + if (class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() == SEI_None + || class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() == SEI_Spring) { DisableSeasonalSkins = false; } @@ -997,7 +997,7 @@ function UpdateListDataProvider() TempObj.SetString("serverName", TempOnlineGamesSettings.OwningPlayerName); - PlayerCount = TempOnlineGamesSettings.NumPublicConnections-TempOnlineGamesSettings.NumOpenPublicConnections; + PlayerCount = TempOnlineGamesSettings.NumPublicConnections - TempOnlineGamesSettings.NumOpenPublicConnections; if (PlayerCount < 0) { diff --git a/KFGame/Classes/KFGFxSpecialeventObjectivesContainer.uc b/KFGame/Classes/KFGFxSpecialeventObjectivesContainer.uc index 162c5b6..5464419 100644 --- a/KFGame/Classes/KFGFxSpecialeventObjectivesContainer.uc +++ b/KFGame/Classes/KFGFxSpecialeventObjectivesContainer.uc @@ -63,7 +63,6 @@ function LocalizeMenu() SetObject("localizedText", TextObject); } - function bool PopulateData() { local GFxObject DataObject; @@ -72,6 +71,13 @@ function bool PopulateData() local int CurrentProgressValue, MaxProgressValue; local float ProgressCompletePercentage; + if (KFPC.HasStatsWrite() == false) + { + // If stats are not ready, retry in one second + KFPC.SetTimer(1.f, false, nameof(PopulateData), self); + return false; + } + if(HasObjectiveStatusChanged()) { DataProvider = CreateArray(); diff --git a/KFGame/Classes/KFGFxStartGameContainer_FindGame.uc b/KFGame/Classes/KFGFxStartGameContainer_FindGame.uc index 687d693..172a9d2 100644 --- a/KFGame/Classes/KFGFxStartGameContainer_FindGame.uc +++ b/KFGame/Classes/KFGFxStartGameContainer_FindGame.uc @@ -182,37 +182,40 @@ function FillWhatsNew() local SWhatsNew item; WhatsNewItems.Remove(0, WhatsNewItems.Length); // Latest Update - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_Event", "LatestUpdate", "http://www.tripwireinteractive.com/redirect/KF2LatestUpdate/"); + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_KF3", "LatestUpdate", "https://killingfloor3.com/"); WhatsNewItems.AddItem(item); // Featured Ultimate Edition item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Summer2022_UltimateEdition_Upgrade", "FeaturedItemBundle", "https://store.steampowered.com/app/1914560/KF2__Ultimate_Edition_Upgrade_DLC/"); WhatsNewItems.AddItem(item); +// KF2 Cosmetic Season Pass + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Summer2023_CosmeticsSeasonPass", "FeaturedItemBundle", "https://store.steampowered.com/app/2363410/Killing_Floor_2__Cosmetics_Season_Pass"); + WhatsNewItems.AddItem(item); // KF2 Armory Season Pass 2022 item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Summer2022_ArmorySeasonPassII", "ArmorySeasonPass", "https://store.steampowered.com/app/1914490/KF2__Season_Pass_2022"); WhatsNewItems.AddItem(item); // KF2 Armory Season Pass 2021 item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Spring_Armory_Season_Pass", "ArmorySeasonPass", "https://store.steampowered.com/app/1524820/Killing_Floor_2__Armory_Season_Pass"); WhatsNewItems.AddItem(item); -// KF2 Armory Season Pass 2023 - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Summer2023_CosmeticsSeasonPass", "FeaturedItemBundle", "https://store.steampowered.com/app/2363410/Killing_Floor_2__Cosmetics_Season_Pass"); - WhatsNewItems.AddItem(item); +// Featured Mrs Foster + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_SS_Steampunk_MrsFosterBundle", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/6185"); + WhatsNewItems.AddItem(item); +// Featured Reaper Outfit Bundle + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Fall_ReaperOutfit", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/8462"); + WhatsNewItems.AddItem(item); +// Featured Last Stand Outfit Bundle + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_LastStand_Uniforms", "FeaturedEventItem", "https://store.steampowered.com/buyitem/232090/9747"); + WhatsNewItems.AddItem(item); +// Featured Commando Chicken Bundle + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween_CommandoChicken_Bundle", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/5286"); + WhatsNewItems.AddItem(item); +// Featured Badass Santa Bundle + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Xmas_BadSanta", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/6670"); + WhatsNewItems.AddItem(item); // Featured Weapon item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_MG3Shredder", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9749"); WhatsNewItems.AddItem(item); -// Featured Outfit Bundle - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_LastStand_Uniforms", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9747"); - WhatsNewItems.AddItem(item); -// Featured Time Limited Item - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween_PremiumTicket", "FeaturedEventItem", "https://store.steampowered.com/buyitem/232090/5246"); - WhatsNewItems.AddItem(item); -// Featured Weapon Skin Bundle - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_MedievalMKII_Weapon_Skin", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9718"); - WhatsNewItems.AddItem(item); -// Featured Weapon Skin Bundle - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_HRGSpectreMKIII_Weapon_Skin", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9720"); - WhatsNewItems.AddItem(item); -// Featured Weapon Skin Bundle - item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Halloween2023_ChameleonMKIV_Weapon_Skin", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9716"); +// Featured Weapon + item = SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_Summer2023_S12Shockgun", "FeaturedItemBundle", "https://store.steampowered.com/buyitem/232090/9655"); WhatsNewItems.AddItem(item); // Misc Community Links item=SetWhatsNewItem("img://UI_WhatsNew.UI_WhatsNew_CommunityHub", "Jaegorhorn", "https://steamcommunity.com/app/232090"); diff --git a/KFGame/Classes/KFGFxStartGameContainer_Options.uc b/KFGame/Classes/KFGFxStartGameContainer_Options.uc index 65ddbfe..00d0989 100644 --- a/KFGame/Classes/KFGFxStartGameContainer_Options.uc +++ b/KFGame/Classes/KFGFxStartGameContainer_Options.uc @@ -260,9 +260,9 @@ function InitializeGameOptions() TextObject.SetString("length",StartMenu.LengthTitle); TextObject.SetString("privacy",StartMenu.PermissionsTitle); TextObject.SetString("inProgress", InProgressString); - - if (class'KFGameEngine'.static.GetSeasonalEventID() == SEI_None - || class'KFGameEngine'.static.GetSeasonalEventID() == SEI_Spring) + + if (class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() == SEI_None + || class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() == SEI_Spring) { TextObject.SetBool("bShowAllowSeasonalSkins", false); } @@ -313,50 +313,12 @@ function FilterWeeklyMaps(out array List) WeeklyIndex = ParentMenu.Manager.GetWeeklySelectorIndex() - 1; } + List.RemoveItem("KF-SantasWorkshop"); + switch (WeeklyIndex) { case 0: // Boom - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 1: // Cranium Cracker - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 2: // Tiny Terror - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 3: // BobbleZed - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 4: // Poundemonium - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 5: // Up Up And Decay - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 6: // Zed Time - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 7: // Beefcake - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 8: // BloodThirst - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 9: // Coliseum - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 10: // Arachnophobia - List.RemoveItem("KF-SantasWorkshop"); + List.RemoveItem("KF-SteamFortress"); break; case 11: // Scavenger @@ -365,17 +327,8 @@ function FilterWeeklyMaps(out array List) List.RemoveItem("KF-PowerCore_Holdout"); List.RemoveItem("KF-TheDescent"); List.RemoveItem("KF-KrampusLair"); - List.RemoveItem("KF-SantasWorkshop"); break; - case 12: // WW - List.RemoveItem("KF-SantasWorkshop"); - break; - - case 13: // Abandon - List.RemoveItem("KF-SantasWorkshop"); - break; - case 14: // Boss Rush List.RemoveItem("KF-Biolapse"); List.RemoveItem("KF-Nightmare"); @@ -385,10 +338,6 @@ function FilterWeeklyMaps(out array List) List.RemoveItem("KF-SteamFortress"); break; - case 15: // Shrunken Heads - List.RemoveItem("KF-SantasWorkshop"); - break; - case 16: // GunGame List.RemoveItem("KF-Biolapse"); List.RemoveItem("KF-Nightmare"); @@ -397,20 +346,12 @@ function FilterWeeklyMaps(out array List) List.RemoveItem("KF-KrampusLair"); break; - case 17: // VIP - break; - - case 18: // Perk Roulette - List.RemoveItem("KF-SantasWorkshop"); - break; - case 19: // Contamination Zone List.RemoveItem("KF-Biolapse"); List.RemoveItem("KF-Nightmare"); List.RemoveItem("KF-PowerCore_Holdout"); List.RemoveItem("KF-TheDescent"); List.RemoveItem("KF-KrampusLair"); - List.RemoveItem("KF-SantasWorkshop"); List.RemoveItem("KF-Elysium"); break; diff --git a/KFGame/Classes/KFGFxStoreContainer_Main.uc b/KFGame/Classes/KFGFxStoreContainer_Main.uc index 0b85129..0ccc913 100644 --- a/KFGame/Classes/KFGFxStoreContainer_Main.uc +++ b/KFGame/Classes/KFGFxStoreContainer_Main.uc @@ -31,6 +31,12 @@ var localized string SelectCosmeticsString; var localized string SelectEmotesString; var localized string SelectKeysAndTicketsString; +var localized string SearchText; +var localized string ClearSearchText; +var localized string NoItemsString; + +var int SearchMaxChars; + var array FilterIndexConversion; var array ItemTypeIndexConversion; var array MarketItemTypeIndexConversion; @@ -44,6 +50,9 @@ var int MaxFeaturedItems; var KFGFxMenu_Store StoreMenu; +var transient string SearchKeyword; +var Array FilteredItemsArray; + enum EStore_Filter { EStore_WeaponBundles, //EStore_WeaponSkins, @@ -105,6 +114,14 @@ function LocalizeText() LocalizedObject.SetString("thankYouString", ThankYouString); + LocalizedObject.SetString("searchTitle", SearchText); + LocalizedObject.SetString("searchText", SearchText$"..."); + + LocalizedObject.SetBool("bIsConsoleBuild", class'WorldInfo'.static.IsConsoleBuild()); + LocalizedObject.SetInt("searchMaxChars", SearchMaxChars); + + LocalizedObject.SetString("noItemsText", NoItemsString); + SetObject("localizedText", LocalizedObject); } @@ -175,10 +192,10 @@ function SendItems(const out Array StoreItemArray) { local int i, ItemCount, j; local GFxObject DataProvider; - local Array FilteredItemsArray; local ItemProperties TempItemProps; //since we can't push elements of an array local bool AlreadyFiltered; + FilteredItemsArray.Length = 0; ItemCount = 0; DataProvider = CreateArray(); @@ -288,13 +305,20 @@ function SendItems(const out Array StoreItemArray) } } - if (CurrentStoreFilter == EStore_Featured) + if (SearchKeyword != "" && CurrentStoreFilter != EStore_Featured) { - SetObject("storeItemFeaturedData", DataProvider); + StoreSearch(SearchKeyword); } else { - SetObject("storeItemData", DataProvider); + if (CurrentStoreFilter == EStore_Featured) + { + SetObject("storeItemFeaturedData", DataProvider); + } + else + { + SetObject("storeItemData", DataProvider); + } } } @@ -410,6 +434,57 @@ function bool IsItemValidForThisPlatform(string ItemName) return true; } + +function StoreSearch(string searchStr, bool bForceInitIfClear = false) +{ + local int i, j, ItemCounter; + local array SearchKeywords; + local bool Accepted; + local GFxObject DataProvider; + + SearchKeyword = searchStr; + + if (searchStr == "") + { + if (bForceInitIfClear && CurrentStoreFilter != EStore_Featured) + { + SendItems(StoreMenu.OnlineSub.ItemPropertiesList); + } + + return; + } + + ItemCounter = 0; + DataProvider = CreateArray(); + + SearchKeywords = SplitString( searchStr, " ", true); + + for (i = 0; i < FilteredItemsArray.Length; ++i) + { + Accepted = true; + for (j = 0; j < SearchKeywords.Length; ++j) + { + if (InStr(Locs(FilteredItemsArray[i].Name), Locs(SearchKeywords[j])) == -1) + { + Accepted = false; + break; + } + } + + if (Accepted) + { + DataProvider.SetElementObject(ItemCounter, CreateStoreItem(FilteredItemsArray[i])); + ++ItemCounter; + } + } + + // Ignore featured items + if (CurrentStoreFilter != EStore_Featured) + { + SetObject("storeItemData", DataProvider); + } +} + DefaultProperties { //defaults @@ -447,19 +522,41 @@ DefaultProperties XboxFilterExceptions[0]="Wasteland Bundle" // Wasteland Outfit Bundle - FeaturedItemIDs[0]=7619 //Whatsnew Gold Ticket - FeaturedItemIDs[1]=9749 - FeaturedItemIDs[2]=9747 - FeaturedItemIDs[3]=9716 - FeaturedItemIDs[4]=9718 - FeaturedItemIDs[5]=9720 + FeaturedItemIDs[0]=6185 //Whatsnew Gold Ticket + FeaturedItemIDs[1]=6670 + FeaturedItemIDs[2]=8462 + FeaturedItemIDs[3]=4857 + FeaturedItemIDs[4]=9747 + FeaturedItemIDs[5]=5286 + FeaturedItemIDs[6]=7967 + FeaturedItemIDs[7]=7968 + FeaturedItemIDs[8]=9369 + FeaturedItemIDs[9]=8190 + FeaturedItemIDs[10]=8469 + FeaturedItemIDs[11]=9125 + FeaturedItemIDs[12]=8959 + FeaturedItemIDs[13]=9471 + FeaturedItemIDs[14]=9557 + FeaturedItemIDs[15]=9655 + FeaturedItemIDs[16]=9749 - ConsoleFeaturedItemIDs[0]=7783 //Whatsnew Gold Ticket PSN - ConsoleFeaturedItemIDs[1]=9749 - ConsoleFeaturedItemIDs[2]=9747 - ConsoleFeaturedItemIDs[3]=9716 - ConsoleFeaturedItemIDs[4]=9718 - ConsoleFeaturedItemIDs[5]=9720 + ConsoleFeaturedItemIDs[0]=6185 //Whatsnew Gold Ticket PSN + ConsoleFeaturedItemIDs[1]=6670 + ConsoleFeaturedItemIDs[2]=8462 + ConsoleFeaturedItemIDs[3]=4857 + ConsoleFeaturedItemIDs[4]=9747 + ConsoleFeaturedItemIDs[5]=5286 + ConsoleFeaturedItemIDs[6]=7967 + ConsoleFeaturedItemIDs[7]=7968 + ConsoleFeaturedItemIDs[8]=9369 + ConsoleFeaturedItemIDs[9]=8190 + ConsoleFeaturedItemIDs[10]=8469 + ConsoleFeaturedItemIDs[11]=9125 + ConsoleFeaturedItemIDs[12]=8959 + ConsoleFeaturedItemIDs[13]=9471 + ConsoleFeaturedItemIDs[14]=9557 + ConsoleFeaturedItemIDs[15]=9655 + ConsoleFeaturedItemIDs[16]=9749 MaxFeaturedItems=5 } \ No newline at end of file diff --git a/KFGame/Classes/KFGFxTraderContainer_ItemDetails.uc b/KFGame/Classes/KFGFxTraderContainer_ItemDetails.uc index 4b8782d..630d5e3 100644 --- a/KFGame/Classes/KFGFxTraderContainer_ItemDetails.uc +++ b/KFGame/Classes/KFGFxTraderContainer_ItemDetails.uc @@ -29,7 +29,7 @@ var localized string UpgradeCostString, UpgradeString; var GFxObject DetailsContainer; /** Max stat values used to calculate stat bars */ -const WeaponStatMax_Damage = 820.f; +const WeaponStatMax_Damage = 990.f; const WeaponStatMax_FireRate = 800.f; const WeaponStatMax_Penetration = 4.f; const WeaponStatMax_Range = 100.f; diff --git a/KFGame/Classes/KFGFxTraderContainer_Store.uc b/KFGame/Classes/KFGFxTraderContainer_Store.uc index 7a9722e..56a35b3 100644 --- a/KFGame/Classes/KFGFxTraderContainer_Store.uc +++ b/KFGame/Classes/KFGFxTraderContainer_Store.uc @@ -102,36 +102,36 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array { continue; // Skip this item if it's in our inventory } - else if ( ItemList[i].AssociatedPerkClasses.length > 0 && ItemList[i].AssociatedPerkClasses[0] != none && TargetPerkClass != class'KFPerk_Survivalist' - && (FilterIndex >= KFPC.PerkList.Length || ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass) == INDEX_NONE ) ) + + if ( ItemList[i].AssociatedPerkClasses.length > 0 + && ItemList[i].AssociatedPerkClasses[0] != none + && (FilterIndex >= KFPC.PerkList.Length || ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass) == INDEX_NONE ) ) { continue; // filtered by perk } - else + + if(ItemList[i].AssociatedPerkClasses.length > 0) { - if(ItemList[i].AssociatedPerkClasses.length > 0) + switch (ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass)) { - switch (ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass)) - { - case 0: //primary perk - if(OnPerkWeapons.length == 0 && MyTraderMenu.SelectedList == TL_Shop) + case 0: //primary perk + if(OnPerkWeapons.length == 0 && MyTraderMenu.SelectedList == TL_Shop) + { + if(GetInt( "currentSelectedIndex" ) == 0) { - if(GetInt( "currentSelectedIndex" ) == 0) - { - MyTraderMenu.SetTraderItemDetails(i); - } + MyTraderMenu.SetTraderItemDetails(i); } - OnPerkWeapons.AddItem(ItemList[i]); - break; - - case 1: //secondary perk - SecondaryWeapons.AddItem(ItemList[i]); - break; - - default: //off perk - OffPerkWeapons.AddItem(ItemList[i]); - break; - } + } + OnPerkWeapons.AddItem(ItemList[i]); + break; + + case 1: //secondary perk + SecondaryWeapons.AddItem(ItemList[i]); + break; + + default: //off perk + OffPerkWeapons.AddItem(ItemList[i]); + break; } } } diff --git a/KFGame/Classes/KFGFxWidget_BaseParty.uc b/KFGame/Classes/KFGFxWidget_BaseParty.uc index f0e4b62..71b62c1 100644 --- a/KFGame/Classes/KFGFxWidget_BaseParty.uc +++ b/KFGame/Classes/KFGFxWidget_BaseParty.uc @@ -249,7 +249,13 @@ function bool isPlayerFromSteam(UniqueNetId PlayerID) { local PlayerReplicationInfo CurrentPRI; CurrentPRI = KFPC.GetPRIFromNetId(PlayerID); - return !class'WorldInfo'.static.IsEOSBuild() && CurrentPRI.PlayfabPlayerId == ""; + + `Log("isPlayerFromSteam"); + `Log("!class'WorldInfo'.static.IsEOSBuild(): " $(!class'WorldInfo'.static.IsEOSBuild())); + + `Log("CurrentPRI.PlayfabPlayerId: " $(CurrentPRI != none ? CurrentPRI.PlayfabPlayerId : "CurrentPRI was NULL")); + + return !class'WorldInfo'.static.IsEOSBuild() && CurrentPRI != none && CurrentPRI.PlayfabPlayerId == ""; } function AddStringOptionToList(string OptionKey, int ItemIndex, string Option, out GFxObject DataProvider) diff --git a/KFGame/Classes/KFGameEngine.uc b/KFGame/Classes/KFGameEngine.uc index 3b5c254..df2baa9 100644 --- a/KFGame/Classes/KFGameEngine.uc +++ b/KFGame/Classes/KFGameEngine.uc @@ -475,6 +475,7 @@ function ClearOnlineDelegates() /** Static because these are both called on default object */ native static function int GetSeasonalEventID(); +native static function int GetSeasonalEventIDForZedSkins(); native static function int GetIntendedWeeklyEventIndex(); native static function int GetIntendedWeeklyEventIndexMod(); native static function int GetWeeklyEventIndex(); diff --git a/KFGame/Classes/KFGameInfo.uc b/KFGame/Classes/KFGameInfo.uc index d2863c3..dd29a31 100644 --- a/KFGame/Classes/KFGameInfo.uc +++ b/KFGame/Classes/KFGameInfo.uc @@ -213,6 +213,7 @@ var protected int BossIndex; //Index into boss array, only preload conte var int AllowSeasonalSkinsIndex; var int WeeklySelectorIndex; +var int SeasonalSkinsIndex; /** Class replacements for each zed type */ struct native SpawnReplacement @@ -428,6 +429,8 @@ var KFOutbreakEvent OutbreakEvent; /** Type of outbreak event to be used. */ var class OutbreakEventClass; +var array PlayersDelayedSuicideMessage; + /************************************************************************************ * @name Kismet Monster Properties ***********************************************************************************/ @@ -722,6 +725,16 @@ event InitGame( string Options, out string ErrorMessage ) AllowSeasonalSkinsIndex = 0; } + OptionRead = ParseOption(Options, "SeasonalSkinsIndex"); + if (OptionRead != "") + { + SeasonalSkinsIndex = int(OptionRead); + if (SeasonalSkinsIndex < 0 || SeasonalSkinsIndex > 4) + { + SeasonalSkinsIndex = -1; + } + } + if( OnlineSub != none && OnlineSub.GetLobbyInterface() != none ) { OnlineSub.GetLobbyInterface().LobbyJoinGame(); @@ -1080,11 +1093,21 @@ event PostLogin( PlayerController NewPlayer ) function Logout( Controller Exiting ) { local int OldNumSpectators; + local KFPlayerController KFPC; OldNumSpectators = NumSpectators; + KFPC = KFPlayerController(Exiting); + + if (KFPC != none) + { + KFPC.bLoggedOut = true; + } + Super.Logout( Exiting ); + MyKFGRI.VoteCollector.ServerNotifyDisconnect(); + // Delay this by 1.5 seconds so there aren't multiple calls if everyone joins/leaves at the same time if( PlayfabInter != None && PlayfabInter.IsRegisteredWithPlayfab() ) { @@ -1179,6 +1202,7 @@ function InitGRIVariables() MyKFGRI.MaxHumanCount = MaxPlayers; MyKFGRI.NotifyAllowSeasonalSkins(AllowSeasonalSkinsIndex); MyKFGRI.NotifyWeeklySelector(WeeklySelectorIndex); + MyKFGRI.NotifySeasonalSkinsIndex(SeasonalSkinsIndex); SetBossIndex(); } @@ -2277,8 +2301,29 @@ function BroadCastLastManStanding() BroadcastLocalized(self, class'KFLocalMessage_Priority', GMT_LastPlayerStanding, none ); } +function BroadCastSuicide() +{ + local KFPlayerController KFPC; + + if (PlayersDelayedSuicideMessage.Length != 0) + { + KFPC = PlayersDelayedSuicideMessage[0]; + + if (KFPC.bLoggedOut == false) + { + BroadcastLocalized( self, class'KFLocalMessage_Game', KMT_Suicide, none, KFPC.PlayerReplicationInfo ); + } + + PlayersDelayedSuicideMessage.Remove(0, 1); + } +} + function BroadcastDeathMessage(Controller Killer, Controller Other, class damageType) { + local KFPlayerController KFPC; + + KFPC = KFPlayerController(Other); + if( Killer == none ) { // If a zed died from no killer, it's very likely that they killed themselves. Skip the death message. @@ -2291,7 +2336,19 @@ function BroadcastDeathMessage(Controller Killer, Controller Other, class 0 || OldArmor - Armor > 0) && IsAliveAndWell() && !KFGRI.bTraderIsOpen ) { diff --git a/KFGame/Classes/KFPawn_Monster.uc b/KFGame/Classes/KFPawn_Monster.uc index b68bac1..3706e92 100644 --- a/KFGame/Classes/KFPawn_Monster.uc +++ b/KFGame/Classes/KFPawn_Monster.uc @@ -741,10 +741,10 @@ static function int IndexOverrideReplaceSpawnWithElite() WI = class'WorldInfo'.static.GetWorldInfo(); KFGRI = KFGameReplicationInfo(WI.GRI); - // We only use this feature in this weekly for now, we pregenerate the Random so we can replace the Zed with Elite version + // We pregenerate the Random so we can replace the Zed with Elite version // And use the Weekly SpawnReplacementList to replace correctly - if (KFGRI.IsContaminationMode()) + if (KFGRI.bIsWeeklyMode) { if (default.ElitePawnClass.length > 0 && default.DifficultySettings != none @@ -757,7 +757,7 @@ static function int IndexOverrideReplaceSpawnWithElite() return -1; } -/** Gets the actual classes used for spawning. Can be overridden to replace this monster with another */ +/** Gets the actual classes used for spawning. */ static event class GetAIPawnClassToSpawn() { local WorldInfo WI; @@ -766,9 +766,7 @@ static event class GetAIPawnClassToSpawn() WI = class'WorldInfo'.static.GetWorldInfo(); KFGRI = KFGameReplicationInfo(WI.GRI); - // We already generated the random for this mode when calling IndexOverrideReplaceSpawnWithElite, so no need to roll the dice again - - if (KFGRI.IsContaminationMode() == false) + if (KFGRI.bIsWeeklyMode == false) { if (default.ElitePawnClass.length > 0 && default.DifficultySettings != none @@ -4907,7 +4905,7 @@ static function string GetLocalizedName() static function string GetSeasonalLocalizationSuffix() { //Remove any year information, just get 1s digit - switch (class'KFGameEngine'.static.GetSeasonalEventID() % 10) + switch (class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins() % 10) { case SEI_Spring: return "_Spring"; diff --git a/KFGame/Classes/KFPerk.uc b/KFGame/Classes/KFPerk.uc index bf25ecc..8243704 100644 --- a/KFGame/Classes/KFPerk.uc +++ b/KFGame/Classes/KFPerk.uc @@ -546,6 +546,17 @@ static function bool IsDoshinegun( KFWeapon KFW ) return KFW != none && KFW.Class.Name == 'KFWeap_AssaultRifle_Doshinegun'; } +/** + * @brief Return if a weapon is Mine Reconstructor + * + * @param KFW Weapon to check + * @return true if mine reconstructor weapon + */ +static function bool IsMineReconstructor( KFWeapon KFW ) +{ + return KFW != none && KFW.Class.Name == 'KFWeap_Mine_Reconstructor'; +} + /** * @brief Return if a weapon is Crossboom (special case for high rounds perk) * @@ -901,6 +912,10 @@ function SetPlayerDefaults(Pawn PlayerPawn) ApplySkillsToPawn(); } +function SetWaveDefaults() +{ +} + /** On perk customization or change, modify owning pawn based on perk selection */ event NotifyPerkModified() { @@ -1338,6 +1353,7 @@ function bool CouldBeZedShrapnel( class KFDT ){ return false; } simulated function bool ShouldShrapnel(){ return false; } simulated function float GetSplashDamageModifier(){ return 1.f; } simulated function bool IsRangeActive(){ return false; } +simulated function float GetRangeGroundFireDurationMod(){ return 1.f; } /** Demo functions */ simulated function bool IsOnContactActive(){ return false; } diff --git a/KFGame/Classes/KFPerk_Firebug.uc b/KFGame/Classes/KFPerk_Firebug.uc index 806f08f..80d77cf 100644 --- a/KFGame/Classes/KFPerk_Firebug.uc +++ b/KFGame/Classes/KFPerk_Firebug.uc @@ -511,6 +511,16 @@ simulated function bool IsRangeActive() return PerkSkills[EFirebugRange].bActive && IsPerkLevelAllowed(EFirebugRange); } +/** + * @brief Returns mod to Ground Fire Duration modification + * + * @return float + */ +simulated function float GetRangeGroundFireDurationMod() +{ + return 1.2f; +} + /** * @brief Checks if the Splash Damage skill is active * diff --git a/KFGame/Classes/KFPerk_Swat.uc b/KFGame/Classes/KFPerk_Swat.uc index 978bb47..5ded4ed 100644 --- a/KFGame/Classes/KFPerk_Swat.uc +++ b/KFGame/Classes/KFPerk_Swat.uc @@ -85,6 +85,18 @@ function SetPlayerDefaults( Pawn PlayerPawn ) NewArmor += OwnerPawn.default.MaxArmor * GetSKillValue( PerkSkills[ESWAT_HeavyArmor] ); } + OwnerPawn.AddArmor( Round( NewArmor ) ); + } +} + +function SetWaveDefaults() +{ + local float NewArmor; + + super.SetWaveDefaults(); + + if( OwnerPawn.Role == ROLE_Authority ) + { if( IsBodyArmorActive() ) { NewArmor += OwnerPawn.default.MaxArmor * GetSKillValue( PerkSkills[ESWAT_BodyArmor] ); diff --git a/KFGame/Classes/KFPickupFactory.uc b/KFGame/Classes/KFPickupFactory.uc index 2453e69..8d66a0c 100644 --- a/KFGame/Classes/KFPickupFactory.uc +++ b/KFGame/Classes/KFPickupFactory.uc @@ -185,6 +185,11 @@ function bool CurrentPickupIsAmmo() return false; } +function bool CurrentPickupIsCash() +{ + return false; +} + /** * Make pickup mesh and associated effects hidden. */ diff --git a/KFGame/Classes/KFPickupFactory_Item.uc b/KFGame/Classes/KFPickupFactory_Item.uc index 48a8a09..9f5952c 100644 --- a/KFGame/Classes/KFPickupFactory_Item.uc +++ b/KFGame/Classes/KFPickupFactory_Item.uc @@ -315,6 +315,9 @@ function GiveWeapon( Pawn P ) local class KFWeaponClass; local KFInventoryManager KFIM; local Inventory Inv; + local bool bIsSecondatyPistol; + local bool bIs9mmInInventory; + local bool bIsHRG93InInventory; // Give us the weapon if we do not have it InventoryClass = ItemPickups[ PickupIndex ].ItemClass; @@ -322,27 +325,40 @@ function GiveWeapon( Pawn P ) // Check if we have the weapon KFIM = KFInventoryManager( P.InvManager ); - // For HRG93R and 9mm pistols, if one of the other type is picked just give the one owned - if (KFIM.Is9mmInInventory()) + bIsSecondatyPistol = InventoryClass.name == 'KFWeap_HRG_93R' || + InventoryClass.name == 'KFWeap_HRG_93R_Dual' || + InventoryClass.name == 'KFWeap_Pistol_9mm' || + InventoryClass.name == 'KFWeap_Pistol_Dual9mm'; + + if (bIsSecondatyPistol) { - if (InventoryClass.name == 'KFWeap_HRG_93R') + bIs9mmInInventory = KFIM.Is9mmInInventory(); + bIsHRG93InInventory = KFIM.IsHRG93InInventory(); + if (!(bIs9mmInInventory && bIsHRG93InInventory)) { - InventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mm'.default.WeaponClassPath, class'Class')); - } - else if (InventoryClass.name == 'KFWeap_HRG_93R_Dual') - { - InventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mmDual'.default.WeaponClassPath, class'Class')); - } - } - else - { - if(InventoryClass.name == 'KFWeap_Pistol_9mm') - { - InventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R'.default.WeaponClassPath, class'Class')); - } - else if (InventoryClass.name == 'KFWeap_Pistol_Dual9mm') - { - InventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R_Dual'.default.WeaponClassPath, class'Class')); + // For HRG93R and 9mm pistols, if one of the other type is picked just give the one owned + if (KFIM.Is9mmInInventory()) + { + if (InventoryClass.name == 'KFWeap_HRG_93R') + { + InventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mm'.default.WeaponClassPath, class'Class')); + } + else if (InventoryClass.name == 'KFWeap_HRG_93R_Dual') + { + InventoryClass = class(DynamicLoadObject(class'KfWeapDef_9mmDual'.default.WeaponClassPath, class'Class')); + } + } + else + { + if(InventoryClass.name == 'KFWeap_Pistol_9mm') + { + InventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R'.default.WeaponClassPath, class'Class')); + } + else if (InventoryClass.name == 'KFWeap_Pistol_Dual9mm') + { + InventoryClass = class(DynamicLoadObject(class'KFWeapDef_HRG_93R_Dual'.default.WeaponClassPath, class'Class')); + } + } } } diff --git a/KFGame/Classes/KFPlayerController.uc b/KFGame/Classes/KFPlayerController.uc index 4aa6b36..e142d7a 100644 --- a/KFGame/Classes/KFPlayerController.uc +++ b/KFGame/Classes/KFPlayerController.uc @@ -172,6 +172,8 @@ struct native ObjectiveAnnouncementInfo /** Used to determine if a player can be considered for achievements */ var bool bIsAchievementPlayer; +var bool bHasEverPossessed; + /********************************************************************************************* * @name UT Variables ********************************************************************************************* */ @@ -761,6 +763,8 @@ var bool bAllowSeasonalSkins; var bool bFriendlyUIEnabled; +var bool bLoggedOut; + cpptext { virtual UBOOL Tick( FLOAT DeltaSeconds, ELevelTick TickType ); @@ -1024,7 +1028,7 @@ simulated function bool GetAllowSeasonalSkins() bIsAllowSeasonalSkins = KFGRI != none && KFGRI.bAllowSeasonalSkins; - if(bIsWWLWeekly || bIsCastleVolter || bIsAllowSeasonalSkins == false) + if (bIsWWLWeekly || bIsCastleVolter || bIsAllowSeasonalSkins == false) { return false; } @@ -1036,8 +1040,11 @@ simulated event name GetSeasonalStateName() { local int EventId, MapModifiedEventId; local KFMapInfo KFMI; + local KFGameReplicationInfo KFGRI; + + KFGRI = KFGameReplicationInfo(WorldInfo.GRI); - EventId = class'KFGameEngine'.static.GetSeasonalEventID(); + EventId = class'KFGameEngine'.static.GetSeasonalEventIDForZedSkins(); MapModifiedEventId = SEI_None; @@ -1049,18 +1056,23 @@ simulated event name GetSeasonalStateName() bAllowSeasonalSkins = GetAllowSeasonalSkins(); - `Log("GetSeasonalStateName: "$EventId$" AllowSeasonalSkins: "$bAllowSeasonalSkins); - if (MapModifiedEventId == SEI_None) { if (bAllowSeasonalSkins == false) { EventId = SEI_None; } + + if (bAllowSeasonalSkins) + { + if (KFGRI != none && KFGRI.SeasonalSkinsIndex != -1) + { + EventId = KFGRI.SeasonalSkinsIndex; + } + } } else { - `Log("GetSeasonalStateName: ModifySeasonalEventId: "$MapModifiedEventId); EventId = MapModifiedEventId; } @@ -1228,6 +1240,8 @@ event Possess(Pawn aPawn, bool bVehicleTransition) { local KFPlayerReplicationInfo KFPRI; + bHasEverPossessed = true; + if( aPawn != none && aPawn.IsAliveAndWell() ) { bIsAchievementPlayer = true; @@ -7259,12 +7273,8 @@ simulated event InitializeStats() local class StatsReadClass; local class StatsWriteClass; - `Log("InitializeStats()"); - - if ( ( StatsRead == none || StatsWrite == none ) && WorldInfo.NetMode != NM_DedicatedServer ) + if ( StatsRead == none && WorldInfo.NetMode != NM_DedicatedServer ) { - `Log("InitializeStats() - Create objects"); - // BWJ - 1-4-17 - Different stats read for dingo if( WorldInfo.IsConsoleBuild( CONSOLE_Durango ) ) { @@ -7293,6 +7303,11 @@ simulated event InitializeStats() } } +simulated function bool HasStatsWrite() +{ + return StatsWrite != none; +} + simulated function LogStatValue(int StatId) { if (StatsWrite != none) @@ -8385,6 +8400,13 @@ function DrawDebugMap( out Canvas Canvas ) ElementColor.B=255; ElementColor.A = 255; } + else if ( KFGRI.PickupInfos[i].PickupType == 3 ) + { + ElementColor.R=255; + ElementColor.G=255; + ElementColor.B=0; + ElementColor.A = 255; + } else { Continue; @@ -12245,6 +12267,8 @@ defaultproperties //Allow PC-based things to be properly ticked, but skip the rest of the tick in native bAlwaysTick=true + bHasEverPossessed = false + MatchStatsClass=Class'EphemeralMatchStats' InputClass=class'KFGame.KFPlayerInput' CheatClass=class'KFGame.KFCheatManager' @@ -12448,4 +12472,6 @@ defaultproperties bAllowSeasonalSkins = false bFriendlyUIEnabled = true + + bLoggedOut = false } diff --git a/KFGame/Classes/KFPlayerInput.uc b/KFGame/Classes/KFPlayerInput.uc index 19ec0cb..ea13db1 100644 --- a/KFGame/Classes/KFPlayerInput.uc +++ b/KFGame/Classes/KFPlayerInput.uc @@ -452,6 +452,15 @@ event PlayerInput( float DeltaTime ) RawJoyVector.y = RawJoyLookUp; RawJoyLookMagnitude = VSize2d( RawJoyVector ); + // Avoid having controller influence view rotation when using keyboard and mouse + if (!bUsingGamepad) + { + CurrTurn = 0; + CurrLookUp = 0; + aLookUp = 0; + aTurn = 0; + } + // PlayerInput shouldn't take timedilation into account DeltaTime /= WorldInfo.TimeDilation; if (Outer.bDemoOwner && WorldInfo.NetMode == NM_Client) diff --git a/KFGame/Classes/KFPlayerReplicationInfoVersus.uc b/KFGame/Classes/KFPlayerReplicationInfoVersus.uc index e674584..4a188b8 100644 --- a/KFGame/Classes/KFPlayerReplicationInfoVersus.uc +++ b/KFGame/Classes/KFPlayerReplicationInfoVersus.uc @@ -257,6 +257,20 @@ reliable client function ShowKickVote(PlayerReplicationInfo PRI, byte VoteDurati super.ShowKickVote(PRI, VoteDuration, bShowChoices && (PRI.GetTeamNum() == GetTeamNum())); } +reliable client function ShowSkipTraderVote(PlayerReplicationInfo PRI, byte VoteDuration, bool bShowChoices) +{ + super.ShowSkipTraderVote(PRI, VoteDuration, bShowChoices && (PRI.GetTeamNum() != GetTeamNum())); +} + +// Override for not allowing skip trader as enemy +simulated function RequestSkiptTrader(PlayerReplicationInfo PRI) +{ + if (GetTeamNum() != 255) + { + super.RequestSkiptTrader(PRI); + } +} + defaultproperties { bReplicateInstigator=false diff --git a/KFGame/Classes/KFProj_Bullet.uc b/KFGame/Classes/KFProj_Bullet.uc index 734159d..ca4c8b1 100644 --- a/KFGame/Classes/KFProj_Bullet.uc +++ b/KFGame/Classes/KFProj_Bullet.uc @@ -89,7 +89,10 @@ simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNorma PenetrationPower -= KFP.PenetrationResistance; } - bPassThrough = TRUE; + if (PenetrationPower > 0) + { + bPassThrough = TRUE; + } } } else diff --git a/KFGame/Classes/KFSM_RecoverFromRagdoll.uc b/KFGame/Classes/KFSM_RecoverFromRagdoll.uc index dcaa256..f5d224d 100644 --- a/KFGame/Classes/KFSM_RecoverFromRagdoll.uc +++ b/KFGame/Classes/KFSM_RecoverFromRagdoll.uc @@ -268,6 +268,12 @@ function SpecialMoveEnded(Name PrevMove, Name NextMove) Super.SpecialMoveEnded(PrevMove, NextMove); } +function AnimEndNotify(AnimNodeSequence SeqNode, float PlayedTime, float ExcessTime) +{ + // By default end this special move. + KFPOwner.EndSpecialMove(SM_RecoverFromRagdoll); +} + defaultproperties { Handle=KFSM_RecoverFromRagdoll diff --git a/KFGame/Classes/KFSeqAct_DisableDoor.uc b/KFGame/Classes/KFSeqAct_DisableDoor.uc index 8632d07..af85287 100644 --- a/KFGame/Classes/KFSeqAct_DisableDoor.uc +++ b/KFGame/Classes/KFSeqAct_DisableDoor.uc @@ -20,8 +20,7 @@ event Activated() { Door = KFDoorActor(ObjVar.GetObjectValue()); Door.SetInteractive(false); - Door.bIsDoorOpen = true; - Door.UseDoor(none); + Door.CloseDoor(); } } } diff --git a/KFGame/Classes/KFSeqAct_EnableDoor.uc b/KFGame/Classes/KFSeqAct_EnableDoor.uc new file mode 100644 index 0000000..87feba2 --- /dev/null +++ b/KFGame/Classes/KFSeqAct_EnableDoor.uc @@ -0,0 +1,36 @@ +//============================================================================= +// KFSeqAct_EnableDoor +//============================================================================= +// Enables one or more KFDoorActors, meaning they can be interacted +// with or damaged +//============================================================================= +// Killing Floor 2 +//============================================================================= + + +class KFSeqAct_EnableDoor extends SequenceAction; + +event Activated() +{ + local SeqVar_Object ObjVar; + local KFDoorActor Door; + + if (InputLinks[0].bHasImpulse) + { + foreach LinkedVariables(class'SeqVar_Object',ObjVar,"KFDoorActor(s)") + { + Door = KFDoorActor(ObjVar.GetObjectValue()); + Door.SetInteractive(true); + } + } +} + +defaultProperties +{ + ObjCategory="Killing Floor" + ObjName="Enable Door" + + InputLinks(0)=(LinkDesc="Enable") + VariableLinks(0)=(ExpectedType=class'SeqVar_Object',LinkDesc="KFDoorActor(s)",PropertyName="") + bCallHandler=false +} \ No newline at end of file diff --git a/KFGame/Classes/KFVoteCollector.uc b/KFGame/Classes/KFVoteCollector.uc index 405e68a..689c204 100644 --- a/KFGame/Classes/KFVoteCollector.uc +++ b/KFGame/Classes/KFVoteCollector.uc @@ -1083,7 +1083,7 @@ function bool ShouldConcludePauseGameVote() reliable server function ConcludeVotePauseGame() { local array PRIs; - local int i, NumPRIs; + local int i; local KFGameInfo KFGI; local KFGameReplicationInfo KFGRI; @@ -1099,7 +1099,6 @@ reliable server function ConcludeVotePauseGame() PRIs[i].HidePauseGameVote(); } - NumPRIs = PRIs.Length; SetTimer( 0.f, true, nameof(UpdatePauseGameTimer), self ); if( NoVotes > 0) @@ -1108,7 +1107,7 @@ reliable server function ConcludeVotePauseGame() SetTimer( KFGI.TimeBetweenFailedVotes, false, nameof(ClearFailedVoteFlag), self ); KFGI.BroadcastLocalized(KFGI, class'KFLocalMessage', KFGRI.bIsEndlessPaused ? LMT_ResumeVoteFailed : LMT_PauseVoteFailed); } - else if( YesVotes >= NumPRIs ) + else if( YesVotes >= KFGameInfo(WorldInfo.Game).NumPlayers ) { //pause game @@ -1159,6 +1158,17 @@ reliable server function ResetPauseGameVote() } } +function ServerNotifyDisconnect() +{ + local KFGameReplicationInfo KFGRI; + KFGRI = Outer; + + if (bIsPauseGameVoteInProgress && KFGRI.bIsEndlessPaused && (YesVotes + NoVotes >= KFGameInfo(WorldInfo.Game).NumPlayers)) + { + ConcludeVotePauseGame(); + } +} + DefaultProperties { VoteTime=30 diff --git a/KFGame/Classes/KFWeap_DualBase.uc b/KFGame/Classes/KFWeap_DualBase.uc index 38beeb9..c8e699a 100644 --- a/KFGame/Classes/KFWeap_DualBase.uc +++ b/KFGame/Classes/KFWeap_DualBase.uc @@ -924,6 +924,16 @@ simulated function StartFire(byte FireModeNum) Super.StartFire(FireModeNum); } +function bool DenyPickupQuery(class ItemClass, Actor Pickup) +{ + if (ItemClass == class || ItemClass == SingleClass) + { + return DenyPickupQuery_Internal(ItemClass, Pickup); + } + + return false; +} + defaultproperties { InventoryGroup=IG_Primary diff --git a/KFGame/Classes/KFWeapon.uc b/KFGame/Classes/KFWeapon.uc index 79a500c..2b52a94 100644 --- a/KFGame/Classes/KFWeapon.uc +++ b/KFGame/Classes/KFWeapon.uc @@ -1768,49 +1768,60 @@ function SetOriginalValuesFromPickup( KFWeapon PickedUpWeapon ) */ function bool DenyPickupQuery(class ItemClass, Actor Pickup) { - local bool bDenyPickUp; + if (ItemClass == class || (DualClass != none && ItemClass == DualClass)) + { + return DenyPickupQuery_Internal(ItemClass, Pickup); + } + + return false; +} + +function bool DenyPickupQuery_Internal(class ItemClass, Actor Pickup) +{ + local bool bDenyPickUp, bIsProjectile; local KFPlayerController KFPC; local class KFWeapClass; - if (ItemClass == class) + KFWeapClass = class(ItemClass); + bIsProjectile = Pickup.IsA('Projectile'); + + // don't do this ammo check if the player is trying to pick up the second dual weapon + if (bIsProjectile || + KFWeapClass == none || default.DualClass == none || + (ItemClass == class && KFWeapClass.default.DualClass != default.DualClass)) { - KFWeapClass = class(ItemClass); - // don't do this ammo check if the player is trying to pick up the second dual weapon - if (KFWeapClass == none || KFWeapClass.default.DualClass == none || KFWeapClass.default.DualClass != default.DualClass) + // Unless ammo is full, allow the pickup to handle giving ammo + // @note: projectile pickups can only refill primary ammo + + if (CanRefillSecondaryAmmo() && !bIsProjectile) { - // Unless ammo is full, allow the pickup to handle giving ammo - // @note: projectile pickups can only refill primary ammo - if (CanRefillSecondaryAmmo() && !Pickup.IsA('Projectile')) + bDenyPickUp = ((SpareAmmoCount[0] + AmmoCount[0]) >= GetMaxAmmoAmount(0) && AmmoCount[1] >= MagazineCapacity[1]); + } + else + { + if (KFProj_RicochetStickBullet(Pickup) == none || KFProj_RicochetStickBullet(Pickup).bPickupCanBeDenied) { - bDenyPickUp = ((SpareAmmoCount[0] + AmmoCount[0]) >= GetMaxAmmoAmount(0) && AmmoCount[1] >= MagazineCapacity[1]); + bDenyPickUp = ((SpareAmmoCount[0] + AmmoCount[0]) >= GetMaxAmmoAmount(0)); } else { - if (KFProj_RicochetStickBullet(Pickup) == none || KFProj_RicochetStickBullet(Pickup).bPickupCanBeDenied) - { - bDenyPickUp = ((SpareAmmoCount[0] + AmmoCount[0]) >= GetMaxAmmoAmount(0)); - } - else - { - bDenyPickUp = false; - } + bDenyPickUp = false; } } + } - if (bDenyPickUp) + if (bDenyPickUp) + { + KFPC = KFPlayerController(Instigator.Controller); + //show non critical message for deny pickup + if (KFPC != None) { - KFPC = KFPlayerController(Instigator.Controller); - //show non critical message for deny pickup - if (KFPC != None) - { - KFPC.ReceiveLocalizedMessage(class'KFLocalMessage_Game', (MagazineCapacity[0] == 0) ? GMT_AlreadyCarryingWeapon : GMT_AmmoIsFull); - } + KFPC.ReceiveLocalizedMessage(class'KFLocalMessage_Game', (MagazineCapacity[0] == 0) ? GMT_AlreadyCarryingWeapon : GMT_AmmoIsFull); } } return bDenyPickUp; } - function NotifyPickedUp() { ClientNotifyPickedUp(); @@ -6568,7 +6579,7 @@ simulated state WeaponFiring if (WorldInfo.NetMode == NM_Client && bAllowClientAmmoTracking && FireInterval[CurrentFireMode] <= MinFireIntervalToTriggerSync) { - SyncCurrentAmmoCount(CurrentFireMode, AmmoCount[CurrentFireMode]); + SyncCurrentAmmoCount(CurrentFireMode, AmmoCount[GetAmmoType(CurrentFireMode)]); } } @@ -6614,11 +6625,11 @@ simulated state WeaponFiring } } -unreliable server function SyncCurrentAmmoCount(byte FireMode, int CurrentAmmoCount) +reliable server function SyncCurrentAmmoCount(byte FireMode, int CurrentAmmoCount) { - if(AmmoCount[FireMode] != CurrentAmmoCount) + if(AmmoCount[GetAmmoType(CurrentFireMode)] != CurrentAmmoCount) { - AmmoCount[FireMode] = CurrentAmmoCount; + AmmoCount[GetAmmoType(CurrentFireMode)] = CurrentAmmoCount; } } @@ -7128,6 +7139,7 @@ simulated function TimeWeaponReloading() local name AnimName; local float AnimLength, AnimRate; local float AmmoTimer, StatusTimer; + local KFPlayerController KFPC; ReloadStatus = GetNextReloadStatus(); @@ -7146,8 +7158,8 @@ simulated function TimeWeaponReloading() if ( AnimLength > 0.f ) { MakeNoise(0.5f,'PlayerReload'); // AI - - if ( Instigator.IsFirstPerson() ) + KFPC = KFPlayerController(Instigator.Controller); + if ( Instigator.IsFirstPerson() || (KFPC != none && KFPC.IsBossCameraMode())) { PlayAnimation(AnimName, AnimLength); } diff --git a/KFGame/Classes/KFWeaponSkinList.uc b/KFGame/Classes/KFWeaponSkinList.uc index 7a1ee1a..f9a7ada 100644 --- a/KFGame/Classes/KFWeaponSkinList.uc +++ b/KFGame/Classes/KFWeaponSkinList.uc @@ -4828,7 +4828,7 @@ defaultproperties Skins.Add((Id=9689, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_Dragonbreath', MIC_1P=("WEP_SkinSet78_MAT.spectre_hrgmegadragonsbreath.Spectre_HRGMegaDragonsbreath_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectre_hrgmegadragonsbreath.Spectre_HRGMegaDragonsbreath_Barrel_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectre_hrgmegadragonsbreath.Spectre_HRGMegaDragonsbreath_Loader_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectre_hrgmegadragonsbreath.Spectre_HRGMegaDragonsbreath_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectre_hrgmegadragonsbreath.Spectre_HRGMegaDragonsbreath_3P_Pickup_MIC")) //Spectre HRG Head Hunter - Skins.Add((Id=9690, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_CranialPopper', MIC_1P=("WEP_1P_HRG_CranialPopper_MAT.Wep_Cranial_Optic_PM_MIC", "WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_Optic_1P_Mint_MIC", "WEP_1P_RailGun_MAT.WEP_RailGunScopeLense_PM", "WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_3P_Pickup_MIC")) + Skins.Add((Id=9690, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_CranialPopper', MIC_1P=("WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_Optic_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectre_hrgcranialpopper.Spectre_HRGCranialPopper_3P_Pickup_MIC")) //Spectre HRG Locust Skins.Add((Id=9691, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_Locust', MIC_1P=("WEP_SkinSet78_MAT.spectre_hrglocust.Spectre_HRGLocust_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectre_hrglocust.Spectre_HRGLocust_Optic_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectre_hrglocust.Spectre_HRGLocust_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectre_hrglocust.Spectre_HRGLocust_3P_Pickup_MIC")) @@ -4867,7 +4867,7 @@ defaultproperties Skins.Add((Id=9702, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_Dragonbreath', MIC_1P=("WEP_SkinSet78_MAT.spectrechroma_hrgmegadragonsbreath.SpectreChroma_HRGMegaDragonsbreath_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectrechroma_hrgmegadragonsbreath.SpectreChroma_HRGMegaDragonsbreath_Barrel_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectrechroma_hrgmegadragonsbreath.SpectreChroma_HRGMegaDragonsbreath_Loader_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectrechroma_hrgmegadragonsbreath.SpectreChroma_HRGMegaDragonsbreath_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectrechroma_hrgmegadragonsbreath.SpectreChroma_HRGMegaDragonsbreath_3P_Pickup_MIC")) //Spectre Chroma HRG Head Hunter - Skins.Add((Id=9703, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_CranialPopper', MIC_1P=("WEP_1P_HRG_CranialPopper_MAT.Wep_Cranial_Optic_PM_MIC", "WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_Optic_1P_Mint_MIC", "WEP_1P_RailGun_MAT.WEP_RailGunScopeLense_PM", "WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_3P_Pickup_MIC")) + Skins.Add((Id=9703, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_CranialPopper', MIC_1P=( "WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_Optic_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectrechroma_hrgcranialpopper.SpectreChroma_HRGCranialPopper_3P_Pickup_MIC")) //Spectre Chroma HRG Locust Skins.Add((Id=9704, bNeedsCodeUpdates = true, Weapondef=class'KFWeapDef_HRG_Locust', MIC_1P=("WEP_SkinSet78_MAT.spectrechroma_hrglocust.SpectreChroma_HRGLocust_1P_Mint_MIC", "WEP_SkinSet78_MAT.spectrechroma_hrglocust.SpectreChroma_HRGLocust_Optic_1P_Mint_MIC"), MIC_3P="WEP_SkinSet78_MAT.spectrechroma_hrglocust.SpectreChroma_HRGLocust_3P_Mint_MIC", MIC_Pickup="WEP_SkinSet78_MAT.spectrechroma_hrglocust.SpectreChroma_HRGLocust_3P_Pickup_MIC")) diff --git a/KFGameContent/Classes/KFDT_Ballistic_ThermiteBoreImpact.uc b/KFGameContent/Classes/KFDT_Ballistic_ThermiteBoreImpact.uc index 06f1697..c787008 100644 --- a/KFGameContent/Classes/KFDT_Ballistic_ThermiteBoreImpact.uc +++ b/KFGameContent/Classes/KFDT_Ballistic_ThermiteBoreImpact.uc @@ -49,6 +49,8 @@ defaultproperties BurnDamageType=class'KFDT_Fire_ThermiteImpactDoT' + SelfDamageReductionValue=0.05f //0.25f + ModifierPerkList(0)=class'KFPerk_FireBug' WeaponDef=class'KFWeapDef_ThermiteBore' diff --git a/KFGameContent/Classes/KFDT_Explosive_Blunderbuss.uc b/KFGameContent/Classes/KFDT_Explosive_Blunderbuss.uc index bcf5d2a..0310d4a 100644 --- a/KFGameContent/Classes/KFDT_Explosive_Blunderbuss.uc +++ b/KFGameContent/Classes/KFDT_Explosive_Blunderbuss.uc @@ -24,6 +24,8 @@ defaultproperties KnockdownPower=150 StumblePower=400 + + SelfDamageReductionValue=0.5f //0.75f //Perk ModifierPerkList(0)=class'KFPerk_Demolitionist' diff --git a/KFGameContent/Classes/KFDT_Explosive_GravityImploder.uc b/KFGameContent/Classes/KFDT_Explosive_GravityImploder.uc index 645e8a7..945a6d1 100644 --- a/KFGameContent/Classes/KFDT_Explosive_GravityImploder.uc +++ b/KFGameContent/Classes/KFDT_Explosive_GravityImploder.uc @@ -27,6 +27,8 @@ defaultproperties KDeathVel=200 StumblePower=200 + SelfDamageReductionValue=0.075f + ModifierPerkList(0)=class'KFPerk_Demolitionist' WeaponDef=class'KFWeapDef_GravityImploder' diff --git a/KFGameContent/Classes/KFDT_Explosive_GravityImploderWave.uc b/KFGameContent/Classes/KFDT_Explosive_GravityImploderWave.uc index 7750046..08b68be 100644 --- a/KFGameContent/Classes/KFDT_Explosive_GravityImploderWave.uc +++ b/KFGameContent/Classes/KFDT_Explosive_GravityImploderWave.uc @@ -23,6 +23,7 @@ defaultproperties KnockdownPower=400 + SelfDamageReductionValue=0.075f //Perk ModifierPerkList(0)=class'KFPerk_Demolitionist' WeaponDef=class'KFWeapDef_GravityImploder' diff --git a/KFGameContent/Classes/KFDT_Explosive_HRG_CrossboomAlt.uc b/KFGameContent/Classes/KFDT_Explosive_HRG_CrossboomAlt.uc index 0a6ff1b..0891065 100644 --- a/KFGameContent/Classes/KFDT_Explosive_HRG_CrossboomAlt.uc +++ b/KFGameContent/Classes/KFDT_Explosive_HRG_CrossboomAlt.uc @@ -24,6 +24,8 @@ defaultproperties KnockdownPower = 100 StumblePower = 200 + SelfDamageReductionValue = 0.25f; + //Perk ModifierPerkList(0) = class'KFPerk_Demolitionist' diff --git a/KFGameContent/Classes/KFDT_Explosive_HRG_Locust.uc b/KFGameContent/Classes/KFDT_Explosive_HRG_Locust.uc index 249f276..6d26283 100644 --- a/KFGameContent/Classes/KFDT_Explosive_HRG_Locust.uc +++ b/KFGameContent/Classes/KFDT_Explosive_HRG_Locust.uc @@ -37,4 +37,7 @@ defaultproperties bCausesFracture=false bCanPlayDeadHitEffects=false + + SelfDamageReductionValue = 0f; + } diff --git a/KFGameContent/Classes/KFDT_Explosive_HRG_Stunner.uc b/KFGameContent/Classes/KFDT_Explosive_HRG_Stunner.uc index c696c76..6dbfd3f 100644 --- a/KFGameContent/Classes/KFDT_Explosive_HRG_Stunner.uc +++ b/KFGameContent/Classes/KFDT_Explosive_HRG_Stunner.uc @@ -20,8 +20,8 @@ defaultproperties KDeathUpKick=1000 KDeathVel=300 - StunPower=160 - StumblePower=40 + StunPower=200 + StumblePower=100 //Perk ModifierPerkList(0)=class'KFPerk_SWAT' diff --git a/KFGameContent/Classes/KFDT_Explosive_HuskCannon.uc b/KFGameContent/Classes/KFDT_Explosive_HuskCannon.uc index d2afd6c..77b4d9c 100644 --- a/KFGameContent/Classes/KFDT_Explosive_HuskCannon.uc +++ b/KFGameContent/Classes/KFDT_Explosive_HuskCannon.uc @@ -50,7 +50,8 @@ defaultproperties ModifierPerkList(0) = class'KFPerk_Firebug' ModifierPerkList(1)=class'KFPerk_Demolitionist' - + SelfDamageReductionValue=0.1f + WeaponDef=class'KFWeapDef_HuskCannon' BurnDamageType = class'KFDT_HuskCannonDot' diff --git a/KFGameContent/Classes/KFDT_Explosive_SealSqueal.uc b/KFGameContent/Classes/KFDT_Explosive_SealSqueal.uc index 99f49d2..4de23fc 100644 --- a/KFGameContent/Classes/KFDT_Explosive_SealSqueal.uc +++ b/KFGameContent/Classes/KFDT_Explosive_SealSqueal.uc @@ -24,6 +24,8 @@ defaultproperties KnockdownPower = 150 StumblePower = 400 + SelfDamageReductionValue = 0.25f + //Perk ModifierPerkList(0) = class'KFPerk_Demolitionist' diff --git a/KFGameContent/Classes/KFDT_Fire_ThermiteImpactDoT.uc b/KFGameContent/Classes/KFDT_Fire_ThermiteImpactDoT.uc index 3d50557..6193033 100644 --- a/KFGameContent/Classes/KFDT_Fire_ThermiteImpactDoT.uc +++ b/KFGameContent/Classes/KFDT_Fire_ThermiteImpactDoT.uc @@ -35,6 +35,8 @@ defaultproperties DoT_Interval=0.5 DoT_DamageScale=0.2 + SelfDamageReductionValue=0.05f //0.25f + BurnPower=10 } diff --git a/KFGameContent/Classes/KFDT_Piercing_ChiappaShrapnel.uc b/KFGameContent/Classes/KFDT_Piercing_ChiappaShrapnel.uc index 9aa4af8..8e82112 100644 --- a/KFGameContent/Classes/KFDT_Piercing_ChiappaShrapnel.uc +++ b/KFGameContent/Classes/KFDT_Piercing_ChiappaShrapnel.uc @@ -22,4 +22,6 @@ defaultproperties WeaponDef=class'KFWeapDef_ChiappaRhino' ModifierPerkList(0)=class'KFPerk_Gunslinger' + + bAnyPerk = true } diff --git a/KFGameContent/Classes/KFDT_Toxic_HRG_Vampire_BloodBall.uc b/KFGameContent/Classes/KFDT_Toxic_HRG_Vampire_BloodBall.uc index b7b095b..009592e 100644 --- a/KFGameContent/Classes/KFDT_Toxic_HRG_Vampire_BloodBall.uc +++ b/KFGameContent/Classes/KFDT_Toxic_HRG_Vampire_BloodBall.uc @@ -21,6 +21,8 @@ defaultproperties DoT_Duration=2.0 //1.0 DoT_Interval=0.5 //1.0 DoT_DamageScale=0.1 + + SelfDamageReductionValue=0.1f ModifierPerkList(0)=class'KFPerk_FieldMedic' WeaponDef=class'KFWeapDef_HRG_Vampire' diff --git a/KFGameContent/Classes/KFDT_Toxic_MineReconstructorExplosion.uc b/KFGameContent/Classes/KFDT_Toxic_MineReconstructorExplosion.uc index 03b3b02..d6c09d2 100644 --- a/KFGameContent/Classes/KFDT_Toxic_MineReconstructorExplosion.uc +++ b/KFGameContent/Classes/KFDT_Toxic_MineReconstructorExplosion.uc @@ -36,6 +36,8 @@ defaultproperties DoT_Duration=4.0 //5.0 //1.7 DoT_Interval=1.0 //1.0 //0.4 DoT_DamageScale=0.1 //1.5 + + SelfDamageReductionValue=0.1f ModifierPerkList(0)=class'KFPerk_FieldMedic' WeaponDef=class'KFWeapDef_Mine_Reconstructor' diff --git a/KFGameContent/Classes/KFGameInfo_Survival.uc b/KFGameContent/Classes/KFGameInfo_Survival.uc index aa6de75..ca17058 100644 --- a/KFGameContent/Classes/KFGameInfo_Survival.uc +++ b/KFGameContent/Classes/KFGameInfo_Survival.uc @@ -1087,6 +1087,12 @@ function WaveStarted() } `QALog("Player Name:" @ KFPC.PlayerReplicationInfo.PlayerName @ "Dosh" @ KFPC.PlayerReplicationInfo.Score, bLogScoring); + + if (KFPC.IsInState('Spectating') == false + && KFPC.PlayerReplicationInfo.bOnlySpectator == false) + { + KFPC.GetPerk().SetWaveDefaults(); + } } diff --git a/KFGameContent/Classes/KFPawn_AutoTurret.uc b/KFGameContent/Classes/KFPawn_AutoTurret.uc index 7e027e8..a20160f 100644 --- a/KFGameContent/Classes/KFPawn_AutoTurret.uc +++ b/KFGameContent/Classes/KFPawn_AutoTurret.uc @@ -22,7 +22,6 @@ enum ETurretState }; var SkeletalMeshComponent TurretMesh; -var Controller InstigatorController; /** Speed to rise the drone in Z axis after thrown */ var const float DeployZSpeed; @@ -164,6 +163,8 @@ simulated event PreBeginPlay() if (Role == ROLE_Authority) { + SetCollisionType(COLLIDE_NoCollision); + Weapon = Spawn(WeaponClass, self); TurretWeapon = KFWeap_AutoTurretWeapon(Weapon); MyKFWeapon = TurretWeapon; @@ -390,6 +391,7 @@ simulated state Deploy { local float CurrentHeight; local vector LocationNext; + local bool bTraceOk; super.Tick(DeltaTime); @@ -404,7 +406,12 @@ simulated state Deploy LocationNext.z += Velocity.z * DeltaTime; // If we are going to collide stop - if (!FastTrace(LocationNext, Location, vect(25,25,25))) + + SetCollisionType(COLLIDE_CustomDefault); + bTraceOk = FastTrace(LocationNext, Location, vect(25,25,25)); + SetCollisionType(COLLIDE_NoCollision); + + if (!bTraceOk) { SetTurretState(ETS_TargetSearch); return; @@ -507,7 +514,9 @@ simulated function bool TargetValidWithGeometry(Actor Target, vector MuzzleLoc, local bool bTraderFound; local int IteratorTrader; + SetCollisionType(COLLIDE_CustomDefault); HitActor = Trace(HitLocation, HitNormal, ReferencePosition, MuzzleLoc,,,,TRACEFLAG_Bullet); + SetCollisionType(COLLIDE_NoCollision); if (HitActor == none || KFPawn_Monster(HitActor) == none) { @@ -804,6 +813,8 @@ function CheckForTargets() TurretWeapon.GetMuzzleLocAndRot(MuzzleLoc, MuzzleRot); + SetCollisionType(COLLIDE_CustomDefault); + foreach CollidingActors(class'KFPawn_Monster', CurrentTarget, EffectiveRadius, Location, true,, HitInfo) { // Visible by local player or team @@ -834,6 +845,8 @@ function CheckForTargets() } } + SetCollisionType(COLLIDE_NoCollision); + if (EnemyTarget != none) { SetTurretState(ETS_Combat); @@ -882,14 +895,18 @@ simulated function CheckEnemiesWithinExplosionRadius() //DrawDebugSphere(CheckExplosionLocation, ExplosiveRadius, 10, 255, 255, 0 ); + SetCollisionType(COLLIDE_CustomDefault); + foreach CollidingActors(class'KFPawn_Monster', KFPM, ExplosiveRadius, CheckExplosionLocation, true,,) { if(KFPM != none && KFPM.IsAliveAndWell()) { SetTurretState(ETS_Detonate); - return; + break; } } + + SetCollisionType(COLLIDE_NoCollision); } simulated function StartIdleAnim() @@ -996,6 +1013,12 @@ simulated function UpdateRotation(float DeltaTime) } } } + else + { + NewRotation = Rotation; + NewRotation.Roll = 0.0f; + SetRotation(NewRotation); + } } simulated function RotateByTime(rotator NewRotation, float Time) @@ -1074,11 +1097,6 @@ simulated function bool CanInteractWithPawnGrapple() return false; } -simulated function bool CanInteractWithZoneVelocity() -{ - return false; -} - function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab) { return false; diff --git a/KFGameContent/Classes/KFPawn_HRG_Warthog.uc b/KFGameContent/Classes/KFPawn_HRG_Warthog.uc index 4f563b0..57cec4d 100644 --- a/KFGameContent/Classes/KFPawn_HRG_Warthog.uc +++ b/KFGameContent/Classes/KFPawn_HRG_Warthog.uc @@ -22,7 +22,6 @@ enum ETurretState }; var SkeletalMeshComponent TurretMesh; -var Controller InstigatorController; /** Speed to rise the drone in Z axis after thrown */ var const float DeployZSpeed; @@ -170,6 +169,8 @@ simulated event PreBeginPlay() if (Role == ROLE_Authority) { + SetCollisionType(COLLIDE_NoCollision); + Weapon = Spawn(WeaponClass, self); TurretWeapon = KFWeap_HRG_WarthogWeapon(Weapon); MyKFWeapon = TurretWeapon; @@ -396,6 +397,7 @@ simulated state Deploy { local float CurrentHeight; local vector LocationNext; + local bool bTraceOk; super.Tick(DeltaTime); @@ -410,7 +412,11 @@ simulated state Deploy LocationNext.z += Velocity.z * DeltaTime; // If we are going to collide stop - if (!FastTrace(LocationNext, Location, vect(25,25,25))) + SetCollisionType(COLLIDE_CustomDefault); + bTraceOk = FastTrace(LocationNext, Location, vect(25,25,25)); + SetCollisionType(COLLIDE_NoCollision); + + if (!bTraceOk) { SetTurretState(ETS_TargetSearch); return; @@ -511,7 +517,9 @@ simulated function bool TargetValidWithGeometry(Actor Target, vector MuzzleLoc, local bool bTraderFound; local int IteratorTrader; + SetCollisionType(COLLIDE_CustomDefault); HitActor = Trace(HitLocation, HitNormal, ReferencePosition, MuzzleLoc,,,,TRACEFLAG_Bullet); + SetCollisionType(COLLIDE_NoCollision); if (HitActor == none || KFPawn_Monster(HitActor) == none) { @@ -909,6 +917,8 @@ function CheckForTargets() TurretWeapon.GetMuzzleLocAndRot(MuzzleLoc, MuzzleRot); + SetCollisionType(COLLIDE_CustomDefault); + foreach CollidingActors(class'KFPawn_Monster', CurrentTarget, EffectiveRadius, Location, true,, HitInfo) { // Visible by local player or team @@ -939,6 +949,8 @@ function CheckForTargets() } } + SetCollisionType(COLLIDE_NoCollision); + if (EnemyTarget != none) { SetTurretState(ETS_Combat); @@ -987,14 +999,18 @@ simulated function CheckEnemiesWithinExplosionRadius() //DrawDebugSphere(CheckExplosionLocation, ExplosiveRadius, 10, 255, 255, 0 ); + SetCollisionType(COLLIDE_CustomDefault); + foreach CollidingActors(class'KFPawn_Monster', KFPM, ExplosiveRadius, CheckExplosionLocation, true,,) { if(KFPM != none && KFPM.IsAliveAndWell()) { SetTurretState(ETS_Detonate); - return; + break; } } + + SetCollisionType(COLLIDE_NoCollision); } simulated function StartIdleAnim() @@ -1101,6 +1117,12 @@ simulated function UpdateRotation(float DeltaTime) } } } + else + { + NewRotation = Rotation; + NewRotation.Roll = 0.0f; + SetRotation(NewRotation); + } } simulated function RotateByTime(rotator NewRotation, float Time) @@ -1179,11 +1201,6 @@ simulated function bool CanInteractWithPawnGrapple() return false; } -simulated function bool CanInteractWithZoneVelocity() -{ - return false; -} - function bool CanBeGrabbed(KFPawn GrabbingPawn, optional bool bIgnoreFalling, optional bool bAllowSameTeamGrab) { return false; diff --git a/KFGameContent/Classes/KFPawn_ZedBloatKing.uc b/KFGameContent/Classes/KFPawn_ZedBloatKing.uc index 6e7496f..9dce271 100644 --- a/KFGameContent/Classes/KFPawn_ZedBloatKing.uc +++ b/KFGameContent/Classes/KFPawn_ZedBloatKing.uc @@ -580,6 +580,17 @@ simulated function string GetIconPath() return "ZED_Patriarch_UI.ZED-VS_Icon_Boss"; } +simulated event EndSpecialMove(optional ESpecialMove SpecialMoveToEnd, optional bool bForceNetSync) +{ + // Wait for the anim to finish + if ( SpecialMove == SM_RecoverFromRagdoll && SpecialMoveToEnd != SM_RecoverFromRagdoll) + { + return; + } + + Super.EndSpecialMove(SpecialMoveToEnd, bForceNetSync); +} + defaultproperties { LocalizationKey=KFPawn_ZedBloatKing diff --git a/KFGameContent/Classes/KFPawn_ZedClot_AlphaKing.uc b/KFGameContent/Classes/KFPawn_ZedClot_AlphaKing.uc index a72ab4d..0c73d97 100644 --- a/KFGameContent/Classes/KFPawn_ZedClot_AlphaKing.uc +++ b/KFGameContent/Classes/KFPawn_ZedClot_AlphaKing.uc @@ -230,4 +230,6 @@ defaultproperties bCanRage=true EnragedSoundEvent=AkEvent'WW_ZED_Clot_Alpha.Play_Alpha_Clot_Special_Enrage' + + ElitePawnClass.Empty } diff --git a/KFGameContent/Classes/KFPawn_ZedCrawlerKing.uc b/KFGameContent/Classes/KFPawn_ZedCrawlerKing.uc index 5a19962..273202b 100644 --- a/KFGameContent/Classes/KFPawn_ZedCrawlerKing.uc +++ b/KFGameContent/Classes/KFPawn_ZedCrawlerKing.uc @@ -126,4 +126,6 @@ defaultproperties MonsterArchPath="ZED_ARCH.ZED_CrawlerKing_Archetype" ControllerClass=class'KFAIController_ZedCrawlerKing' DifficultySettings=class'KFDifficulty_CrawlerKing' + + ElitePawnClass.Empty } \ No newline at end of file diff --git a/KFGameContent/Classes/KFPawn_ZedGorefastDualBlade.uc b/KFGameContent/Classes/KFPawn_ZedGorefastDualBlade.uc index 36d0838..86d558e 100644 --- a/KFGameContent/Classes/KFPawn_ZedGorefastDualBlade.uc +++ b/KFGameContent/Classes/KFPawn_ZedGorefastDualBlade.uc @@ -8,6 +8,27 @@ //============================================================================= class KFPawn_ZedGorefastDualBlade extends KFPawn_ZedGorefast; +var protected AKEvent StopWhirlwindEvent; + +/** + Whirlwind attack can be parried but the initial sfx is not stopped. + As we don't have an event to stop it, it has been assigned to the + 'hips' bone so it can be stopped. + */ +function bool NotifyAttackParried(Pawn InstigatedBy, byte InParryStrength) +{ + local bool Result; + + Result = Super.NotifyAttackParried(InstigatedBy, InParryStrength); + + if (StopWhirlwindEvent != none) + { + PlayAkEvent( StopWhirlwindEvent ); + } + + return Result; +} + defaultproperties { LocalizationKey=KFPawn_ZedGorefastDualBlade @@ -106,6 +127,7 @@ defaultproperties // Block Settings MinBlockFOV=0.1f + StopWhirlwindEvent = AkEvent'WW_ZED_GoreFast_2.Stop_Gorefast_2_Whirl'; - + ElitePawnClass.Empty } \ No newline at end of file diff --git a/KFGameContent/Classes/KFPawn_ZedMatriarch.uc b/KFGameContent/Classes/KFPawn_ZedMatriarch.uc index 80f052d..7e18d16 100644 --- a/KFGameContent/Classes/KFPawn_ZedMatriarch.uc +++ b/KFGameContent/Classes/KFPawn_ZedMatriarch.uc @@ -1079,7 +1079,7 @@ function CallOutCloakingExpired() /** Handle cloaking materials */ simulated function UpdateGameplayMICParams() { - local int i; + local int i, NumRepeats; local bool bIsSpotted; local bool bWasCloaked; local KFCharacterInfo_Monster MonsterInfo; @@ -1096,7 +1096,8 @@ simulated function UpdateGameplayMICParams() bIsSpotted = (bIsCloakingSpottedByLP || bIsCloakingSpottedByTeam); if ((!bIsCloaking || IsImpaired()) && CharacterMICs[0].Parent != MonsterInfo.Skins[0]) { - for (i = 0; i < MonsterInfo.Skins.Length; ++i) + NumRepeats = Min(CharacterMICs.Length, MonsterInfo.Skins.Length); + for (i = 0; i < NumRepeats; ++i) { bWasCloaked = bWasCloaked || (CharacterMICs[i].Parent == MonsterInfo.CloakedSkins[i]) || @@ -1126,6 +1127,8 @@ simulated function UpdateGameplayMICParams() } else if (bIsCloaking && bIsSpotted && CharacterMICs[0].Parent != MonsterInfo.SpottedSkins[0]) { + NumRepeats = Min(CharacterMICs.Length, MonsterInfo.SpottedSkins.Length); + for (i = 0; i < MonsterInfo.SpottedSkins.Length; ++i) { CharacterMICs[i].SetParent(MonsterInfo.SpottedSkins[i]); @@ -1148,6 +1151,8 @@ simulated function UpdateGameplayMICParams() } else if (bIsCloaking && !bIsSpotted && CharacterMICs[0].Parent != MonsterInfo.CloakedSkins[0]) { + NumRepeats = Min(CharacterMICs.Length, MonsterInfo.CloakedSkins.Length); + for (i = 0; i < MonsterInfo.CloakedSkins.Length; ++i) { CharacterMICs[i].SetParent(MonsterInfo.CloakedSkins[i]); diff --git a/KFGameContent/Classes/KFPhysicsVolume.uc b/KFGameContent/Classes/KFPhysicsVolume.uc index 70e8958..efd7445 100644 --- a/KFGameContent/Classes/KFPhysicsVolume.uc +++ b/KFGameContent/Classes/KFPhysicsVolume.uc @@ -35,23 +35,10 @@ function CausePainTo(Actor Other) } } -simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal ) -{ - local KFPawn KFP; - - KFP = KFPawn(Other); - - if (KFP != none && KFP.CanInteractWithZoneVelocity() == false) - { - return; - } - - Super.Touch(Other, OtherComp, HitLocation, HitNormal); -} - simulated event UnTouch(Actor Other) { local int RecentHitIdx; + super.UnTouch(Other); RecentHitIdx = RecentUntouchEvents.Find('HitActor', Other); diff --git a/KFGameContent/Classes/KFPickupFactory_Cash.uc b/KFGameContent/Classes/KFPickupFactory_Cash.uc new file mode 100644 index 0000000..af20471 --- /dev/null +++ b/KFGameContent/Classes/KFPickupFactory_Cash.uc @@ -0,0 +1,89 @@ +//============================================================================= +// KFPickupFactory_Cash +//============================================================================= +// Pickup that gives some ammo for all weapons in inventory +//============================================================================= +// Killing Floor 2 +// Copyright (C) 2023 Tripwire Interactive LLC +//============================================================================= + +class KFPickupFactory_Cash extends KFPickupFactory; + +/** Sound to play when picÂșng up cash */ +var() AkEvent CashPickupSound; +var() int CashAmount; +var() StaticMeshComponent CashMeshComponent; + +simulated function InitializePickup() +{ + +} + +/** Bypass PickupFactory implementation. This class doesn't use InventoryType. */ +simulated event SetInitialState() +{ + super.SetInitialState(); + + bScriptInitialized = true; +} + +/** give pickup to player */ +function GiveTo( Pawn P ) +{ + local KFPawn_Human KFPH; + local KFPlayerReplicationInfo KFPRI; + + if ( P.PlayerReplicationInfo != none ) + { + KFPH = KFPawn_Human(P); + KFPRI = KFPlayerReplicationInfo(P.PlayerReplicationInfo); + + // @todo (?): for now, play "catch dosh" dialog whenever you pick some up + if( KFPRI != none && KFPH != none ) + { + KFPH.UpdateDoshCaught( CashAmount, none ); + } + + if( KFPRI != none ) + { + KFPRI.AddDosh( CashAmount ); + `AnalyticsLog(("dosh_picked_up", KFPRI, "#"$CashAmount)); + } + + bForceNetUpdate = true; + P.PlaySoundBase(CashPickupSound); + } + + SetPickupHidden(); + GotoState('Disabled'); + SetCollision(false, false); +} + +function bool CurrentPickupIsCash() +{ + return true; +} + +defaultproperties +{ + CashPickupSound=AkEvent'WW_UI_PlayerCharacter.Play_UI_Pickup_Ammo' + + Begin Object Class=StaticMeshComponent Name=MyStaticMeshComponent + StaticMesh=StaticMesh'ENV_Horzine_MESH.crates.ENV_Horzine_Equiptment_Crate_02' + bCastDynamicShadow=FALSE + CollideActors=FALSE + End Object + + CashMeshComponent=MyStaticMeshComponent + PickupMesh=MyStaticMeshComponent + Components.Add(MyStaticMeshComponent) + + Begin Object NAME=CollisionCylinder + CollisionRadius=100.f + CollisionHeight=50.f + End Object + + bNotBased=TRUE + bEnabledAtStart=true + bKismetDriven=true +} diff --git a/KFGameContent/Classes/KFProj_BloatPukeMine.uc b/KFGameContent/Classes/KFProj_BloatPukeMine.uc index 100115b..0dedb5f 100644 --- a/KFGameContent/Classes/KFProj_BloatPukeMine.uc +++ b/KFGameContent/Classes/KFProj_BloatPukeMine.uc @@ -317,6 +317,28 @@ simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLoca { local Pawn P; + // If touched by ballistic bouncer, explode + if (KFProj_HRG_BallisticBouncer(Other) != none) + { + // Make sure not touching through wall + if (`TimeSince(CreationTime) >= 0.1f && FastTrace( Other.Location, Location,, true )) + { + TriggerExplosion( Location, vect(0,0,1), KFProj_HRG_BallisticBouncer(Other) ); + return; + } + } + + // If touched by mine reconstructor, explode + if (KFProj_Mine_Reconstructor(Other) != none) + { + // Make sure not touching through wall + if (`TimeSince(CreationTime) >= 0.1f && FastTrace( Other.Location, Location,, true )) + { + TriggerExplosion( Location, vect(0,0,1), KFProj_Mine_Reconstructor(Other) ); + return; + } + } + // If touched by an enemy pawn, explode P = Pawn( Other ); if( P != None ) diff --git a/KFGameContent/Classes/KFProj_Bullet_Frost_Shotgun_Axe.uc b/KFGameContent/Classes/KFProj_Bullet_Frost_Shotgun_Axe.uc index 9a50987..a1d6a43 100644 --- a/KFGameContent/Classes/KFProj_Bullet_Frost_Shotgun_Axe.uc +++ b/KFGameContent/Classes/KFProj_Bullet_Frost_Shotgun_Axe.uc @@ -36,7 +36,7 @@ defaultproperties ProjFlightTemplate=ParticleSystem'WEP_Frost_Shotgun_Axe_EMIT.FX_FrostFang_Tracer_01' ProjFlightTemplateZedTime=ParticleSystem'WEP_Frost_Shotgun_Axe_EMIT.FX_FrostFang_Tracer_Zedtime_01' ImpactEffects=KFImpactEffectInfo'WEP_Frost_Shotgun_Axe_ARCH.WEP_FrostFang_Projectile_Impact' - oFrozenSound=AkEvent'WW_WEP_SA_CompoundBow.Play_Arrow_Impact_Cryo' + oFrozenSound=AkEvent'WW_WEP_FrostFang.Play_FrostFang_Frozen_Impact' AssociatedPerkClass=class'KFPerk_Support' } diff --git a/KFGameContent/Classes/KFProj_Bullet_Pellet.uc b/KFGameContent/Classes/KFProj_Bullet_Pellet.uc index 34338c8..9bd4f5a 100644 --- a/KFGameContent/Classes/KFProj_Bullet_Pellet.uc +++ b/KFGameContent/Classes/KFProj_Bullet_Pellet.uc @@ -45,4 +45,13 @@ defaultproperties AmbientSoundPlayEvent=none AmbientSoundStopEvent=none + + + bWaitForEffects=false + ProjEffectsFadeOutDuration=0.25 + bSyncToOriginalLocation=true + bSyncToThirdPersonMuzzleLocation=true + bRotationFollowsVelocity=true + bNoReplicationToInstigator=false + bUseClientSideHitDetection=true } \ No newline at end of file diff --git a/KFGameContent/Classes/KFProj_Cannonball_Blunderbuss.uc b/KFGameContent/Classes/KFProj_Cannonball_Blunderbuss.uc index 56714ea..e02c53d 100644 --- a/KFGameContent/Classes/KFProj_Cannonball_Blunderbuss.uc +++ b/KFGameContent/Classes/KFProj_Cannonball_Blunderbuss.uc @@ -398,6 +398,13 @@ defaultproperties DampenFactorParallel=0 WallHitDampenFactor=0.5 WallHitDampenFactorParallel=0.5 + + ExtraLineCollisionOffsets.Add((Y=-30)) + ExtraLineCollisionOffsets.Add((Y=30)) + ExtraLineCollisionOffsets.Add((Z=-30)) + ExtraLineCollisionOffsets.Add((Z=30)) + // Since we're still using an extent cylinder, we need a line at 0 + ExtraLineCollisionOffsets.Add(()) bNetTemporary=False NetPriority=5 diff --git a/KFGameContent/Classes/KFProj_CaulkNBurn_GroundFire.uc b/KFGameContent/Classes/KFProj_CaulkNBurn_GroundFire.uc index c268e99..9bb4277 100644 --- a/KFGameContent/Classes/KFProj_CaulkNBurn_GroundFire.uc +++ b/KFGameContent/Classes/KFProj_CaulkNBurn_GroundFire.uc @@ -10,6 +10,36 @@ class KFProj_CaulkNBurn_GroundFire extends KFProj_GroundFire; +simulated protected function PrepareExplosionActor(GameExplosionActor GEA) +{ + local KFExplosionActorLingering KFE_GroundFire; + local KFPlayerController KFPC; + local KFPerk InstigatorPerk; + + super.PrepareExplosionActor(GEA); + + KFE_GroundFire = KFExplosionActorLingering( GEA ); + if( KFE_GroundFire != none ) + { + if (Instigator != none && Instigator.Controller != none) + { + KFPC = KFPlayerController(Instigator.Controller); + if (KFPC != none) + { + InstigatorPerk = KFPC.GetPerk(); + if (InstigatorPerk != none && InstigatorPerk.IsRangeActive()) + { + KFE_GroundFire.MaxTime = KFE_GroundFire.default.MaxTime * InstigatorPerk.GetRangeGroundFireDurationMod(); + KFE_GroundFire.FadeOutTime = KFE_GroundFire.MaxTime * 0.25f; + + KFE_GroundFire.LoopingParticleEffect=ParticleSystem'WEP_3P_Molotov_EMIT.FX_Molotov_ground_fire_01'; + //KFE_GroundFire.LoopingParticleEffect=ParticleSystem'WEP_Flamethrower_EMIT.FX_Ground_fire_Splash_01'; + } + } + } + } +} + defaultproperties { bWarnAIWhenFired=true diff --git a/KFGameContent/Classes/KFProj_FlameThrower_GroundFire.uc b/KFGameContent/Classes/KFProj_FlameThrower_GroundFire.uc index 03f93d0..a95b5a6 100644 --- a/KFGameContent/Classes/KFProj_FlameThrower_GroundFire.uc +++ b/KFGameContent/Classes/KFProj_FlameThrower_GroundFire.uc @@ -10,6 +10,36 @@ class KFProj_FlameThrower_GroundFire extends KFProj_GroundFire; +simulated protected function PrepareExplosionActor(GameExplosionActor GEA) +{ + local KFExplosionActorLingering KFE_GroundFire; + local KFPlayerController KFPC; + local KFPerk InstigatorPerk; + + super.PrepareExplosionActor(GEA); + + KFE_GroundFire = KFExplosionActorLingering( GEA ); + if( KFE_GroundFire != none ) + { + if (Instigator != none && Instigator.Controller != none) + { + KFPC = KFPlayerController(Instigator.Controller); + if (KFPC != none) + { + InstigatorPerk = KFPC.GetPerk(); + if (InstigatorPerk != none && InstigatorPerk.IsRangeActive()) + { + KFE_GroundFire.MaxTime = KFE_GroundFire.default.MaxTime * InstigatorPerk.GetRangeGroundFireDurationMod(); + KFE_GroundFire.FadeOutTime = KFE_GroundFire.MaxTime * 0.25f; + + KFE_GroundFire.LoopingParticleEffect=ParticleSystem'WEP_3P_Molotov_EMIT.FX_Molotov_ground_fire_01'; + //KFE_GroundFire.LoopingParticleEffect=ParticleSystem'WEP_Flamethrower_EMIT.FX_Ground_fire_Splash_01'; + } + } + } + } +} + defaultproperties { bWarnAIWhenFired=true diff --git a/KFGameContent/Classes/KFProj_Grenade_GravityImploder.uc b/KFGameContent/Classes/KFProj_Grenade_GravityImploder.uc index eba2c15..5af78e5 100644 --- a/KFGameContent/Classes/KFProj_Grenade_GravityImploder.uc +++ b/KFGameContent/Classes/KFProj_Grenade_GravityImploder.uc @@ -54,7 +54,12 @@ simulated state VortexState { foreach CollidingActors(class'Actor', Victim, VortexRadius, Location, true,, HitInfo) { - if (KFPawn_Human(Victim) == none && Victim.CollisionComponent != none && !Victim.bWorldGeometry) + if (KFPawn_Human(Victim) == none + && Victim.CollisionComponent != none + && !Victim.bWorldGeometry + && KFPawn_Scripted(Victim) == none + && KFPawn_AutoTurret(Victim) == none + && KFPawn_HRG_Warthog(Victim) == none) { Victim.CollisionComponent.AddRadialImpulse(Location, VortexRadius, VortexImpulseStrength, RIF_Constant, true); } diff --git a/KFGameContent/Classes/KFProj_Grenade_GravityImploderAlt.uc b/KFGameContent/Classes/KFProj_Grenade_GravityImploderAlt.uc index 95a03c6..5c9e13f 100644 --- a/KFGameContent/Classes/KFProj_Grenade_GravityImploderAlt.uc +++ b/KFGameContent/Classes/KFProj_Grenade_GravityImploderAlt.uc @@ -316,6 +316,9 @@ simulated state ImplodingState && Victim != Instigator && KFP != None && KFPawn_Human(Victim) == none // No player's character + && KFPawn_Scripted(Victim) == none + && KFPawn_AutoTurret(Victim) == none + && KFPawn_HRG_Warthog(Victim) == none && (KFPM == none || VortexTime < VortexDuration*KFPM.GetVortexAttractionModifier()) ) { KFP.GetBoundingCylinder(ColRadius, ColHeight); diff --git a/KFGameContent/Classes/KFProj_MicrowaveGun_GroundFire.uc b/KFGameContent/Classes/KFProj_MicrowaveGun_GroundFire.uc index 520ee79..639ca3b 100644 --- a/KFGameContent/Classes/KFProj_MicrowaveGun_GroundFire.uc +++ b/KFGameContent/Classes/KFProj_MicrowaveGun_GroundFire.uc @@ -8,6 +8,36 @@ //============================================================================= class KFProj_MicrowaveGun_GroundFire extends KFProj_GroundFire; +simulated protected function PrepareExplosionActor(GameExplosionActor GEA) +{ + local KFExplosionActorLingering KFE_GroundFire; + local KFPlayerController KFPC; + local KFPerk InstigatorPerk; + + super.PrepareExplosionActor(GEA); + + KFE_GroundFire = KFExplosionActorLingering( GEA ); + if( KFE_GroundFire != none ) + { + if (Instigator != none && Instigator.Controller != none) + { + KFPC = KFPlayerController(Instigator.Controller); + if (KFPC != none) + { + InstigatorPerk = KFPC.GetPerk(); + if (InstigatorPerk != none && InstigatorPerk.IsRangeActive()) + { + KFE_GroundFire.MaxTime = KFE_GroundFire.default.MaxTime * InstigatorPerk.GetRangeGroundFireDurationMod(); + KFE_GroundFire.FadeOutTime = KFE_GroundFire.MaxTime * 0.25f; + + KFE_GroundFire.LoopingParticleEffect=ParticleSystem'WEP_3P_Molotov_EMIT.FX_Molotov_ground_fire_01'; + //KFE_GroundFire.LoopingParticleEffect=ParticleSystem'WEP_Flamethrower_EMIT.FX_Ground_fire_Splash_01'; + } + } + } + } +} + defaultproperties { bWarnAIWhenFired=true diff --git a/KFGameContent/Classes/KFProj_Mine_Reconstructor.uc b/KFGameContent/Classes/KFProj_Mine_Reconstructor.uc index 647cfdf..740dc01 100644 --- a/KFGameContent/Classes/KFProj_Mine_Reconstructor.uc +++ b/KFGameContent/Classes/KFProj_Mine_Reconstructor.uc @@ -337,11 +337,18 @@ simulated function Stick( vector StuckLocation, vector StuckNormal ) local KFProj_Mine_Reconstructor PukeMine; local rotator RandRot; - if( Role != ROLE_Authority ) return; + if( Role != ROLE_Authority ) + { + return; + } //we added a scapegoat that fixes the problem of hitwall not calling always in client, so we need to check it in case it comes //to not call it twice - if(bSticked == true) return; + if(bSticked == true) + { + return; + } + RotationRate = rot(0,0,0); // Modify the collision so it can be detonated by the player @@ -351,7 +358,6 @@ simulated function Stick( vector StuckLocation, vector StuckNormal ) bCollideComplex = false; bBounce = false; SetPhysics( PHYS_None ); - SetOwner( none ); // Optimize for network NetUpdateFrequency = 10; @@ -410,7 +416,11 @@ reliable client function StickInClient(vector StuckLocation, vector StuckNormal) //we added a scapegoat that fixes the problem of hitwall not calling always in client, so we need to check it in case it comes //to not call it twice - if(bSticked == true) return; + if(bSticked == true) + { + return; + } + RotationRate = rot(0,0,0); SetLocation(StuckLocation); // Modify the collision so it can be detonated by the player @@ -419,7 +429,6 @@ reliable client function StickInClient(vector StuckLocation, vector StuckNormal) CylinderComponent.SetActorCollision( true, false ); bCollideComplex = false; bBounce = false; - SetOwner( none ); // Optimize for network NetUpdateFrequency = 0.25f; @@ -541,7 +550,6 @@ simulated function bool ValidTouch( Pawn Other ) } else { - if(bCantDetonateOnFullHP) { if(Other.GetTeamNum() == TeamNum && Other.Health >= Other.HealthMax ) @@ -558,6 +566,7 @@ simulated function bool ValidTouch( Pawn Other ) // Make sure not touching through wall return FastTrace( Other.Location, Location,, true ); } + return FastTrace( Other.Location, Location,, true ); } @@ -566,6 +575,35 @@ simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLoca { local Pawn P; + // If touched by ballistic bouncer, explode + if (KFProj_HRG_BallisticBouncer(Other) != none + || KFProj_BloatPukeMine(Other) != none) + { + if (KFProj_BloatPukeMine(Other) != none) + { + // Force Touch, as by itself doesn't detect the Mine.. + KFProj_BloatPukeMine(Other).Touch(self, none, HitLocation, HitNormal); + } + + if (`TimeSince(CreationTime) >= 0.1f) + { + if ( WorldInfo.NetMode != NM_DedicatedServer ) + { + // Use ImpactEffectManager to handle material based impacts + `ImpactEffectManager.PlayImpactEffects(HitLocation, Instigator,, ImpactEffects); + } + + if (ExplosionTemplate != None && Role == ROLE_Authority) + { + TriggerExplosion(HitLocation, HitNormal, Other); + } + + Shutdown(); // cleanup/destroy projectile + + return; + } + } + // If touched by an enemy pawn, explode P = Pawn( Other ); if( P != None ) @@ -886,9 +924,9 @@ defaultproperties // Camera Shake CamShake=CameraShake'WEP_Mine_Reconstructor_Arch.Camera_Shake' - CamShakeInnerRadius=0 - CamShakeOuterRadius=0 - CamShakeFalloff=1.f + CamShakeInnerRadius=100 + CamShakeOuterRadius=450 + CamShakeFalloff=1.5f bOrientCameraShakeTowardsEpicenter=true End Object ExplosionTemplate=ExploTemplate0 diff --git a/KFGameContent/Classes/KFVolume_RagdollThrow.uc b/KFGameContent/Classes/KFVolume_RagdollThrow.uc index d3f71da..dfcab8e 100644 --- a/KFGameContent/Classes/KFVolume_RagdollThrow.uc +++ b/KFGameContent/Classes/KFVolume_RagdollThrow.uc @@ -137,4 +137,4 @@ defaultproperties RateLimiter=0.1 bKnockdownZeds=true bExcludeAnyBoss=true -} \ No newline at end of file +} diff --git a/KFGameContent/Classes/KFWeap_AssaultRifle_FNFal.uc b/KFGameContent/Classes/KFWeap_AssaultRifle_FNFal.uc index 4250e12..70f6c5b 100644 --- a/KFGameContent/Classes/KFWeap_AssaultRifle_FNFal.uc +++ b/KFGameContent/Classes/KFWeap_AssaultRifle_FNFal.uc @@ -17,7 +17,7 @@ simulated state WeaponSingleFiring if (WorldInfo.NetMode == NM_Client && bAllowClientAmmoTracking && FireInterval[CurrentFireMode] <= MinFireIntervalToTriggerSync) { - SyncCurrentAmmoCount(CurrentFireMode, AmmoCount[CurrentFireMode]); + SyncCurrentAmmoCount(CurrentFireMode, AmmoCount[GetAmmoType(CurrentFireMode)]); } } } diff --git a/KFGameContent/Classes/KFWeap_AutoTurret.uc b/KFGameContent/Classes/KFWeap_AutoTurret.uc index e6c3b7b..0025860 100644 --- a/KFGameContent/Classes/KFWeap_AutoTurret.uc +++ b/KFGameContent/Classes/KFWeap_AutoTurret.uc @@ -270,18 +270,6 @@ function SetOriginalValuesFromPickup( KFWeapon PickedUpWeapon ) // charge alerts (beep, light) need current instigator WeaponPawn.Instigator = Instigator; WeaponPawn.SetOwner(self); - - if (Instigator.Controller != none) - { - if (KFPawn_HRG_Warthog(KFPC.DeployedTurrets[i]) != none) - { - KFPawn_HRG_Warthog(KFPC.DeployedTurrets[i]).InstigatorController = Instigator.Controller; - } - else if (KFPawn_Autoturret(KFPC.DeployedTurrets[i]) != none) - { - KFPawn_Autoturret(KFPC.DeployedTurrets[i]).InstigatorController = Instigator.Controller; - } - } } } } diff --git a/KFGameContent/Classes/KFWeap_Edged_Scythe.uc b/KFGameContent/Classes/KFWeap_Edged_Scythe.uc index 3fe3677..ffdcb4a 100644 --- a/KFGameContent/Classes/KFWeap_Edged_Scythe.uc +++ b/KFGameContent/Classes/KFWeap_Edged_Scythe.uc @@ -427,8 +427,8 @@ defaultproperties DistortTrailParticle = none WhiteTrailParticle = none - BlueTrailParticle = none - RedTrailParticle = none + // BlueTrailParticle = none + // RedTrailParticle = none FoldedTrailParticleSystem=ParticleSystem'WEP_Scythe_EMIT.FX_Scythe_Custom_R_01' UnfoldedTrailParticleSystem=ParticleSystem'WEP_Scythe_EMIT.FX_Scythe_Custom_Unfold_01'; diff --git a/KFGameContent/Classes/KFWeap_GravityImploder.uc b/KFGameContent/Classes/KFWeap_GravityImploder.uc index 5c815e2..b10b265 100644 --- a/KFGameContent/Classes/KFWeap_GravityImploder.uc +++ b/KFGameContent/Classes/KFWeap_GravityImploder.uc @@ -11,9 +11,6 @@ class KFWeap_GravityImploder extends KFWeapon; `define GRAVITYIMPLODER_MIC_LED_INDEX 1 -/** Reduction for the amount of damage dealt to the weapon owner (including damage by the explosion) */ -var float SelfDamageReductionValue; - /** Weapons material colors for each fire mode. */ var LinearColor DefaultFireMaterialColor; var LinearColor AltFireMaterialColor; @@ -70,17 +67,6 @@ simulated function AltFireMode() StartFire(ALTFIRE_FIREMODE); } -// Reduce damage to self -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator) - { - InDamage *= SelfDamageReductionValue; - } -} - defaultproperties { // Content @@ -179,9 +165,7 @@ defaultproperties bHasFlashlight=false WeaponFireWaveForm=ForceFeedbackWaveform'FX_ForceFeedback_ARCH.Gunfire.Medium_Recoil' - - SelfDamageReductionValue=0.075f //0.f - + bLastFireWasAlt=false DefaultFireMaterialColor = (R = 0.965f,G = 0.2972f, B = 0.0f) AltFireMaterialColor = (R = 0.0f, G = 0.9631f, B = 0.96581f) diff --git a/KFGameContent/Classes/KFWeap_HRG_Crossboom.uc b/KFGameContent/Classes/KFWeap_HRG_Crossboom.uc index d9f0694..e867708 100644 --- a/KFGameContent/Classes/KFWeap_HRG_Crossboom.uc +++ b/KFGameContent/Classes/KFWeap_HRG_Crossboom.uc @@ -9,8 +9,6 @@ class KFWeap_HRG_Crossboom extends KFWeap_ScopedBase; -/** Reduction for the amount of damage dealt to the weapon owner (including damage by the explosion) */ -var() float SelfDamageReductionValue; /** Return true if this weapon should play the fire last animation for this shoot animation */ simulated function bool ShouldPlayFireLast(byte FireModeNum) @@ -49,19 +47,6 @@ simulated function AltFireMode() StartFire(ALTFIRE_FIREMODE); } -/** - Reduce the damage received and apply it to the shield - */ -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser.Instigator == Instigator) - { - InDamage *= SelfDamageReductionValue; - } -} - defaultproperties { // Inventory @@ -186,6 +171,4 @@ defaultproperties WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.15f), (Stat=EWUS_Damage1, Scale=1.15f), (Stat=EWUS_Weight, Add=1))) WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.3f), (Stat=EWUS_Damage1, Scale=1.3f), (Stat=EWUS_Weight, Add=2))) - - SelfDamageReductionValue = 0.25f; } \ No newline at end of file diff --git a/KFGameContent/Classes/KFWeap_HRG_Locust.uc b/KFGameContent/Classes/KFWeap_HRG_Locust.uc index 26391ae..7fe1888 100644 --- a/KFGameContent/Classes/KFWeap_HRG_Locust.uc +++ b/KFGameContent/Classes/KFWeap_HRG_Locust.uc @@ -48,9 +48,6 @@ var AkComponent IronsightsComponent; var AkEvent IronsightsZoomInSound; var AkEvent IronsightsZoomOutSound; -/** Reduction for the amount of damage dealt to the weapon owner (including damage by the explosion) */ -var() float SelfDamageReductionValue; - /** * Toggle between DEFAULT and ALTFIRE */ @@ -527,19 +524,6 @@ simulated state WeaponBurstFiring } } -/** - Reduce the damage received and apply it to the shield - */ -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser.Instigator == Instigator) - { - InDamage *= SelfDamageReductionValue; - } -} - defaultproperties { ForceReloadTime=0.4f @@ -680,5 +664,4 @@ defaultproperties WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.15f), (Stat=EWUS_Damage1, Scale=1.15f), (Stat=EWUS_Weight, Add=1))) WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.3f), (Stat=EWUS_Damage1, Scale=1.3f), (Stat=EWUS_Weight, Add=2))) - SelfDamageReductionValue = 0f; } diff --git a/KFGameContent/Classes/KFWeap_HRG_Stunner.uc b/KFGameContent/Classes/KFWeap_HRG_Stunner.uc index 3351676..ca5db98 100644 --- a/KFGameContent/Classes/KFWeap_HRG_Stunner.uc +++ b/KFGameContent/Classes/KFWeap_HRG_Stunner.uc @@ -123,7 +123,7 @@ defaultproperties PenetrationPower(ALTFIRE_FIREMODE)=0 FireInterval(ALTFIRE_FIREMODE)=0.5 Spread(ALTFIRE_FIREMODE)=0.025 - AmmoCost(ALTFIRE_FIREMODE)=5 //3 + AmmoCost(ALTFIRE_FIREMODE)=3 //3 // Shotgun NumPellets(ALTFIRE_FIREMODE)=1 diff --git a/KFGameContent/Classes/KFWeap_HRG_Vampire.uc b/KFGameContent/Classes/KFWeap_HRG_Vampire.uc index 7754d4a..795873e 100644 --- a/KFGameContent/Classes/KFWeap_HRG_Vampire.uc +++ b/KFGameContent/Classes/KFWeap_HRG_Vampire.uc @@ -71,8 +71,6 @@ var const WeaponFireSndInfo BloodSuctionLoopNoAmmoAndBloodBallChargedSound; var bool bIsSprayDisabled; -var float SelfDamageReductionValue; - var float FullChargedTimerInterval; var float ChargePercentage; @@ -1339,7 +1337,6 @@ defaultproperties //BLOOD BALL ChargingSound=(DefaultCue = AkEvent'WW_WEP_HRG_Vampire.Play_WEP_HRG_Vampire_SuckBlood_Loop_3P', FirstPersonCue=AkEvent'WW_WEP_HRG_Vampire.Play_WEP_HRG_Vampire_SuckBlood_Loop_1P') ChargedSound=(DefaultCue = AkEvent'WW_WEP_HRG_Vampire.Play_WEP_HRG_Vampire_SuckBlood_Charged_3P', FirstPersonCue=AkEvent'WW_WEP_HRG_Vampire.Play_WEP_HRG_Vampire_SuckBlood_Charged_1P') - SelfDamageReductionValue=0.1f //MaxChargeTime=0.6 //0.8 MinDamageWhileChargingThreshold=0.12 //10% of MaxChargeTime diff --git a/KFGameContent/Classes/KFWeap_HRG_Warthog.uc b/KFGameContent/Classes/KFWeap_HRG_Warthog.uc index 042e2cf..41ab982 100644 --- a/KFGameContent/Classes/KFWeap_HRG_Warthog.uc +++ b/KFGameContent/Classes/KFWeap_HRG_Warthog.uc @@ -275,18 +275,6 @@ function SetOriginalValuesFromPickup( KFWeapon PickedUpWeapon ) // charge alerts (beep, light) need current instigator WeaponPawn.Instigator = Instigator; WeaponPawn.SetOwner(self); - - if (Instigator.Controller != none) - { - if (KFPawn_HRG_Warthog(KFPC.DeployedTurrets[i]) != none) - { - KFPawn_HRG_Warthog(KFPC.DeployedTurrets[i]).InstigatorController = Instigator.Controller; - } - else if (KFPawn_Autoturret(KFPC.DeployedTurrets[i]) != none) - { - KFPawn_Autoturret(KFPC.DeployedTurrets[i]).InstigatorController = Instigator.Controller; - } - } } } } diff --git a/KFGameContent/Classes/KFWeap_HuskCannon.uc b/KFGameContent/Classes/KFWeap_HuskCannon.uc index 6d34a71..a069dbd 100644 --- a/KFGameContent/Classes/KFWeap_HuskCannon.uc +++ b/KFGameContent/Classes/KFWeap_HuskCannon.uc @@ -32,7 +32,6 @@ var transient bool bIsFullyCharged; var const WeaponFireSndInfo FullyChargedSound; -var float SelfDamageReductionValue; var float FullChargedTimerInterval; @@ -377,16 +376,6 @@ simulated function int GetChargeFXLevel() } } -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator ) //self - { - InDamage *= SelfDamageReductionValue; - } -} - // increase the instant hit damage based on the charge level simulated function int GetModifiedDamage(byte FireModeNum, optional vector RayDir) { @@ -403,7 +392,6 @@ simulated function int GetModifiedDamage(byte FireModeNum, optional vector RayDi defaultproperties { - SelfDamageReductionValue=0.1f //Gameplay Props MaxChargeTime=1.0 ValueIncreaseTime=0.2 diff --git a/KFGameContent/Classes/KFWeap_Mine_Reconstructor.uc b/KFGameContent/Classes/KFWeap_Mine_Reconstructor.uc index e6784d5..4e3faa9 100644 --- a/KFGameContent/Classes/KFWeap_Mine_Reconstructor.uc +++ b/KFGameContent/Classes/KFWeap_Mine_Reconstructor.uc @@ -32,8 +32,6 @@ var transient bool bIsFullyCharged; var const WeaponFireSndInfo FullyChargedSound; -var float SelfDamageReductionValue; - var float FullChargedTimerInterval; var float FXScalingFactorByCharge, ChargePercentage; var float MinScale, MaxScale; @@ -289,7 +287,7 @@ simulated function BeginFire(Byte FireModeNum) simulated function StartFire(byte FiremodeNum) { - if (IsTimerActive('RefireCheckTimer') || bBlocked) + if (bBlocked) { return; } @@ -308,8 +306,6 @@ simulated function StartFire(byte FiremodeNum) { bBlocked = false; } - - } simulated function RefireCheckTimer() @@ -513,6 +509,7 @@ simulated state MineReconstructorCharge extends WeaponFiring global.Tick(DeltaTime); if(bIsFullyCharged) return; + if(PendingFire(ALTFIRE_FIREMODE)) return; // Don't charge unless we're holding down the button if (PendingFire(CurrentFireMode)) @@ -803,6 +800,11 @@ simulated function AltFireMode() return; } + if (PendingFire(DEFAULT_FIREMODE)) + { + return; + } + StartFire(ALTFIRE_FIREMODE); } @@ -831,11 +833,8 @@ state WeaponSingleFiring } } - - defaultproperties { - SelfDamageReductionValue=0.1f //Gameplay Props MaxChargeTime=1.2 AmmoIncreasePerCharge=1 @@ -906,6 +905,7 @@ defaultproperties WeaponFireTypes(DEFAULT_FIREMODE)=EWFT_Projectile WeaponProjectiles(DEFAULT_FIREMODE)=class'KFProj_Mine_Reconstructor' FireInterval(DEFAULT_FIREMODE)=+0.2 //+0.33 + Spread(DEFAULT_FIREMODE)=0.0 InstantHitDamage(DEFAULT_FIREMODE)=120 PenetrationPower(DEFAULT_FIREMODE)=0.0; InstantHitDamageTypes(DEFAULT_FIREMODE)=class'KFDT_Toxic_MineReconstructorImpact' @@ -915,6 +915,7 @@ defaultproperties FiringStatesArray(ALTFIRE_FIREMODE)=WeaponSingleFiring WeaponFireTypes(ALTFIRE_FIREMODE)=EWFT_Custom FireInterval(ALTFIRE_FIREMODE)=+0.15 //+0.25 + Spread(ALTFIRE_FIREMODE)=0.0 AmmoCost(ALTFIRE_FIREMODE)=0 // BASH_FIREMODE diff --git a/KFGameContent/Classes/KFWeap_Minigun_Patriarch.uc b/KFGameContent/Classes/KFWeap_Minigun_Patriarch.uc index 00bf24f..241f354 100644 --- a/KFGameContent/Classes/KFWeap_Minigun_Patriarch.uc +++ b/KFGameContent/Classes/KFWeap_Minigun_Patriarch.uc @@ -138,6 +138,7 @@ defaultproperties // Fire Effects MuzzleFlashTemplate=KFMuzzleFlash'WEP_L85A2_ARCH.Wep_L85A2_MuzzleFlash' WeaponFireSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_ZED_Patriarch.Play_Mini_Gun_LP', FirstPersonCue=AkEvent'WW_ZED_Patriarch.Play_Mini_Gun_LP') + WeaponFireSnd(ALTFIRE_FIREMODE) = (DefaultCue=AkEvent'WW_WEP_Stoner.Play_WEP_Stoner_Fire_3P_Single', FirstPersonCue=AkEvent'WW_WEP_Stoner.Play_WEP_Stoner_Fire_3P_Single') WeaponDryFireSnd(DEFAULT_FIREMODE)=AkEvent'WW_WEP_SA_AK12.Play_WEP_SA_AK12_Handling_DryFire' WeaponDryFireSnd(ALTFIRE_FIREMODE)=AkEvent'WW_WEP_SA_AK12.Play_WEP_SA_AK12_Handling_DryFire' diff --git a/KFGameContent/Classes/KFWeap_Pistol_Blunderbuss.uc b/KFGameContent/Classes/KFWeap_Pistol_Blunderbuss.uc index 9cda462..fca55bd 100644 --- a/KFGameContent/Classes/KFWeap_Pistol_Blunderbuss.uc +++ b/KFGameContent/Classes/KFWeap_Pistol_Blunderbuss.uc @@ -28,9 +28,6 @@ var bool bCannonballConvertedToTimeBomb; /** flag indicating that the player released the button and the cannonbal can't be configured as a timed bomb **/ var bool bForceStandardCannonbal; -/** Reduction for the amount of damage dealt to the weapon owner (including damage by the explosion) */ -var float SelfDamageReductionValue; - /** Amount of time we hold the fire button on this fire state, used in BlunderbussDeployAndDetonate **/ var transient float FireHoldTime; @@ -369,16 +366,6 @@ simulated function HandleProjectileImpact(byte ProjectileFireMode, ImpactInfo Im } } -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator) - { - InDamage *= SelfDamageReductionValue; - } -} - simulated function KFProjectile SpawnAllProjectiles(class KFProjClass, vector RealStartLoc, vector AimDir) { local KFPerk InstigatorPerk; @@ -467,7 +454,6 @@ defaultproperties bIsBackupWeapon=false // Gameplay - SelfDamageReductionValue=0.5f //0.75f TimedDetonationThresholdTime=0.01f // FOV diff --git a/KFGameContent/Classes/KFWeap_RocketLauncher_SealSqueal.uc b/KFGameContent/Classes/KFWeap_RocketLauncher_SealSqueal.uc index 5fb6efc..345b3b1 100644 --- a/KFGameContent/Classes/KFWeap_RocketLauncher_SealSqueal.uc +++ b/KFGameContent/Classes/KFWeap_RocketLauncher_SealSqueal.uc @@ -19,9 +19,6 @@ var array DeployedHarpoons; /** Same as DeployedHarpoons.Length, but replicated because harpoons are only tracked on server */ var int NumDeployedHarpoons; -/** Reduction for the amount of damage dealt to the weapon owner (including damage by the explosion) */ -var float SelfDamageReductionValue; - /** Camera shake when detonating the harpoons */ var CameraAnim DetonateCameraAnim; var float DetonateCameraAnimPlayRate; @@ -81,15 +78,6 @@ simulated function name GetReloadAnimName(bool bTacticalReload) } } -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator) - { - InDamage *= SelfDamageReductionValue; - } -} /********************************************************************************************* * State WeaponDetonating @@ -338,8 +326,6 @@ defaultproperties WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.15f), (Stat=EWUS_Weight, Add=1))) WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.3f), (Stat=EWUS_Weight, Add=2))) - SelfDamageReductionValue=0.25f - DetonateCameraAnim=CameraAnim'WEP_1P_Seal_Squeal_ANIM.Shoot_MB500' DetonateCameraAnimPlayRate=2.0f DetonateCameraAnimScale=0.4f diff --git a/KFGameContent/Classes/KFWeap_RocketLauncher_ThermiteBore.uc b/KFGameContent/Classes/KFWeap_RocketLauncher_ThermiteBore.uc index 702e3c9..e2abcba 100644 --- a/KFGameContent/Classes/KFWeap_RocketLauncher_ThermiteBore.uc +++ b/KFGameContent/Classes/KFWeap_RocketLauncher_ThermiteBore.uc @@ -15,9 +15,6 @@ var array DeployedHarpoons; /** Same as DeployedHarpoons.Length, but replicated because harpoons are only tracked on server */ var int NumDeployedHarpoons; -/** Reduction for the amount of damage dealt to the weapon owner (including damage by the explosion) */ -var float SelfDamageReductionValue; - var(Animations) const editconst name DetonateAnim; var(Animations) const editconst name DetonateAnimLast; var(Animations) const editconst name DetonateAnimIron; @@ -77,16 +74,6 @@ simulated function name GetReloadAnimName(bool bTacticalReload) } } -function AdjustDamage(out int InDamage, class DamageType, Actor DamageCauser) -{ - super.AdjustDamage(InDamage, DamageType, DamageCauser); - - if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator) - { - InDamage *= SelfDamageReductionValue; - } -} - /********************************************************************************************* * State WeaponDetonating * The weapon is in this state while detonating a charge @@ -315,8 +302,6 @@ defaultproperties WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.125f), (Stat=EWUS_Weight, Add=1))) - SelfDamageReductionValue=0.05f //0.25f - DetonateAnim=Alt_Fire DetonateAnimLast=Alt_Fire_Last DetonateAnimIron=Alt_Fire_Iron diff --git a/KFGameContent/Classes/KFWeap_Shotgun_ElephantGun.uc b/KFGameContent/Classes/KFWeap_Shotgun_ElephantGun.uc index 35c23f4..ab683c3 100644 --- a/KFGameContent/Classes/KFWeap_Shotgun_ElephantGun.uc +++ b/KFGameContent/Classes/KFWeap_Shotgun_ElephantGun.uc @@ -168,7 +168,7 @@ defaultproperties FireInterval(ALTFIRE_FIREMODE)=0.25 // 240 RPM NumPellets(ALTFIRE_FIREMODE)=24 Spread(ALTFIRE_FIREMODE)=0.19 - AmmoCost(ALTFIRE_FIREMODE)=4 + AmmoCost(ALTFIRE_FIREMODE)=1 DoubleBarrelKickMomentum=1000 FallingMomentumReduction=0.5