1
0
This commit is contained in:
2023-02-24 20:06:51 +03:00
parent 2131b14e05
commit 2942d046da
68 changed files with 299 additions and 46 deletions

View File

@ -47,7 +47,7 @@ defaultproperties
GoreDamageGroup=DGT_EMP
EffectGroup=FXG_Electricity
ForceImpactEffect=ParticleSystem'WEP_HVStormCannon_EMIT.FX_HVStormCannon_Impact'
ForceImpactEffect=ParticleSystem'WEP_HVStormCannon_EMIT.FX_HVStormCannon_Impact_Zed'
ForceImpactSound=AkEvent'WW_WEP_HVStormCannon.Play_WEP_HVStormCannon_Impact'
WeaponDef=class'KFWeapDef_HVStormCannon'

View File

@ -31,6 +31,8 @@ struct PerkRoulette_PlayerMessageDelegate
var array<PerkRoulette_PlayerMessageDelegate> PerkRoulette_PlayersDelegateData;
var array<KFPlayerController_WeeklySurvival> PerkRoulette_PlayersDelegateInventory;
//-----------------------------------------------------------------------------
// Statics
static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
@ -1177,6 +1179,14 @@ function NotifyKilled(Controller Killer, Controller Killed, Pawn KilledPawn, cla
SetTimer(1.5f, false, 'OnVIPDiesEndMatch');
}
}
if (MyKFGRI.IsRandomPerkMode())
{
if (KFPC_WS_Killed != none)
{
PerkRoulette_PlayersDelegateInventory.AddItem(KFPC_WS_Killed);
}
}
}
function GunGameLevelGrantWeapon(KFPlayerController_WeeklySurvival KFPC_WS, class<KFWeaponDefinition> ToGrantWeaponDefinition)
@ -1603,8 +1613,79 @@ function ChooseInitialRandomPerk(KFPlayerController_WeeklySurvival KFPC_WS)
KFPC_WS.InitialRandomPerk = PerkRouletteRandomInitialIndex;
PerkRouletteRandomInitialIndex = (PerkRouletteRandomInitialIndex + 1) % PerkRouletteRandomList.Length;
`Log("PLAYER : " $KFPC_WS);
`Log("InitialRandomPerk : " $KFPC_WS.InitialRandomPerk);
//`Log("PLAYER : " $KFPC_WS);
//`Log("InitialRandomPerk : " $KFPC_WS.InitialRandomPerk);
}
}
function bool CanAssignDefaultWeaponsToPlayer(Controller NewPlayer)
{
local KFPlayerController_WeeklySurvival KFPC_WS;
local int i;
// We can't assign default weapons if we have to wait to assign the New Perk
KFPC_WS = KFPlayerController_WeeklySurvival(NewPlayer);
if (KFPC_WS != none)
{
for (i = 0; i < PerkRoulette_PlayersDelegateInventory.Length ; ++i)
{
if (KFPC_WS == PerkRoulette_PlayersDelegateInventory[i])
{
return false;
}
}
}
return true;
}
function PerkRoulette_InventoryCustomDelegate()
{
local KFPlayerController_WeeklySurvival KFPC_WS;
local KFPerk Perk;
local int i;
local byte NewPerk;
for (i = PerkRoulette_PlayersDelegateInventory.Length - 1 ; i >= 0 ; --i)
{
KFPC_WS = PerkRoulette_PlayersDelegateInventory[i];
if (KFPC_WS == none)
{
PerkRoulette_PlayersDelegateInventory.Remove(i, 1);
continue;
}
Perk = KFPC_WS.GetPerk();
// While the new Perk is not valid, or is not the one we expect continue
if (Perk == none)
{
continue;
}
else
{
NewPerk = (KFPC_WS.InitialRandomPerk + PerkRouletteRandomWaveNum) % PerkRouletteRandomList.Length;
if (KFPC_WS.Perklist[PerkRouletteRandomList[NewPerk]].PerkClass != Perk.Class)
{
continue;
}
}
if (KFPC_WS.Pawn != none)
{
AddDefaultInventory(KFPC_WS.Pawn);
PerkRoulette_PlayersDelegateInventory.Remove(i, 1);
}
}
if (PerkRoulette_PlayersDelegateInventory.Length == 0)
{
ClearTimer(nameof(PerkRoulette_InventoryCustomDelegate));
}
}
@ -1612,7 +1693,17 @@ function ChooseRandomPerks(bool isEndWave)
{
local KFPlayerController_WeeklySurvival KFPC_WS;
local byte NewPerk;
if (isEndWave)
{
ClearTimer(nameof(PerkRoulette_InventoryCustomDelegate));
if (PerkRoulette_PlayersDelegateInventory.Length > 0)
{
SetTimer(0.5f, true, nameof(PerkRoulette_InventoryCustomDelegate));
}
}
foreach WorldInfo.AllControllers(class'KFPlayerController_WeeklySurvival', KFPC_WS)
{
if (KFPC_WS.InitialRandomPerk == 255 || KFPC_WS.PlayerReplicationInfo.bOnlySpectator || KFPC_WS.IsInState('Spectating'))

View File

@ -14,6 +14,8 @@ defaultproperties
MaxSpeed=22500.0
Speed=22500.0
ProjEffectsFadeOutDuration=0
DamageRadius=0
ProjFlightTemplate = ParticleSystem'WEP_HVStormCannon_EMIT.FX_HVStormCannon_Projectile'

View File

@ -340,6 +340,8 @@ simulated function ProcessBulletTouch(Actor Other, Vector HitLocation, Vector Hi
if ( HitZoneImpactList.length > 0 )
{
IncrementNumImpacts(Victim);
HitZoneImpactList[0].RayDir = Direction;
if( Owner != none )
@ -351,8 +353,6 @@ simulated function ProcessBulletTouch(Actor Other, Vector HitLocation, Vector Hi
}
}
IncrementNumImpacts(Victim);
BounceNoCheckRepeatingTouch(HitNormal, Other);
}
}
@ -363,7 +363,15 @@ simulated function IncrementNumImpacts(Pawn Victim)
local int i;
local KFPlayerController KFPC;
if (WorldInfo.NetMode == NM_Client)
if (WorldInfo.NetMode != NM_Standalone)
{
if (WorldInfo.NetMode == NM_Client)
{
return;
}
}
if (Victim == none)
{
return;
}

View File

@ -26,7 +26,7 @@ private event Initialize(string MapName)
bObjectiveIsValidForMap[0] = 1; // Freeze 500 Zeds using ice arsenal
bObjectiveIsValidForMap[1] = 0; // Complete the Weekly on Crash
bObjectiveIsValidForMap[2] = 0; // Use 4 Boomstick Jumps in a same match on Crash
bObjectiveIsValidForMap[3] = 1; // Hit 3 Zeds with a shot of HRG Ballistic Bouncer (15 times)
bObjectiveIsValidForMap[3] = 1; // Hit 2 Zeds with a shot of HRG Ballistic Bouncer (30 times)
bObjectiveIsValidForMap[4] = 0; // Complete wave 15 on Endless Hard or higher difficulty on Crash
if (CapsMapName == "KF-CRASH")

View File

@ -37,6 +37,8 @@ simulated function StartFire()
if (WeapMesh != none)
{
ChargeMIC = ChargeAttachment.CreateAndSetMaterialInstanceConstant(0);
WeapMesh.AttachComponentToSocket(ChargeAttachment, 'MuzzleFlash');
}
else
@ -57,7 +59,7 @@ simulated event Tick(float DeltaTime)
{
local float ChargeValue;
if(bIsCharging && !bIsFullyCharged)
if (bIsCharging && !bIsFullyCharged)
{
ChargeValue = FMin(class'KFWeap_HRG_BallisticBouncer'.default.MaxChargeTime, WorldInfo.TimeSeconds - StartFireTime) / class'KFWeap_HRG_BallisticBouncer'.default.MaxChargeTime;
@ -67,6 +69,12 @@ simulated event Tick(float DeltaTime)
ChargeValue = 1.0f;
}
if (ChargeMIC != none)
{
// Change Color
ChargeMIC.SetScalarParameterValue('Charge', ChargeValue);
}
if( ChargeAttachment != none)
{
ChargeAttachment.SetScale(MinProjPlaceholderScale + (MaxProjPlaceHolderScale - MinProjPlaceholderScale) * ChargeValue);

View File

@ -483,7 +483,6 @@ simulated state MineReconstructorCharge extends WeaponFiring
NotifyWeaponFinishedFiring(CurrentFireMode);
super.HandleFinishedFiring();
//`Log("ChargePercentage"@ChargePercentage);
}
simulated function PutDownWeapon()
@ -577,6 +576,7 @@ simulated function KFProjectile SpawnProjectile(class<KFProjectile> KFProjClass,
BouncingProj.SetInheritedScale(FXScalingFactorByCharge, ChargePercentage);
return BouncingProj;
}
return none;
}
@ -645,8 +645,8 @@ defaultproperties
ValueIncreaseTime=0.1
//FOR LERPING DAMANGE
MaxDamageByCharge=200
MinDamageByCharge=10
MaxDamageByCharge=300
MinDamageByCharge=15
// FOV
Meshfov=80
MeshIronSightFOV=65 //52
@ -768,4 +768,6 @@ defaultproperties
ChargeStaticMesh = StaticMesh'WEP_HRG_BallisticBouncer_EMIT.HRG_BallisticBouncer_ball_MESH'
MinProjPlaceholderScale = 2.0f;
MaxProjPlaceholderScale = 3.0f;
UseFixedPhysicalFireLocation=true
}

View File

@ -70,10 +70,11 @@ simulated function KFProjectile SpawnAllProjectiles(class<KFProjectile> KFProjCl
// 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);
}
}
return SpawnProjectile(KFProjClass, RealStartLoc, AimDir);
return super.SpawnAllProjectiles(KFProjClass, RealStartLoc, AimDir);
}
simulated function ProcessInstantHitEx(byte FiringMode, ImpactInfo Impact, optional int NumHits, optional out float out_PenetrationVal, optional int ImpactNum )
@ -382,7 +383,7 @@ defaultproperties
FireInterval(DEFAULT_FIREMODE)=0.4 // 150 RPM // 0.8 // 75 RPM
Spread(DEFAULT_FIREMODE)=0.005
PenetrationPower(DEFAULT_FIREMODE)=0
FireOffset=(X=30,Y=16,Z=-8)
//FireOffset=(X=30,Y=16,Z=-8)
// BASH_FIREMODE
InstantHitDamageTypes(BASH_FIREMODE)=class'KFDT_Bludgeon_HVStormCannon'