husk use Myammo func

This commit is contained in:
Shtoyan 2022-02-07 15:28:24 +04:00
parent 140a70513d
commit eb6ef56d79
4 changed files with 38 additions and 12 deletions

View File

@ -48,7 +48,7 @@ function RangedAttack(Actor A) {
defaultproperties
{
maxNormalShots=3
HuskFireProjClass=class'MeanHuskFireProjectile'
AmmunitionClass=class'MeanZombieHuskAmmo'
remainingStuns=1
MenuName="Mean Husk"
ControllerClass=class'MeanZombieHuskController'

View File

@ -0,0 +1,7 @@
class MeanZombieHuskAmmo extends NiceZombieHuskAmmo;
defaultproperties
{
ProjectileClass=class'MeanHuskFireProjectile'
}

View File

@ -21,14 +21,20 @@ simulated function HeatTick(){
}
super.HeatTick();
}
simulated function PostBeginPlay()
{
// Difficulty Scaling
if (Level.Game != none && !bDiffAdjusted){
if (Level.Game != none && !bDiffAdjusted)
{
ProjectileFireInterval = default.ProjectileFireInterval * 0.6;
}
// and why TWI removed this feature...
MyAmmo = spawn(AmmunitionClass);
super.PostBeginPlay();
}
// don't interrupt the bloat while he is puking
simulated function bool HitCanInterruptAction()
{
@ -146,14 +152,14 @@ function SpawnTwoShots()
if (!SavedFireProperties.bInitialized)
{
SavedFireProperties.AmmoClass = class'SkaarjAmmo';
SavedFireProperties.ProjectileClass = HuskFireProjClass;
SavedFireProperties.WarnTargetPct = 1;
SavedFireProperties.MaxRange = 65535;
SavedFireProperties.bTossed = false;
SavedFireProperties.bTrySplash = true;
SavedFireProperties.bLeadTarget = true;
SavedFireProperties.bInstantHit = false;
SavedFireProperties.AmmoClass = MyAmmo.Class;
SavedFireProperties.ProjectileClass = MyAmmo.ProjectileClass;
SavedFireProperties.WarnTargetPct = MyAmmo.WarnTargetPct;
SavedFireProperties.MaxRange = MyAmmo.MaxRange;
SavedFireProperties.bTossed = MyAmmo.bTossed;
SavedFireProperties.bTrySplash = MyAmmo.bTrySplash;
SavedFireProperties.bLeadTarget = MyAmmo.bLeadTarget;
SavedFireProperties.bInstantHit = MyAmmo.bInstantHit;
SavedFireProperties.bInitialized = true;
}
@ -173,7 +179,7 @@ function SpawnTwoShots()
}
// added projectile owner...
Spawn(HuskFireProjClass, self, , FireStart, FireRotation);
Spawn(SavedFireProperties.ProjectileClass, self, , FireStart, FireRotation);
// Turn extra collision back on
ToggleAuxCollision(true);
@ -379,7 +385,7 @@ static simulated function PreCacheMaterials(LevelInfo myLevel)
}
defaultproperties
{
HuskFireProjClass=class'NiceHuskFireProjectile'
AmmunitionClass=class'NiceZombieHuskAmmo'
stunLoopStart=0.080000
stunLoopEnd=0.900000
idleInsertFrame=0.930000

View File

@ -0,0 +1,13 @@
class NiceZombieHuskAmmo extends Ammunition;
defaultproperties
{
ProjectileClass=class'NiceHuskFireProjectile'
WarnTargetPct=1
MaxRange=65535
bTossed=False
bTrySplash=True
bLeadTarget=True
bInstantHit=False
}