upload
This commit is contained in:
@ -35,11 +35,14 @@ defaultproperties
|
||||
KDeathVel=250
|
||||
|
||||
KnockdownPower=20
|
||||
StunPower=50
|
||||
StumblePower=200
|
||||
GunHitPower=150
|
||||
MeleeHitPower=100
|
||||
EMPPower=0 // Don't use the affliction here, we manage this on KFWeap_HVStormCannon to completely synchronize it with the logic of the weapon
|
||||
StunPower=25
|
||||
StumblePower=85
|
||||
GunHitPower=80
|
||||
|
||||
// DISABLED PER DESIGN REQUEST, WE DO USE NOW DAMAGE TYPE EMP POWER
|
||||
// Don't use the affliction here, we manage this on KFWeap_HVStormCannon to completely synchronize it with the logic of the weapon
|
||||
//EMPPower=0
|
||||
EMPPower=25
|
||||
|
||||
GoreDamageGroup=DGT_EMP
|
||||
EffectGroup=FXG_Electricity
|
||||
|
@ -54,7 +54,7 @@ defaultproperties
|
||||
KDeathVel=200
|
||||
|
||||
StumblePower=18
|
||||
StunPower=15
|
||||
StunPower=5
|
||||
GunHitPower=15
|
||||
|
||||
WeaponDef=class'KFWeapDef_ZedMKIII'
|
||||
|
@ -16,6 +16,21 @@ var int CurrentFrameBooms;
|
||||
/** Index of event to use as the default block */
|
||||
var int ActiveEventIdx;
|
||||
|
||||
/** List with perks in random order */
|
||||
var array<byte> PerkRouletteRandomList;
|
||||
|
||||
var int PerkRouletteRandomInitialIndex;
|
||||
var int PerkRouletteRandomWaveNum;
|
||||
|
||||
struct PerkRoulette_PlayerMessageDelegate
|
||||
{
|
||||
var() KFPlayerController_WeeklySurvival KFPC_WS;
|
||||
var() class<LocalMessage> InMessageClass;
|
||||
var() int SwitchValue;
|
||||
};
|
||||
|
||||
var array<PerkRoulette_PlayerMessageDelegate> PerkRoulette_PlayersDelegateData;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Statics
|
||||
static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
|
||||
@ -513,7 +528,14 @@ function SetBossIndex()
|
||||
function Tick(float DeltaTime)
|
||||
{
|
||||
CurrentFrameBooms = 0;
|
||||
|
||||
super.Tick(DeltaTime);
|
||||
|
||||
if (MyKFGRI.IsRandomPerkMode())
|
||||
{
|
||||
// This deals with players joining at any time (lobby, or in wave)
|
||||
ChooseRandomPerks(false);
|
||||
}
|
||||
}
|
||||
|
||||
function TickZedTime( float DeltaTime )
|
||||
@ -548,7 +570,8 @@ function WaveEnded(EWaveEndCondition WinCondition)
|
||||
// Choose new perk before the end of wave message triggers in supper.
|
||||
if (MyKFGRI.IsRandomPerkMode() && WinCondition == WEC_WaveWon)
|
||||
{
|
||||
ChooseRandomPerks();
|
||||
PerkRouletteRandomWaveNum++;
|
||||
ChooseRandomPerks(true);
|
||||
}
|
||||
|
||||
super.WaveEnded(WinCondition);
|
||||
@ -1320,6 +1343,11 @@ function WaveStarted()
|
||||
ChooseVIP(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (MyKFGRI.IsRandomPerkMode())
|
||||
{
|
||||
RandomPerkWaveStarted();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1523,137 +1551,86 @@ simulated function NotifyPlayerStatsInitialized(KFPlayerController_WeeklySurviva
|
||||
}
|
||||
}
|
||||
|
||||
function ChooseInitialRandomPerk(KFPlayerController_WeeklySurvival KFPC_WS)
|
||||
simulated function RandomPerkWaveStarted()
|
||||
{
|
||||
local KFPlayerController_WeeklySurvival OtherKFPC;
|
||||
local array<class<KFPerk> > AvailablePerks;
|
||||
local int i;
|
||||
local byte NewPerkIndex;
|
||||
local bool bPerkFound;
|
||||
local KFPlayerController_WeeklySurvival KFPC_WS;
|
||||
|
||||
`Log("CHOOSING INITIAL PERKS");
|
||||
|
||||
for (i = 0; i < KFPC_WS.PerkList.Length; ++i)
|
||||
foreach WorldInfo.AllControllers(class'KFPlayerController_WeeklySurvival', KFPC_WS)
|
||||
{
|
||||
bPerkFound = false;
|
||||
|
||||
foreach WorldInfo.AllControllers(class'KFPlayerController_WeeklySurvival', OtherKFPC)
|
||||
if (KFPC_WS.InitialRandomPerk == 255)
|
||||
{
|
||||
if (OtherKFPC == KFPC_WS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
`Log("PLAYER - RandomPerkWaveStart : " $KFPC_WS);
|
||||
|
||||
if (KFPC_WS.Perklist[i].PerkClass == OtherKFPC.CurrentPerk.Class)
|
||||
{
|
||||
bPerkFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bPerkFound)
|
||||
{
|
||||
AvailablePerks.AddItem(KFPC_WS.PerkList[i].PerkClass);
|
||||
ChooseInitialRandomPerk(KFPC_WS);
|
||||
}
|
||||
}
|
||||
|
||||
if (AvailablePerks.Length == 0)
|
||||
{
|
||||
for (i = 0; i < KFPC_WS.Perklist.Length; ++i)
|
||||
{
|
||||
AvailablePerks.AddItem(KFPC_WS.Perklist[i].PerkClass);
|
||||
}
|
||||
KFPC_WS.LockedPerks.Length = 0;
|
||||
}
|
||||
|
||||
NewPerkIndex = Rand(AvailablePerks.Length);
|
||||
|
||||
KFPC_WS.LockedPerks.AddItem(AvailablePerks[NewPerkIndex]);
|
||||
KFPC_WS.ForceNewPerk(AvailablePerks[NewPerkIndex]);
|
||||
}
|
||||
|
||||
function ChooseRandomPerks()
|
||||
function InitializeRandomPerkList(array<PerkInfo> PerkList)
|
||||
{
|
||||
local KFPlayerController_WeeklySurvival KFPC;
|
||||
local array<class<KFPerk> > AvailablePerks;
|
||||
local array<class<KFPerk> > PickedPerks;
|
||||
local int i, j;
|
||||
local byte NewPerkIndex;
|
||||
local bool bPerkFound;
|
||||
local array<byte> AvailablePerks;
|
||||
local int i;
|
||||
local byte NewRandomIndex;
|
||||
|
||||
foreach WorldInfo.AllControllers(class'KFPlayerController_WeeklySurvival', KFPC)
|
||||
for (i = 0; i < PerkList.Length; ++i)
|
||||
{
|
||||
AvailablePerks.Length = 0;
|
||||
AvailablePerks.Additem(i);
|
||||
}
|
||||
|
||||
for (i = 0; i < KFPC.Perklist.Length; ++i)
|
||||
while(AvailablePerks.Length > 0)
|
||||
{
|
||||
NewRandomIndex = Rand(AvailablePerks.Length);
|
||||
PerkRouletteRandomList.AddItem(AvailablePerks[NewRandomIndex]);
|
||||
AvailablePerks.Remove(NewRandomIndex, 1);
|
||||
}
|
||||
|
||||
PerkRouletteRandomInitialIndex = 0;
|
||||
PerkRouletteRandomWaveNum = 0;
|
||||
}
|
||||
|
||||
function ChooseInitialRandomPerk(KFPlayerController_WeeklySurvival KFPC_WS)
|
||||
{
|
||||
if (PerkRouletteRandomList.Length == 0)
|
||||
{
|
||||
// First case, fill random array
|
||||
InitializeRandomPerkList(KFPC_WS.PerkList);
|
||||
}
|
||||
|
||||
if (KFPC_WS.InitialRandomPerk == 255)
|
||||
{
|
||||
// Choose initial random perk
|
||||
|
||||
KFPC_WS.InitialRandomPerk = PerkRouletteRandomInitialIndex;
|
||||
PerkRouletteRandomInitialIndex = (PerkRouletteRandomInitialIndex + 1) % PerkRouletteRandomList.Length;
|
||||
|
||||
`Log("PLAYER : " $KFPC_WS);
|
||||
`Log("InitialRandomPerk : " $KFPC_WS.InitialRandomPerk);
|
||||
}
|
||||
}
|
||||
|
||||
function ChooseRandomPerks(bool isEndWave)
|
||||
{
|
||||
local KFPlayerController_WeeklySurvival KFPC_WS;
|
||||
local byte NewPerk;
|
||||
|
||||
foreach WorldInfo.AllControllers(class'KFPlayerController_WeeklySurvival', KFPC_WS)
|
||||
{
|
||||
if (KFPC_WS.InitialRandomPerk == 255 || KFPC_WS.PlayerReplicationInfo.bOnlySpectator || KFPC_WS.IsInState('Spectating'))
|
||||
{
|
||||
bPerkFound = false;
|
||||
for (j = 0; j < PickedPerks.Length; ++j)
|
||||
{
|
||||
if (KFPC.Perklist[i].PerkClass == PickedPerks[j])
|
||||
{
|
||||
bPerkFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bPerkFound)
|
||||
{
|
||||
for (j = 0; j < KFPC.LockedPerks.Length; ++j)
|
||||
{
|
||||
if (KFPC.Perklist[i].PerkClass == KFPC.LockedPerks[j])
|
||||
{
|
||||
bPerkFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!bPerkFound)
|
||||
{
|
||||
AvailablePerks.AddItem(KFPC.Perklist[i].PerkClass);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (AvailablePerks.Length == 0)
|
||||
// If the perk assigned to this player is different than the one it should have.. reassign
|
||||
NewPerk = (KFPC_WS.InitialRandomPerk + PerkRouletteRandomWaveNum) % PerkRouletteRandomList.Length;
|
||||
if (PerkRouletteRandomList[NewPerk] != KFPC_WS.SavedPerkIndex || isEndWave)
|
||||
{
|
||||
for (i = 0; i < KFPC.Perklist.Length; ++i)
|
||||
{
|
||||
bPerkFound = false;
|
||||
for (j = 0; j < PickedPerks.Length; ++j)
|
||||
{
|
||||
if (KFPC.Perklist[i].PerkClass == PickedPerks[j])
|
||||
{
|
||||
bPerkFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bPerkFound && KFPC.Perklist[i].PerkClass != KFPC.CurrentPerk.Class)
|
||||
{
|
||||
AvailablePerks.AddItem(KFPC.Perklist[i].PerkClass);
|
||||
}
|
||||
}
|
||||
|
||||
if (AvailablePerks.Length == 0)
|
||||
{
|
||||
for (i = 0; i < KFPC.Perklist.Length; ++i)
|
||||
{
|
||||
AvailablePerks.AddItem(KFPC.Perklist[i].PerkClass);
|
||||
PickedPerks.Length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
KFPC.LockedPerks.Length = 0;
|
||||
KFPC_WS.ForceNewPerk(PerkRouletteRandomList[NewPerk]);
|
||||
}
|
||||
|
||||
NewPerkIndex = Rand(AvailablePerks.Length);
|
||||
PickedPerks.AddItem(AvailablePerks[NewPerkIndex]);
|
||||
KFPC.LockedPerks.AddItem(AvailablePerks[NewPerkIndex]);
|
||||
|
||||
KFPC.ForceNewPerk(AvailablePerks[NewPerkIndex]);
|
||||
|
||||
KFPC.PlayRandomPerkChosenSound();
|
||||
if (isEndWave)
|
||||
{
|
||||
KFPC_WS.PlayRandomPerkChosenSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1672,19 +1649,82 @@ event BroadcastLocalizedMessage( class<LocalMessage> InMessageClass, optional in
|
||||
}
|
||||
else
|
||||
{
|
||||
BroadcastCustomWaveEndMessage(self, InMessageClass, Switch);
|
||||
BroadcastCustomWaveEndMessage(InMessageClass, Switch);
|
||||
}
|
||||
}
|
||||
|
||||
function BroadcastCustomWaveEndMessage( actor Sender, class<LocalMessage> InMessageClass, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject )
|
||||
function BroadcastCustomWaveEndMessage(class<LocalMessage> InMessageClass, optional int Switch)
|
||||
{
|
||||
local KFPlayerController KFPC;
|
||||
local KFPlayerController_WeeklySurvival KFPC_WS;
|
||||
local PerkRoulette_PlayerMessageDelegate PlayerMessageData;
|
||||
|
||||
foreach WorldInfo.AllControllers(class'KFPlayerController', KFPC)
|
||||
PerkRoulette_PlayersDelegateData.Remove(0, PerkRoulette_PlayersDelegateData.Length);
|
||||
ClearTimer(nameof(BroadcastCustomDelegate));
|
||||
|
||||
foreach WorldInfo.AllControllers(class'KFPlayerController_WeeklySurvival', KFPC_WS)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage( InMessageClass, Switch, RelatedPRI_1, RelatedPRI_2, KFPC.GetPerk().Class);
|
||||
if (KFPC_WS.InitialRandomPerk == 255)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (KFPC_WS.Pawn.IsAliveAndWell() == false || KFPC_WS.PlayerReplicationInfo.bOnlySpectator || KFPC_WS.IsInState('Spectating'))
|
||||
{
|
||||
PlayerMessageData.KFPC_WS = KFPC_WS;
|
||||
PlayerMessageData.InMessageClass = InMessageClass;
|
||||
PlayerMessageData.SwitchValue = Switch;
|
||||
|
||||
PerkRoulette_PlayersDelegateData.AddItem(PlayerMessageData);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
KFPC_WS.ReceiveLocalizedMessage( InMessageClass, Switch, None, None, KFPC_WS.GetPerk().Class);
|
||||
}
|
||||
|
||||
if (PerkRoulette_PlayersDelegateData.Length > 0)
|
||||
{
|
||||
SetTimer(1.f, true, nameof(BroadcastCustomDelegate));
|
||||
}
|
||||
}
|
||||
|
||||
function BroadcastCustomDelegate()
|
||||
{
|
||||
local int i;
|
||||
local PerkRoulette_PlayerMessageDelegate PlayerMessageData;
|
||||
|
||||
for (i = PerkRoulette_PlayersDelegateData.Length - 1 ; i >= 0 ; --i)
|
||||
{
|
||||
PlayerMessageData = PerkRoulette_PlayersDelegateData[i];
|
||||
|
||||
if (PlayerMessageData.KFPC_WS == none)
|
||||
{
|
||||
PerkRoulette_PlayersDelegateData.Remove(i, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (PlayerMessageData.KFPC_WS.Pawn.IsAliveAndWell() == false
|
||||
|| PlayerMessageData.KFPC_WS.PlayerReplicationInfo.bOnlySpectator
|
||||
|| PlayerMessageData.KFPC_WS.IsInState('Spectating'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerMessageData.KFPC_WS.ReceiveLocalizedMessage(PlayerMessageData.InMessageClass
|
||||
, PlayerMessageData.SwitchValue
|
||||
, None
|
||||
, None
|
||||
, PlayerMessageData.KFPC_WS.GetPerk().Class);
|
||||
|
||||
PerkRoulette_PlayersDelegateData.Remove(i, 1);
|
||||
}
|
||||
|
||||
if (PerkRoulette_PlayersDelegateData.Length == 0)
|
||||
{
|
||||
ClearTimer(nameof(BroadcastCustomDelegate));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
defaultproperties
|
||||
|
@ -326,6 +326,7 @@ defaultproperties
|
||||
DamageTypeModifiers.Add((DamageType=class'KFDT_Explosive', DamageScale=(0.4)))
|
||||
DamageTypeModifiers.Add((DamageType=class'KFDT_Piercing', DamageScale=(0.75)))
|
||||
DamageTypeModifiers.Add((DamageType=class'KFDT_Ballistic_RPG7Impact', DamageScale=(4.f)))
|
||||
DamageTypeModifiers.Add((DamageType=class'KFDT_Ballistic_HRG_MedicMissile', DamageScale=(3.f)))
|
||||
DamageTypeModifiers.Add((DamageType=class'KFDT_Toxic', DamageScale=(0.25)))
|
||||
|
||||
//special cases
|
||||
|
@ -39,8 +39,8 @@ var AkEvent BurstAkEvent;
|
||||
|
||||
/** Decal settings */
|
||||
var MaterialInterface ImpactDecalMaterial;
|
||||
var float ImpactDecalWidth;
|
||||
var float ImpactDecalHeight;
|
||||
var float ImpactDecalMinSize;
|
||||
var float ImpactDecalMaxSize;
|
||||
var float ImpactDecalThickness;
|
||||
|
||||
var int MaxBounces;
|
||||
@ -184,6 +184,8 @@ simulated function BounceNoCheckRepeatingTouch(vector HitNormal, Actor BouncedOf
|
||||
* Returns true if projectile actually bounced / was allowed to bounce */
|
||||
simulated function bool Bounce( vector HitNormal, Actor BouncedOff )
|
||||
{
|
||||
local vector StartTrace, EndTrace, TraceLocation, TraceNormal;
|
||||
|
||||
// Avoid crazy bouncing
|
||||
if (CheckRepeatingTouch(BouncedOff))
|
||||
{
|
||||
@ -194,6 +196,18 @@ simulated function bool Bounce( vector HitNormal, Actor BouncedOff )
|
||||
|
||||
BounceNoCheckRepeatingTouch(HitNormal, BouncedOff);
|
||||
|
||||
if (WorldInfo.NetMode == NM_DedicatedServer || WorldInfo.NetMode == NM_Standalone)
|
||||
{
|
||||
StartTrace = Location;
|
||||
EndTrace = Location - HitNormal * 200.f;
|
||||
|
||||
Trace(TraceLocation, TraceNormal, EndTrace, StartTrace,,,,TRACEFLAG_Bullet);
|
||||
|
||||
//DrawDebugLine(StartTrace, EndTrace, 0, 0, 255, true);
|
||||
|
||||
SpawnImpactDecal(TraceLocation, HitNormal, fChargePercentage);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -252,8 +266,8 @@ simulated function ProcessBulletTouch(Actor Other, Vector HitLocation, Vector Hi
|
||||
{
|
||||
local Pawn Victim;
|
||||
local array<ImpactInfo> HitZoneImpactList;
|
||||
//local ImpactInfo ImpactInfoFallBack;
|
||||
local vector StartTrace, EndTrace, Direction; //, DirectionFallBack;
|
||||
local ImpactInfo ImpactInfoFallBack;
|
||||
local vector StartTrace, EndTrace, Direction, DirectionFallBack;
|
||||
local TraceHitInfo HitInfo;
|
||||
local KFWeapon KFW;
|
||||
|
||||
@ -293,6 +307,37 @@ simulated function ProcessBulletTouch(Actor Other, Vector HitLocation, Vector Hi
|
||||
|
||||
//`Log("HitZoneImpactList: " $HitZoneImpactList.Length);
|
||||
|
||||
if (HitZoneImpactList.length == 0)
|
||||
{
|
||||
// This projectile needs this special case, the projectile bounces with everything constantly while changing cylinder size
|
||||
// Making it's direction kind of unpredictable when trying to find the hit zones
|
||||
// If we fail to find one with the default method, trace from Hit Location to Victim Location plus some distance that makes the trace end outside of the Victim
|
||||
// That will succeed in any case start - end points are inside or outside the collider
|
||||
|
||||
DirectionFallBack = Normal(Victim.Location - StartTrace);
|
||||
|
||||
EndTrace = Victim.Location + DirectionFallBack * (Victim.CylinderComponent.CollisionRadius * 6.0);
|
||||
|
||||
//Victim.DrawDebugSphere(StartTrace, 12, 6, 255, 0, 0, true);
|
||||
//Victim.DrawDebugSphere(EndTrace, 12, 6, 0, 255, 0, true);
|
||||
//Victim.DrawDebugLine(StartTrace, EndTrace, 0, 0, 255, true);
|
||||
|
||||
TraceProjHitZones(Victim, EndTrace, StartTrace, HitZoneImpactList);
|
||||
|
||||
// For some reason with the bouncing hitting certain parts doesn't detect hit, we force a fallback
|
||||
if (HitZoneImpactList.length == 0)
|
||||
{
|
||||
//`Log("HitZoneImpactList: USING FALLBACK!");
|
||||
|
||||
ImpactInfoFallBack.HitActor = Victim;
|
||||
ImpactInfoFallBack.HitLocation = HitLocation;
|
||||
ImpactInfoFallBack.HitNormal = Direction;
|
||||
ImpactInfoFallBack.StartTrace = StartTrace;
|
||||
|
||||
HitZoneImpactList.AddItem(ImpactInfoFallBack);
|
||||
}
|
||||
}
|
||||
|
||||
if ( HitZoneImpactList.length > 0 )
|
||||
{
|
||||
HitZoneImpactList[0].RayDir = Direction;
|
||||
@ -323,6 +368,11 @@ simulated function IncrementNumImpacts(Pawn Victim)
|
||||
return;
|
||||
}
|
||||
|
||||
if (Victim.bCanBeDamaged == false || Victim.IsAliveAndWell() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
KFPC = KFPlayerController(InstigatorController);
|
||||
|
||||
if (KFPC == none)
|
||||
@ -446,6 +496,20 @@ simulated function SyncOriginalLocation()
|
||||
Super.SyncOriginalLocation();
|
||||
}
|
||||
|
||||
reliable client function SpawnImpactDecal(Vector HitLocation, vector HitNormal, float ChargePercentage )
|
||||
{
|
||||
local float DecalSize;
|
||||
|
||||
if( WorldInfo.MyDecalManager != none)
|
||||
{
|
||||
DecalSize = Lerp(ImpactDecalMinSize, ImpactDecalMaxSize, ChargePercentage);
|
||||
|
||||
//DrawDebugSphere(ProjEffects.GetPosition(), 12, 6, 0, 255, 0, true);
|
||||
|
||||
WorldInfo.MyDecalManager.SpawnDecal( ImpactDecalMaterial, HitLocation, rotator(-HitNormal)
|
||||
, DecalSize, DecalSize, ImpactDecalThickness, true );
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
@ -483,9 +547,9 @@ defaultproperties
|
||||
AmbientComponent=AmbientAkSoundComponent
|
||||
Components.Add(AmbientAkSoundComponent)
|
||||
|
||||
//ImpactDecalMaterial=DecalMaterial'FX_Mat_Lib.FX_Puke_Mine_Splatter_DM'
|
||||
ImpactDecalWidth=178.f
|
||||
ImpactDecalHeight=178.f
|
||||
ImpactDecalMaterial=DecalMaterial'WEP_HRG_BallisticBouncer_EMIT.FX_Ball_Impact_DM'
|
||||
ImpactDecalMinSize=20.f
|
||||
ImpactDecalMaxSize=80.f
|
||||
ImpactDecalThickness=28.f
|
||||
|
||||
Begin Object Name=CollisionCylinder
|
||||
|
@ -23,6 +23,12 @@ simulated function bool AllowDemolitionistExplosionChangeRadius()
|
||||
return false;
|
||||
}
|
||||
|
||||
// Used by Demolitionist Nuke and Mad Bomber skills
|
||||
simulated function bool CanDud()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
simulated protected function PrepareExplosionTemplate()
|
||||
{
|
||||
local Weapon OwnerWeapon;
|
||||
@ -60,7 +66,7 @@ defaultproperties
|
||||
TossZ=0
|
||||
GravityScale=1.0
|
||||
MomentumTransfer=50000.0
|
||||
ArmDistSquared=150000 // 4 meters
|
||||
ArmDistSquared=75000 // 2m
|
||||
|
||||
bCollideWithTeammates=true
|
||||
|
||||
@ -97,9 +103,9 @@ defaultproperties
|
||||
|
||||
// explosion
|
||||
Begin Object Class=KFGameExplosion Name=ExploTemplate0
|
||||
Damage=400
|
||||
Damage=700
|
||||
DamageRadius=300
|
||||
DamageFalloffExponent=2
|
||||
DamageFalloffExponent=1
|
||||
DamageDelay=0.f
|
||||
|
||||
// Damage Effects
|
||||
|
@ -120,10 +120,17 @@ reliable client function ClientUpdateVisualAmmo(float BoneControlTranslation)
|
||||
|
||||
simulated function StartFire(byte FiremodeNum)
|
||||
{
|
||||
if (IsTimerActive('RefireCheckTimer') || bBlocked)
|
||||
if (IsTimerActive('RefireCheckTimer'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (bBlocked && AmmoCount[0] == 0 && !IsTimerActive(nameof(RefireCheckTimer)) && !IsTimerActive(nameof(UnlockClientFire)))
|
||||
{
|
||||
|
||||
bBlocked = false;
|
||||
}
|
||||
|
||||
if(Role != Role_Authority && FireModeNum == DEFAULT_FIREMODE && HasAmmo(DEFAULT_FIREMODE))
|
||||
{
|
||||
bBlocked = true;
|
||||
@ -139,8 +146,6 @@ simulated function StartFire(byte FiremodeNum)
|
||||
{
|
||||
bBlocked = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
simulated function RefireCheckTimer()
|
||||
@ -640,8 +645,8 @@ defaultproperties
|
||||
ValueIncreaseTime=0.1
|
||||
|
||||
//FOR LERPING DAMANGE
|
||||
MaxDamageByCharge=600
|
||||
MinDamageByCharge=60
|
||||
MaxDamageByCharge=200
|
||||
MinDamageByCharge=10
|
||||
// FOV
|
||||
Meshfov=80
|
||||
MeshIronSightFOV=65 //52
|
||||
|
@ -53,6 +53,29 @@ event PostBeginPlay()
|
||||
}
|
||||
}
|
||||
|
||||
simulated function KFProjectile SpawnAllProjectiles(class<KFProjectile> KFProjClass, vector RealStartLoc, vector AimDir)
|
||||
{
|
||||
local Vector X, Y, Z, POVLoc;
|
||||
local Quat R;
|
||||
local rotator POVRot;
|
||||
|
||||
if (bUsingSights)
|
||||
{
|
||||
if (Instigator != None && Instigator.Controller != none)
|
||||
{
|
||||
Instigator.Controller.GetPlayerViewPoint(POVLoc, POVRot);
|
||||
|
||||
GetAxes(POVRot, X, Y, Z);
|
||||
|
||||
// 0.32 is a value the artists found that was needed to balance the aim in order to match the iron sight with the bullet impact position
|
||||
R = QuatFromAxisAndAngle(Y, -0.32f * DegToRad);
|
||||
AimDir = QuatRotateVector(R, AimDir);
|
||||
}
|
||||
}
|
||||
|
||||
return SpawnProjectile(KFProjClass, RealStartLoc, AimDir);
|
||||
}
|
||||
|
||||
simulated function ProcessInstantHitEx(byte FiringMode, ImpactInfo Impact, optional int NumHits, optional out float out_PenetrationVal, optional int ImpactNum )
|
||||
{
|
||||
local int HitZoneIdx;
|
||||
@ -85,12 +108,13 @@ simulated function ProcessInstantHitEx(byte FiringMode, ImpactInfo Impact, optio
|
||||
KFPC.StormCannonIDCounter = 0;
|
||||
}
|
||||
|
||||
// DISABLED PER DESIGN REQUEST, WE DO USE NOW DAMAGE TYPE EMP POWER
|
||||
// We simulate EMP affliction on Server, we can't use the affliction itself because it's duration is super hard to control
|
||||
// To completely sync with the logic of TrackingInstanceTimeDelaySeconds
|
||||
|
||||
// Simulate start EMP affliction
|
||||
Target.bEmpPanicked = true;
|
||||
Target.OnStackingAfflictionChanged(AF_EMP);
|
||||
//Target.bEmpPanicked = true;
|
||||
//Target.OnStackingAfflictionChanged(AF_EMP);
|
||||
|
||||
HVStormCannon_ProjectileTracking.AddItem(NewTrackingInstance);
|
||||
|
||||
@ -124,7 +148,7 @@ function KFPawn_Monster SearchClosestTarget(HVStormCannon_ProjectileTrackingInst
|
||||
, ReferenceLocation
|
||||
, true,, HitInfo)
|
||||
{
|
||||
if (!CurrentTarget.IsAliveAndWell() || CurrentTarget.bIsCloaking)
|
||||
if (!CurrentTarget.IsAliveAndWell())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -176,9 +200,10 @@ function UpdateTracking()
|
||||
|
||||
if (WorldInfo.TimeSeconds >= HVStormCannon_ProjectileTracking[i].TimeNextJump)
|
||||
{
|
||||
// DISABLED PER DESIGN REQUEST, WE DO USE NOW DAMAGE TYPE EMP POWER
|
||||
// Simulate stop EMP affliction
|
||||
HVStormCannon_ProjectileTracking[i].LastTarget.bEmpPanicked = false;
|
||||
HVStormCannon_ProjectileTracking[i].LastTarget.OnStackingAfflictionChanged(AF_EMP);
|
||||
//HVStormCannon_ProjectileTracking[i].LastTarget.bEmpPanicked = false;
|
||||
//HVStormCannon_ProjectileTracking[i].LastTarget.OnStackingAfflictionChanged(AF_EMP);
|
||||
|
||||
if (HVStormCannon_ProjectileTracking[i].NumberHits < TrackingDamage.length)
|
||||
{
|
||||
@ -187,9 +212,10 @@ function UpdateTracking()
|
||||
{
|
||||
HVStormCannon_ProjectileTracking[i].TimeNextJump = WorldInfo.TimeSeconds + TrackingInstanceTimeDelaySeconds;
|
||||
|
||||
// DISABLED PER DESIGN REQUEST, WE DO USE NOW DAMAGE TYPE EMP POWER
|
||||
// Simulate start EMP affliction
|
||||
NextTarget.bEmpPanicked = true;
|
||||
NextTarget.OnStackingAfflictionChanged(AF_EMP);
|
||||
//NextTarget.bEmpPanicked = true;
|
||||
//NextTarget.OnStackingAfflictionChanged(AF_EMP);
|
||||
|
||||
StartBeamVFX(NextTarget, HVStormCannon_ProjectileTracking[i].IDCounter);
|
||||
|
||||
@ -274,27 +300,6 @@ function int GetID(byte ID)
|
||||
return WeaponID + ID;
|
||||
}
|
||||
|
||||
simulated function KFProjectile SpawnProjectile( class<KFProjectile> KFProjClass, vector RealStartLoc, vector AimDir )
|
||||
{
|
||||
local vector SocketLocation;
|
||||
local rotator SocketRotation;
|
||||
local vector SpawnLocation;
|
||||
local vector SpawnDirection;
|
||||
|
||||
if(bUsingSights && MySkelMesh.GetSocketWorldLocationAndRotation('MuzzleFlash_Scope', SocketLocation, SocketRotation, 0))
|
||||
{
|
||||
SpawnLocation = SocketLocation;
|
||||
SpawnDirection = vector(SocketRotation);
|
||||
}
|
||||
else
|
||||
{
|
||||
SpawnLocation = RealStartLoc;
|
||||
SpawnDirection = AimDir;
|
||||
}
|
||||
|
||||
return super.SpawnProjectile(KFProjClass, SpawnLocation, SpawnDirection);
|
||||
}
|
||||
|
||||
simulated function UpdateAmmoCounter()
|
||||
{
|
||||
local float PercentageAmmo;
|
||||
@ -339,21 +344,22 @@ defaultproperties
|
||||
AimWarningDelay=(X=0.4f, Y=0.8f)
|
||||
AimWarningCooldown=0.0f
|
||||
|
||||
// Recoil
|
||||
maxRecoilPitch=300
|
||||
minRecoilPitch=200
|
||||
maxRecoilYaw=150
|
||||
minRecoilYaw=-150
|
||||
RecoilRate=0.08
|
||||
// Recoil
|
||||
maxRecoilPitch=200 //185
|
||||
minRecoilPitch=165 //150
|
||||
maxRecoilYaw=190 //175
|
||||
minRecoilYaw=-165 //-150
|
||||
RecoilRate=0.09
|
||||
RecoilMaxYawLimit=500
|
||||
RecoilMinYawLimit=1000
|
||||
RecoilMaxPitchLimit=1250
|
||||
RecoilMinPitchLimit=1500
|
||||
RecoilISMaxYawLimit=50
|
||||
RecoilISMinYawLimit=1000
|
||||
RecoilISMaxPitchLimit=500
|
||||
RecoilISMinPitchLimit=1000
|
||||
RecoilMinYawLimit=65035
|
||||
RecoilMaxPitchLimit=900
|
||||
RecoilMinPitchLimit=65035
|
||||
RecoilISMaxYawLimit=150
|
||||
RecoilISMinYawLimit=65385
|
||||
RecoilISMaxPitchLimit=375
|
||||
RecoilISMinPitchLimit=65460
|
||||
RecoilViewRotationScale=0.6
|
||||
HippedRecoilModifier=1.5 //1.25
|
||||
IronSightMeshFOVCompensationScale=1.5
|
||||
|
||||
// Inventory
|
||||
@ -409,7 +415,7 @@ defaultproperties
|
||||
|
||||
ScopedSensitivityMod=8.0 //16.0
|
||||
ScopeLenseMICTemplate=MaterialInstanceConstant'WEP_1P_HVStormCannon_MAT.Wep_1stP_HVStormCannon_Lens_MIC'
|
||||
ScopeMICIndex = 1
|
||||
ScopeMICIndex = 2
|
||||
|
||||
WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.15f), (Stat=EWUS_Damage1, Scale=1.15f), (Stat=EWUS_Weight, Add=1)))
|
||||
|
||||
|
@ -20,9 +20,6 @@ defaultproperties
|
||||
FirstPersonMeshName="WEP_1P_Demo_Knife_MESH.Wep_1stP_Demo_Knife_Rig"
|
||||
AttachmentArchetypeName="WEP_Demo_Knife_ARCH.Wep_Demo_Knife_3P"
|
||||
|
||||
Spread(DEFAULT_FIREMODE)=1.0
|
||||
Spread(ALTFIRE_FIREMODE)=1.0
|
||||
|
||||
Begin Object Name=FirstPersonMesh
|
||||
AnimSets(0)=AnimSet'WEP_1P_CommandoKnife_ANIM.Wep_1stP_CommKnife_Anim'
|
||||
End Object
|
||||
|
@ -186,14 +186,14 @@ simulated function Projectile ProjectileFire()
|
||||
{
|
||||
if (NumShotsFired >= NumBulletsBeforeRocket)
|
||||
{
|
||||
WeaponFireSnd[ALTFIRE_FIREMODE]=RocketFireSound;
|
||||
//WeaponFireSnd[ALTFIRE_FIREMODE]=RocketFireSound;
|
||||
CurrentFireMode = ALTFIRE_FIREMODE;
|
||||
NumShotsFired = 0;
|
||||
LastShotIsRocket = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
WeaponFireSnd[ALTFIRE_FIREMODE]=NormalFireSound;
|
||||
//WeaponFireSnd[ALTFIRE_FIREMODE]=NormalFireSound;
|
||||
CurrentFireMode = DEFAULT_FIREMODE;
|
||||
++NumShotsFired;
|
||||
LastShotIsRocket = false;
|
||||
@ -283,13 +283,13 @@ simulated state WeaponPuttingDown
|
||||
|
||||
simulated function StartRadar()
|
||||
{
|
||||
EnemiesInRadar.Length = 0;
|
||||
SetTimer(RadarUpdateEntitiesTime, true, nameof(UpdateRadarEntities));
|
||||
}
|
||||
|
||||
simulated function StopRadar()
|
||||
{
|
||||
ClearTimer(nameof(UpdateRadarEntities));
|
||||
EnemiesInRadar.Length = 0;
|
||||
}
|
||||
|
||||
simulated function UpdateRadarEntities()
|
||||
@ -467,9 +467,9 @@ defaultproperties
|
||||
MuzzleFlashTemplateName="WEP_ZEDMKIII_ARCH.Wep_ZEDMKIII_MuzzleFlash"
|
||||
|
||||
// Ammo
|
||||
MagazineCapacity[0]=100
|
||||
SpareAmmoCapacity[0]=400
|
||||
InitialSpareMags[0]=1
|
||||
MagazineCapacity[0]=50
|
||||
SpareAmmoCapacity[0]=350
|
||||
InitialSpareMags[0]=2
|
||||
bCanBeReloaded=true
|
||||
bReloadFromMagazine=true
|
||||
|
||||
@ -526,16 +526,18 @@ defaultproperties
|
||||
NormalFireSound=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_1P')
|
||||
RocketFireSound=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Rocket_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Rocket_1P')
|
||||
|
||||
WeaponFireSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_1P')
|
||||
WeaponFireSnd(ALTFIRE_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_1P')
|
||||
//WeaponFireSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_1P')
|
||||
WeaponFireSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_1P')
|
||||
//WeaponFireSnd(ALTFIRE_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Single_1P')
|
||||
WeaponFireSnd(ALTFIRE_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Rocket_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_Rocket_1P')
|
||||
WeaponDryFireSnd(DEFAULT_FIREMODE)=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Handling_DryFire'
|
||||
WeaponDryFireSnd(ALTFIRE_FIREMODE)=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Handling_DryFire'
|
||||
|
||||
// Advanced (High RPM) Fire Effects
|
||||
bLoopingFireAnim(DEFAULT_FIREMODE)=true
|
||||
bLoopingFireSnd(DEFAULT_FIREMODE)=true
|
||||
WeaponFireLoopEndSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_End_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_End_1P')
|
||||
SingleFireSoundIndex=ALTFIRE_FIREMODE
|
||||
bLoopingFireSnd(DEFAULT_FIREMODE)=false
|
||||
//WeaponFireLoopEndSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_End_3P', FirstPersonCue=AkEvent'WW_WEP_ZEDMKIII.Play_WEP_ZEDMKIII_Shoot_LP_End_1P')
|
||||
//SingleFireSoundIndex=ALTFIRE_FIREMODE
|
||||
|
||||
// Attachments
|
||||
bHasIronSights=true
|
||||
|
Reference in New Issue
Block a user