upload
This commit is contained in:
parent
d0b2d125ff
commit
3c1ea26aca
@ -220,6 +220,11 @@ function UpdateUICursorPosition(float newX, float newY, bool bMouseInput)
|
||||
ActionScriptVoid("setNormalizedMousePosition");
|
||||
}
|
||||
|
||||
function SetToggleFriendlyButtonActive(bool IsActive)
|
||||
{
|
||||
ActionScriptVoid("toggleFriendlyActive");
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
ControllerDampening=2.5f
|
||||
|
@ -403,6 +403,31 @@ static function PrepareExplosive( Pawn ProjOwner, KFProjectile Proj, optional fl
|
||||
}
|
||||
}
|
||||
|
||||
static function GameExplosion PrepareDroneExplosion(KFPawn Turret, optional float AuxRadiusMod = 1.0f, optional float AuxDmgMod = 1.0f )
|
||||
{
|
||||
local KFPlayerReplicationInfo InstigatorPRI;
|
||||
local GameExplosion ExplosionTemplate;
|
||||
|
||||
ExplosionTemplate = None;
|
||||
|
||||
if (Turret.WorldInfo.TimeDilation < 1.f)
|
||||
{
|
||||
InstigatorPRI = KFPlayerReplicationInfo( Turret.Instigator.PlayerReplicationInfo );
|
||||
if( InstigatorPRI != none )
|
||||
{
|
||||
if( InstigatorPRI.bNukeActive )
|
||||
{
|
||||
ExplosionTemplate = class'KFPerk_Demolitionist'.static.GetNukeExplosionTemplate();
|
||||
ExplosionTemplate.Damage = ExplosionTemplate.default.Damage * class'KFPerk_Demolitionist'.static.GetNukeDamageModifier() * AuxDmgMod;
|
||||
ExplosionTemplate.DamageRadius = ExplosionTemplate.default.DamageRadius * class'KFPerk_Demolitionist'.static.GetNukeRadiusModifier() * AuxRadiusMod;
|
||||
ExplosionTemplate.DamageFalloffExponent = ExplosionTemplate.default.DamageFalloffExponent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ExplosionTemplate;
|
||||
}
|
||||
|
||||
simulated function float GetAoERadiusModifier()
|
||||
{
|
||||
local float RadiusModifier;
|
||||
|
@ -12179,7 +12179,6 @@ simulated function ClearShotgunJumpFlag()
|
||||
exec function ToggleFriendlyUI()
|
||||
{
|
||||
bFriendlyUIEnabled = !bFriendlyUIEnabled;
|
||||
`Log("Toggle Friendly UI " $bFriendlyUIEnabled);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
|
@ -2978,6 +2978,16 @@ exec function ToggleFriendlyUIFromHUD()
|
||||
if( MyGFxHUD != none && MyGFxHUD.VoiceCommsWidget != none && MyGFxHUD.VoiceCommsWidget.bActive )
|
||||
{
|
||||
Outer.ToggleFriendlyUI();
|
||||
|
||||
MyGFxHUD.VoiceCommsWidget.SetToggleFriendlyButtonActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
exec function ReleaseToggleFriendlyUIFromHUD()
|
||||
{
|
||||
if( MyGFxHUD != none && MyGFxHUD.VoiceCommsWidget != none && MyGFxHUD.VoiceCommsWidget.bActive )
|
||||
{
|
||||
MyGFxHUD.VoiceCommsWidget.SetToggleFriendlyButtonActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ defaultproperties
|
||||
//KDeathUpKick=120
|
||||
//KDeathVel=10
|
||||
|
||||
StumblePower=5
|
||||
StumblePower=10
|
||||
GunHitPower=0
|
||||
|
||||
ModifierPerkList(0)=class'KFPerk_Support'
|
||||
|
@ -632,10 +632,6 @@ simulated state Combat
|
||||
SetTurretState(ETS_Empty);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TurretWeapon.StopFire(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -752,7 +748,7 @@ simulated state Detonate
|
||||
ExploActor.Instigator = Instigator;
|
||||
ExploActor.bIgnoreInstigator = true;
|
||||
|
||||
ExploActor.Explode(ExplosionTemplate);
|
||||
ExploActor.Explode(PrepareExplosionTemplate());
|
||||
}
|
||||
|
||||
Destroy();
|
||||
@ -1191,6 +1187,34 @@ simulated function ClearFlashCount(Weapon InWeapon)
|
||||
bForceNetUpdate=true;
|
||||
}
|
||||
|
||||
// Special case as this is not a projectile
|
||||
simulated function GameExplosion PrepareExplosionTemplate()
|
||||
{
|
||||
local KFPawn PawnInstigator;
|
||||
local KFPerk Perk;
|
||||
local GameExplosion NewTemplate;
|
||||
|
||||
|
||||
PawnInstigator = KFPawn(Instigator);
|
||||
if (PawnInstigator != None)
|
||||
{
|
||||
NewTemplate = class'KFPerk_Demolitionist'.static.PrepareDroneExplosion(self);
|
||||
|
||||
if (NewTemplate == None)
|
||||
{
|
||||
NewTemplate = default.ExplosionTemplate;
|
||||
}
|
||||
|
||||
Perk = PawnInstigator.GetPerk();
|
||||
if (Perk != None)
|
||||
{
|
||||
NewTemplate.DamageRadius *= Perk.GetAoERadiusModifier();
|
||||
}
|
||||
}
|
||||
|
||||
return NewTemplate;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bCollideComplex=TRUE
|
||||
|
@ -381,7 +381,7 @@ defaultproperties
|
||||
|
||||
// explosion
|
||||
Begin Object Class=KFGameExplosion Name=ExploTemplate0
|
||||
Damage=35
|
||||
Damage=50
|
||||
DamageRadius=200
|
||||
DamageFalloffExponent=1
|
||||
DamageDelay=0.f
|
||||
|
@ -444,6 +444,7 @@ simulated function PrepareAndDetonate()
|
||||
Detonate();
|
||||
}
|
||||
|
||||
CurrentFireMode = DETONATE_FIREMODE;
|
||||
IncrementFlashCount();
|
||||
|
||||
if( bInSprintState )
|
||||
|
@ -464,7 +464,7 @@ defaultproperties
|
||||
WeaponFireSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shot_LP_3P', FirstPersonCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shot_LP_1P')
|
||||
WeaponFireLoopEndSnd(DEFAULT_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shot_EndLP_3P', FirstPersonCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shot_EndLP_1P')
|
||||
|
||||
WeaponFireSnd(ALTFIRE_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shoot_3P', FirstPersonCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shoot_3P')
|
||||
WeaponFireSnd(ALTFIRE_FIREMODE)=(DefaultCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shoot_3P', FirstPersonCue=AkEvent'WW_WEP_Autoturret.Play_WEP_AutoTurret_Shoot_1P')
|
||||
SingleFireSoundIndex=ALTFIRE_FIREMODE
|
||||
|
||||
bLoopingFireSnd(DEFAULT_FIREMODE)=true
|
||||
|
@ -448,6 +448,7 @@ simulated function PrepareAndDetonate()
|
||||
Detonate();
|
||||
}
|
||||
|
||||
CurrentFireMode = DETONATE_FIREMODE;
|
||||
IncrementFlashCount();
|
||||
|
||||
if( bInSprintState )
|
||||
|
@ -19,7 +19,7 @@ var float CurrentDistanceProjectile;
|
||||
|
||||
var float DistanceParabolicLaunch;
|
||||
|
||||
var transient float LastTimeFireSeconds;
|
||||
var transient float FireLookAheadSeconds;
|
||||
|
||||
simulated event PreBeginPlay()
|
||||
{
|
||||
@ -122,13 +122,16 @@ simulated function KFProjectile SpawnProjectile( class<KFProjectile> KFProjClass
|
||||
|
||||
if( SpawnedProjectile != none && !SpawnedProjectile.bDeleteMe )
|
||||
{
|
||||
if (CurrentTarget != none)
|
||||
if (CurrentTarget != none) // This is used for regular shooting
|
||||
{
|
||||
//TargetLocation = CurrentTarget.Mesh.GetBoneLocation('Spine1');
|
||||
TargetLocation = CurrentTarget.Location;
|
||||
TargetLocation.Z += CurrentTarget.GetCollisionHeight() * 0.5f; // Add an offset on the location, so it matches correctly
|
||||
|
||||
// Apply look ahead
|
||||
TargetLocation += CurrentTarget.Velocity * FireLookAheadSeconds;
|
||||
}
|
||||
else if (CurrentDistanceProjectile > 0.f)
|
||||
else if (CurrentDistanceProjectile > 0.f) // This is used for the explosion when drone dies
|
||||
{
|
||||
TargetLocation = RealStartLoc + AimDir * CurrentDistanceProjectile;
|
||||
TargetLocation.Z -= InstigatorDrone.DeployHeight; // We target more or less the ground
|
||||
@ -213,14 +216,14 @@ simulated function IncrementFlashCount()
|
||||
|
||||
simulated function Fire()
|
||||
{
|
||||
if (IsInState('WeaponFiring'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasAmmo(DEFAULT_FIREMODE))
|
||||
{
|
||||
//if (WorldInfo.TimeSeconds - LastTimeFireSeconds > GetFireInterval(DEFAULT_FIREMODE))
|
||||
//{
|
||||
LastTimeFireSeconds = WorldInfo.TimeSeconds;
|
||||
|
||||
SendToFiringState(DEFAULT_FIREMODE);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -488,5 +491,5 @@ defaultproperties
|
||||
|
||||
DistanceParabolicLaunch=150.f //cm
|
||||
|
||||
LastTimeFireSeconds=0.f
|
||||
FireLookAheadSeconds=0.2f
|
||||
}
|
@ -258,7 +258,7 @@ defaultproperties
|
||||
FireInterval(DEFAULT_FIREMODE)=+0.05 // 1200 RPM
|
||||
Spread(DEFAULT_FIREMODE)=0.0085
|
||||
PenetrationPower(DEFAULT_FIREMODE)=2.0
|
||||
InstantHitDamage(DEFAULT_FIREMODE)=35.0 //32.0 //25
|
||||
InstantHitDamage(DEFAULT_FIREMODE)=38.0 //32.0 //25
|
||||
FireOffset=(X=30,Y=4.5,Z=-5)
|
||||
|
||||
// ALT_FIREMODE
|
||||
|
@ -17,6 +17,7 @@ const SecondaryFireIronAnim = 'Shoot_Secondary_Iron';
|
||||
const SecondaryReloadAnim = 'Reload_Secondary';
|
||||
const SecondaryReloadEliteAnim = 'Reload_Secondary_Elite';
|
||||
|
||||
var transient KFMuzzleFlash SecondaryMuzzleFlash;
|
||||
var() KFMuzzleFlash SecondaryMuzzleFlashTemplate;
|
||||
|
||||
// Used on the server to keep track of grenades
|
||||
@ -124,11 +125,6 @@ simulated function ConsumeAmmo( byte FireModeNum )
|
||||
}
|
||||
}
|
||||
|
||||
simulated function bool HasAnyAmmo()
|
||||
{
|
||||
return HasSpareAmmo() || HasAmmo(DEFAULT_FIREMODE) || SpareAmmoCount[1] > 0 || HasAmmo(ALTFIRE_FIREMODE);
|
||||
}
|
||||
|
||||
/** Make sure user can't fire infinitely if they cheat to get infinite ammo locally. */
|
||||
simulated event bool HasAmmo( byte FireModeNum, optional int Amount=1 )
|
||||
{
|
||||
@ -250,22 +246,23 @@ simulated state FiringSecondaryState extends WeaponSingleFiring
|
||||
*/
|
||||
simulated function CauseMuzzleFlash(byte FireModeNum)
|
||||
{
|
||||
local bool AutoShellEject;
|
||||
|
||||
if(FireModeNum == ALTFIRE_FIREMODE)
|
||||
{
|
||||
if (MuzzleFlash == None)
|
||||
if (SecondaryMuzzleFlash == None)
|
||||
{
|
||||
AttachSecondaryMuzzleFlash();
|
||||
AttachMuzzleFlash();
|
||||
}
|
||||
|
||||
AutoShellEject = MuzzleFlash.bAutoActivateShellEject;
|
||||
if (SecondaryMuzzleFlash != none)
|
||||
{
|
||||
SecondaryMuzzleFlash.CauseMuzzleFlash(FireModeNum);
|
||||
}
|
||||
|
||||
MuzzleFlash.bAutoActivateShellEject = false;
|
||||
|
||||
Super.CauseMuzzleFlash(FireModeNum);
|
||||
|
||||
MuzzleFlash.bAutoActivateShellEject = AutoShellEject;
|
||||
if (SecondaryMuzzleFlash.bAutoActivateShellEject)
|
||||
{
|
||||
SecondaryMuzzleFlash.CauseShellEject();
|
||||
SetShellEjectsToForeground();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -273,14 +270,16 @@ simulated function CauseMuzzleFlash(byte FireModeNum)
|
||||
}
|
||||
}
|
||||
|
||||
simulated function AttachSecondaryMuzzleFlash()
|
||||
simulated function AttachMuzzleFlash()
|
||||
{
|
||||
super.AttachMuzzleFlash();
|
||||
|
||||
if ( MySkelMesh != none )
|
||||
{
|
||||
if (MuzzleFlashTemplate != None)
|
||||
if (SecondaryMuzzleFlashTemplate != None)
|
||||
{
|
||||
MuzzleFlash = new(self) Class'KFMuzzleFlash'(SecondaryMuzzleFlashTemplate);
|
||||
MuzzleFlash.AttachMuzzleFlash(MySkelMesh, 'MuzzleFlashAlt');
|
||||
SecondaryMuzzleFlash = new(self) Class'KFMuzzleFlash'(SecondaryMuzzleFlashTemplate);
|
||||
SecondaryMuzzleFlash.AttachMuzzleFlash(MySkelMesh, 'MuzzleFlashAlt');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -627,11 +626,11 @@ defaultproperties
|
||||
FiringStatesArray(DEFAULT_FIREMODE)=WeaponSingleFiring
|
||||
WeaponFireTypes(DEFAULT_FIREMODE)=EWFT_Projectile
|
||||
WeaponProjectiles(DEFAULT_FIREMODE)=class'KFProj_Bullet_Pellet'
|
||||
InstantHitDamage(DEFAULT_FIREMODE)=24.0 //25 //20
|
||||
InstantHitDamage(DEFAULT_FIREMODE)=28.0 //25 //20
|
||||
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'KFDT_Ballistic_Shotgun_S12'
|
||||
PenetrationPower(DEFAULT_FIREMODE)=2.0
|
||||
FireInterval(DEFAULT_FIREMODE)=0.2 // 300 RPM
|
||||
Spread(DEFAULT_FIREMODE)=0.08
|
||||
Spread(DEFAULT_FIREMODE)=0.12
|
||||
FireOffset=(X=30,Y=5,Z=-4)
|
||||
NumPellets(DEFAULT_FIREMODE)=7
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user