Add update 13 to this branch
This commit is contained in:
parent
e79d49ce0d
commit
99aac40182
17 changed files with 254 additions and 667 deletions
|
|
@ -52,7 +52,6 @@ defaultproperties
|
|||
ClawMeleeDamageRange=85.000000
|
||||
ImpaleMeleeDamageRange=45.000000
|
||||
fuelRatio=0.400000
|
||||
bFrugalFuelUsage=False
|
||||
clientHeadshotScale=1.200000
|
||||
ZapThreshold=5.000000
|
||||
ZappedDamageMod=1.250000
|
||||
|
|
|
|||
|
|
@ -34,17 +34,20 @@ event Landed(vector HitNormal)
|
|||
}
|
||||
event Bump(actor Other)
|
||||
{
|
||||
local int actualDamage;
|
||||
// TODO: is there a better way
|
||||
if(bPouncing && KFHumanPawn(Other)!=none )
|
||||
{
|
||||
KFHumanPawn(Other).TakeDamage(((MeleeDamage - (MeleeDamage * 0.05)) + (MeleeDamage * (FRand() * 0.1))), self ,self.Location,self.velocity, class'NiceZedMeleeDamageType');
|
||||
if (KFHumanPawn(Other).Health <=0)
|
||||
{
|
||||
//TODO - move this to humanpawn.takedamage? Also see KFMonster.MeleeDamageTarget
|
||||
KFHumanPawn(Other).SpawnGibs(self.rotation, 1);
|
||||
}
|
||||
//After impact, there'll be no momentum for further bumps
|
||||
bPouncing=false;
|
||||
actualDamage = MeleeDamage;
|
||||
ModDamageFromZed(actualDamage, class'NiceZedMeleeDamageType');
|
||||
KFHumanPawn(Other).TakeDamage(((actualDamage * 0.95) + (actualDamage * (FRand() * 0.1))), self ,self.Location,self.velocity, class'NiceZedMeleeDamageType');
|
||||
if (KFHumanPawn(Other).Health <=0)
|
||||
{
|
||||
//TODO - move this to humanpawn.takedamage? Also see KFMonster.MeleeDamageTarget
|
||||
KFHumanPawn(Other).SpawnGibs(self.rotation, 1);
|
||||
}
|
||||
//After impact, there'll be no momentum for further bumps
|
||||
bPouncing=false;
|
||||
}
|
||||
}
|
||||
// Blend his attacks so he can hit you in mid air.
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ function SpinDamage(actor Target)
|
|||
local vector HitLocation;
|
||||
local Name TearBone;
|
||||
local Float dummy;
|
||||
local float DamageAmount;
|
||||
local int damageAmount;
|
||||
local vector PushDir;
|
||||
local KFHumanPawn HumanTarget;
|
||||
if(target==none)
|
||||
|
|
@ -456,8 +456,9 @@ function SpinDamage(actor Target)
|
|||
}
|
||||
if (Target !=none && Target.IsA('KFDoorMover'))
|
||||
{
|
||||
Target.TakeDamage(DamageAmount , self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
|
||||
ModDamageFromZed(DamageAmount, class'NiceZedMeleeDamageType');
|
||||
Target.TakeDamage(DamageAmount , self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
|
||||
}
|
||||
if (KFHumanPawn(Target)!=none)
|
||||
{
|
||||
|
|
@ -465,8 +466,9 @@ function SpinDamage(actor Target)
|
|||
if (HumanTarget.Controller != none)
|
||||
HumanTarget.Controller.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
|
||||
|
||||
//TODO - line below was KFPawn. Does this whole block need to be KFPawn, or is it OK as KFHumanPawn?
|
||||
KFHumanPawn(Target).TakeDamage(DamageAmount, self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
ModDamageFromZed(DamageAmount, class'NiceZedMeleeDamageType');
|
||||
//TODO - line below was KFPawn. Does this whole block need to be KFPawn, or is it OK as KFHumanPawn?
|
||||
KFHumanPawn(Target).TakeDamage(DamageAmount, self ,HitLocation,pushdir, class'NiceZedMeleeDamageType');
|
||||
|
||||
if (KFHumanPawn(Target).Health <=0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
|||
local float InitMomentum;
|
||||
local float damageScale, dist;
|
||||
local vector dir;
|
||||
local float UsedDamageAmount;
|
||||
local int UsedDamageAmount;
|
||||
local KFHumanPawn humanPawn;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
|||
UsedDamageAmount = 100000; // Siren always shatters glass
|
||||
else
|
||||
UsedDamageAmount = DamageAmount;
|
||||
|
||||
ModDamageFromZed(UsedDamageAmount, DamageType);
|
||||
Victims.TakeDamage(damageScale * UsedDamageAmount,Instigator, Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, (damageScale * Momentum * dir), DamageType);
|
||||
|
||||
if (Instigator != none && Vehicle(Victims) != none && Vehicle(Victims).Health > 0)
|
||||
|
|
|
|||
|
|
@ -127,10 +127,7 @@ var float heatDissipationRate;
|
|||
var float heatTicksPerSecond;
|
||||
// Tracks last time heat tick occured
|
||||
var float lastHeatTick;
|
||||
// If set to 'true' - low-value ticks of fire DoT will waste accordingly small
|
||||
// amount of fuel, otherwise they will always waste some minimal amount,
|
||||
// resulting in a loss of potential damage
|
||||
var bool bFrugalFuelUsage;
|
||||
var float MIN_HEAT, MAX_HEAT;
|
||||
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
|
|
@ -475,7 +472,7 @@ function AccumulateHeadDamage( float addDamage,
|
|||
bool bIsHeadshot,
|
||||
NicePlayerController nicePlayer){
|
||||
if(bIsHeadshot){
|
||||
AccHeadDamage += addDamage;
|
||||
AccHeadDamage += addDamage * 0.5;
|
||||
HeadRecoveryCountDown = HeadRecoveryTime;
|
||||
if(AccHeadDamage > (default.HeadHealth / 1.5)
|
||||
&& (concussionCountdown > 0.0 && IsStunPossible()))
|
||||
|
|
@ -686,9 +683,6 @@ simulated function float GetDistanceToHead(Vector location) {
|
|||
local Coords headBoneCoords;
|
||||
local Vector headLocation;
|
||||
|
||||
local Vector AToLineOrig;
|
||||
local Vector lineDir;
|
||||
|
||||
if(headBone == '') {
|
||||
return 0.0;
|
||||
}
|
||||
|
|
@ -707,28 +701,28 @@ function ModDamage( out int damage,
|
|||
float headshotLevel,
|
||||
KFPlayerReplicationInfo KFPRI,
|
||||
optional float lockonTime){
|
||||
local NicePlayerController nicePlayer;
|
||||
local bool hasGiantSlayer;
|
||||
local int bonusDamageStacks;
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return;
|
||||
// Add perked damage
|
||||
damage = KFPRI.ClientVeteranSkill.Static.AddDamage( KFPRI, self,
|
||||
KFPawn(instigatedBy),
|
||||
damage, damageType);
|
||||
// Skill bonuses
|
||||
if(instigatedBy == none)
|
||||
return;
|
||||
nicePlayer = NicePlayerController(instigatedBy.controller);
|
||||
if(nicePlayer == none)
|
||||
return;
|
||||
hasGiantSlayer = class'NiceVeterancyTypes'.static.hasSkill(nicePlayer,
|
||||
class'NiceSkillCommandoGiantSlayer');
|
||||
if(!hasGiantSlayer)
|
||||
return;
|
||||
bonusDamageStacks =
|
||||
int(health / class'NiceSkillCommandoGiantSlayer'.default.healthStep);
|
||||
damage *= 1.0f + bonusDamageStacks *
|
||||
class'NiceSkillCommandoGiantSlayer'.default.bonusDamageMult;
|
||||
local NicePlayerController nicePlayer;
|
||||
local bool hasGiantSlayer;
|
||||
local int bonusDamageStacks;
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return;
|
||||
// Add perked damage
|
||||
damage = KFPRI.ClientVeteranSkill.Static.AddDamage( KFPRI, self,
|
||||
KFPawn(instigatedBy),
|
||||
damage, damageType);
|
||||
// Skill bonuses
|
||||
if(instigatedBy == none)
|
||||
return;
|
||||
nicePlayer = NicePlayerController(instigatedBy.controller);
|
||||
if(nicePlayer == none)
|
||||
return;
|
||||
hasGiantSlayer = class'NiceVeterancyTypes'.static.hasSkill(nicePlayer,
|
||||
class'NiceSkillCommandoGiantSlayer');
|
||||
if(!hasGiantSlayer)
|
||||
return;
|
||||
bonusDamageStacks =
|
||||
int(health / class'NiceSkillCommandoGiantSlayer'.default.healthStep);
|
||||
damage *= 1.0f + bonusDamageStacks *
|
||||
class'NiceSkillCommandoGiantSlayer'.default.bonusDamageMult;
|
||||
}
|
||||
function ModRegularDamage( out int damage,
|
||||
Pawn instigatedBy,
|
||||
|
|
@ -750,9 +744,6 @@ function ModRegularDamage( out int damage,
|
|||
damage = niceVet.static.AddRegDamage( KFPRI, self,
|
||||
KFPawn(instigatedBy), damage,
|
||||
damageType);
|
||||
// Add some damage against crispy zeds
|
||||
if(bCrispified)
|
||||
damage += (Max(1200 - default.Health, 0) * damage) / 1200;
|
||||
// Skills bonuses
|
||||
if(nicePlayer == none) return;
|
||||
hasOverkillSkill = class'NiceVeterancyTypes'.static.
|
||||
|
|
@ -841,13 +832,15 @@ function int ModBodyDamage( out int damage,
|
|||
return painDamage;
|
||||
}
|
||||
// Do effects, based on fire damage dealt to monster
|
||||
function FireDamageEffects( int damage,
|
||||
function FireDamageEffects(out int damage,
|
||||
Pawn instigatedBy,
|
||||
Vector hitLocation,
|
||||
Vector momentum,
|
||||
class<NiceWeaponDamageType> damageType,
|
||||
float headshotLevel,
|
||||
KFPlayerReplicationInfo KFPRI){
|
||||
local float heatDelta, bonusFireDamage;
|
||||
local bool shouldBeSetOnFire, isFireWeapon;
|
||||
damage = FMax(0.0, damage);
|
||||
iceCrustStrenght = FMax(0.0, iceCrustStrenght);
|
||||
if(bFrozenZed){
|
||||
|
|
@ -865,24 +858,39 @@ function FireDamageEffects( int damage,
|
|||
}
|
||||
damage /= 10;
|
||||
}
|
||||
if(damage <= 0) return;
|
||||
if(damage <= 0) {
|
||||
return;
|
||||
}
|
||||
// Turn up the heat!
|
||||
// (we can only make it twice as hot with that damage,
|
||||
// but set limit at least at 50, as if we've dealt at least 25 heat damage)
|
||||
heat += (damage * HeatIncScale())
|
||||
heatDelta = (damage * HeatIncScale())
|
||||
* FMin(1.0, FMax(0.0, (2 - Abs(heat) / FMax(25, Abs(damage) ))));
|
||||
if (concussionCountdown > 0) {
|
||||
heat += heatDelta * 2;
|
||||
} else {
|
||||
heat += heatDelta;
|
||||
}
|
||||
CapHeat();
|
||||
// Change damage type if new one was stronger
|
||||
if(!bOnFire || damage * HeatIncScale() > lastBurnDamage){
|
||||
fireDamageClass = damageType;
|
||||
burnInstigator = instigatedBy;
|
||||
}
|
||||
// Double heat damage at the cost of the fuel, if zed is already on fire
|
||||
isFireWeapon = (damageType.default.heatPart >= 0.75);
|
||||
if (bOnFire && isFireWeapon) {
|
||||
bonusFireDamage = FMax(FMin(damage, flameFuel), 0);
|
||||
flameFuel -= bonusFireDamage;
|
||||
damage += bonusFireDamage;
|
||||
}
|
||||
// Set on fire, if necessary
|
||||
if(heat > GetIgnitionPoint() && !bOnFire && bCanBurn){
|
||||
shouldBeSetOnFire = (heat > GetIgnitionPoint()) || isFireWeapon;
|
||||
if(shouldBeSetOnFire && !bOnFire && bCanBurn){
|
||||
bBurnified = true;
|
||||
bOnFire = true;
|
||||
burnInstigator = instigatedBy;
|
||||
fireDamageClass = damageType;
|
||||
fireDamageClass = damageType;
|
||||
lastHeatTick = Level.TimeSeconds;
|
||||
}
|
||||
}
|
||||
|
|
@ -1017,6 +1025,10 @@ function DealHeadDamage( int damage,
|
|||
// Actual damage effects
|
||||
// Skull injury killed a zed
|
||||
if(HeadHealth <= 0) return;
|
||||
// Additional weakpoint damage to burning zeds from non-flame weapons
|
||||
if (bOnFire && damageType.default.heatPart < 0.75) {
|
||||
damage += 100;
|
||||
}
|
||||
HeadHealth -= damage;
|
||||
if(nicePlayer != none && IsFinisher(damage, damageType, nicePlayer, true))
|
||||
HeadHealth -= damage;
|
||||
|
|
@ -1199,6 +1211,9 @@ function EPainReaction GetRightPainReaction(int painDamage,
|
|||
local int stunScore, flinchScore;
|
||||
local bool bStunPass, bFlinchPass, bMiniFlinshPass;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
if (bOnFire) {
|
||||
return PREACTION_NONE;
|
||||
}
|
||||
if(KFPRI != none)
|
||||
niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
|
||||
stunScore = painDamage;
|
||||
|
|
@ -1649,8 +1664,8 @@ function TakeDamageClient( int damage,
|
|||
ExtractElementalDamage(regDamage, heatDamage, damage,
|
||||
instigatedBy, hitLocation, momentum,
|
||||
damageType, KFPRI, headshotLevel, lockonTime);
|
||||
FireDamageEffects( HeatDamage, instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
FireDamageEffects(HeatDamage, instigatedBy, hitLocation,
|
||||
momentum, damageType, headshotLevel, KFPRI);
|
||||
FrostEffects( instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
// Handle body parts damage components
|
||||
|
|
@ -1660,9 +1675,9 @@ function TakeDamageClient( int damage,
|
|||
headshotLevel, lockonTime);
|
||||
DoRightPainReaction( painDamage, instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
DealPartsDamage( bodyDamage, headDamage, instigatedBy,
|
||||
hitLocation, momentum, damageType, KFPRI,
|
||||
headshotLevel, lockonTime);
|
||||
DealPartsDamage( bodyDamage, headDamage,
|
||||
instigatedBy, hitLocation, momentum, damageType,
|
||||
KFPRI, headshotLevel, lockonTime);
|
||||
AddKillAssistant(instigatedBy, bodyDamage);
|
||||
// Rewrite values of last deal damage, instigator, etc.
|
||||
UpdateLastDamageVars( instigatedBy, bodyDamage, damageType,
|
||||
|
|
@ -1738,15 +1753,12 @@ function TakeDamage(int damage,
|
|||
}
|
||||
}
|
||||
function TakeFireDamage(int damage, Pawn instigator){
|
||||
local bool bLowFuel, bHighHeat;
|
||||
local Vector DummyHitLoc, DummyMomentum;
|
||||
super(Skaarj).TakeDamage( damage, instigator, dummyHitLoc,
|
||||
dummyMomentum, fireDamageClass);
|
||||
lastBurnDamage = damage;
|
||||
// Melt em' :)
|
||||
bHighHeat = heat > default.health / 20;
|
||||
bLowFuel = FlameFuel < 0.75 * InitFlameFuel;
|
||||
if(FlameFuel <= 0 || bHighHeat && bLowFuel)
|
||||
if(FlameFuel <= 0)
|
||||
ZombieCrispUp();
|
||||
}
|
||||
function TakeFrostDamage(int damage, Pawn instigator){
|
||||
|
|
@ -1769,34 +1781,43 @@ simulated function ZombieCrispUp(){
|
|||
Skins[3]=Combiner'PatchTex.Common.BurnSkinEmbers_cmb';
|
||||
}
|
||||
simulated function HeatTick(){
|
||||
local float iceDamage;
|
||||
local float iceDamage, heatDamage;
|
||||
|
||||
// Update heat value
|
||||
if(!bOnFire || flameFuel <= 0)
|
||||
heat *= heatDissipationRate;
|
||||
else{
|
||||
if(flameFuel < heat)
|
||||
heat = flameFuel * 1.1 + (heat - flameFuel) * heatDissipationRate;
|
||||
else
|
||||
else {
|
||||
if(flameFuel < heat) {
|
||||
heat = flameFuel * 1.1 + (heat - flameFuel) * heatDissipationRate;
|
||||
} else {
|
||||
heat = heat * 1.1;
|
||||
if(bFrugalFuelUsage)
|
||||
flameFuel -= heat;
|
||||
else
|
||||
flameFuel -= FMax(heat, InitFlameFuel / 15);
|
||||
}
|
||||
if (flameFuel >= 0) {
|
||||
// Burning always deals at least 5% damage (of the total fuel),
|
||||
// up to additional 5%, depending on the heat levels.
|
||||
heatDamage = 5 + 5 * FMin(heat, flameFuel) / initFlameFuel; // calc %
|
||||
heatDamage = FMin(flameFuel, healthMax * heatDamage / 100.0);
|
||||
flameFuel -= heatDamage;
|
||||
} else {
|
||||
// 5 damage for burning without fuel
|
||||
heatDamage = 5.0;
|
||||
}
|
||||
}
|
||||
CapHeat();
|
||||
if(Abs(heat) < 1)
|
||||
heat = 0.0;
|
||||
// Update on-fire status
|
||||
if(bOnFire){
|
||||
if(heat > 0)
|
||||
TakeFireDamage(heat + rand(5), burnInstigator);
|
||||
else{
|
||||
bBurnified = false;
|
||||
UnSetBurningBehavior();
|
||||
RemoveFlamingEffects();
|
||||
StopBurnFX();
|
||||
bOnFire = false;
|
||||
}
|
||||
if(heat > 0) {
|
||||
TakeFireDamage(heatDamage, burnInstigator);
|
||||
}
|
||||
else {
|
||||
bBurnified = false;
|
||||
UnSetBurningBehavior();
|
||||
RemoveFlamingEffects();
|
||||
StopBurnFX();
|
||||
bOnFire = false;
|
||||
}
|
||||
}
|
||||
// Update frozen status (always deal frost damage)
|
||||
iceCrustStrenght = FMax(iceCrustStrenght, heat);
|
||||
|
|
@ -1815,9 +1836,9 @@ simulated function HeatTick(){
|
|||
}
|
||||
simulated function SetBurningBehavior(){
|
||||
bBurningBehavior = true;
|
||||
if(default.Health >= 1000) return;
|
||||
if(Role == Role_Authority)
|
||||
Intelligence = BRAINS_Retarded;
|
||||
if(default.Health >= 1000) {
|
||||
return;
|
||||
}
|
||||
MovementAnims[0] = BurningWalkFAnims[Rand(3)];
|
||||
WalkAnims[0] = BurningWalkFAnims[Rand(3)];
|
||||
MovementAnims[1] = BurningWalkAnims[0];
|
||||
|
|
@ -1863,6 +1884,17 @@ simulated function UpdateGroundSpeed() {
|
|||
if (bDecapitated) {
|
||||
groundSpeed *= 0.8;
|
||||
}
|
||||
if (bCrispified) {
|
||||
groundSpeed *= 1.25;
|
||||
}
|
||||
}
|
||||
simulated function ModDamageFromZed(
|
||||
out int damage,
|
||||
class<DamageType> damageType
|
||||
) {
|
||||
if (bCrispified) {
|
||||
damage *= 2;
|
||||
}
|
||||
}
|
||||
// If this function returns `true`, then we shouldn't touch speed further,
|
||||
// because a speed hack was used for the zed
|
||||
|
|
@ -2093,8 +2125,8 @@ function float HeatIncScale(){
|
|||
return 100.0 / default.health;
|
||||
}
|
||||
function CapHeat(){
|
||||
heat = FMin(heat, 135 + rand(10) - 5);
|
||||
heat = FMax(heat, -150 + rand(10) - 5);
|
||||
heat = FMin(heat, MAX_HEAT);
|
||||
heat = FMax(heat, MIN_HEAT);
|
||||
}
|
||||
function bool TryMeleeReachTarget(out Vector hitLocation){
|
||||
local Actor hitActor;
|
||||
|
|
@ -2135,6 +2167,7 @@ function bool MeleeDamageTarget(int hitDamage, Vector pushDir){
|
|||
local KFHumanPawn kfHumanPawn;
|
||||
if(Level.netMode == NM_Client) return false;
|
||||
if(controller == none || controller.target == none) return false;
|
||||
ModDamageFromZed(hitDamage, niceZombieDamType);
|
||||
// Melee for doors
|
||||
kfHumanPawn = KFHumanPawn(controller.target);
|
||||
bTargetIsDoor = controller.target.IsA('KFDoorMover');
|
||||
|
|
@ -2291,7 +2324,6 @@ defaultproperties
|
|||
fuelRatio=0.750000
|
||||
heatDissipationRate=0.666000
|
||||
heatTicksPerSecond=3.000000
|
||||
bFrugalFuelUsage=True
|
||||
clientHeadshotScale=1.000000
|
||||
FrozenMaterial=Texture'HTec_A.Overlay.IceOverlay'
|
||||
ShatteredIce=class'NiceIceChunkEmitter'
|
||||
|
|
@ -2304,6 +2336,8 @@ defaultproperties
|
|||
stoppingRecoveryRate=0.025
|
||||
maxStoppingEffect=0.25
|
||||
minStoppingThreshold=0.0
|
||||
MIN_HEAT = -150.0
|
||||
MAX_HEAT = 135.0
|
||||
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
||||
KConvulseSpacing=(Max=2.200000)
|
||||
KLinearDamping=0.150000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue