1
0
This commit is contained in:
2023-10-18 02:03:17 +03:00
parent ce182019df
commit cde088c1f4
38 changed files with 231 additions and 113 deletions

View File

@ -163,7 +163,7 @@ function KillOwner()
defaultproperties
{
DissipationRate=10 //20
DissipationRate=200 //20
bNeedsTick=true
MaxEffect=10.f;
@ -171,7 +171,7 @@ defaultproperties
EffectAppliedByStack=1.0f
ApplyEffectVel=100.0f // % per second
RemoveEffectVel=0.5f // % per second
RemoveEffectVel=0.25f // % per second
CurrentEffect=0.0f
CurrentEffectApplied=0.0f

View File

@ -198,14 +198,6 @@ function TickHud(float DeltaTime)
local int bStatusWarning, bStatusNotification;
local string StatusMessage;
local GFxObject DataObject;
local KFGameReplicationInfo KFGRI;
KFGRI=KFGameReplicationInfo(KFPC.WorldInfo.GRI);
if (KFGRI.IsContaminationMode())
{
return;
}
if (CurrentObjectiveInterface != none)
{

View File

@ -518,14 +518,17 @@ function TickHud(float DeltaTime)
{
bBountyHuntVisibility = KFPC.CanUseBountyHunt();
if (KFGRI.bWaveIsActive == false)
if (KFGRI != none)
{
bBountyHuntVisibility = false;
if (KFGRI.bWaveIsActive == false)
{
bBountyHuntVisibility = false;
}
else if (KFGRI.WaveNum == KFGRI.WaveMax)
{
bBountyHuntVisibility = false;
}
}
else if (KFGRI.WaveNum == KFGRI.WaveMax)
{
bBountyHuntVisibility = false;
}
if (bBountyHuntVisibility != bLastBountyHuntVisibility)
{

View File

@ -684,8 +684,6 @@ event InitGame( string Options, out string ErrorMessage )
KFGameEngine(class'Engine'.static.GetEngine()).SetWeeklyEventIndex(KFGameEngine(class'Engine'.static.GetEngine()).GetIntendedWeeklyEventIndex());
}
`Log("TEST - InitGame : " $WeeklySelectorIndex);
Super.InitGame( Options, ErrorMessage );
if (UsesModifiedDifficulty())
@ -1182,8 +1180,6 @@ function InitGRIVariables()
MyKFGRI.NotifyAllowSeasonalSkins(AllowSeasonalSkinsIndex);
MyKFGRI.NotifyWeeklySelector(WeeklySelectorIndex);
`Log("TEST - InitGRIVariables- NotifyWeeklySelector : " $WeeklySelectorIndex);
SetBossIndex();
}

View File

@ -2321,8 +2321,6 @@ simulated function NotifyWeeklySelector(int WeeklySelectorIndex_)
WeeklySelectorIndex = WeeklySelectorIndex_;
bNetDirty = true;
`Log("TEST - NotifyWeeklySelector : " $WeeklySelectorIndex);
}
/** VIP weekly */

View File

@ -1945,8 +1945,9 @@ simulated function final BuyAmmo( float AmountPurchased, EItemType ItemType, opt
{
local STraderItem WeaponItem;
local KFWeapon KFW;
local byte MagAmmoCount;
local int MagAmmoCount;
// Keep 255 because what else?
MagAmmoCount = 255;
if ( ItemType == EIT_Weapon )
@ -1973,7 +1974,7 @@ simulated function final BuyAmmo( float AmountPurchased, EItemType ItemType, opt
}
/** Receive weapon ammo */
reliable server final private function ServerBuyAmmo(int AmountPurchased, byte ClientAmmoCount, byte ItemIndex, bool bSecondaryAmmo)
reliable server final private function ServerBuyAmmo(int AmountPurchased, int ClientAmmoCount, byte ItemIndex, bool bSecondaryAmmo)
{
local STraderItem WeaponItem;
local KFWeapon KFW;

View File

@ -144,8 +144,8 @@ function StartHealRecharge()
if (Role == ROLE_Authority)
{
InstigatorPerk = KFW.GetPerk();
UsedHealRechargeTime =
HealFullRechargeSeconds * KFW.static.GetUpgradeHealRechargeMod(KFW.CurrentWeaponUpgradeIndex);
UsedHealRechargeTime = HealFullRechargeSeconds;
UsedHealRechargeTime *= KFW.static.GetUpgradeHealRechargeMod(KFW.CurrentWeaponUpgradeIndex);
InstigatorPerk.ModifyHealerRechargeTime(UsedHealRechargeTime);
HealRechargePerSecond = KFW.MagazineCapacity[ALTFIRE_FIREMODE] / UsedHealRechargeTime;

View File

@ -1130,7 +1130,7 @@ private event AddToHitsGiven(class<DamageType> DT)
private event AddToKills( class<KFPawn_Monster> MonsterClass, byte Difficulty, class<DamageType> DT, bool bKiller )
{
// seasonal event hook
SeasonalEventStats_OnZedKilled(MonsterClass, Difficulty, DT);
SeasonalEventStats_OnZedKilled(MonsterClass, Difficulty, DT, bKiller);
if (!bKiller)
{
@ -1878,11 +1878,11 @@ final simulated function SeasonalEventStats_OnHitGiven(class<DamageType> DT)
}
}
final simulated function SeasonalEventStats_OnZedKilled(class<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT)
final simulated function SeasonalEventStats_OnZedKilled(class<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT, bool bKiller)
{
if (SeasonalEventIsValid())
{
SeasonalEvent.OnZedKilled(MonsterClass, Difficulty, DT);
SeasonalEvent.OnZedKilled(MonsterClass, Difficulty, DT, bKiller);
}
}

View File

@ -656,7 +656,7 @@ var WeeklyOverrides ActiveEvent;
/** Stored values of World Info and GRI items incase we need to reset it. */
var CachedOutbreakInfo CachedItems;
function int SetActiveEvent(int ActiveEventIdx, KFGameInfo GameInfo)
function int SetActiveEvent(int ActiveEventIdx, optional KFGameInfo GameInfoForWeeklyIndex = none)
{
`if(`notdefined(ShippingPC))
local string LocalURL;
@ -667,17 +667,21 @@ function int SetActiveEvent(int ActiveEventIdx, KFGameInfo GameInfo)
LocalURL = WorldInfo.GetLocalURL();
LocalURL = Split(LocalURL, "?"); //remove map name
if (GameInfo.WeeklySelectorIndex == -1) // WeeklySelectorIndex overrides the ActiveEventIdx if any
// WeeklySelectorIndex overrides the ActiveEventIdx if any
if (GameInfoForWeeklyIndex == none || GameInfoForWeeklyIndex.WeeklySelectorIndex == -1)
{
ActiveEventIdx = GetIntOption(LocalURL, "ActiveEventIdx", ActiveEventIdx);
// Set WeeklySelectorIndex to the value (ActiveEventIdx is not replicated), so all the flow of the game works the same
GameInfo.WeeklySelectorIndex = ActiveEventIdx + 1;
if (GameInfoForWeeklyIndex != none)
{
GameInfoForWeeklyIndex.WeeklySelectorIndex = ActiveEventIdx + 1;
}
}
else if (GameInfo.WeeklySelectorIndex > 0)
else if (GameInfoForWeeklyIndex != none && GameInfoForWeeklyIndex.WeeklySelectorIndex > 0)
{
// 0 is default, we move one index to the left so it matches first Weekly Mode
ActiveEventIdx = GameInfo.WeeklySelectorIndex - 1;
ActiveEventIdx = GameInfoForWeeklyIndex.WeeklySelectorIndex - 1;
}
//If our override is out of bounds, see if it's a valid test event
@ -694,10 +698,10 @@ function int SetActiveEvent(int ActiveEventIdx, KFGameInfo GameInfo)
ActiveEvent = SetEvents[ActiveEventIdx];
}
`else
if (GameInfo.WeeklySelectorIndex > 0)
if (GameInfoForWeeklyIndex != none && GameInfoForWeeklyIndex.WeeklySelectorIndex > 0)
{
// 0 is default, we move one index to the left so it matches first Weekly Mode
ActiveEventIdx = GameInfo.WeeklySelectorIndex - 1;
ActiveEventIdx = GameInfoForWeeklyIndex.WeeklySelectorIndex - 1;
}
if(ActiveEventIdx < SetEvents.length)
@ -706,9 +710,11 @@ function int SetActiveEvent(int ActiveEventIdx, KFGameInfo GameInfo)
}
`endif
`Log("TEST - SetActiveEvent : " $ActiveEventIdx);
KFGameEngine(class'Engine'.static.GetEngine()).SetWeeklyEventIndex(ActiveEventIdx);
// Override this only if we can force a new index via GameInfo
if (GameInfoForWeeklyIndex != none)
{
KFGameEngine(class'Engine'.static.GetEngine()).SetWeeklyEventIndex(ActiveEventIdx);
}
return ActiveEventIdx;
}

View File

@ -1316,7 +1316,6 @@ native function bool CanRepairDoors();
function bool RepairArmor( Pawn HealTarget );
function bool IsToxicDmgActive() { return false; }
static function class<KFDamageType> GetToxicDmgTypeClass(){ return default.ToxicDmgTypeClass; }
static function float GetHealRechargeMod();
static function ModifyToxicDmg( out int ToxicDamage );
simulated function float GetSirenScreamStrength(){ return 1.f; }
simulated function bool IsHealingSurgeActive(){ return false; }
@ -1327,7 +1326,7 @@ simulated function bool GetHealingShieldActive(){ return false; }
simulated function bool IsZedativeActive(){ return false; }
function bool CouldBeZedToxicCloud( class<KFDamageType> KFDT ){ return false; }
function ToxicCloudExplode( Controller Killer, Pawn ZedKilled );
simulated function float GetDartAmmoCostModifier() { return 1.0f; }
/** Firebug functions */
simulated function bool IsFlarotovActive(){ return false; }

View File

@ -47,6 +47,7 @@ var int ZedativeDamage;
var class<KFDamageType> ZedativeDamageType;
var class<KFDamageType> ZedativeHealingType;
var int ZedativeEffectRadius;
var float DartAmmoCostModifier;
enum EMedicPerkSkills
{
@ -324,11 +325,6 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
InDamage = Round(TempDamage);
}
static function float GetHealRechargeMod()
{
return GetSkillValue( default.PerkSkills[EMedicAcidicCompound] );
}
/** Takes the weapons primary damage and calculates the poisoning over time value */
/**
* @brief Takes the weapons primary damage and calculates the bleeding over time value
@ -339,7 +335,7 @@ static function ModifyToxicDmg( out int ToxicDamage )
{
local float TempDamage;
TempDamage = float(ToxicDamage) * GetHealRechargeMod();
TempDamage = float(ToxicDamage) * GetSkillValue( default.PerkSkills[EMedicAcidicCompound] );
ToxicDamage = FCeil( TempDamage );
}
@ -588,6 +584,14 @@ static function float GetZedativeEffectRadius()
return default.ZedativeEffectRadius;
}
simulated function float GetDartAmmoCostModifier()
{
if (IsAcidicCompoundActive())
{
return DartAmmoCostModifier;
}
return Super.GetDartAmmoCostModifier();
}
/*********************************************************************************************
* @name HUD / UI
********************************************************************************************* */
@ -639,6 +643,7 @@ simulated function LogPerkSkills()
}
}
DefaultProperties
{
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Medic'
@ -672,6 +677,8 @@ DefaultProperties
ToxicDmgTypeClass=class'KFDT_Toxic_AcidicRounds'
DartAmmoCostModifier=0.8f
// explosion
Begin Object Class=KFGameExplosion Name=ExploTemplate0
Damage=50 //50

View File

@ -216,6 +216,8 @@ function ModifyDamageTaken( out int InDamage, optional class<DamageType> DamageT
{
TempDamage -= TempDamage * FortitudeDamageResistance;
`QALog( "Fortitude Damage Resistance =" @ FortitudeDamageResistance, bLogPerk );
InDamage = Round(TempDamage);
}
}
@ -928,5 +930,5 @@ DefaultProperties
AdditionalOnPerkDTNames(2)="KFDT_Ballistic_NailShotgun"
FortitudeDamageResistance=0.1f
APDamageModifier=0.05f
APDamageModifier=0.1f
}

View File

@ -1014,17 +1014,21 @@ reliable server event PushV()
simulated function bool GetAllowSeasonalSkins()
{
local KFGameReplicationInfo KFGRI;
local bool bIsWWLWeekly, bIsAllowSeasonalSkins; // Situations that shouldn't allow seasonal overrides
local bool bIsWWLWeekly, bIsCastleVolter, bIsAllowSeasonalSkins; // Situations that shouldn't allow seasonal overrides
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
bIsWWLWeekly = KFGRI != none && KFGRI.bIsWeeklyMode && KFGRI.CurrentWeeklyIndex == 12;
bIsCastleVolter = Caps(WorldInfo.GetMapName(true)) == "KF-CASTLEVOLTER";
bIsAllowSeasonalSkins = KFGRI != none && KFGRI.bAllowSeasonalSkins;
//`Log("GetAllowSeasonalSkins: AllowSeasonalSkins: "$bIsAllowSeasonalSkins$" WWLWeekly "$bIsWWLWeekly);
if(bIsWWLWeekly || bIsAllowSeasonalSkins == false)
if(bIsWWLWeekly || bIsCastleVolter || bIsAllowSeasonalSkins == false)
{
return false;
}
return true;
}
@ -7255,8 +7259,12 @@ simulated event InitializeStats()
local class<KFOnlineStatsRead> StatsReadClass;
local class<KFOnlineStatsWrite> StatsWriteClass;
if ( StatsRead == none && WorldInfo.NetMode != NM_DedicatedServer )
`Log("InitializeStats()");
if ( ( StatsRead == none || StatsWrite == none ) && WorldInfo.NetMode != NM_DedicatedServer )
{
`Log("InitializeStats() - Create objects");
// BWJ - 1-4-17 - Different stats read for dingo
if( WorldInfo.IsConsoleBuild( CONSOLE_Durango ) )
{
@ -7638,7 +7646,23 @@ native reliable client private function ClientNotifyHitGiven(class<DamageType> D
/** Kill stat */
function AddZedKill( class<KFPawn_Monster> MonsterClass, byte Difficulty, class<DamageType> DT, bool bKiller )
{
local KFPlayerController KFPC;
ClientAddZedKill( MonsterClass, Difficulty, DT, bKiller );
if (bKiller)
{
foreach WorldInfo.AllControllers(class'KFPlayerController', KFPC)
{
if (KFPC != none
&& KFPC != self
&& KFPC.IsInState('Spectating') == false
&& KFPC.PlayerReplicationInfo.bOnlySpectator == false)
{
KFPC.AddZedKill(MonsterClass, Difficulty, DT, false);
}
}
}
}
native reliable client private function ClientAddZedKill( class<KFPawn_Monster> MonsterClass, byte Difficulty, class<DamageType> DT, bool bKiller );
@ -7666,9 +7690,25 @@ function AddAfflictionCaused(EAfflictionType Type)
}
native reliable client private function ClientAddAfflictionCaused(EAfflictionType Type);
function AddCollectibleFound(int Limit)
function AddCollectibleFound(int Limit, optional bool bBroadcast = true)
{
local KFPlayerController KFPC;
ClientAddCollectibleFound(Limit);
if (bBroadcast)
{
foreach WorldInfo.AllControllers(class'KFPlayerController', KFPC)
{
if (KFPC != none
&& KFPC != self
&& KFPC.IsInState('Spectating') == false
&& KFPC.PlayerReplicationInfo.bOnlySpectator == false)
{
KFPC.AddCollectibleFound(Limit, false);
}
}
}
}
native reliable client private function ClientAddCollectibleFound(int Limit);

View File

@ -68,7 +68,7 @@ final protected simulated function FinishedObjective(int EventIndex, int Objecti
}
simulated function OnMapObjectiveDeactivated(Actor ObjectiveInterfaceActor);
simulated function OnZedKilled(class<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT);
simulated function OnZedKilled(class<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT, bool bKiller);
simulated function OnZedKilledByHeadshot(class<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT);
simulated function OnMapCollectibleFound(PlayerReplicationInfo FinderPRI, int CollectibleID);
simulated event OnGameWon(class<GameInfo> GameClass, int Difficulty, int GameLength, bool bCoOp);

View File

@ -15,7 +15,7 @@ defaultproperties
{
WeaponClassPath="KFGameContent.KFWeap_AssaultRifle_FAMAS"
BuyPrice=1200
BuyPrice=1000
AmmoPricePerMag=25
SecondaryAmmoMagPrice=15 //13

View File

@ -214,6 +214,8 @@ simulated function AltFireMode()
/** @see KFWeapon::ConsumeAmmo */
simulated function ConsumeAmmo( byte FireModeNum )
{
local KFPerk Perk;
local float DartAmmoCostModifier;
// If its not the healing fire mode, return
if( FireModeNum != ALTFIRE_FIREMODE )
{
@ -231,11 +233,14 @@ simulated function ConsumeAmmo( byte FireModeNum )
// If AmmoCount is being replicated, don't allow the client to modify it here
if (Role == ROLE_Authority || bAllowClientAmmoTracking)
{
Perk = GetPerk();
DartAmmoCostModifier = Perk != none ? Perk.GetDartAmmoCostModifier() : 1.0f;
// Don't consume ammo if magazine size is 0 (infinite ammo with no reload)
if (MagazineCapacity[1] > 0 && AmmoCount[1] > 0)
{
// Reduce ammo amount by heal ammo cost
AmmoCount[1] = Max(AmmoCount[1] - AmmoCost[1], 0);
AmmoCount[1] = Max(AmmoCount[1] - AmmoCost[1] * DartAmmoCostModifier, 0);
}
}
}
@ -411,7 +416,6 @@ function StartHealRecharge()
UsedHealRechargeTime = HealFullRechargeSeconds;
UsedHealRechargeTime *= static.GetUpgradeHealRechargeMod(CurrentWeaponUpgradeIndex);
UsedHealRechargeTime *= InstigatorPerk.GetHealRechargeMod();
InstigatorPerk.ModifyHealerRechargeTime( UsedHealRechargeTime );
// Set the healing recharge rate whenever we start charging

View File

@ -4663,7 +4663,7 @@ function int AddSecondaryAmmo(int Amount)
*
* @param bAmmoSync - If performing a sync the lowest value is typically the most correct
*/
reliable client function ClientForceAmmoUpdate(byte NewAmmoCount, int NewSpareAmmoCount, optional bool bAmmoSync)
reliable client function ClientForceAmmoUpdate(int NewAmmoCount, int NewSpareAmmoCount, optional bool bAmmoSync)
{
if ( Role < ROLE_Authority )
{
@ -6614,7 +6614,7 @@ simulated state WeaponFiring
}
}
unreliable server function SyncCurrentAmmoCount(byte FireMode, byte CurrentAmmoCount)
unreliable server function SyncCurrentAmmoCount(byte FireMode, int CurrentAmmoCount)
{
if(AmmoCount[FireMode] != CurrentAmmoCount)
{