Merge pull request 'Limit Bloat Vomit super damage' (#29) from BloatBileBullshit into dev
Reviewed-on: https://insultplayers.ru/git/dkanus/NicePack/pulls/29
This commit is contained in:
commit
dcc35d767b
30
sources/Zeds/Nice/NiceBloatVomit.uc
Normal file
30
sources/Zeds/Nice/NiceBloatVomit.uc
Normal file
@ -0,0 +1,30 @@
|
||||
class NiceBloatVomit extends KFBloatVomit;
|
||||
|
||||
// limit how much you can damage zeds
|
||||
const DAMAGECOUNT=10;
|
||||
var private transient int DamageTicked;
|
||||
|
||||
auto state Flying {
|
||||
simulated function ProcessTouch(Actor Other, Vector HitLocation) {
|
||||
// add damage limit
|
||||
if (DamageTicked >= DAMAGECOUNT) {
|
||||
BlowUp(HitLocation);
|
||||
return;
|
||||
}
|
||||
if (ExtendedZCollision(Other) != none) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
Other != Instigator &&
|
||||
(Other.IsA('Pawn') || Other.IsA('DestroyableObjective') || Other.bProjTarget)
|
||||
) {
|
||||
DamageTicked += 1;
|
||||
// warn("DamageTicked: " $ DamageTicked);
|
||||
// use server DelayedHurtRadius() instead?
|
||||
HurtRadius(Damage, DamageRadius, MyDamageType, MomentumTransfer, HitLocation);
|
||||
}
|
||||
else if (Other != Instigator && Other.bBlockActors) {
|
||||
HitWall(Normal(HitLocation - Location), Other);
|
||||
}
|
||||
}
|
||||
}
|
@ -173,7 +173,8 @@ function SpawnTwoShots()
|
||||
if ( !SavedFireProperties.bInitialized )
|
||||
{
|
||||
SavedFireProperties.AmmoClass = Class'SkaarjAmmo';
|
||||
SavedFireProperties.ProjectileClass = Class'KFBloatVomit';
|
||||
// use fixed bile class, to prevent super high damage to zeds
|
||||
SavedFireProperties.ProjectileClass = Class'NiceBloatVomit';
|
||||
SavedFireProperties.WarnTargetPct = 1;
|
||||
SavedFireProperties.MaxRange = 500;
|
||||
SavedFireProperties.bTossed = False;
|
||||
@ -185,13 +186,13 @@ function SpawnTwoShots()
|
||||
// Turn off extra collision before spawning vomit, otherwise spawn fails
|
||||
ToggleAuxCollision(false);
|
||||
FireRotation = Controller.AdjustAim(SavedFireProperties,FireStart,600);
|
||||
Spawn(Class'KFBloatVomit',,,FireStart,FireRotation);
|
||||
Spawn(SavedFireProperties.ProjectileClass,,,FireStart,FireRotation);
|
||||
FireStart-=(0.5*CollisionRadius*Y);
|
||||
FireRotation.Yaw -= 1200;
|
||||
spawn(Class'KFBloatVomit',,,FireStart, FireRotation);
|
||||
spawn(SavedFireProperties.ProjectileClass,,,FireStart, FireRotation);
|
||||
FireStart+=(CollisionRadius*Y);
|
||||
FireRotation.Yaw += 2400;
|
||||
spawn(Class'KFBloatVomit',,,FireStart, FireRotation);
|
||||
spawn(SavedFireProperties.ProjectileClass,,,FireStart, FireRotation);
|
||||
// Turn extra collision back on
|
||||
ToggleAuxCollision(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user