1
0
This commit is contained in:
GenZmeY 2021-07-08 18:50:49 +03:00
parent 9a5bfed23e
commit 415265eca9
10 changed files with 102 additions and 44 deletions

View File

@ -436,11 +436,6 @@ enum EMonsterProperties
var int SpawnedMonsterProperties[EMonsterProperties];
/************************************************************************************
* @name Force to sort maps by name
***********************************************************************************/
var bool bForceMapSorting;
/************************************************************************************
* @name Native
***********************************************************************************/
@ -2896,10 +2891,10 @@ function string GetNextMap()
{
MapCycleIndex = MapCycleIndex + 1 < GameMapCycles[ActiveMapCycle].Maps.length ? (MapCycleIndex + 1) : 0;
if (class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 11)
if ((class'KFGameEngine'.static.GetWeeklyEventIndexMod() == 11 || OutbreakEvent.ActiveEvent == OutbreakEvent.SetEvents[11])
&& MyKFGRI.IsA('KFGameReplicationInfo_WeeklySurvival'))
{
if (MyKFGRI.IsA('KFGameReplicationInfo_WeeklySurvival') &&
GameMapCycles[ActiveMapCycle].Maps[MapCycleIndex] == "KF-Biolapse" ||
if (GameMapCycles[ActiveMapCycle].Maps[MapCycleIndex] == "KF-Biolapse" ||
GameMapCycles[ActiveMapCycle].Maps[MapCycleIndex] == "KF-Nightmare" ||
GameMapCycles[ActiveMapCycle].Maps[MapCycleIndex] == "KF-PowerCore_Holdout" ||
GameMapCycles[ActiveMapCycle].Maps[MapCycleIndex] == "KF-TheDescent" ||
@ -3895,6 +3890,4 @@ defaultproperties
DebugForcedOutbreakIdx=INDEX_NONE
DebugForceSpecialWaveZedType=INDEX_NONE
bForceMapSorting=True
}

View File

@ -159,7 +159,7 @@ simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCau
}
`QALog( GetFuncName() @ "Base damage:" @ InDamage , bLogPerk);
if( (MyKFWeapon != none && IsWeaponOnPerk( MyKFWeapon,, self.class )) || IsDamageTypeOnPerk( DamageType ) )
if( ((MyKFWeapon != none && IsWeaponOnPerk( MyKFWeapon,, self.class )) || IsDamageTypeOnPerk( DamageType )) && !IsBlastBrawlers(MyKFWeapon) )
{
TempDamage += InDamage * GetPassiveValue( BerserkerDamage, CurrentLevel );
if( IsSpeedActive() )

View File

@ -303,6 +303,8 @@ simulated function float GetZedTimeModifier( KFWeapon W )
local name StateName;
StateName = W.GetStateName();
`Log("STATE NAME: " $StateName);
if( IsProfessionalActive() && (IsWeaponOnPerk( W,, self.class ) || IsBackupWeapon( W ) || IsDual9mm( W )) )
{
if( StateName == 'Reloading' ||
@ -315,8 +317,9 @@ simulated function float GetZedTimeModifier( KFWeapon W )
return 0.3f;
}
}
if( CouldRapidFireActive() && (Is9mm(W) || IsDual9mm( W ) || IsWeaponOnPerk( W,, self.class )) && ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE )
// FAMAS uses alt fire as common firing. Needs a special case
if( CouldRapidFireActive() && (Is9mm(W) || IsDual9mm( W ) || IsWeaponOnPerk( W,, self.class )) &&
(ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE || (IsFAMAS(W) && StateName == 'FiringSecondaryState')) )
{
return RapidFireFiringRate;
}

View File

@ -561,8 +561,11 @@ simulated function float GetZedTimeModifier( KFWeapon W )
StateName = W.GetStateName();
// Blast Brawlers use a different state for shooting (combining melee + firing). Needs a special case for this
// FAMAS uses alt fire as common firing. Another special case added
if( IsWeaponOnPerk( W,, self.class ) && CouldBarrageActive() &&
(ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE || (StateName == 'MeleeChainAttacking' && IsBlastBrawlers(W))))
(ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE ||
(StateName == 'MeleeChainAttacking' && IsBlastBrawlers(W)) ||
(IsFAMAS(W) && StateName == 'FiringSecondaryState')))
{
return BarrageFiringRate;
}

View File

@ -468,7 +468,10 @@ simulated function float GetZedTimeModifier( KFWeapon W )
`Warn(StateName);
// Blast Brawlers use a different state for shooting (combining melee + firing). Needs a special case for this
if( ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE || (StateName == 'MeleeChainAttacking' && IsBlastBrawlers(W)) )
// FAMAS uses alt fire as common firing. Another special case added
if( ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE ||
(StateName == 'MeleeChainAttacking' && IsBlastBrawlers(W)) ||
(StateName == 'FiringSecondaryState' && IsFAMAS(W)))
{
return GetSkillValue( PerkSkills[ESurvivalist_MadMan] );
}

View File

@ -105,6 +105,8 @@ enum EWeaponState
WEP_ReloadSingleEmpty_Elite,
WEP_ReloadSecondary,
WEP_ReloadSecondary_Elite,
WEP_ReloadSecondaryEmpty,
WEP_ReloadSecondaryEmpty_Elite,
WEP_ReloadDualsOneEmpty,
WEP_ReloadDualsOneEmpty_Elite,
WEP_MeleeBasic,
@ -799,6 +801,8 @@ simulated function UpdateThirdPersonWeaponAction(EWeaponState NewWeaponState, KF
case WEP_ReloadSecondary_Elite:
case WEP_ReloadDualsOneEmpty:
case WEP_ReloadDualsOneEmpty_Elite:
case WEP_ReloadSecondaryEmpty:
case WEP_ReloadSecondaryEmpty_Elite:
bIsReloading = true;
PlayReloadMagazineAnim(NewWeaponState, P);
break;

View File

@ -249,6 +249,29 @@ function vector CalculateResidualFlameVelocity( vector HitNormal, vector HitVelD
return SpawnDir * ResidualFlameForceMultiplier;
}
simulated protected function PrepareExplosionTemplate()
{
local Weapon OwnerWeapon;
local Pawn OwnerPawn;
local KFPerk_Survivalist Perk;
super(KFProjectile).PrepareExplosionTemplate();
OwnerWeapon = Weapon(Owner);
if (OwnerWeapon != none)
{
OwnerPawn = Pawn(OwnerWeapon.Owner);
if (OwnerPawn != none)
{
Perk = KFPerk_Survivalist(KFPawn(OwnerPawn).GetPerk());
if (Perk != none)
{
ExplosionTemplate.DamageRadius *= Perk.GetAoERadiusModifier();
}
}
}
}
defaultproperties
{
ProjFlightTemplate=ParticleSystem'WEP_Thermite_EMIT.FX_Harpoon_Projectile'

View File

@ -9,18 +9,21 @@
class KFWeapAttach_FAMAS extends KFWeaponAttachment;
const SecondaryFireAnim = 'Shoot_Secondary';
const SecondaryFireIronAnim = 'Shoot_Secondary_Iron';
const SecondaryFireAnimLast = 'Shoot_Secondary_Last';
const SecondaryFireIronAnimLast = 'Shoot_Secondary_Iron_Last';
const SecondaryFireBodyAnim = 'ADD_Shoot_Secondary';
const SecondaryFireBodyAnimCH = 'ADD_Shoot_Secondary_CH';
const SecondaryFireBodyAnimIron = 'ADD_Shoot_Secondary_Iron';
const SecondaryReloadAnimEmpty = 'Reload_Secondary_Empty';
const SecondaryReloadAnimHalf = 'Reload_Secondary_Half';
const SecondaryReloadAnimEliteEmpty = 'Reload_Secondary_Elite_Empty';
const SecondaryReloadAnimEliteHalf = 'Reload_Secondary_Elite_Half';
const ShotgunMuzzleSocket = 'ShotgunMuzzleFlash';
const SecondaryFireAnim = 'Shoot_Secondary';
const SecondaryFireAnimCrouch = 'Shoot_Secondary_CH';
const SecondaryFireIronAnim = 'Shoot_Secondary_Iron';
const SecondaryFireBodyAnim = 'ADD_Shoot_Secondary';
const SecondaryFireBodyAnimCH = 'ADD_Shoot_Secondary_CH';
const SecondaryFireBodyAnimIron = 'ADD_Shoot_Secondary_Iron';
const SecondaryReloadAnimEmpty = 'Reload_Secondary_Empty';
const SecondaryReloadAnimEmptyCrouch = 'Reload_Secondary_Empty_CH';
const SecondaryReloadAnimHalf = 'Reload_Secondary_Half';
const SecondaryReloadAnimHalfCrouch = 'Reload_Secondary_Half_CH';
const SecondaryReloadAnimEliteEmpty = 'Reload_Secondary_Elite_Empty';
const SecondaryReloadAnimEliteEmptyCrouch = 'Reload_Secondary_Elite_Empty_CH';
const SecondaryReloadAnimEliteHalf = 'Reload_Secondary_Elite_Half';
const SecondaryReloadAnimEliteHalfCrouch = 'Reload_Secondary_Elite_Half_CH';
const ShotgunMuzzleSocket = 'ShotgunMuzzleFlash';
var protected transient KFMuzzleFlash ShotgunMuzzleFlash;
@ -30,18 +33,25 @@ simulated function PlayReloadMagazineAnim(EWeaponState NewWeaponState, KFPawn P)
{
local name AnimName;
if(NewWeaponState == WEP_ReloadSecondary || NewWeaponState == WEP_ReloadSecondary_Elite)
switch (NewWeaponState)
{
switch (NewWeaponState)
{
case WEP_ReloadSecondary:
AnimName = (P.MyKFWeapon.AmmoCount[1] == 0) ? SecondaryReloadAnimEmpty : SecondaryReloadAnimHalf;
break;
case WEP_ReloadSecondary_Elite:
AnimName = (P.MyKFWeapon.AmmoCount[1] == 0) ? SecondaryReloadAnimEliteEmpty : SecondaryReloadAnimEliteHalf;
break;
}
case WEP_ReloadSecondary:
AnimName = (P.bIsCrouched) ? SecondaryReloadAnimHalfCrouch : SecondaryReloadAnimHalf;
break;
case WEP_ReloadSecondaryEmpty:
AnimName = (P.bIsCrouched) ? SecondaryReloadAnimEmptyCrouch : SecondaryReloadAnimEmpty;
break;
case WEP_ReloadSecondary_Elite:
AnimName = (P.bIsCrouched) ? SecondaryReloadAnimEliteHalfCrouch : SecondaryReloadAnimEliteHalf;
break;
case WEP_ReloadSecondaryEmpty_Elite:
AnimName = (P.bIsCrouched) ? SecondaryReloadAnimEliteEmptyCrouch : SecondaryReloadAnimEliteEmpty;
break;
}
if (AnimName != '')
{
PlayCharacterMeshAnim(P, AnimName, true);
}
else
@ -103,21 +113,19 @@ simulated function PlayFireAnim(KFPawn P)
}
else if (OwnerPawn.FiringMode == 1) // ALT FIRE MODE (Shotgun)
{
// Anim = (P.MyKFWeapon.AmmoCount[1] == 0) ? SecondaryFireIronAnimLast : SecondaryFireIronAnim;
Anim = SecondaryFireIronAnim;
}
}
else // Normal anims
{
if (Pawn(Owner).FiringMode == 0) // DEFAULT FIRE MODE (Rifle)
if (OwnerPawn.FiringMode == 0) // DEFAULT FIRE MODE (Rifle)
{
Anim = WeaponFireAnim;
}
else if (Pawn(Owner).FiringMode == 1) // ALT FIRE MODE (Shotgun)
else if (OwnerPawn.FiringMode == 1) // ALT FIRE MODE (Shotgun)
{
// Anim = (P.MyKFWeapon.AmmoCount[1] == 0) ? SecondaryFireAnimLast : SecondaryFireAnim;
Anim = SecondaryFireAnim;
Anim = OwnerPawn.bIsCrouched ? SecondaryFireAnimCrouch : SecondaryFireAnim;
}
}

View File

@ -387,7 +387,14 @@ simulated state AltReloading extends Reloading
Perk = GetPerk();
bTacticalReload = (Perk != None && Perk.GetUsingTactialReload(self));
return (bTacticalReload ? WEP_ReloadSecondary_Elite : WEP_ReloadSecondary);
if (AmmoCount[ALTFIRE_FIREMODE] == 0)
{
return (bTacticalReload ? WEP_ReloadSecondaryEmpty_Elite : WEP_ReloadSecondaryEmpty);
}
else
{
return (bTacticalReload ? WEP_ReloadSecondary_Elite : WEP_ReloadSecondary);
}
}
simulated event BeginState(Name PreviousStateName)

View File

@ -373,7 +373,21 @@ simulated function float GetReloadRateScale()
simulated function bool HasAnyAmmo()
{
return AmmoCount[0] != 0 && SpareAmmoCount[0] != 0;
return AmmoCount[0] > 0 || SpareAmmoCount[0] > 0;
}
simulated function int GetMeleeDamage(byte FireModeNum, optional vector RayDir)
{
local int Damage;
Damage = GetModifiedDamage(FireModeNum, RayDir);
// decode damage scale (see GetDamageScaleByAngle) from the RayDir
if ( !IsZero(RayDir) )
{
Damage = Round(float(Damage) * FMin(VSize(RayDir), 1.f));
}
return Damage;
}
defaultproperties