1
0
This commit is contained in:
2021-03-11 22:29:08 +03:00
parent 28f1e3c001
commit 7977e0103d
34 changed files with 92 additions and 128 deletions

View File

@ -19,6 +19,13 @@ struct SWhatsNew
var string TextField;
var string RedirectURL;
var string PSNProductId;
/** Used for those entitlements which does not have a "linked" Playfab item (like Armory Season Pass 2021)*/
var bool bPlayfabItemPairedUp;
structdefaultproperties
{
bPlayfabItemPairedUp=true
}
};
var array<SWhatsNew> WhatsNewItems;

View File

@ -219,7 +219,7 @@ native static function InitEventContent();
native static function RefreshEventContent();
// make sure our current tweak values are up-to-date with global
native static function RefreshOnlineGameData();
native static function RefreshOnlineGameData(bool RefreshTimeEvent = true);
native static function ApplyTweaks(string MapName);
native static function bool IsLastRefreshTweakParamsSuccessful();

View File

@ -775,7 +775,7 @@ simulated function EndGame()
bMatchHasBegun = false;
bMatchIsOver = true;
class'KFGameEngine'.static.RefreshOnlineGameData();
class'KFGameEngine'.static.RefreshOnlineGameData(false);
}
/* Welcome screen shenanigans */

View File

@ -764,8 +764,21 @@ function Callback_OnWhatsNewClicked(int Index, string URL)
Manager.OnBuyGamePressed();
return;
}
//We skip looking in the catalog for the linked Playfab item to this entitlement. We open up directly the store
if ( !FindGameContainer.PS4ActiveWhatsNewItems[Index].bPlayfabItemPairedUp )
{
`log(`location@" Product ID: "@FindGameContainer.PS4ActiveWhatsNewItems[Index].PSNProductId@" does not have a playfab item paired up. Opening up directly store.");
if( class'WorldInfo'.static.IsConsoleBuild( CONSOLE_Orbis ) )
{
OnlineSub.OpenMarketPlaceSearchBySignedOfferId( FindGameContainer.PS4ActiveWhatsNewItems[Index].PSNProductId );
}
else
{
OnlineSub.PlayerInterfaceEx.ShowProductDetailsUI( GetLP().ControllerId, FindGameContainer.PS4ActiveWhatsNewItems[Index].PSNProductId );
}
}
// If this is attached to a PSN product ID, we need to look up the signed offer Id
if( FindGameContainer.PS4ActiveWhatsNewItems[Index].PSNProductId != "" )
else if( FindGameContainer.PS4ActiveWhatsNewItems[Index].PSNProductId != "" )
{
for( i = 0; i < OnlineSub.ItemPropertiesList.Length; i++ )
{
@ -1918,9 +1931,9 @@ defaultproperties
SubWidgetBindings.Add((WidgetName ="newsPage",WidgetClass=class'KFGFxStartContainer_NewsImageHolder'))
WhatsNewPS="http://www.killingfloor2.com/psnews"
WhatsNewMS="http://www.killingfloor2.com/xboxnews"
WhatsNewSteam="http://www.killingfloor2.com/pcnews"
WhatsNewPS="https://www.killingfloor2.com/psnews"
WhatsNewMS="https://www.killingfloor2.com/xboxnews"
WhatsNewSteam="https://www.killingfloor2.com/pcnews"
}

View File

@ -2672,6 +2672,9 @@ event TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector
OldHealth = Health;
Super.TakeDamage(Damage, InstigatedBy, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
// using the passed in damage type instead of the hitfxinfo since that doesn't get updated when zero damage is done
HandleAfflictionsOnHit(InstigatedBy, Normal(Momentum), class<KFDamageType>(DamageType), DamageCauser);
ActualDamage = OldHealth - Health;
if( ActualDamage > 0 )
{
@ -3996,12 +3999,12 @@ simulated function KFSkinTypeEffects GetHitZoneSkinTypeEffects( int HitZoneIdx )
*/
simulated function AdjustAffliction(out float AfflictionPower);
function HandleAfflictionsOnHit(Controller DamageInstigator, vector HitDir, class<DamageType> DamageType, Actor DamageCauser)
function HandleAfflictionsOnHit(Controller DamageInstigator, vector HitDir, class<KFDamageType> DamageType, Actor DamageCauser)
{
//Handle afflictions
if (AfflictionHandler != None)
{
AfflictionHandler.NotifyTakeHit(DamageInstigator, HitDir, class<KFDamageType>(DamageType), DamageCauser);
AfflictionHandler.NotifyTakeHit(DamageInstigator, HitDir, DamageType, DamageCauser);
}
}

View File

@ -1287,14 +1287,14 @@ function AdjustDamage(out int InDamage, out vector Momentum, Controller Instigat
event TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
local int ActualDamageTaken, OldHealth;
local int ActualDamageTaken, OldHealth, OldArmor;
//local KFGameInfo KFGI;
local KFGameReplicationInfo KFGRI;
local KFPlayerReplicationInfo KFPRI;
local KFAIController_ZedBoss InstigatedByBoss;
OldHealth = Health;
OldArmor = Armor;
`log(GetFuncName()@"Damage BEFORE ="$Damage$" DamageType: "$DamageType$" DamageCauser: "$DamageCauser, bLogTakeDamage);
Super.TakeDamage(Damage, InstigatedBy, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
@ -1303,7 +1303,12 @@ 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);
if( Damage > 0 && IsAliveAndWell() && !KFGRI.bTraderIsOpen )
`Log("ARMOR OLD: " $ OldArmor);
`Log("ARMOR NEW: " $ Armor);
`Log("ARMOR diff: " $ OldArmor - Armor);
if( (ActualDamageTaken > 0 || OldArmor - Armor > 0) && IsAliveAndWell() && !KFGRI.bTraderIsOpen )
{
KFPlayerController(Controller).NotifyHitTaken();
}

View File

@ -189,17 +189,6 @@ var float HeadshotAccuracyHandicap;
var array<string> PrestigeRewardItemIconPaths;
/*********************************************************************************************
* Transient vars
********************************************************************************************* */
/**
Indicates if the last hit was a headshot.
This is added for the crossbow to apply the stun on enemies only if hit in the head.
Afflictions are calculated after adjusting the damage, so the bone is not necessary
indicating a headshot anymore.
*/
var transient bool bWasLastHitAHeadshot;
/*********************************************************************************************
* Caching
********************************************************************************************* */
@ -1100,7 +1089,8 @@ simulated function ModifySprintSpeed( out float Speed ){ ModifySpeed( Speed ); }
function FinalizeSpeedVariables();
/** Kickback - recaoil bonus */
simulated function ModifyRecoil( out float CurrentRecoilModifier, KFWeapon KFW );
/** Allows to modify the damage taken */
/** Allow perk to adjust damage given */
function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx );
function ModifyDamageTaken( out int InDamage, optional class<DamageType> DamageType, optional Controller InstigatedBy );
/** Ammunition capacity and mag count increased */
simulated function ModifyMagSizeAndNumber( KFWeapon KFW, out int MagazineCapacity, optional array< Class<KFPerk> > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname );
@ -1400,12 +1390,6 @@ simulated function class<KFWeaponDefinition> GetGrenadeWeaponDef()
return default.GrenadeWeaponDef;
}
/** Allow perk to adjust damage given */
function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
{
bWasLastHitAHeadshot = MyKFPM != none && HitZoneIdx == HZI_HEAD;
}
/*********************************************************************************************
* @name Debug
********************************************************************************************* */
@ -1519,6 +1503,4 @@ DefaultProperties
AssistDoshModifier=1.f
PrestigeRewardItemIconPaths[0]="Xmas_UI.UI_Objectives_Xmas_Krampus"
bWasLastHitAHeadshot=false
}

View File

@ -145,8 +145,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon MyKFWeapon;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
if( DamageCauser != none )

View File

@ -74,8 +74,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
{
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;

View File

@ -127,8 +127,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
if( DamageType != none && IsDamageIgnoredDT( DamageType ) )
{
return;

View File

@ -298,8 +298,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
if( DamageCauser != none )
@ -648,7 +646,7 @@ DefaultProperties
PerkBuildStatID=STATID_Medic_Build
SelfHealingSurgePct=0.1f
MaxSurvivalistResistance=0.70f //0.5f //0.8
MaxSurvivalistResistance=0.60f //0.70f //0.5f //0.8
CombatantSpeedModifier=0.1f
MaxHealingSpeedBoost=30 //15 //50

View File

@ -82,8 +82,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
if( DamageCauser != none )

View File

@ -133,8 +133,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
if( DamageCauser != none )
{

View File

@ -50,6 +50,8 @@ var private const array<Name> AdditionalOnPerkDTNames;
/** The % chance that zed time will be activated when damage is done when the Zed Time perk skills are active */
var float SkillZedTimeChance;
var private transient bool bWasHeadshot;
/*********************************************************************************************
* @name Stats/XP
********************************************************************************************* */
@ -125,8 +127,7 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
bWasHeadshot = false;
TempDamage = InDamage;
if( DamageCauser != none )
@ -138,6 +139,8 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
{
if( MyKFPM != none && HitZoneIdx == HZI_HEAD )
{
bWasHeadshot = true;
`QALog( "(Headshot), damage mod=" $GetPassiveValue( HeadshotDamage, CurrentLevel ), bLogPerk );
TempDamage += InDamage * GetPassiveValue( HeadshotDamage, CurrentLevel );
@ -343,7 +346,9 @@ function bool IsStunGuaranteed( optional class<DamageType> DamageType, optional
{
if( IsDamageTypeOnPerk(class<KFDamageType>(DamageType)) && GetZTStunActive())
{
return bWasLastHitAHeadshot;
// At this point, HitZoneIdx is already modified to point to the armor rather the pawn's body part.
// Caching in ModifyDamageGiven if it was a headshot will be based on the original bone index.
return bWasHeadshot;
}
return false;
@ -725,4 +730,6 @@ DefaultProperties
CameraViewShakeScale=0.5
AutoBuyLoadOutPath=(class'KFWeapDef_Winchester1894', class'KFWeapDef_Crossbow', class'KFWeapDef_M14EBR', class'KFWeapDef_RailGun', class'KFWeapDef_M99')
AssistDoshModifier=1.1f
bWasHeadshot = false;
}

View File

@ -155,8 +155,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
`QALog( GetFuncName() @ "BaseDamage =" @ InDamage, bLogPerk );

View File

@ -142,8 +142,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
TempDamage += InDamage * GetPassiveValue( WeaponDamage, CurrentLevel );

View File

@ -268,8 +268,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
local KFWeapon KFW;
local float TempDamage;
super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
TempDamage = InDamage;
if( DamageCauser != none )