1
0
This commit is contained in:
GenZmeY 2023-06-06 21:19:41 +03:00
parent 3c1ea26aca
commit 39b56bd58b
2 changed files with 42 additions and 9 deletions

View File

@ -257,6 +257,8 @@ function UpdateCraftButtons()
function OnOpen()
{
class'GameEngine'.static.GetPlayfabInterface().ReadInventory();
//@SABER_EGS IsEosBuild() case added
if( class'WorldInfo'.static.IsConsoleBuild() || class'WorldInfo'.static.IsEosBuild() )
{
@ -412,6 +414,24 @@ function InitInventory()
return;
}
if (class'WorldInfo'.static.IsConsoleBuild() || class'WorldInfo'.static.IsEosBuild() )
{
if (OnlineSub.CurrentInventory.Length == 0)
{
SetObject("inventoryList", ItemArray);
return;
}
}
else
{
if (!OnlineSub.bInventoryReady)
{
// If the inventory is not ready just send an empty array.
SetObject("inventoryList", ItemArray);
return;
}
}
// While reading from the profile we also order by type, then we might want to order again some stuff that's inside the same item type later
//`Log("NEW MENU OPEN: " $CurrentInventoryFilter);

View File

@ -680,6 +680,10 @@ simulated state Detonate
local float Angle, FuseTime;
local KFProj_HighExplosive_HRG_Warthog Projectile;
local array<float> FuseTimes;
local GameExplosion ExplosionToUse;
local KFPawn PawnInstigator;
local KFPerk Perk;
local float OriginalDamageRadiusDroneExplosion;
// Shoot grenades around
@ -748,7 +752,24 @@ simulated state Detonate
ExploActor.Instigator = Instigator;
ExploActor.bIgnoreInstigator = true;
ExploActor.Explode(PrepareExplosionTemplate());
ExplosionToUse = PrepareExplosionTemplate();
OriginalDamageRadiusDroneExplosion = ExplosionToUse.DamageRadius;
PawnInstigator = KFPawn(Instigator);
if (PawnInstigator != None)
{
Perk = PawnInstigator.GetPerk();
if (Perk != None)
{
ExplosionToUse.DamageRadius = OriginalDamageRadiusDroneExplosion * Perk.GetAoERadiusModifier();
}
}
ExploActor.Explode(ExplosionToUse);
// Revert to original
ExplosionToUse.DamageRadius = OriginalDamageRadiusDroneExplosion;
}
Destroy();
@ -1191,10 +1212,8 @@ simulated function ClearFlashCount(Weapon InWeapon)
simulated function GameExplosion PrepareExplosionTemplate()
{
local KFPawn PawnInstigator;
local KFPerk Perk;
local GameExplosion NewTemplate;
PawnInstigator = KFPawn(Instigator);
if (PawnInstigator != None)
{
@ -1204,12 +1223,6 @@ simulated function GameExplosion PrepareExplosionTemplate()
{
NewTemplate = default.ExplosionTemplate;
}
Perk = PawnInstigator.GetPerk();
if (Perk != None)
{
NewTemplate.DamageRadius *= Perk.GetAoERadiusModifier();
}
}
return NewTemplate;