1
0
This commit is contained in:
GenZmeY 2022-03-29 20:30:25 +03:00
parent 0fe0ac1920
commit 5b3b3e758d
11 changed files with 112 additions and 30 deletions

View File

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

View File

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

View File

@ -2114,7 +2114,7 @@ simulated function HidePauseGameVote()
UnloadCurrentPopup();
}
SkipTraderVotePRI = none;
PauseGameVotePRI = none;
}
function CastYesVotePauseGame()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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