1
0
This commit is contained in:
GenZmeY 2024-01-23 19:25:12 +03:00
parent cde088c1f4
commit 722a3bf4a7
Signed by: GenZmeY
GPG Key ID: 424DA4BC3CB2CF39
101 changed files with 1438 additions and 669 deletions

View File

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

View File

@ -21,4 +21,6 @@ defaultproperties
ObliterationHealthThreshold = 0
ObliterationDamageThreshold = 1
bIgnoreAggroOnDamage=true
bAnyPerk = true
}

View File

@ -33,4 +33,6 @@ defaultproperties
WeaponDef=class'KFWeapDef_HRG_Locust'
SpreadOnTouchDamage=25
SelfDamageReductionValue=0.f
}

View File

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

View File

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

View File

@ -390,6 +390,9 @@ function GiveTo(Pawn P)
local KFInventoryManager KFIM;
local KFGameReplicationInfo KFGRI;
local class<Inventory> NewInventoryClass;
local bool bIsSecondaryPistol;
local bool bIs9mmInInventory;
local bool bIsHRG93InInventory;
NewInventoryClass = InventoryClass;
@ -404,7 +407,18 @@ 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)
{
bIs9mmInInventory = KFIM.Is9mmInInventory();
bIsHRG93InInventory = KFIM.IsHRG93InInventory();
if (!(bIs9mmInInventory && bIsHRG93InInventory))
{
if (bIs9mmInInventory)
{
if (InventoryClass.name == 'KFWeap_HRG_93R')
{
@ -426,6 +440,9 @@ function GiveTo(Pawn P)
NewInventoryClass = class<Weapon>(DynamicLoadObject(class'KFWeapDef_HRG_93R_Dual'.default.WeaponClassPath, class'Class'));
}
}
}
}
KFWInvClass = class<KFWeapon>(NewInventoryClass);
foreach KFIM.InventoryActors(class'KFWeapon', KFW)

View File

@ -145,18 +145,12 @@ simulated function SetActive(bool bActive)
function SetCompleted(bool bComplete)
{
local GFxObject DataObject;
local KFGameReplicationInfo KFGRI;
KFGRI=KFGameReplicationInfo(KFPC.WorldInfo.GRI);
if (KFGRI.IsContaminationMode() == false)
{
DataObject = CreateObject("Object");
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);

View File

@ -366,4 +366,5 @@ DefaultProperties
LastWeight=-1
bLastDoshVisibility=true
LastGrenadeIndex=0
LastSecondaryAmmo=255
}

View File

@ -157,7 +157,7 @@ struct InventoryHelper
var bool IsKey;
};
struct WeaponSkinListCacheState
struct GenericCacheState
{
var array<InventoryHelper> 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<InventoryHelper> CosmeticSkinListSearchCache;
var GenericCacheState CosmeticSkinListCache;
var array<InventoryHelper> CraftingListSearchCache;
var GenericCacheState CraftingListCache;
var array<InventoryHelper> 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)
break;
case ITP_CraftingComponent:
if (bool(OnlineSub.CurrentInventory[i].NewlyAdded))
{
ItemId = CraftingListSearchCache.Find('ItemDefinition', HelperItem.ItemDefinition);
// 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)
break;
case ITP_KeyCrate:
if (bool(OnlineSub.CurrentInventory[i].NewlyAdded))
{
ItemId = ItemListSearchCache.Find('ItemDefinition', HelperItem.ItemDefinition);
// 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,22 +777,17 @@ 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 (CurrentWeaponTypeFilter == EInvWT_None
&& CurrentPerkIndexFilter == KFPC.PerkList.Length
&& CurrentRarityFilter == ITR_NONE)
{
if (WeaponSkinListCache.NeedToRegenerate
|| WeaponSkinListCache.WeaponTypeFilter != CurrentWeaponTypeFilter
|| WeaponSkinListCache.PerkIndexFilter != CurrentPerkIndexFilter
|| WeaponSkinListCache.RarityFilter != CurrentRarityFilter
|| ByTypeItems[ITP_WeaponSkin].ItemsOnType.Length != WeaponSkinListCache.OrderedCache.Length)
{
WeaponSkinListCache.NeedToRegenerate = false;
WeaponSkinListCache.WeaponTypeFilter = CurrentWeaponTypeFilter;
WeaponSkinListCache.PerkIndexFilter = CurrentPerkIndexFilter;
WeaponSkinListCache.RarityFilter = CurrentRarityFilter;
// We want to order by Price - Weapon Def - Rarity - Quality
ByTypeItems[ITP_WeaponSkin].ItemsOnType.Sort(SortWeaponSkinList);
WeaponSkinListCache.OrderedCache = ByTypeItems[ITP_WeaponSkin].ItemsOnType;
@ -795,16 +810,32 @@ function InitInventory()
}
else
{
//`Log("USING SKIN LIST CACHE!!!");
//`Log("USING WEAPON SKIN LIST CACHE!!!");
ByTypeItems[ITP_WeaponSkin].ItemsOnType = WeaponSkinListCache.OrderedCache;
}
}
else
{
ByTypeItems[ITP_WeaponSkin].ItemsOnType.Sort(SortWeaponSkinList);
}
}
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++)
@ -817,11 +848,30 @@ function InitInventory()
`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_CraftingComponent].ItemsOnType.Length; i++)
@ -834,12 +884,26 @@ function InitInventory()
`Log("----------");*/
}
else
{
//`Log("USING CRAFTING LIST CACHE!!!");
ByTypeItems[ITP_CraftingComponent].ItemsOnType = CraftingListCache.OrderedCache;
}
}
if (CurrentInventoryFilter == EInv_All || CurrentInventoryFilter == EInv_Consumables)
{
if (ItemListCache.NeedToRegenerate
|| ByTypeItems[ITP_KeyCrate].ItemsOnType.Length != ItemListCache.OrderedCache.Length)
{
ItemListCache.NeedToRegenerate = false;
// 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++)
@ -850,6 +914,13 @@ function InitInventory()
`Log("----------");*/
}
else
{
//`Log("USING ITEMS LIST CACHE!!!");
ByTypeItems[ITP_KeyCrate].ItemsOnType = ItemListCache.OrderedCache;
}
}
//`Log("--------------------------------");
@ -898,12 +969,17 @@ function bool DoesMatchFilter(ItemProperties InventoryItem)
return false;
}
// Skip perk check for 9mm
if (!(InventoryItem.WeaponType == 0 && Is9mm(InventoryItem)))
{
// 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
if (CurrentPerkIndexFilter != KFPC.PerkList.length
&& !(CurrentPerkIndexFilter == InventoryItem.PerkId || CurrentPerkIndexFilter == InventoryItem.AltPerkId))
{
return false;
}
}
}
if (CurrentRarityFilter != ITR_NONE && InventoryItem.Rarity != CurrentRarityFilter && CurrentInventoryFilter != EInv_Consumables)
{
@ -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();

View File

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

View File

@ -170,7 +170,9 @@ function SearchInventoryForNewItem()
local int ItemIndex, InventoryIndex;
local CurrentInventoryEntry TempInventoryDetailsHolder;
local ItemProperties TempItemDetailsHolder;
local int i, IndexInReward;
local array<int> NewlyAddedItems, RewardIDs;
local KFGameReplicationInfo KFGRI;
ItemIndex = INDEX_NONE;
InventoryIndex = INDEX_NONE;
@ -181,13 +183,50 @@ function SearchInventoryForNewItem()
return;
}
// 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)

View File

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

View File

@ -191,7 +191,7 @@ function UpdateAndGetCurrentWeaponIndexes(class<KFPerk> 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();
}

View File

@ -55,100 +55,69 @@ function SetMapOptions()
local array<string> 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;
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 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)
{
if (MapName == MapSantas)
{
continue;
}
}
if ( bShouldSkipMaps && ( MapName == MapBiolapse ||
if (IsWeeklyMode && IsBoom)
{
if (MapName == MapSteam)
{
continue;
}
}
if (IsWeeklyMode && (IsScavenger || IsBossRush || IsGunGame))
{
if (MapName == MapBiolapse ||
MapName == MapNightmare ||
MapName == MapPowerCore ||
MapName == MapDescent ||
MapName == MapKrampus))
MapName == MapKrampus)
{
continue;
}
}
if (IsWeeklyMode && IsContaminationMode)
{
@ -178,10 +147,13 @@ function SetMapOptions()
}
}
if (IsWeeklyMode && IsBossRush && MapName == MapSteam)
if (IsWeeklyMode && IsBossRush)
{
if (MapName == MapSteam)
{
continue;
}
}
MapObject = CreateObject("Object");
MapObject.SetString("label", class'KFCommon_LocalizedStrings'.static.GetFriendlyMapName(ServerMapList[i]) );

View File

@ -28,6 +28,7 @@ var transient int CachedDifficulty, CachedLength;
var transient array<string> 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<string> TextArray, int SelectedIndex
, optional int MaxListLength = -1
function CreateList( string ListString
, array<string> TextArray
, int SelectedIndex
, optional int MaxListLength = 0
, optional bool bAnyIsFirst = false
, optional bool bEnabled = true)
{
@ -250,9 +263,11 @@ function CreateList( string ListString, array<string> 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<string> TextArray, int SelectedInd
{
ListLength = TextArray.length;
}
if (MaxListLength >= ListLength)
{
SelectedIndex = 255;
@ -334,6 +350,47 @@ function CreateList( string ListString, array<string> 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();

View File

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

View File

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

View File

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

View File

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

View File

@ -261,8 +261,8 @@ function InitializeGameOptions()
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<string> 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,15 +327,6 @@ function FilterWeeklyMaps(out array<string> 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
@ -385,10 +338,6 @@ function FilterWeeklyMaps(out array<string> 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<string> 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;

View File

@ -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<int> FilterIndexConversion;
var array<int> ItemTypeIndexConversion;
var array<int> MarketItemTypeIndexConversion;
@ -44,6 +50,9 @@ var int MaxFeaturedItems;
var KFGFxMenu_Store StoreMenu;
var transient string SearchKeyword;
var Array<ItemProperties> 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<ItemProperties> StoreItemArray)
{
local int i, ItemCount, j;
local GFxObject DataProvider;
local Array<ItemProperties> FilteredItemsArray;
local ItemProperties TempItemProps; //since we can't push elements of an array
local bool AlreadyFiltered;
FilteredItemsArray.Length = 0;
ItemCount = 0;
DataProvider = CreateArray();
@ -288,6 +305,12 @@ function SendItems(const out Array<ItemProperties> StoreItemArray)
}
}
if (SearchKeyword != "" && CurrentStoreFilter != EStore_Featured)
{
StoreSearch(SearchKeyword);
}
else
{
if (CurrentStoreFilter == EStore_Featured)
{
SetObject("storeItemFeaturedData", DataProvider);
@ -296,6 +319,7 @@ function SendItems(const out Array<ItemProperties> StoreItemArray)
{
SetObject("storeItemData", DataProvider);
}
}
}
function ShuffleFeaturedItems(out Array<ItemProperties> FeaturedItemArray)
@ -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<string> 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
}

View File

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

View File

@ -102,13 +102,14 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array<STraderItem>
{
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'
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)
{
switch (ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass))
@ -134,7 +135,6 @@ function RefreshWeaponListByPerk(byte FilterIndex, const out array<STraderItem>
}
}
}
}
for (i = 0; i < OnPerkWeapons.length; i++)
{

View File

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

View File

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

View File

@ -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<KFOutbreakEvent> OutbreakEventClass;
var array<KFPlayerController> 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> 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,8 +2336,20 @@ function BroadcastDeathMessage(Controller Killer, Controller Other, class<Damage
else if( Killer == Other )
{
// Suicide
if (KFPC != none && damageType == class'DmgType_Suicided')
{
// The Logout message comes after the Death, don't ask me why, we have to
// delay so we can react properly to a Logout situation (to change UI or hide death notification)
PlayersDelayedSuicideMessage.AddItem(KFPC);
SetTimer(0.5f, false, nameOf(BroadCastSuicide));
return;
}
else
{
BroadcastLocalized( self, class'KFLocalMessage_Game', KMT_Suicide, none, Other.PlayerReplicationInfo );
}
}
else
{
// Optimization, try to use IsHumanControlled() before we cast
@ -2305,6 +2362,7 @@ function BroadcastDeathMessage(Controller Killer, Controller Other, class<Damage
BroadcastLocalized( self, class'KFLocalMessage_PlayerKills', KMT_PlayerKillPlayer, Killer.PlayerReplicationInfo, Other.PlayerReplicationInfo );
}
}
if (Other != none && Other.GetTeamNum() != 255)
{
//do timer to double check group didnt get wasted by hans' nade spam or something like that
@ -3046,27 +3104,17 @@ function string GetNextMap()
{
MapName = name(GameMapCycles[ActiveMapCycle].Maps[MapCycleIndex]);
if ((class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 0 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[0]) || // Boom
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 1 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[1]) || // Cranium Cracker
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 2 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[2]) || // Tiny Terror
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 3 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[3]) || // Bobble Zed
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 4 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[4]) || // Poundemonium
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 5 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[5]) || // Up Up and Decay
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 6 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[6]) || // Zed Time
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 7 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[7]) || // Beefcake
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 8 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[8]) || // Bloodthirst
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 9 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[9]) || // Coliseum
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 10 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[10]) || // Arachnophobia
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 11 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[11]) || // Scavenger
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 12 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[12]) || // WW
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 13 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[13]) || // Abandon
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 15 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[15]) || // Shrunken Heads
(class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 18 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[18])) // Perk Roulette
{
if (MapName == MapSantas)
{
continue;
}
if (class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 0 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[0]) // Boom
{
if (MapName == MapSteam)
{
continue;
}
}
if ((class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 11 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[11]) || // Scavenger
@ -3090,8 +3138,7 @@ function string GetNextMap()
MapName == MapPowerCore ||
MapName == MapDescent ||
MapName == MapKrampus ||
MapName == MapElysium ||
MapName == MapSantas)
MapName == MapElysium)
{
continue;
}
@ -3111,7 +3158,7 @@ function string GetNextMap()
}
}
if (class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 14 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[14])
if (class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 14 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[14]) // Boss Rush
{
if (MapName == MapSteam)
{
@ -3285,6 +3332,7 @@ event MakeReservations(const string URLOptions, const UniqueNetId PlayerId, out
event PlayerController Login(string Portal, string Options, const UniqueNetID UniqueID, out string ErrorMessage)
{
local PlayerController SpawnedPC;
local KFPlayerController KFPC;
local string PlayerfabPlayerId;
SeatPlayer(UniqueID);
@ -3303,6 +3351,13 @@ event PlayerController Login(string Portal, string Options, const UniqueNetID Un
}
}
KFPC = KFPlayerController(SpawnedPC);
if (KFPC != none)
{
KFPC.bLoggedOut = false;
}
return SpawnedPC;
}
@ -4134,6 +4189,7 @@ defaultproperties
bDelayedStart=true
AllowSeasonalSkinsIndex=0
WeeklySelectorIndex=-1
SeasonalSkinsIndex=-1
ActionMusicDelay=5.0
ForcedMusicTracks(0)=KFMusicTrackInfo'WW_MMNU_Login.TrackInfo' // menu

View File

@ -387,6 +387,7 @@ var repnotify KFPlayerReplicationInfo VIPRepPlayer;
var bool bAllowSeasonalSkins;
var int WeeklySelectorIndex;
var int SeasonalSkinsIndex;
/************************************
* Steam heartbeat
@ -426,7 +427,7 @@ replication
if ( bNetInitial )
GameLength, WaveMax, bCustom, bVersusGame, TraderItems, GameAmmoCostScale, bAllowGrenadePurchase, MaxPerkLevel, bTradersEnabled, bForceShowSkipTrader, bAllowSeasonalSkins;
if ( bNetInitial || bNetDirty )
CurrentWeeklyIndex, WeeklySelectorIndex, PerksAvailableData;
CurrentWeeklyIndex, WeeklySelectorIndex, SeasonalSkinsIndex, PerksAvailableData;
if ( bNetInitial && Role == ROLE_Authority )
ServerAdInfo;
@ -856,7 +857,7 @@ exec reliable client function ShowPreGameServerWelcomeScreen()
{
local KFPlayerController KFPC;
if( WorldInfo.NetMode != NM_DedicatedServer )
if( WorldInfo.NetMode != NM_Client )
{
return;
}
@ -1557,11 +1558,16 @@ function UpdatePickupList()
else if( KFGameInfo.AllPickupFactories[j].CurrentPickupIsArmor() )
{
PickupInfos[i].PickupType = 2;
}
else if (KFGameInfo.AllPickupFactories[j].CurrentPickupIsCash())
{
PickupInfos[i].PickupType = 3;
}
else
{
PickupInfos[i].PickupType = -1;
}
bNetDirty = true;
i++;
}
@ -1831,7 +1837,7 @@ simulated function PlayNewMusicTrack( optional bool bGameStateChanged, optional
}
// loop if we're designated to loop or this is the boss wave
if( bLoop || (!bEndlessMode && IsBossWave()))
if( bLoop || (!bEndlessMode && (IsBossWave() || class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 12)))
{
NextMusicTrackInfo = CurrentMusicTrackInfo;
}
@ -2319,7 +2325,12 @@ simulated function NotifyAllowSeasonalSkins(int AllowSeasonalSkinsIndex)
simulated function NotifyWeeklySelector(int WeeklySelectorIndex_)
{
WeeklySelectorIndex = WeeklySelectorIndex_;
bNetDirty = true;
}
simulated function NotifySeasonalSkinsIndex(int SeasonalSkinsIndex_)
{
SeasonalSkinsIndex = SeasonalSkinsIndex_;
bNetDirty = true;
}
@ -2498,6 +2509,7 @@ defaultproperties
bForceShowSkipTrader=false
bAllowSeasonalSkins=true
WeeklySelectorIndex=-1
SeasonalSkinsIndex=-1
bForceSkipTraderUI=false
GunGameWavesCurrent=1
bWaveGunGameIsFinal=false

View File

@ -1180,8 +1180,8 @@ function string MakeMapURL(KFGFxStartGameContainer_Options InOptionsComponent)
}
if (CurrentMenuState == 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)
{
AllowSeasonalSkins = 1; // Default if we don't have a season or it's find a match menu
}
@ -1599,17 +1599,6 @@ function BuildServerFilters(OnlineGameInterface GameInterfaceSteam, KFGFxStartGa
// We don't want to force a search with the Seasonal Skins filter, we find any available server
// then we do a takeover, that's when we change the server settings
//bAllowSeasonal = OptionsComponent.GetAllowSeasonalSkinsIndex() == 0;
//if (GetStartMenuState() == EMatchmaking
// || class'KFGameEngine'.static.GetSeasonalEventID() == SEI_None
// || class'KFGameEngine'.static.GetSeasonalEventID() == SEI_Spring)
//{
// bAllowSeasonal = true; // Default if we don't have a season or it's find a match menu
//}
//Search.TestAddBoolGametagFilter(GameTagFilters, bAllowSeasonal == false, 'bNoSeasonalSkins', 1);
if (OptionsComponent.GetMakeNewServer() || bAttemptingServerCreate )
{
Search.AddGametagFilter( GameTagFilters, 'bAvailableForTakeover', "1");

View File

@ -579,6 +579,11 @@ simulated function PurchaseError(bool bCannotAfford, bool bCannotCarry)
// ActionScript Callbacks - Trader and Player Inventory
//==============================================================
function Callback_Log(String Text)
{
`Log("From script: " $Text);
}
function Callback_BuyOrSellItem()
{
local STraderItem ShopItem;

View File

@ -90,9 +90,16 @@ function ShowLeavePartyPopUp()
function ConfirmLeaveParty()
{
local KFPlayerController KFPC;
local KFPawn KFP;
KFPC = KFPlayerController(GetPC());
// For killing Special Movement Sounds before going to menu
KFP = KFPawn(KFPC.Pawn);
if (KFP != none && KFP.IsDoingSpecialMove())
{
KFP.EndSpecialMove();
}
if(OnlineLobby != none)
{
OnlineLobby.QuitLobby();

View File

@ -868,7 +868,7 @@ simulated function bool DrawFriendlyHumanPlayerInfo( KFPawn_Human KFPH )
}
//Draw player name (Top)
FontScale = class'KFGameEngine'.Static.GetKFFontScale() * FriendlyHudScale;
FontScale = class'KFGameEngine'.Static.GetKFFontScale() * ResModifier;
Canvas.Font = class'KFGameEngine'.Static.GetKFCanvasFont();
// drop shadow for player name text
@ -992,7 +992,7 @@ simulated function bool DrawScriptedPawnInfo(KFPawn_Scripted KFPS, float Normali
}
//Draw health bar
FontScale = class'KFGameEngine'.Static.GetKFFontScale() * FriendlyHudScale;
FontScale = class'KFGameEngine'.Static.GetKFFontScale() * ResModifier;
Percentage = FMin(float(KFPS.Health) / float(KFPS.HealthMax), 1);
// Make sure that the entire health bar is on screen

View File

@ -2765,6 +2765,7 @@ simulated function bool GetIsOwned( name ClassName )
{
local int i;
local Inventory Inv;
local KFPlayerController KFPC;
ForEach InventoryActors(class'Inventory', Inv)
{
@ -2784,6 +2785,21 @@ simulated function bool GetIsOwned( name ClassName )
}
}
if (WorldInfo.NetMode == NM_Client)
{
KFPC = KFPlayerController( Instigator.Controller );
if (KFPC != none)
{
for (i = 0; i < KFPC.GetPurchaseHelper().OwnedItemList.Length; ++i)
{
if (KFPC.GetPurchaseHelper().OwnedItemList[i].DefaultItem.ClassName == ClassName)
{
return true;
}
}
}
}
`log("GetIsOwned: ClassName="$ClassName @ "false", bLogInventory);
return false;
}
@ -2832,6 +2848,21 @@ simulated function bool Is9mmInInventory()
return false;
}
simulated function bool IsHRG93InInventory()
{
local Inventory Inv;
for (Inv = InventoryChain; Inv != None; Inv = Inv.Inventory)
{
if (Inv.Class.name == 'KFWeap_HRG_93R' || Inv.Class.name == 'KFWeap_HRG_93R_Dual')
{
return true;
}
}
return false;
}
defaultproperties
{
PendingFire(0)=0 // DEFAULT_FIREMOD

View File

@ -2821,6 +2821,12 @@ function AdjustDamage(out int InDamage, out vector Momentum, Controller Instigat
`log(self@GetFuncName()@"Starting Damage="$InDamage@"Momentum="$Momentum@"Zone="$HitInfo.BoneName@"DamageType="$DamageType, bLogTakeDamage);
// Allow current weapon state to reduce damage
KFDT = class<KFDamageType>(DamageType);
if (KFDT != none && Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator)
{
InDamage *= KFDT.default.SelfDamageReductionValue;
}
if ( MyKFWeapon != None )
{
MyKFWeapon.AdjustDamage(InDamage, DamageType, DamageCauser);
@ -2863,7 +2869,6 @@ function AdjustDamage(out int InDamage, out vector Momentum, Controller Instigat
}
// Check non lethal damage
KFDT = class<KFDamageType>(DamageType);
if ( InDamage >= Health && KFDT != none && KFDT.default.bNonLethalDamage )
{
InDamage = Health - 1;
@ -3159,7 +3164,10 @@ function class<KFPerk> GetUsedWeaponPerk( Controller DamagerController, Actor Da
}
}
if( WeaponPerk == none && KFW != none && ( class'KFPerk'.static.IsBackupWeapon( KFW ) || class'KFPerk'.static.IsDoshinegun( KFW ) ))
if( WeaponPerk == none && KFW != none
&& ( class'KFPerk'.static.IsBackupWeapon( KFW ) ||
class'KFPerk'.static.IsDoshinegun( KFW ) ||
class'KFPerk'.static.IsMineReconstructor( KFW ) ))
{
WeaponPerk = InstigatorPerkClass;
}
@ -5011,7 +5019,7 @@ reliable server final function ServerDoSpecialMove(ESpecialMove NewMove, optiona
/**
* Request to abort/stop current SpecialMove
*/
simulated final event EndSpecialMove(optional ESpecialMove SpecialMoveToEnd, optional bool bForceNetSync)
simulated event EndSpecialMove(optional ESpecialMove SpecialMoveToEnd, optional bool bForceNetSync)
{
if ( SpecialMoveHandler != None )
{
@ -5579,11 +5587,6 @@ simulated function bool CanInteractWithPawnGrapple()
return true;
}
simulated function bool CanInteractWithZoneVelocity()
{
return true;
}
defaultproperties
{
InventoryManagerClass=class'KFInventoryManager'

View File

@ -1363,7 +1363,7 @@ event TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector
`log(GetFuncName()@"Damage AFTER ="$ActualDamageTaken$" DamageType: "$DamageType$" DamageCauser: "$DamageCauser, bLogTakeDamage);
KFGRI = KFGameReplicationInfo(KFGameInfo(WorldInfo.Game).GameReplicationInfo);
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
if( (ActualDamageTaken > 0 || OldArmor - Armor > 0) && IsAliveAndWell() && !KFGRI.bTraderIsOpen )
{

View File

@ -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<KFPawn_Monster> GetAIPawnClassToSpawn()
{
local WorldInfo WI;
@ -766,9 +766,7 @@ static event class<KFPawn_Monster> 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";

View File

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

View File

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

View File

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

View File

@ -185,6 +185,11 @@ function bool CurrentPickupIsAmmo()
return false;
}
function bool CurrentPickupIsCash()
{
return false;
}
/**
* Make pickup mesh and associated effects hidden.
*/

View File

@ -315,6 +315,9 @@ function GiveWeapon( Pawn P )
local class<KFWeapon> 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,6 +325,17 @@ function GiveWeapon( Pawn P )
// Check if we have the weapon
KFIM = KFInventoryManager( P.InvManager );
bIsSecondatyPistol = InventoryClass.name == 'KFWeap_HRG_93R' ||
InventoryClass.name == 'KFWeap_HRG_93R_Dual' ||
InventoryClass.name == 'KFWeap_Pistol_9mm' ||
InventoryClass.name == 'KFWeap_Pistol_Dual9mm';
if (bIsSecondatyPistol)
{
bIs9mmInInventory = KFIM.Is9mmInInventory();
bIsHRG93InInventory = KFIM.IsHRG93InInventory();
if (!(bIs9mmInInventory && bIsHRG93InInventory))
{
// For HRG93R and 9mm pistols, if one of the other type is picked just give the one owned
if (KFIM.Is9mmInInventory())
{
@ -345,6 +359,8 @@ function GiveWeapon( Pawn P )
InventoryClass = class<Weapon>(DynamicLoadObject(class'KFWeapDef_HRG_93R_Dual'.default.WeaponClassPath, class'Class'));
}
}
}
}
foreach KFIM.InventoryActors( class'KFWeapon', KFW )
{

View File

@ -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;
EventId = class'KFGameEngine'.static.GetSeasonalEventID();
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
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<KFOnlineStatsRead> StatsReadClass;
local class<KFOnlineStatsWrite> 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)
@ -8383,6 +8398,13 @@ function DrawDebugMap( out Canvas Canvas )
ElementColor.R=0;
ElementColor.G=0;
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
@ -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
}

View File

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

View File

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

View File

@ -89,9 +89,12 @@ simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNorma
PenetrationPower -= KFP.PenetrationResistance;
}
if (PenetrationPower > 0)
{
bPassThrough = TRUE;
}
}
}
else
{
ProcessBulletTouch(Other, HitLocation, HitNormal);

View File

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

View File

@ -20,8 +20,7 @@ event Activated()
{
Door = KFDoorActor(ObjVar.GetObjectValue());
Door.SetInteractive(false);
Door.bIsDoorOpen = true;
Door.UseDoor(none);
Door.CloseDoor();
}
}
}

View File

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

View File

@ -1083,7 +1083,7 @@ function bool ShouldConcludePauseGameVote()
reliable server function ConcludeVotePauseGame()
{
local array<KFPlayerReplicationInfo> 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

View File

@ -924,6 +924,16 @@ simulated function StartFire(byte FireModeNum)
Super.StartFire(FireModeNum);
}
function bool DenyPickupQuery(class<Inventory> ItemClass, Actor Pickup)
{
if (ItemClass == class || ItemClass == SingleClass)
{
return DenyPickupQuery_Internal(ItemClass, Pickup);
}
return false;
}
defaultproperties
{
InventoryGroup=IG_Primary

View File

@ -1768,19 +1768,32 @@ function SetOriginalValuesFromPickup( KFWeapon PickedUpWeapon )
*/
function bool DenyPickupQuery(class<Inventory> 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<Inventory> ItemClass, Actor Pickup)
{
local bool bDenyPickUp, bIsProjectile;
local KFPlayerController KFPC;
local class<KFWeapon> KFWeapClass;
if (ItemClass == class)
{
KFWeapClass = class<KFWeapon>(ItemClass);
bIsProjectile = Pickup.IsA('Projectile');
// 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)
if (bIsProjectile ||
KFWeapClass == none || default.DualClass == none ||
(ItemClass == class && 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() && !Pickup.IsA('Projectile'))
if (CanRefillSecondaryAmmo() && !bIsProjectile)
{
bDenyPickUp = ((SpareAmmoCount[0] + AmmoCount[0]) >= GetMaxAmmoAmount(0) && AmmoCount[1] >= MagazineCapacity[1]);
}
@ -1806,11 +1819,9 @@ function bool DenyPickupQuery(class<Inventory> ItemClass, Actor Pickup)
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);
}

View File

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

View File

@ -49,6 +49,8 @@ defaultproperties
BurnDamageType=class'KFDT_Fire_ThermiteImpactDoT'
SelfDamageReductionValue=0.05f //0.25f
ModifierPerkList(0)=class'KFPerk_FireBug'
WeaponDef=class'KFWeapDef_ThermiteBore'

View File

@ -25,6 +25,8 @@ defaultproperties
KnockdownPower=150
StumblePower=400
SelfDamageReductionValue=0.5f //0.75f
//Perk
ModifierPerkList(0)=class'KFPerk_Demolitionist'

View File

@ -27,6 +27,8 @@ defaultproperties
KDeathVel=200
StumblePower=200
SelfDamageReductionValue=0.075f
ModifierPerkList(0)=class'KFPerk_Demolitionist'
WeaponDef=class'KFWeapDef_GravityImploder'

View File

@ -23,6 +23,7 @@ defaultproperties
KnockdownPower=400
SelfDamageReductionValue=0.075f
//Perk
ModifierPerkList(0)=class'KFPerk_Demolitionist'
WeaponDef=class'KFWeapDef_GravityImploder'

View File

@ -24,6 +24,8 @@ defaultproperties
KnockdownPower = 100
StumblePower = 200
SelfDamageReductionValue = 0.25f;
//Perk
ModifierPerkList(0) = class'KFPerk_Demolitionist'

View File

@ -37,4 +37,7 @@ defaultproperties
bCausesFracture=false
bCanPlayDeadHitEffects=false
SelfDamageReductionValue = 0f;
}

View File

@ -20,8 +20,8 @@ defaultproperties
KDeathUpKick=1000
KDeathVel=300
StunPower=160
StumblePower=40
StunPower=200
StumblePower=100
//Perk
ModifierPerkList(0)=class'KFPerk_SWAT'

View File

@ -50,6 +50,7 @@ defaultproperties
ModifierPerkList(0) = class'KFPerk_Firebug'
ModifierPerkList(1)=class'KFPerk_Demolitionist'
SelfDamageReductionValue=0.1f
WeaponDef=class'KFWeapDef_HuskCannon'
BurnDamageType = class'KFDT_HuskCannonDot'

View File

@ -24,6 +24,8 @@ defaultproperties
KnockdownPower = 150
StumblePower = 400
SelfDamageReductionValue = 0.25f
//Perk
ModifierPerkList(0) = class'KFPerk_Demolitionist'

View File

@ -35,6 +35,8 @@ defaultproperties
DoT_Interval=0.5
DoT_DamageScale=0.2
SelfDamageReductionValue=0.05f //0.25f
BurnPower=10
}

View File

@ -22,4 +22,6 @@ defaultproperties
WeaponDef=class'KFWeapDef_ChiappaRhino'
ModifierPerkList(0)=class'KFPerk_Gunslinger'
bAnyPerk = true
}

View File

@ -22,6 +22,8 @@ defaultproperties
DoT_Interval=0.5 //1.0
DoT_DamageScale=0.1
SelfDamageReductionValue=0.1f
ModifierPerkList(0)=class'KFPerk_FieldMedic'
WeaponDef=class'KFWeapDef_HRG_Vampire'
}

View File

@ -37,6 +37,8 @@ defaultproperties
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'
}

View File

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

View File

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

View File

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

View File

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

View File

@ -230,4 +230,6 @@ defaultproperties
bCanRage=true
EnragedSoundEvent=AkEvent'WW_ZED_Clot_Alpha.Play_Alpha_Clot_Special_Enrage'
ElitePawnClass.Empty
}

View File

@ -126,4 +126,6 @@ defaultproperties
MonsterArchPath="ZED_ARCH.ZED_CrawlerKing_Archetype"
ControllerClass=class'KFAIController_ZedCrawlerKing'
DifficultySettings=class'KFDifficulty_CrawlerKing'
ElitePawnClass.Empty
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,4 +45,13 @@ defaultproperties
AmbientSoundPlayEvent=none
AmbientSoundStopEvent=none
bWaitForEffects=false
ProjEffectsFadeOutDuration=0.25
bSyncToOriginalLocation=true
bSyncToThirdPersonMuzzleLocation=true
bRotationFollowsVelocity=true
bNoReplicationToInstigator=false
bUseClientSideHitDetection=true
}

View File

@ -399,6 +399,13 @@ defaultproperties
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
NetUpdateFrequency=200

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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> DamageType, Actor DamageCauser)
{
super.AdjustDamage(InDamage, DamageType, DamageCauser);
if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator)
{
InDamage *= SelfDamageReductionValue;
}
}
defaultproperties
{
// Content
@ -180,8 +166,6 @@ defaultproperties
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)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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> DamageType, Actor DamageCauser)
{
super.AdjustDamage(InDamage, DamageType, DamageCauser);
if (Instigator != none && DamageCauser != none && DamageCauser.Instigator == Instigator)
{
InDamage *= SelfDamageReductionValue;
}
}
simulated function KFProjectile SpawnAllProjectiles(class<KFProjectile> 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

View File

@ -19,9 +19,6 @@ var array<KFProj_Rocket_SealSqueal> 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> 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

View File

@ -15,9 +15,6 @@ var array<KFProj_Rocket_ThermiteBore> 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> 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

View File

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