From 5b3b3e758db288e2fc125d3b68cad3c288ccc796 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Tue, 29 Mar 2022 20:30:25 +0300 Subject: [PATCH] upload --- .../KFGFxServerBrowser_ServerDetails.uc | 12 ++++- .../Classes/KFGFxServerBrowser_ServerList.uc | 14 +++-- KFGame/Classes/KFGfxMoviePlayer_Manager.uc | 2 +- KFGame/Classes/KFPawn_Human.uc | 7 ++- KFGame/Classes/KFPerk_Swat.uc | 5 +- KFGame/Classes/KFWeap_MinigunBase.uc | 13 ++++- KFGame/Classes/KFWeapon.uc | 2 +- KFGameContent/Classes/KFPawn_ZedMatriarch.uc | 9 +++- KFGameContent/Classes/KFProj_Dosh.uc | 53 ++++++++++++++++++- .../Classes/KFSeqCond_IsWeeklyEvent.uc | 19 +++---- .../Classes/KFWeap_AssaultRifle_Doshinegun.uc | 6 +-- 11 files changed, 112 insertions(+), 30 deletions(-) diff --git a/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc b/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc index 04a3bca..603c87a 100644 --- a/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc +++ b/KFGame/Classes/KFGFxServerBrowser_ServerDetails.uc @@ -59,7 +59,7 @@ function SetFavoriteButtonActive(bool bActive) function SetDetails(KFOnlineGameSettings ServerResult) { local GFxObject TempObj; - local int Ping; + local int Ping, PlayerCount; local KFOnlineGameSettings TempOnlingGamesSettings; if(ServerResult != none) @@ -68,7 +68,15 @@ function SetDetails(KFOnlineGameSettings ServerResult) TempObj = CreateObject("Object"); TempObj.SetString("serverName", TempOnlingGamesSettings.OwningPlayerName); - TempObj.SetFloat("playerCount", (TempOnlingGamesSettings.NumPublicConnections-TempOnlingGamesSettings.NumOpenPublicConnections-TempOnlingGamesSettings.NumSpectators)); + + PlayerCount = TempOnlingGamesSettings.NumPublicConnections-TempOnlingGamesSettings.NumOpenPublicConnections; + + if (PlayerCount < 0) + { + PlayerCount = 0; + } + + TempObj.SetFloat("playerCount", PlayerCount); TempObj.SetFloat("maxPlayerCount", TempOnlingGamesSettings.NumPublicConnections); TempObj.SetFloat("waveCount", TempOnlingGamesSettings.CurrentWave); diff --git a/KFGame/Classes/KFGFxServerBrowser_ServerList.uc b/KFGame/Classes/KFGFxServerBrowser_ServerList.uc index 22c747f..78bb48d 100644 --- a/KFGame/Classes/KFGFxServerBrowser_ServerList.uc +++ b/KFGame/Classes/KFGFxServerBrowser_ServerList.uc @@ -921,7 +921,7 @@ function UpdateListDataProvider() local GFxObject TempObj; local KFOnlineGameSearch LatestGameSearch; - local int Ping; + local int Ping, PlayerCount; local KFOnlineGameSettings TempOnlineGamesSettings; LatestGameSearch = KFOnlineGameSearch(SearchDataStore.GetActiveGameSearch()); @@ -954,8 +954,16 @@ function UpdateListDataProvider() TempObj = CreateObject("Object"); - TempObj.SetString("serverName", TempOnlineGamesSettings.OwningPlayerName); - TempObj.SetFloat("playerCount", (TempOnlineGamesSettings.NumPublicConnections-TempOnlineGamesSettings.NumOpenPublicConnections-TempOnlineGamesSettings.NumSpectators)); + TempObj.SetString("serverName", TempOnlineGamesSettings.OwningPlayerName); + + PlayerCount = TempOnlineGamesSettings.NumPublicConnections-TempOnlineGamesSettings.NumOpenPublicConnections; + + if (PlayerCount < 0) + { + PlayerCount = 0; + } + + TempObj.SetFloat("playerCount", PlayerCount); TempObj.SetFloat("maxPlayerCount", TempOnlineGamesSettings.NumPublicConnections); TempObj.SetFloat("waveCount", TempOnlineGamesSettings.CurrentWave); TempObj.SetFloat("maxWaveCount", IsEndlessModeIndex(TempOnlineGamesSettings.Mode) ? INDEX_NONE : TempOnlineGamesSettings.NumWaves); diff --git a/KFGame/Classes/KFGfxMoviePlayer_Manager.uc b/KFGame/Classes/KFGfxMoviePlayer_Manager.uc index f88afc7..7625bca 100644 --- a/KFGame/Classes/KFGfxMoviePlayer_Manager.uc +++ b/KFGame/Classes/KFGfxMoviePlayer_Manager.uc @@ -2114,7 +2114,7 @@ simulated function HidePauseGameVote() UnloadCurrentPopup(); } - SkipTraderVotePRI = none; + PauseGameVotePRI = none; } function CastYesVotePauseGame() diff --git a/KFGame/Classes/KFPawn_Human.uc b/KFGame/Classes/KFPawn_Human.uc index 5661b32..06aa3a6 100644 --- a/KFGame/Classes/KFPawn_Human.uc +++ b/KFGame/Classes/KFPawn_Human.uc @@ -2119,6 +2119,7 @@ client reliable function ClientOverrideHumanDefaults() { local KFPlayerController_WeeklySurvival KFPC_WS; local KFPlayerReplicationInfo KFPRI; + local KFGameReplicationInfo KFGRI; local KFCharacterInfo_Human KFCIH; local int CowboyHatIndex; @@ -2127,8 +2128,10 @@ client reliable function ClientOverrideHumanDefaults() { return; } - - if (class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 12) + + KFGRI = KFGameReplicationInfo(WorldInfo.GRI); + + if (KFGRI != none && KFGRI.CurrentWeeklyIndex == 12) { KFPRI = KFPlayerReplicationInfo(KFPC_WS.PlayerReplicationInfo); if (KFPRI != none) diff --git a/KFGame/Classes/KFPerk_Swat.uc b/KFGame/Classes/KFPerk_Swat.uc index 4fae93e..6e04a2e 100644 --- a/KFGame/Classes/KFPerk_Swat.uc +++ b/KFGame/Classes/KFPerk_Swat.uc @@ -195,7 +195,7 @@ simulated function bool HasHeavyArmor() return IsHeavyArmorActive(); } -static simulated private function bool Is9mm( KFWeapon KFW ) +static simulated public function bool Is9mm( KFWeapon KFW ) { return KFW != none && KFW.default.bIsBackupWeapon && !KFW.IsMeleeWeapon(); } @@ -279,7 +279,8 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau if( KFW != none ) { // KFDT_Bludgeon_Doshinegun_Shot is a special case of Bludgeon damage that doesn't apply this mod. - if( IsBackupActive() && (IsBackupWeapon( KFW ) || IsDual9mm( KFW ) || ClassIsChildOf(DamageType, class'KFDT_Bludgeon')) && (IsDoshinegun(KFW) && DamageType.Name != 'KFDT_Bludgeon_Doshinegun_Shot' )) + if( IsBackupActive() && (IsBackupWeapon( KFW ) || IsDual9mm( KFW ) || + ((!IsDoshinegun(KFW) && ClassIsChildOf(DamageType, class'KFDT_Bludgeon') ) || (IsDoshinegun(KFW) && DamageType.Name != 'KFDT_Bludgeon_Doshinegun_Shot' )))) { `QALog( "Backup Damage" @ KFW @ GetPercentage( InDamage, InDamage * GetSkillValue(PerkSkills[ESWAT_Backup])), bLogPerk ); TempDamage += InDamage * GetSkillValue( PerkSkills[ESWAT_Backup] ); diff --git a/KFGame/Classes/KFWeap_MinigunBase.uc b/KFGame/Classes/KFWeap_MinigunBase.uc index 005ab5a..a66131a 100644 --- a/KFGame/Classes/KFWeap_MinigunBase.uc +++ b/KFGame/Classes/KFWeap_MinigunBase.uc @@ -57,6 +57,9 @@ var float FiringViewRotationSpeed; /* Pawn movement speed used when the weapon is firing */ var float FiringPawnMovementSpeed; +/** Rotation Speed limit when the weapon is equipped */ +var const float EquippedRotationSpeedLimit; + simulated event ReplicatedEvent(name VarName) { switch (VarName) @@ -375,9 +378,13 @@ simulated event Tick( float DeltaTime ) { NewRotationSpeedLimit = WindUpViewRotationSpeed; } - else + else if (!IsInState('Inactive')) // Weapon hold { - NewRotationSpeedLimit = 2000.0f; + NewRotationSpeedLimit = EquippedRotationSpeedLimit; + } + else // Weapon holstered + { + NewRotationSpeedLimit = OwnerController.default.RotationSpeedLimit; } if( NewRotationSpeedLimit != OwnerController.RotationSpeedLimit ) @@ -624,6 +631,8 @@ defaultproperties bAlwaysRelevant=True bOnlyRelevantToOwner=False + EquippedRotationSpeedLimit=2000; + WindUpViewRotationSpeed=2000 // base rotation WindUpPawnMovementSpeed=1 // base speed diff --git a/KFGame/Classes/KFWeapon.uc b/KFGame/Classes/KFWeapon.uc index 69769c9..e2eb4b2 100644 --- a/KFGame/Classes/KFWeapon.uc +++ b/KFGame/Classes/KFWeapon.uc @@ -4268,7 +4268,7 @@ simulated protected native function int SendClientProjectileExplosion(vector Exp // Compress our fragment impact into a ImpactRepInfo for replication (returns number of impacts sent) simulated protected native function int SendClientFragmentImpact(const out ImpactInfo Impact, class FragmentClass); simulated protected native function vector GetSafeStartTraceLocation(); - +simulated native function Actor DoTraceNative(out Vector OutLocation, Vector StartLocation, Vector EndLocation); /** * Allows subclass to perform extra bullet traces * Network: Local Player diff --git a/KFGameContent/Classes/KFPawn_ZedMatriarch.uc b/KFGameContent/Classes/KFPawn_ZedMatriarch.uc index 99e36ab..70209b9 100644 --- a/KFGameContent/Classes/KFPawn_ZedMatriarch.uc +++ b/KFGameContent/Classes/KFPawn_ZedMatriarch.uc @@ -438,7 +438,14 @@ function ActivateShield() KFGI.DifficultyInfo.GetAIHealthModifier(self, KFGI.GetModifiedGameDifficulty(), KFGI.GetLivingPlayerCount(), HealthMod, HeadHealthMod); ShieldHealth = ShieldHealthMaxDefaults[KFGI.GetModifiedGameDifficulty()] * HealthMod * ShieldHealthScale; - ShieldHealthMax = ShieldHealth; + + if (KFGI.OutbreakEvent != none && KFGi.OutbreakEvent.ActiveEvent.bBossRushMode) + { + ShieldHealth = ShieldHealth * ArmorInfo.ArmorScale; + } + + + ShieldHealthMax = ShieldHealth; ShieldHealthPctByte = FloatToByte( fClamp(ShieldHealth / ShieldHealthMax, 0.f, 1.f) ); UpdateShield(); diff --git a/KFGameContent/Classes/KFProj_Dosh.uc b/KFGameContent/Classes/KFProj_Dosh.uc index fb1dcde..b111c0c 100644 --- a/KFGameContent/Classes/KFProj_Dosh.uc +++ b/KFGameContent/Classes/KFProj_Dosh.uc @@ -22,6 +22,7 @@ var() float DampenFactorParallel; var transient Vector PreviousLocations [`KFPROJ_DOSH_CACHED_LOCATION]; var transient rotator PreviousRotations [`KFPROJ_DOSH_CACHED_LOCATION]; +var transient Vector Ceiling; // Make sure that last location always exists. simulated event PostBeginPlay() @@ -91,25 +92,43 @@ function SpawnDosh(Actor BouncedOff) { local KFDroppedPickup_Cash P; local int i; + local Vector Pos; + local rotator Rot; if ( WorldInfo.NetMode == NM_Client ) return; if (Pawn(BouncedOff) == none) { - P = Spawn(class'KFDroppedPickup_Cash',,, Location, Rotation,, false); + Pos = Location; + Rot = Rotation; + P = Spawn(class'KFDroppedPickup_Cash',,, Pos, Rot,, false); if (P == none) { for (i = 0; i < `KFPROJ_DOSH_CACHED_LOCATION; ++i) { - P = Spawn(class'KFDroppedPickup_Cash',,, PreviousLocations[i], PreviousRotations[i],, false); + Pos = PreviousLocations[i]; + Rot = PreviousRotations[i]; + P = Spawn(class'KFDroppedPickup_Cash',,, Pos, Rot,, false); if (P != none) { break; } } } + + // DrawDebugSphere( Pos, 20, 8, 0, 255, 255, true ); + if (P != none && RelocateFromCeiling(Pos)) + { + P.Destroy(); + if(Ceiling.Z > -10000) + { + // DrawDebugSphere( Ceiling, 22, 8, 255, 255, 0, true ); + P = Spawn(class'KFDroppedPickup_Cash',,, Ceiling, Rot,, false); + Velocity = vect(0,0,0); + } + } } else { @@ -198,6 +217,36 @@ simulated function SyncOriginalLocation() Super.SyncOriginalLocation(); } +simulated function bool RelocateFromCeiling(Vector Pos) +{ + local Actor HitActorVolume, HitActorWorld, HitActorVolumeBack; + local Vector HitLocationVolume, HitLocationWorld; + local Vector HitNormalUnused; + + HitActorWorld = Owner.Trace(HitLocationWorld, HitNormalUnused, Pos - vect(0,0,10000), Pos, false,,,TRACEFLAG_Bullet); + if(HitActorWorld != none) + { + HitActorVolume = KFWeapon(Owner).DoTraceNative(HitLocationVolume, Pos, Pos - vect(0,0,10000)); + if (HitActorVolume == none || (HitLocationWorld.Z + 80) > HitLocationVolume.Z || IsZero(HitLocationVolume-Pos)) + { + return false; + } + + // DrawDebugSphere( HitLocationWorld , 32, 8, 0, 255, 0, true ); + // DrawDebugSphere( HitLocationVolume, 30, 8, 255, 0, 0, true ); + + HitLocationWorld += vect(0,0,1); + HitActorVolumeBack = KFWeapon(Owner).DoTraceNative(HitLocationVolume, HitLocationWorld, HitLocationWorld + vect(0,0,10000)); + if (HitActorVolumeBack != none && !IsZero(HitLocationVolume-HitLocationWorld)) + { + // DrawDebugSphere( HitLocationVolume, 28, 8, 255, 255, 0, true ); + Ceiling = HitLocationVolume - vect(0,0,10); + return true; + } + } + Ceiling = Vect(0,0,-10000); + return true; +} defaultproperties diff --git a/KFGameContent/Classes/KFSeqCond_IsWeeklyEvent.uc b/KFGameContent/Classes/KFSeqCond_IsWeeklyEvent.uc index cf6ed0c..f4bbb73 100644 --- a/KFGameContent/Classes/KFSeqCond_IsWeeklyEvent.uc +++ b/KFGameContent/Classes/KFSeqCond_IsWeeklyEvent.uc @@ -12,19 +12,16 @@ var() int WeeklyIndex; function Activated() { - local KFGameInfo KFGI; - KFGI = KFGameInfo(GetWorldInfo().Game); + local KFGameReplicationInfo KFGRI; + KFGRI = KFGameReplicationInfo(GetWorldInfo().GRI); - if (KFGI != none) + if (KFGRI != none && KFGRI.bIsWeeklyMode && KFGRI.CurrentWeeklyIndex == WeeklyIndex) { - if (KFGI.MyKFGRI != none && KFGI.MyKFGRI.bIsWeeklyMode && class'KFGameEngine'.static.GetWeeklyEventIndexMod() == WeeklyIndex) - { - OutputLinks[0].bHasImpulse = true; - } - else - { - OutputLinks[1].bHasImpulse = true; - } + OutputLinks[0].bHasImpulse = true; + } + else + { + OutputLinks[1].bHasImpulse = true; } } diff --git a/KFGameContent/Classes/KFWeap_AssaultRifle_Doshinegun.uc b/KFGameContent/Classes/KFWeap_AssaultRifle_Doshinegun.uc index 1de0656..f106d7d 100644 --- a/KFGameContent/Classes/KFWeap_AssaultRifle_Doshinegun.uc +++ b/KFGameContent/Classes/KFWeap_AssaultRifle_Doshinegun.uc @@ -235,9 +235,9 @@ defaultproperties //WeaponUpgrades[2]=(IncrementDamage=1.65f,IncrementWeight=2) //WeaponUpgrades[3]=(IncrementDamage=1.85f,IncrementWeight=3) - WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.23f), (Stat=EWUS_Damage1, Scale=1.2f), (Stat=EWUS_Weight, Add=1))) - WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.47f), (Stat=EWUS_Damage1, Scale=1.4f), (Stat=EWUS_Weight, Add=2))) - WeaponUpgrades[3]=(Stats=((Stat=EWUS_Damage0, Scale=1.70f), (Stat=EWUS_Damage1, Scale=1.6f), (Stat=EWUS_Weight, Add=3))) + WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.23f), (Stat=EWUS_Damage1, Scale=1.23f), (Stat=EWUS_Weight, Add=1))) + WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=1.47f), (Stat=EWUS_Damage1, Scale=1.47f), (Stat=EWUS_Weight, Add=2))) + WeaponUpgrades[3]=(Stats=((Stat=EWUS_Damage0, Scale=1.70f), (Stat=EWUS_Damage1, Scale=1.70f), (Stat=EWUS_Weight, Add=3))) DoshCost = 20; //25; bUsesSecondaryAmmoAltHUD=true