Add stopping power mechanic
This commit is contained in:
parent
1bc35cc348
commit
0951574451
@ -102,31 +102,39 @@ simulated function ServerExplode
|
|||||||
local Vector dirToVictim;
|
local Vector dirToVictim;
|
||||||
local Vector hitLocation;
|
local Vector hitLocation;
|
||||||
local float scale1, scale2;
|
local float scale1, scale2;
|
||||||
|
local NiceMonster niceVictim;
|
||||||
if(Role < ROLE_Authority) return;
|
if(Role < ROLE_Authority) return;
|
||||||
foreach VisibleActors(class'Actor', victim, explRadius, explLocation){
|
foreach VisibleActors(class'Actor', victim, explRadius, explLocation){
|
||||||
if(victim == none || victim == self) continue;
|
if(victim == none || victim == self) continue;
|
||||||
if(victim.role < ROLE_Authority) continue;
|
if(victim.role < ROLE_Authority) continue;
|
||||||
if(ExtendedZCollision(victim) != none) continue;
|
if(ExtendedZCollision(victim) != none) continue;
|
||||||
if(Trigger(victim) != none) continue;
|
if(Trigger(victim) != none) continue;
|
||||||
dirToVictim = Normal(victim.location - explLocation);
|
dirToVictim = Normal(victim.location - explLocation);
|
||||||
hitLocation = victim.location - 0.5 *
|
hitLocation = victim.location - 0.5 *
|
||||||
(victim.collisionHeight + victim.collisionRadius) * dirToVictim;
|
(victim.collisionHeight + victim.collisionRadius) * dirToVictim;
|
||||||
CalculateDamageScales( scale1, scale2,
|
CalculateDamageScales( scale1, scale2,
|
||||||
victim, explLocation, explRadius, explExp);
|
victim, explLocation, explRadius, explExp);
|
||||||
// Deal main damage
|
// Deal main damage
|
||||||
if(scale1 > 0){
|
if(scale1 > 0){
|
||||||
ServerDealDamage( victim, explDamage * scale1, instigator,
|
ServerDealDamage( victim, explDamage * scale1, instigator,
|
||||||
hitLocation, scale1 * momentum * dirToVictim,
|
hitLocation, scale1 * momentum * dirToVictim,
|
||||||
explDmgType);
|
explDmgType);
|
||||||
}
|
}
|
||||||
// Deal secondary damage
|
// Deal secondary damage
|
||||||
if(allowDoubleExplosion && victim != none && scale2 > 0){
|
if(allowDoubleExplosion && victim != none && scale2 > 0){
|
||||||
ServerDealDamage( victim, explDamage * scale2, instigator,
|
ServerDealDamage( victim, explDamage * scale2, instigator,
|
||||||
hitLocation, scale2 * momentum * dirToVictim,
|
hitLocation, scale2 * momentum * dirToVictim,
|
||||||
explDmgType);
|
explDmgType);
|
||||||
}
|
}
|
||||||
if(NiceMonster(victim) != none && NiceMonster(victim).health <= 0)
|
niceVictim = NiceMonster(victim);
|
||||||
numKilled ++;
|
if(NiceMonster(victim) != none) {
|
||||||
|
if (NiceMonster(victim).health <= 0) {
|
||||||
|
numKilled += 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
niceVictim.concussionCountdown = 10.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(numKilled >= 4)
|
if(numKilled >= 4)
|
||||||
KFGameType(level.game).DramaticEvent(0.05);
|
KFGameType(level.game).DramaticEvent(0.05);
|
||||||
@ -272,9 +280,6 @@ simulated function HandleNiceDamageMechanicsAndSkills
|
|||||||
hasSkill(nicePlayer, class'NiceSkillCommandoTranquilizer');
|
hasSkill(nicePlayer, class'NiceSkillCommandoTranquilizer');
|
||||||
hasZEDFrenzy = class'NiceVeterancyTypes'.static.
|
hasZEDFrenzy = class'NiceVeterancyTypes'.static.
|
||||||
hasSkill(nicePlayer, class'NiceSkillMedicZEDFrenzy');
|
hasSkill(nicePlayer, class'NiceSkillMedicZEDFrenzy');
|
||||||
// Medic's suppression
|
|
||||||
if(hasTranquilizer)
|
|
||||||
niceZed.mind = FMin(niceZed.mind, 0.5);
|
|
||||||
// Medic's frenzy
|
// Medic's frenzy
|
||||||
if(hasZEDFrenzy && nicePlayer.IsZedTimeActive()){
|
if(hasZEDFrenzy && nicePlayer.IsZedTimeActive()){
|
||||||
niceZed.madnessCountDown =
|
niceZed.madnessCountDown =
|
||||||
|
@ -8,6 +8,7 @@ static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealt
|
|||||||
}
|
}
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
|
stoppingPower=0.5
|
||||||
stunMultiplier=0.600000
|
stunMultiplier=0.600000
|
||||||
bIsExplosive=True
|
bIsExplosive=True
|
||||||
DeathString="%o filled %k's body with shrapnel."
|
DeathString="%o filled %k's body with shrapnel."
|
||||||
|
@ -27,6 +27,7 @@ var const int MediumZedMinHealth; // If zed's base Health >= this
|
|||||||
var float PenDmgReduction; // Penetration damage reduction after hitting small zed
|
var float PenDmgReduction; // Penetration damage reduction after hitting small zed
|
||||||
var float penDecapReduction; // Penetration decapitaion effectiveness reduction after hitting small zed
|
var float penDecapReduction; // Penetration decapitaion effectiveness reduction after hitting small zed
|
||||||
var float penIncapReduction; // Penetration incapacitation (flinch or stun) effectiveness reduction after hitting small zed
|
var float penIncapReduction; // Penetration incapacitation (flinch or stun) effectiveness reduction after hitting small zed
|
||||||
|
var float stoppingPower; // How much stopping power the gun has - % amount zeds will be made to slow down when shot
|
||||||
var bool bIsProjectile; // If original damage type's version was derived from 'KFProjectileWeaponDamageType', then set this to true
|
var bool bIsProjectile; // If original damage type's version was derived from 'KFProjectileWeaponDamageType', then set this to true
|
||||||
// Scales exp gain according to given HardcoreLevel
|
// Scales exp gain according to given HardcoreLevel
|
||||||
static function float getScale(int HL){
|
static function float getScale(int HL){
|
||||||
@ -88,6 +89,7 @@ defaultproperties
|
|||||||
BigZedPenDmgReduction=0.500000
|
BigZedPenDmgReduction=0.500000
|
||||||
BigZedMinHealth=1000
|
BigZedMinHealth=1000
|
||||||
MediumZedPenDmgReduction=0.750000
|
MediumZedPenDmgReduction=0.750000
|
||||||
|
stoppingPower=0.0
|
||||||
MediumZedMinHealth=500
|
MediumZedMinHealth=500
|
||||||
PenDmgReduction=0.700000
|
PenDmgReduction=0.700000
|
||||||
PawnDamageEmitter=None
|
PawnDamageEmitter=None
|
||||||
|
@ -2,6 +2,7 @@ class NiceDamTypeKrissM extends NiceDamageTypeVetDemolitions
|
|||||||
abstract;
|
abstract;
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
|
stoppingPower=0.25
|
||||||
HeadShotDamageMult=1.500000
|
HeadShotDamageMult=1.500000
|
||||||
WeaponClass=class'NiceKrissMMedicGun'
|
WeaponClass=class'NiceKrissMMedicGun'
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ class NiceDamTypeM7A3M extends NiceDamageTypeVetDemolitions
|
|||||||
abstract;
|
abstract;
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
|
stoppingPower=0.15
|
||||||
HeadShotDamageMult=2.000000
|
HeadShotDamageMult=2.000000
|
||||||
WeaponClass=class'NiceM7A3MMedicGun'
|
WeaponClass=class'NiceM7A3MMedicGun'
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ class NiceDamTypeMP5M extends NiceDamageTypeVetDemolitions
|
|||||||
abstract;
|
abstract;
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
|
stoppingPower=0.15
|
||||||
HeadShotDamageMult=2.000000
|
HeadShotDamageMult=2.000000
|
||||||
WeaponClass=class'NiceMP5MMedicGun'
|
WeaponClass=class'NiceMP5MMedicGun'
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,6 @@ defaultproperties
|
|||||||
bPenetrationHSOnly=True
|
bPenetrationHSOnly=True
|
||||||
MaxPenetrations=1
|
MaxPenetrations=1
|
||||||
HeadShotDamageMult=2.250000
|
HeadShotDamageMult=2.250000
|
||||||
|
stoppingPower=0.15
|
||||||
WeaponClass=class'NiceMP7MMedicGun'
|
WeaponClass=class'NiceMP7MMedicGun'
|
||||||
}
|
}
|
||||||
|
@ -27,23 +27,20 @@ Ignores StartChargingFP;
|
|||||||
bFrustrated = false;
|
bFrustrated = false;
|
||||||
if(Controller != none)
|
if(Controller != none)
|
||||||
NiceZombieFleshPoundController(Controller).RageFrustrationTimer = 0;
|
NiceZombieFleshPoundController(Controller).RageFrustrationTimer = 0;
|
||||||
if( Health>0 && !bZapped )
|
|
||||||
{
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
|
||||||
|
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
ClientChargingAnims();
|
ClientChargingAnims();
|
||||||
|
|
||||||
NetUpdateTime = Level.TimeSeconds - 1;
|
NetUpdateTime = Level.TimeSeconds - 1;
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super(NiceMonster).UpdateGroundSpeed();
|
||||||
|
if (!bShotAnim) {
|
||||||
|
groundSpeed *= 2.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
function Tick( float Delta )
|
function Tick( float Delta )
|
||||||
{
|
{
|
||||||
if( !bShotAnim )
|
|
||||||
{
|
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);//2.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep the flesh pound moving toward its target when attacking
|
// Keep the flesh pound moving toward its target when attacking
|
||||||
if( Role == ROLE_Authority && bShotAnim)
|
if( Role == ROLE_Authority && bShotAnim)
|
||||||
{
|
{
|
||||||
|
@ -915,9 +915,16 @@ state Charging
|
|||||||
// How many charge attacks we can do randomly 1-3
|
// How many charge attacks we can do randomly 1-3
|
||||||
NumChargeAttacks = Rand(2) + 1;
|
NumChargeAttacks = Rand(2) + 1;
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
if (bShotAnim) {
|
||||||
|
groundSpeed *= 1.25;
|
||||||
|
} else {
|
||||||
|
groundSpeed *= 2.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
function EndState()
|
function EndState()
|
||||||
{
|
{
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
bChargingPlayer = False;
|
bChargingPlayer = False;
|
||||||
ChargeDamage = 0;
|
ChargeDamage = 0;
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
@ -942,7 +949,6 @@ state Charging
|
|||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
}
|
}
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
|
||||||
if( LookTarget!=none )
|
if( LookTarget!=none )
|
||||||
{
|
{
|
||||||
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
||||||
@ -956,16 +962,6 @@ state Charging
|
|||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zapping slows him down, but doesn't stop him
|
|
||||||
if( bZapped )
|
|
||||||
{
|
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.5);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 2.5);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Global.Tick(Delta);
|
Global.Tick(Delta);
|
||||||
@ -1071,7 +1067,6 @@ State Escaping extends Charging // Got hurt and running away...
|
|||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
}
|
}
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1081,23 +1076,20 @@ State Escaping extends Charging // Got hurt and running away...
|
|||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zapping slows him down, but doesn't stop him
|
|
||||||
if( bZapped )
|
|
||||||
{
|
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.5);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 2.5);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Global.Tick(Delta);
|
Global.Tick(Delta);
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
if (bShotAnim) {
|
||||||
|
groundSpeed *= 1.25;
|
||||||
|
} else {
|
||||||
|
groundSpeed *= 2.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
function EndState()
|
function EndState()
|
||||||
{
|
{
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
bChargingPlayer = False;
|
bChargingPlayer = False;
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
|
@ -98,6 +98,9 @@ defaultproperties
|
|||||||
HealthMax=8000.000000
|
HealthMax=8000.000000
|
||||||
Health=8000
|
Health=8000
|
||||||
HeadScale=1.300000
|
HeadScale=1.300000
|
||||||
|
stoppingRecoveryRate=0.1
|
||||||
|
maxStoppingEffect=0.2
|
||||||
|
minStoppingThreshold=0.6
|
||||||
MenuName="Nice Patriarch"
|
MenuName="Nice Patriarch"
|
||||||
MovementAnims(0)="WalkF"
|
MovementAnims(0)="WalkF"
|
||||||
MovementAnims(1)="WalkF"
|
MovementAnims(1)="WalkF"
|
||||||
|
@ -182,18 +182,6 @@ function TakeDamageClient(int Damage, Pawn InstigatedBy, Vector HitLocation, Vec
|
|||||||
if (bDecapitated)
|
if (bDecapitated)
|
||||||
Died(InstigatedBy.Controller, damageType, HitLocation);
|
Died(InstigatedBy.Controller, damageType, HitLocation);
|
||||||
}
|
}
|
||||||
function TakeFireDamage(int Damage, Pawn Instigator)
|
|
||||||
{
|
|
||||||
Super.TakeFireDamage(Damage, Instigator);
|
|
||||||
// Adjust movement speed if not charging
|
|
||||||
if (!bChargingPlayer)
|
|
||||||
{
|
|
||||||
if (bBurnified)
|
|
||||||
GroundSpeed = GetOriginalGroundSpeed() * BurnGroundSpeedMul;
|
|
||||||
else
|
|
||||||
GroundSpeed = GetOriginalGroundSpeed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function ClawDamageTarget()
|
function ClawDamageTarget()
|
||||||
{
|
{
|
||||||
local KFHumanPawn HumanTarget;
|
local KFHumanPawn HumanTarget;
|
||||||
@ -311,19 +299,16 @@ Ignores StartCharging;
|
|||||||
|
|
||||||
NetUpdateTime = Level.TimeSeconds - 1;
|
NetUpdateTime = Level.TimeSeconds - 1;
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
groundSpeed = groundSpeed + ((groundSpeed * 0.75 / maxRageCounter * (rageCounter + 1) * rageSpeedTween));
|
||||||
|
}
|
||||||
function EndState()
|
function EndState()
|
||||||
{
|
{
|
||||||
bChargingPlayer = false;
|
bChargingPlayer = false;
|
||||||
|
|
||||||
NiceZombieBruteController(Controller).RageFrustrationTimer = 0;
|
NiceZombieBruteController(Controller).RageFrustrationTimer = 0;
|
||||||
|
|
||||||
if (Health > 0)
|
|
||||||
{
|
|
||||||
GroundSpeed = GetOriginalGroundSpeed();
|
|
||||||
if (bBurnified)
|
|
||||||
GroundSpeed *= BurnGroundSpeedMul;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
ClientChargingAnims();
|
ClientChargingAnims();
|
||||||
|
|
||||||
@ -331,12 +316,8 @@ Ignores StartCharging;
|
|||||||
}
|
}
|
||||||
function Tick(float Delta)
|
function Tick(float Delta)
|
||||||
{
|
{
|
||||||
if (!bShotAnim)
|
if (!bShotAnim) {
|
||||||
{
|
|
||||||
RageSpeedTween = FClamp(RageSpeedTween + (Delta * 0.75), 0, 1.0);
|
RageSpeedTween = FClamp(RageSpeedTween + (Delta * 0.75), 0, 1.0);
|
||||||
GroundSpeed = OriginalGroundSpeed + ((OriginalGroundSpeed * 0.75 / MaxRageCounter * (RageCounter + 1) * RageSpeedTween));
|
|
||||||
if (bBurnified)
|
|
||||||
GroundSpeed *= BurnGroundSpeedMul;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Global.Tick(Delta);
|
Global.Tick(Delta);
|
||||||
|
@ -33,7 +33,6 @@ var bool bServerBlock;
|
|||||||
var bool bClientBlock;
|
var bool bClientBlock;
|
||||||
var float BlockDmgMul; // Multiplier for damage taken from blocked shots
|
var float BlockDmgMul; // Multiplier for damage taken from blocked shots
|
||||||
var float BlockFireDmgMul;
|
var float BlockFireDmgMul;
|
||||||
var float BurnGroundSpeedMul; // Multiplier for ground speed when burning
|
|
||||||
replication
|
replication
|
||||||
{
|
{
|
||||||
reliable if(Role == ROLE_Authority)
|
reliable if(Role == ROLE_Authority)
|
||||||
@ -61,7 +60,6 @@ defaultproperties
|
|||||||
BlockAddScale=2.500000
|
BlockAddScale=2.500000
|
||||||
BlockDmgMul=0.100000
|
BlockDmgMul=0.100000
|
||||||
BlockFireDmgMul=1.000000
|
BlockFireDmgMul=1.000000
|
||||||
BurnGroundSpeedMul=0.700000
|
|
||||||
StunThreshold=4.000000
|
StunThreshold=4.000000
|
||||||
flameFuel=0.500000
|
flameFuel=0.500000
|
||||||
clientHeadshotScale=1.300000
|
clientHeadshotScale=1.300000
|
||||||
@ -110,6 +108,7 @@ defaultproperties
|
|||||||
Health=1000
|
Health=1000
|
||||||
HeadHeight=2.500000
|
HeadHeight=2.500000
|
||||||
HeadScale=1.300000
|
HeadScale=1.300000
|
||||||
|
minStoppingThreshold=0.1
|
||||||
MenuName="Brute"
|
MenuName="Brute"
|
||||||
MovementAnims(0)="BruteWalkC"
|
MovementAnims(0)="BruteWalkC"
|
||||||
MovementAnims(1)="BruteWalkC"
|
MovementAnims(1)="BruteWalkC"
|
||||||
|
@ -49,7 +49,6 @@ function SetMindControlled(bool bNewMindControlled)
|
|||||||
|
|
||||||
if( bNewMindControlled != bZedUnderControl )
|
if( bNewMindControlled != bZedUnderControl )
|
||||||
{
|
{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
|
||||||
Health *= 1.25;
|
Health *= 1.25;
|
||||||
HealthMax *= 1.25;
|
HealthMax *= 1.25;
|
||||||
}
|
}
|
||||||
@ -252,21 +251,21 @@ Ignores StartChargingFP;
|
|||||||
if(fpController == none)
|
if(fpController == none)
|
||||||
fpController.RageFrustrationTimer = 0;
|
fpController.RageFrustrationTimer = 0;
|
||||||
|
|
||||||
if( Health>0 && !bZapped )
|
|
||||||
{
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
|
||||||
|
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
ClientChargingAnims();
|
ClientChargingAnims();
|
||||||
|
|
||||||
NetUpdateTime = Level.TimeSeconds - 1;
|
NetUpdateTime = Level.TimeSeconds - 1;
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
if (!bShotAnim) {
|
||||||
|
groundSpeed *= 2.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
function Tick( float Delta )
|
function Tick( float Delta )
|
||||||
{
|
{
|
||||||
if( !bShotAnim )
|
if( !bShotAnim )
|
||||||
{
|
{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);//2.0;
|
|
||||||
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
||||||
{
|
{
|
||||||
GoToState('');
|
GoToState('');
|
||||||
@ -330,11 +329,16 @@ Ignores StartChargingFP;
|
|||||||
state ChargeToMarker extends RageCharging
|
state ChargeToMarker extends RageCharging
|
||||||
{
|
{
|
||||||
Ignores StartChargingFP;
|
Ignores StartChargingFP;
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
if (!bShotAnim) {
|
||||||
|
groundSpeed *= 2.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
function Tick( float Delta )
|
function Tick( float Delta )
|
||||||
{
|
{
|
||||||
if( !bShotAnim )
|
if( !bShotAnim )
|
||||||
{
|
{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);
|
|
||||||
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
||||||
{
|
{
|
||||||
GoToState('');
|
GoToState('');
|
||||||
|
@ -80,6 +80,8 @@ defaultproperties
|
|||||||
Health=1650
|
Health=1650
|
||||||
HeadHeight=2.500000
|
HeadHeight=2.500000
|
||||||
HeadScale=1.300000
|
HeadScale=1.300000
|
||||||
|
maxStoppingEffect=0.05
|
||||||
|
minStoppingThreshold=0.68
|
||||||
MenuName="Nice Flesh Pound"
|
MenuName="Nice Flesh Pound"
|
||||||
MovementAnims(0)="PoundWalk"
|
MovementAnims(0)="PoundWalk"
|
||||||
MovementAnims(1)="WalkB"
|
MovementAnims(1)="WalkB"
|
||||||
|
@ -45,7 +45,6 @@ function SetMindControlled(bool bNewMindControlled)
|
|||||||
|
|
||||||
if( bNewMindControlled != bZedUnderControl )
|
if( bNewMindControlled != bZedUnderControl )
|
||||||
{
|
{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
|
||||||
Health *= 1.25;
|
Health *= 1.25;
|
||||||
HealthMax *= 1.25;
|
HealthMax *= 1.25;
|
||||||
}
|
}
|
||||||
@ -73,13 +72,6 @@ function RangedAttack(Actor A){
|
|||||||
if(!bShotAnim && !bDecapitated && VSize(A.Location - Location) <= 700)
|
if(!bShotAnim && !bDecapitated && VSize(A.Location - Location) <= 700)
|
||||||
GoToState('RunningState');
|
GoToState('RunningState');
|
||||||
}
|
}
|
||||||
simulated function Tick(float DeltaTime){
|
|
||||||
super.Tick(DeltaTime);
|
|
||||||
if(IsInState('RunningState'))
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed() * 1.875);
|
|
||||||
else
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
|
||||||
state RunningState{
|
state RunningState{
|
||||||
// Set the zed to the zapped behavior
|
// Set the zed to the zapped behavior
|
||||||
simulated function SetZappedBehavior(){
|
simulated function SetZappedBehavior(){
|
||||||
@ -94,7 +86,6 @@ state RunningState{
|
|||||||
if(bZapped)
|
if(bZapped)
|
||||||
GoToState('');
|
GoToState('');
|
||||||
else{
|
else{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.875);
|
|
||||||
bRunning = true;
|
bRunning = true;
|
||||||
if(Level.NetMode != NM_DedicatedServer)
|
if(Level.NetMode != NM_DedicatedServer)
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
@ -103,7 +94,6 @@ state RunningState{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function EndState(){
|
function EndState(){
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
bRunning = false;
|
bRunning = false;
|
||||||
if(Level.NetMode != NM_DedicatedServer)
|
if(Level.NetMode != NM_DedicatedServer)
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
@ -112,6 +102,10 @@ state RunningState{
|
|||||||
|
|
||||||
NetUpdateTime = Level.TimeSeconds - 1;
|
NetUpdateTime = Level.TimeSeconds - 1;
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
groundSpeed *= 1.875;
|
||||||
|
}
|
||||||
function RemoveHead(){
|
function RemoveHead(){
|
||||||
GoToState('');
|
GoToState('');
|
||||||
Global.RemoveHead();
|
Global.RemoveHead();
|
||||||
|
@ -60,6 +60,7 @@ defaultproperties
|
|||||||
HeadHeight=1.000000
|
HeadHeight=1.000000
|
||||||
HeadScale=1.350000
|
HeadScale=1.350000
|
||||||
AmbientSoundScaling=8.000000
|
AmbientSoundScaling=8.000000
|
||||||
|
stoppingRecoveryRate=0.05
|
||||||
MenuName="Nice Husk"
|
MenuName="Nice Husk"
|
||||||
MovementAnims(0)="WalkF"
|
MovementAnims(0)="WalkF"
|
||||||
MovementAnims(1)="WalkB"
|
MovementAnims(1)="WalkB"
|
||||||
|
@ -105,15 +105,11 @@ State SawingLoop
|
|||||||
else GoToState('');
|
else GoToState('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
simulated function float GetOriginalGroundSpeed()
|
simulated function UpdateGroundSpeed() {
|
||||||
{
|
super.UpdateGroundSpeed();
|
||||||
local float result;
|
if (bWasRaged || bCharging) {
|
||||||
result = OriginalGroundSpeed;
|
groundSpeed *= 3.5;
|
||||||
if ( bWasRaged || bCharging )
|
}
|
||||||
result *= 3.5;
|
|
||||||
else if( bZedUnderControl )
|
|
||||||
result *= 1.25;
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
state RunningState
|
state RunningState
|
||||||
{
|
{
|
||||||
@ -124,7 +120,6 @@ state RunningState
|
|||||||
GoToState('');
|
GoToState('');
|
||||||
else {
|
else {
|
||||||
bCharging = true;
|
bCharging = true;
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
NetUpdateTime = Level.TimeSeconds - 1;
|
NetUpdateTime = Level.TimeSeconds - 1;
|
||||||
@ -133,8 +128,6 @@ state RunningState
|
|||||||
function EndState()
|
function EndState()
|
||||||
{
|
{
|
||||||
bCharging = False;
|
bCharging = False;
|
||||||
if( !bZapped )
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
}
|
}
|
||||||
@ -163,6 +156,8 @@ defaultproperties
|
|||||||
ChallengeSound(2)=None
|
ChallengeSound(2)=None
|
||||||
ChallengeSound(3)=None
|
ChallengeSound(3)=None
|
||||||
ScoringValue=300
|
ScoringValue=300
|
||||||
|
maxStoppingEffect=0.25
|
||||||
|
minStoppingThreshold=0.25
|
||||||
MenuName="Jason"
|
MenuName="Jason"
|
||||||
AmbientSound=Sound'ScrnZedPack_S.Jason.Jason_Sound'
|
AmbientSound=Sound'ScrnZedPack_S.Jason.Jason_Sound'
|
||||||
Mesh=SkeletalMesh'ScrnZedPack_A.JasonMesh'
|
Mesh=SkeletalMesh'ScrnZedPack_A.JasonMesh'
|
||||||
|
@ -83,7 +83,6 @@ function SetMindControlled(bool bNewMindControlled)
|
|||||||
|
|
||||||
if( bNewMindControlled != bZedUnderControl )
|
if( bNewMindControlled != bZedUnderControl )
|
||||||
{
|
{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
|
||||||
Health *= 1.25;
|
Health *= 1.25;
|
||||||
HealthMax *= 1.25;
|
HealthMax *= 1.25;
|
||||||
}
|
}
|
||||||
@ -185,8 +184,9 @@ state RunningState
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
simulated function float GetOriginalGroundSpeed() {
|
simulated function UpdateGroundSpeed() {
|
||||||
return 3.5 * OriginalGroundSpeed;
|
super.UpdateGroundSpeed();
|
||||||
|
groundSpeed *= 3.5;
|
||||||
}
|
}
|
||||||
function BeginState(){
|
function BeginState(){
|
||||||
local NiceHumanPawn rageTarget, rageCause;
|
local NiceHumanPawn rageTarget, rageCause;
|
||||||
@ -214,7 +214,6 @@ state RunningState
|
|||||||
if(bZapped)
|
if(bZapped)
|
||||||
GoToState('');
|
GoToState('');
|
||||||
else{
|
else{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * 3.5);
|
|
||||||
bCharging = true;
|
bCharging = true;
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
@ -224,10 +223,6 @@ state RunningState
|
|||||||
}
|
}
|
||||||
function EndState()
|
function EndState()
|
||||||
{
|
{
|
||||||
if( !bZapped )
|
|
||||||
{
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
|
||||||
bCharging = False;
|
bCharging = False;
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
@ -265,8 +260,9 @@ State SawingLoop
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
simulated function float GetOriginalGroundSpeed() {
|
simulated function UpdateGroundSpeed() {
|
||||||
return OriginalGroundSpeed * AttackChargeRate;
|
super.UpdateGroundSpeed();
|
||||||
|
groundSpeed *= attackChargeRate;
|
||||||
}
|
}
|
||||||
function bool CanGetOutOfWay()
|
function bool CanGetOutOfWay()
|
||||||
{
|
{
|
||||||
@ -279,7 +275,6 @@ State SawingLoop
|
|||||||
// Randomly have the scrake charge during an attack so it will be less predictable
|
// Randomly have the scrake charge during an attack so it will be less predictable
|
||||||
if(Health/HealthMax < 0.5 || FRand() <= 0.95)
|
if(Health/HealthMax < 0.5 || FRand() <= 0.95)
|
||||||
{
|
{
|
||||||
SetGroundSpeed(OriginalGroundSpeed * AttackChargeRate);
|
|
||||||
bCharging = true;
|
bCharging = true;
|
||||||
if( Level.NetMode!=NM_DedicatedServer )
|
if( Level.NetMode!=NM_DedicatedServer )
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
@ -327,8 +322,6 @@ State SawingLoop
|
|||||||
{
|
{
|
||||||
AmbientSound=default.AmbientSound;
|
AmbientSound=default.AmbientSound;
|
||||||
MeleeDamage = Max( DifficultyDamageModifer() * default.MeleeDamage, 1 );
|
MeleeDamage = Max( DifficultyDamageModifer() * default.MeleeDamage, 1 );
|
||||||
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
bCharging = False;
|
bCharging = False;
|
||||||
if(Level.NetMode != NM_DedicatedServer)
|
if(Level.NetMode != NM_DedicatedServer)
|
||||||
PostNetReceive();
|
PostNetReceive();
|
||||||
|
@ -63,6 +63,8 @@ defaultproperties
|
|||||||
HealthMax=1000.000000
|
HealthMax=1000.000000
|
||||||
Health=1000
|
Health=1000
|
||||||
HeadHeight=2.200000
|
HeadHeight=2.200000
|
||||||
|
maxStoppingEffect=0.15
|
||||||
|
minStoppingThreshold=0.15
|
||||||
MenuName="Nice Scrake"
|
MenuName="Nice Scrake"
|
||||||
MovementAnims(0)="SawZombieWalk"
|
MovementAnims(0)="SawZombieWalk"
|
||||||
MovementAnims(1)="SawZombieWalk"
|
MovementAnims(1)="SawZombieWalk"
|
||||||
|
@ -179,7 +179,6 @@ state Running
|
|||||||
Global.Tick(Delta);
|
Global.Tick(Delta);
|
||||||
if (RunUntilTime < Level.TimeSeconds)
|
if (RunUntilTime < Level.TimeSeconds)
|
||||||
GotoState('');
|
GotoState('');
|
||||||
GroundSpeed = GetOriginalGroundSpeed();
|
|
||||||
}
|
}
|
||||||
function BeginState()
|
function BeginState()
|
||||||
{
|
{
|
||||||
@ -190,13 +189,12 @@ state Running
|
|||||||
function EndState()
|
function EndState()
|
||||||
{
|
{
|
||||||
bRunning = false;
|
bRunning = false;
|
||||||
GroundSpeed = global.GetOriginalGroundSpeed();
|
|
||||||
RunCooldownEnd = Level.TimeSeconds + PeriodRunCoolBase + FRand() * PeriodRunCoolRan;
|
RunCooldownEnd = Level.TimeSeconds + PeriodRunCoolBase + FRand() * PeriodRunCoolRan;
|
||||||
MovementAnims[0] = WalkAnim;
|
MovementAnims[0] = WalkAnim;
|
||||||
}
|
}
|
||||||
function float GetOriginalGroundSpeed()
|
simulated function UpdateGroundSpeed() {
|
||||||
{
|
super.UpdateGroundSpeed();
|
||||||
return global.GetOriginalGroundSpeed() * 2.5;
|
groundSpeed *= 2.5;
|
||||||
}
|
}
|
||||||
function bool CanSpeedAdjust()
|
function bool CanSpeedAdjust()
|
||||||
{
|
{
|
||||||
@ -219,14 +217,6 @@ simulated function bool AnimNeedsWait(name TestAnim)
|
|||||||
}
|
}
|
||||||
return ExpectingChannel == 0;
|
return ExpectingChannel == 0;
|
||||||
}
|
}
|
||||||
simulated function float GetOriginalGroundSpeed()
|
|
||||||
{
|
|
||||||
local float result;
|
|
||||||
result = OriginalGroundSpeed;
|
|
||||||
if( bZedUnderControl )
|
|
||||||
result *= 1.25;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
simulated function HandleAnimation(float Delta)
|
simulated function HandleAnimation(float Delta)
|
||||||
{
|
{
|
||||||
// hehehe
|
// hehehe
|
||||||
|
@ -281,6 +281,12 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
|||||||
function RemoveHead(){
|
function RemoveHead(){
|
||||||
Super.RemoveHead();
|
Super.RemoveHead();
|
||||||
}
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
super.UpdateGroundSpeed();
|
||||||
|
if (bShotAnim) {
|
||||||
|
groundSpeed *= 0.65;
|
||||||
|
}
|
||||||
|
}
|
||||||
simulated function Tick( float Delta )
|
simulated function Tick( float Delta )
|
||||||
{
|
{
|
||||||
local float currScreamTime;
|
local float currScreamTime;
|
||||||
@ -295,17 +301,11 @@ simulated function Tick( float Delta )
|
|||||||
{
|
{
|
||||||
if( bShotAnim )
|
if( bShotAnim )
|
||||||
{
|
{
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed() * 0.65);
|
|
||||||
|
|
||||||
if( LookTarget!=none )
|
if( LookTarget!=none )
|
||||||
{
|
{
|
||||||
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(Role == ROLE_Authority && screamStartTime > 0){
|
if(Role == ROLE_Authority && screamStartTime > 0){
|
||||||
currScreamTime = Level.TimeSeconds - screamStartTime;
|
currScreamTime = Level.TimeSeconds - screamStartTime;
|
||||||
|
@ -709,7 +709,6 @@ defaultproperties
|
|||||||
HealEnergyDrain=0.200000
|
HealEnergyDrain=0.200000
|
||||||
ProjectileFireInterval=5.000000
|
ProjectileFireInterval=5.000000
|
||||||
BurnDamageScale=1.000000
|
BurnDamageScale=1.000000
|
||||||
mind=0.000000
|
|
||||||
bFireImmune=False
|
bFireImmune=False
|
||||||
MoanVoice=SoundGroup'KF_EnemiesFinalSnd_CIRCUS.Husk.Husk_Talk'
|
MoanVoice=SoundGroup'KF_EnemiesFinalSnd_CIRCUS.Husk.Husk_Talk'
|
||||||
BleedOutDuration=5.000000
|
BleedOutDuration=5.000000
|
||||||
|
@ -24,6 +24,7 @@ class NiceMonster extends KFMonster
|
|||||||
#exec OBJ LOAD FILE=KF_EnemyGlobalSndTwo.uax
|
#exec OBJ LOAD FILE=KF_EnemyGlobalSndTwo.uax
|
||||||
#exec OBJ LOAD FILE=KFZED_FX_T.utx
|
#exec OBJ LOAD FILE=KFZED_FX_T.utx
|
||||||
|
|
||||||
|
var bool initializationComplete;
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// > Affliction system
|
// > Affliction system
|
||||||
@ -75,13 +76,15 @@ var float stunLoopStart, stunLoopEnd, idleInsertFrame;
|
|||||||
var bool bWasIdleStun; // Were we using idleanimation for stun?
|
var bool bWasIdleStun; // Were we using idleanimation for stun?
|
||||||
var float prevStunAnimFrame; // At which tick we were?
|
var float prevStunAnimFrame; // At which tick we were?
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// >> Another default stun system allows tostuns zeds by repeatedly dealing
|
// >> Another default stun system allows to stun zeds by repeatedly dealing
|
||||||
// head damage to them fast enough:
|
// head damage to them fast enough:
|
||||||
// 1. Dealing head damage increases accumulated damage
|
// 1. Dealing head damage increases accumulated damage
|
||||||
// 2. If head damage was received for a certain time period, -
|
// 2. If head damage was received for a certain time period, -
|
||||||
// accumulated damage starts to decrease
|
// accumulated damage starts to decrease
|
||||||
// 3. If accumulated damage is high enough, passes 'IsStunPossible' check
|
// 3. If accumulated damage is high enough, passes 'IsStunPossible' check
|
||||||
// and has low enough mind level - normal duration stun activates
|
// - normal duration stun activates
|
||||||
|
// How much more time will this zed spend concussed?
|
||||||
|
var float concussionCountdown;
|
||||||
// Accumulated head damage
|
// Accumulated head damage
|
||||||
var float accHeadDamage;
|
var float accHeadDamage;
|
||||||
// Rate (per second) at which accumulated head damage diminishes
|
// Rate (per second) at which accumulated head damage diminishes
|
||||||
@ -91,16 +94,6 @@ var float headRecoveryTime;
|
|||||||
// Count down variable for above mentioned time
|
// Count down variable for above mentioned time
|
||||||
var float headRecoveryCountDown;
|
var float headRecoveryCountDown;
|
||||||
|
|
||||||
//==============================================================================
|
|
||||||
//==============================================================================
|
|
||||||
// > Mind system
|
|
||||||
// Largly underdeveloped and currently only exists to decide whether or not
|
|
||||||
// zed can be stunned by accumulating head damage
|
|
||||||
// Current mind level (1.0 - default and maximum value)
|
|
||||||
var float mind;
|
|
||||||
// Treshold, required for stun by accumulated head damage
|
|
||||||
var float accStunMindLvl;
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// > Temperature system
|
// > Temperature system
|
||||||
@ -148,16 +141,14 @@ var bool bFrugalFuelUsage;
|
|||||||
// Is a value from 0.0 to 1.0 and `1 - stoppingEffect` acts as speed multiplier
|
// Is a value from 0.0 to 1.0 and `1 - stoppingEffect` acts as speed multiplier
|
||||||
// for the zed
|
// for the zed
|
||||||
var float stoppingEffect;
|
var float stoppingEffect;
|
||||||
// (Absolute) Point in time at which recovery would start, updated when zeds
|
// How much stopping effect would be recovred in a second
|
||||||
// receives another stopping effect from somewhere
|
|
||||||
var float stoppingRecoveryStartTime;
|
|
||||||
// How much stopping effect would be rcovred in a second
|
|
||||||
var float stoppingRecoveryRate;
|
var float stoppingRecoveryRate;
|
||||||
// Maximum stopping effect this zed can tank
|
// Maximum `stoppingEffect` value zed can accumulate
|
||||||
var float maxStoppingEffect;
|
var float maxStoppingEffect;
|
||||||
// Minimal stopping threshold for the zed (supposed to be subtracted from
|
// Minimal stopping threshold for the zed (supposed to be subtracted from
|
||||||
// incoming effects' strenght).
|
// incoming effects' strenght).
|
||||||
var float minStoppingThreshold;
|
var float minStoppingThreshold;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// > Miscellaneous variables
|
// > Miscellaneous variables
|
||||||
@ -241,6 +232,7 @@ simulated function PostBeginPlay(){
|
|||||||
SavedExtCollision = MyExtCollision.bCollideActors;
|
SavedExtCollision = MyExtCollision.bCollideActors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
initializationComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@ -381,6 +373,15 @@ simulated function FearTick(float deltaTime){
|
|||||||
+ 0.75 * accelRate * Normal(Location - fearCenter);
|
+ 0.75 * accelRate * Normal(Location - fearCenter);
|
||||||
}
|
}
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
// >> Decrease active stopping power on the zed as the time goes by
|
||||||
|
simulated function StoppingPowerTick(float deltaTime) {
|
||||||
|
if (stoppingEffect <= 0.0 || concussionCountdown > 0.0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
stoppingEffect -= deltaTime * stoppingRecoveryRate;
|
||||||
|
stoppingEffect = FMax(0, stoppingEffect);
|
||||||
|
}
|
||||||
|
//==============================================================================
|
||||||
// >> Set of functions to handle animation changes during stun
|
// >> Set of functions to handle animation changes during stun
|
||||||
simulated function CalcRemainigStunStructure( name seqName,
|
simulated function CalcRemainigStunStructure( name seqName,
|
||||||
float oFrame,
|
float oFrame,
|
||||||
@ -470,14 +471,14 @@ simulated function StunTick(float deltaTime){
|
|||||||
}
|
}
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// >> Set of functions to handle stun from head damage accumulation
|
// >> Set of functions to handle stun from head damage accumulation
|
||||||
function AccumulateHeadDamage( float addDamage,
|
function AccumulateHeadDamage( float addDamage,
|
||||||
bool bIsHeadshot,
|
bool bIsHeadshot,
|
||||||
NicePlayerController nicePlayer){
|
NicePlayerController nicePlayer){
|
||||||
if(bIsHeadshot){
|
if(bIsHeadshot){
|
||||||
AccHeadDamage += addDamage;
|
AccHeadDamage += addDamage;
|
||||||
HeadRecoveryCountDown = HeadRecoveryTime;
|
HeadRecoveryCountDown = HeadRecoveryTime;
|
||||||
if(AccHeadDamage > (default.HeadHealth / 1.5)
|
if(AccHeadDamage > (default.HeadHealth / 1.5)
|
||||||
&& (Mind <= AccStunMindLvl && IsStunPossible()))
|
&& (concussionCountdown > 0.0 && IsStunPossible()))
|
||||||
DoStun(nicePlayer.pawn,,,, 1.0);
|
DoStun(nicePlayer.pawn,,,, 1.0);
|
||||||
}
|
}
|
||||||
else if(HeadRecoveryCountDown > 0.0)
|
else if(HeadRecoveryCountDown > 0.0)
|
||||||
@ -485,11 +486,13 @@ function AccumulateHeadDamage( float addDamage,
|
|||||||
HeadRecoveryTime / 2);
|
HeadRecoveryTime / 2);
|
||||||
}
|
}
|
||||||
function HeadDamageRecoveryTick(float delta){
|
function HeadDamageRecoveryTick(float delta){
|
||||||
HeadRecoveryCountDown -= delta;
|
concussionCountdown -= delta;
|
||||||
HeadRecoveryCountDown = FMax(0.0, HeadRecoveryCountDown);
|
concussionCountdown = FMax(0.0, concussionCountdown);
|
||||||
if(HeadRecoveryCountDown <= 0.0)
|
headRecoveryCountDown -= delta;
|
||||||
AccHeadDamage -= delta * HeadDamageRecoveryRate;
|
headRecoveryCountDown = FMax(0.0, headRecoveryCountDown);
|
||||||
AccHeadDamage = FMax(AccHeadDamage, 0.0);
|
if(headRecoveryCountDown <= 0.0)
|
||||||
|
accHeadDamage -= delta * HeadDamageRecoveryRate;
|
||||||
|
accHeadDamage = FMax(accHeadDamage, 0.0);
|
||||||
}
|
}
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// >> Function that calls actual 'HeatTick' when needed
|
// >> Function that calls actual 'HeatTick' when needed
|
||||||
@ -546,15 +549,6 @@ simulated function FakeHeatTick(float deltaTime){
|
|||||||
// >> Ticks from TWI's code
|
// >> Ticks from TWI's code
|
||||||
// Updates zed's speed if it's not relevant;
|
// Updates zed's speed if it's not relevant;
|
||||||
// code, specific to standalone game and listen servers was cut out
|
// code, specific to standalone game and listen servers was cut out
|
||||||
simulated function NonRelevantSpeedupTick(float deltaTime){
|
|
||||||
if(Level.netMode == NM_Client || !CanSpeedAdjust()) return;
|
|
||||||
if(Level.TimeSeconds - LastReplicateTime > 0.5)
|
|
||||||
SetGroundSpeed(default.GroundSpeed * (300.0 / default.GroundSpeed));
|
|
||||||
else{
|
|
||||||
LastSeenOrRelevantTime = Level.TimeSeconds;
|
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Kill zed if it has been bleeding long enough
|
// Kill zed if it has been bleeding long enough
|
||||||
simulated function BleedOutTick(float deltaTick)
|
simulated function BleedOutTick(float deltaTick)
|
||||||
@ -605,7 +599,6 @@ simulated function TWITick(float deltaTime){
|
|||||||
// If we've flagged this character to be destroyed next tick, handle that
|
// If we've flagged this character to be destroyed next tick, handle that
|
||||||
if(bDestroyNextTick && TimeSetDestroyNextTickTime < Level.TimeSeconds)
|
if(bDestroyNextTick && TimeSetDestroyNextTickTime < Level.TimeSeconds)
|
||||||
Destroy();
|
Destroy();
|
||||||
NonRelevantSpeedupTick(deltaTime);
|
|
||||||
// Reset AnimAction
|
// Reset AnimAction
|
||||||
if(bResetAnimAct && ResetAnimActTime < Level.TimeSeconds){
|
if(bResetAnimAct && ResetAnimActTime < Level.TimeSeconds){
|
||||||
AnimAction = '';
|
AnimAction = '';
|
||||||
@ -628,8 +621,10 @@ simulated function Tick(float deltaTime){
|
|||||||
DecapTick(deltaTime);
|
DecapTick(deltaTime);
|
||||||
FearTick(deltaTime);
|
FearTick(deltaTime);
|
||||||
StunTick(deltaTime);
|
StunTick(deltaTime);
|
||||||
|
StoppingPowerTick(deltaTime);
|
||||||
HeadDamageRecoveryTick(deltaTime);
|
HeadDamageRecoveryTick(deltaTime);
|
||||||
FakeHeatTick(deltaTime);
|
FakeHeatTick(deltaTime);
|
||||||
|
UpdateGroundSpeed();
|
||||||
// TWI's tick
|
// TWI's tick
|
||||||
TWITick(deltaTime);
|
TWITick(deltaTime);
|
||||||
}
|
}
|
||||||
@ -1613,7 +1608,7 @@ function UnFreeze(){
|
|||||||
GroundSpeed = GetOriginalGroundSpeed();
|
GroundSpeed = GetOriginalGroundSpeed();
|
||||||
bFrozenZed = false;
|
bFrozenZed = false;
|
||||||
}
|
}
|
||||||
function TakeDamageClient( int damage,
|
function TakeDamageClient( int damage,
|
||||||
Pawn instigatedBy,
|
Pawn instigatedBy,
|
||||||
Vector hitLocation,
|
Vector hitLocation,
|
||||||
Vector momentum,
|
Vector momentum,
|
||||||
@ -1632,22 +1627,24 @@ function TakeDamageClient( int damage,
|
|||||||
KFPRI = KFPlayerReplicationInfo(instigatedBy.PlayerReplicationInfo);
|
KFPRI = KFPlayerReplicationInfo(instigatedBy.PlayerReplicationInfo);
|
||||||
if(headHealth <= 0)
|
if(headHealth <= 0)
|
||||||
headshotLevel = 0.0;
|
headshotLevel = 0.0;
|
||||||
|
// Handle special weapon effects
|
||||||
|
HandleStoppingPower(damageType, headshotLevel);
|
||||||
// Handle elemental damage components
|
// Handle elemental damage components
|
||||||
ExtractElementalDamage( regDamage, heatDamage, damage,
|
ExtractElementalDamage(regDamage, heatDamage, damage,
|
||||||
instigatedBy, hitLocation, momentum,
|
instigatedBy, hitLocation, momentum,
|
||||||
damageType, KFPRI, headshotLevel, lockonTime);
|
damageType, KFPRI, headshotLevel, lockonTime);
|
||||||
FireDamageEffects( HeatDamage, instigatedBy, hitLocation, momentum,
|
FireDamageEffects( HeatDamage, instigatedBy, hitLocation, momentum,
|
||||||
damageType, headshotLevel, KFPRI);
|
damageType, headshotLevel, KFPRI);
|
||||||
FrostEffects( instigatedBy, hitLocation, momentum,
|
FrostEffects( instigatedBy, hitLocation, momentum,
|
||||||
damageType, headshotLevel, KFPRI);
|
damageType, headshotLevel, KFPRI);
|
||||||
// Handle body parts damage components
|
// Handle body parts damage components
|
||||||
ExtractPartsDamage( bodyDamage, headDamage, painDamage,
|
ExtractPartsDamage( bodyDamage, headDamage, painDamage,
|
||||||
RegDamage + HeatDamage, instigatedBy,
|
RegDamage + HeatDamage, instigatedBy,
|
||||||
hitLocation, momentum, damageType, KFPRI,
|
hitLocation, momentum, damageType, KFPRI,
|
||||||
headshotLevel, lockonTime);
|
headshotLevel, lockonTime);
|
||||||
DoRightPainReaction( painDamage, instigatedBy, hitLocation, momentum,
|
DoRightPainReaction( painDamage, instigatedBy, hitLocation, momentum,
|
||||||
damageType, headshotLevel, KFPRI);
|
damageType, headshotLevel, KFPRI);
|
||||||
DealPartsDamage( bodyDamage, headDamage, instigatedBy,
|
DealPartsDamage( bodyDamage, headDamage, instigatedBy,
|
||||||
hitLocation, momentum, damageType, KFPRI,
|
hitLocation, momentum, damageType, KFPRI,
|
||||||
headshotLevel, lockonTime);
|
headshotLevel, lockonTime);
|
||||||
AddKillAssistant(instigatedBy, bodyDamage);
|
AddKillAssistant(instigatedBy, bodyDamage);
|
||||||
@ -1658,6 +1655,28 @@ function TakeDamageClient( int damage,
|
|||||||
// like why the fuck is it being done HERE? Makes no fucking sense
|
// like why the fuck is it being done HERE? Makes no fucking sense
|
||||||
bBackstabbed = false;
|
bBackstabbed = false;
|
||||||
}
|
}
|
||||||
|
function HandleStoppingPower(
|
||||||
|
class<NiceWeaponDamageType> damageType,
|
||||||
|
float headshotLevel
|
||||||
|
) {
|
||||||
|
local float strength;
|
||||||
|
local float actualMinStoppingThreshold, actualMaxStoppingEffect;
|
||||||
|
|
||||||
|
strength = damageType.default.stoppingPower;
|
||||||
|
if (headshotLevel > 0.0) {
|
||||||
|
strength *= 2;
|
||||||
|
}
|
||||||
|
if (concussionCountdown > 0) {
|
||||||
|
actualMinStoppingThreshold = FMax(0.0, minStoppingThreshold - 0.2);
|
||||||
|
actualMaxStoppingEffect = FMin(0.9, maxStoppingEffect + 0.2);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
actualMinStoppingThreshold = minStoppingThreshold;
|
||||||
|
actualMaxStoppingEffect = maxStoppingEffect;
|
||||||
|
}
|
||||||
|
strength = FMax(0, strength - actualMinStoppingThreshold);
|
||||||
|
stoppingEffect = FMin(actualMaxStoppingEffect, stoppingEffect + strength);
|
||||||
|
}
|
||||||
function TakeDamage(int damage,
|
function TakeDamage(int damage,
|
||||||
Pawn instigatedBy,
|
Pawn instigatedBy,
|
||||||
Vector hitLocation,
|
Vector hitLocation,
|
||||||
@ -1798,7 +1817,6 @@ simulated function UnSetBurningBehavior(){
|
|||||||
if(Role == Role_Authority){
|
if(Role == Role_Authority){
|
||||||
Intelligence = default.Intelligence;
|
Intelligence = default.Intelligence;
|
||||||
if(!bZapped){
|
if(!bZapped){
|
||||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
|
||||||
AirSpeed = default.AirSpeed;
|
AirSpeed = default.AirSpeed;
|
||||||
WaterSpeed = default.WaterSpeed;
|
WaterSpeed = default.WaterSpeed;
|
||||||
}
|
}
|
||||||
@ -1810,6 +1828,39 @@ simulated function UnSetBurningBehavior(){
|
|||||||
WalkAnims[i] = default.WalkAnims[i];
|
WalkAnims[i] = default.WalkAnims[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
simulated function SetGroundSpeed(float newGroundSpeed) {
|
||||||
|
if (initializationComplete) {
|
||||||
|
UpdateGroundSpeed();
|
||||||
|
} else {
|
||||||
|
// Let `KFMonster`'s code setup original speed for this zed.
|
||||||
|
// This is a hack to be removed later, when we'll be untangling
|
||||||
|
// initialization code
|
||||||
|
super.SetGroundSpeed(newGroundSpeed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
simulated function UpdateGroundSpeed() {
|
||||||
|
if (TryNonRelevantSpeedup()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
groundSpeed = GetOriginalGroundSpeed();
|
||||||
|
groundSpeed *= (1.0 - stoppingEffect);
|
||||||
|
if (bDecapitated) {
|
||||||
|
groundSpeed *= 0.8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this function returns `true`, then we shouldn't touch speed further,
|
||||||
|
// because a speed hack was used for the zed
|
||||||
|
simulated function bool TryNonRelevantSpeedup(){
|
||||||
|
if(level.netMode == NM_Client || !CanSpeedAdjust()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(level.timeSeconds - lastReplicateTime > 0.5) {
|
||||||
|
groundSpeed = default.groundSpeed * (300.0 / default.groundSpeed);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
lastSeenOrRelevantTime = level.timeSeconds;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
simulated function ServerDropFaster(NiceHumanPawn nicePawn){
|
simulated function ServerDropFaster(NiceHumanPawn nicePawn){
|
||||||
if(nicePawn == none) return;
|
if(nicePawn == none) return;
|
||||||
if(Health > 0)
|
if(Health > 0)
|
||||||
@ -1827,7 +1878,7 @@ simulated function RemoveHead(){
|
|||||||
if(kfDmgType != none && kfDmgType.default.bIsMeleeDamage)
|
if(kfDmgType != none && kfDmgType.default.bIsMeleeDamage)
|
||||||
bMeleeDecapitated = true;
|
bMeleeDecapitated = true;
|
||||||
SetAnimAction('HitF');
|
SetAnimAction('HitF');
|
||||||
SetGroundSpeed(GroundSpeed *= 0.80);
|
UpdateGroundSpeed();
|
||||||
// No more raspy breathin'...cuz he has no throat or mouth :S
|
// No more raspy breathin'...cuz he has no throat or mouth :S
|
||||||
AmbientSound = MiscSound;
|
AmbientSound = MiscSound;
|
||||||
if(Health > 0)
|
if(Health > 0)
|
||||||
@ -2220,8 +2271,6 @@ defaultproperties
|
|||||||
lastStunTime=-1.000000
|
lastStunTime=-1.000000
|
||||||
headDamageRecoveryRate=100.000000
|
headDamageRecoveryRate=100.000000
|
||||||
headRecoveryTime=1.000000
|
headRecoveryTime=1.000000
|
||||||
mind=1.000000
|
|
||||||
accStunMindLvl=0.500000
|
|
||||||
bCanBurn=True
|
bCanBurn=True
|
||||||
fuelRatio=0.750000
|
fuelRatio=0.750000
|
||||||
heatDissipationRate=0.666000
|
heatDissipationRate=0.666000
|
||||||
@ -2236,9 +2285,8 @@ defaultproperties
|
|||||||
RagdollLifeSpan=120.000000
|
RagdollLifeSpan=120.000000
|
||||||
ControllerClass=class'NiceMonsterController'
|
ControllerClass=class'NiceMonsterController'
|
||||||
stoppingEffect=0.0
|
stoppingEffect=0.0
|
||||||
stoppingRecoveryStartTime=2.0
|
stoppingRecoveryRate=0.025
|
||||||
stoppingRecoveryRate=0.5
|
maxStoppingEffect=0.25
|
||||||
maxStoppingEffect=0.5
|
|
||||||
minStoppingThreshold=0.0
|
minStoppingThreshold=0.0
|
||||||
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
||||||
KConvulseSpacing=(Max=2.200000)
|
KConvulseSpacing=(Max=2.200000)
|
||||||
|
Loading…
Reference in New Issue
Block a user