Merge pull request 'update11' (#31) from update11 into master
Reviewed-on: https://insultplayers.ru/git/dkanus/NicePack/pulls/31
This commit is contained in:
commit
08c7d99de9
@ -107,6 +107,10 @@ function PostRender(Canvas C)
|
||||
local int x, y, center, barWidth, offset;
|
||||
local int missesWidth, missesHeight, missesSpace;
|
||||
local int missesX, missesY;
|
||||
local TeamInfo team;
|
||||
local int healthToGive, totalExpectedHealth;
|
||||
local float textWidth, textHeight;
|
||||
local string textToDraw;
|
||||
// local Vector CamPos, ViewDir;
|
||||
// local Rotator CamRot;
|
||||
// local float OffsetX, BarLength, BarHeight, XL, YL, posY;
|
||||
@ -256,6 +260,32 @@ function PostRender(Canvas C)
|
||||
}
|
||||
}
|
||||
|
||||
team = C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team;
|
||||
//// Draw health still in regen timer
|
||||
healthToGive = ScrnHumanPawn(C.ViewPort.Actor.Pawn).clientHealthToGive;
|
||||
if (healthToGive > 0) {
|
||||
totalExpectedHealth = healthToGive + C.ViewPort.Actor.Pawn.health;;
|
||||
C.Font = class'ROHUD'.Static.LoadSmallFontStatic(3);
|
||||
if (totalExpectedHealth >= C.ViewPort.Actor.Pawn.healthMax) {
|
||||
if(team.teamIndex == 0) {
|
||||
C.SetDrawColor(255, 64, 64);
|
||||
}
|
||||
else {
|
||||
C.SetDrawColor(
|
||||
team.teamColor.R,
|
||||
team.teamColor.G,
|
||||
team.teamColor.B);
|
||||
}
|
||||
}
|
||||
else {
|
||||
C.SetDrawColor(128, 128, 128);
|
||||
}
|
||||
textToDraw = "+" $ healthToGive;
|
||||
C.TextSize(textToDraw, textWidth, textHeight);
|
||||
C.SetPos(C.ClipX * 0.05, C.ClipY * 0.9);
|
||||
C.DrawText(textToDraw);
|
||||
}
|
||||
|
||||
//// Draw cooldowns
|
||||
if (nicePlayer.abilityManager == none)
|
||||
return;
|
||||
@ -273,7 +303,7 @@ function PostRender(Canvas C)
|
||||
{
|
||||
if (niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue)
|
||||
{
|
||||
DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
|
||||
DrawCounter(C, niceMutator.niceCounterSet[i], x, y, team);
|
||||
x += 128 + 4;
|
||||
}
|
||||
}
|
||||
@ -283,7 +313,7 @@ function PostRender(Canvas C)
|
||||
function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){
|
||||
local float borderSpace;
|
||||
local Texture textureToDraw;
|
||||
local float textWidth, textHeight;
|
||||
local float textWidth, textHeight;
|
||||
local string textToDraw;
|
||||
// Some per-defined values for drawing
|
||||
local int iconSize, backgroundWidth, backgroundHeight;
|
||||
@ -320,7 +350,7 @@ function DrawAbilityCooldown(Canvas C, int abilityIndex){
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
local int x, y;
|
||||
local string textToDraw;
|
||||
local float textWidth, textHeight;
|
||||
local float textWidth, textHeight;
|
||||
local NiceAbilityManager.EAbilityState abilityState;
|
||||
if(C == none) return;
|
||||
if(C.ViewPort == none) return;
|
||||
|
@ -846,7 +846,7 @@ function VeterancyChanged(){
|
||||
nicePlayer.TriggerSelectEventOnPerkChange(nicePrevPerkClass,
|
||||
class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill));
|
||||
}
|
||||
|
||||
|
||||
super.VeterancyChanged();
|
||||
}
|
||||
simulated function AltFire(optional float F){
|
||||
|
@ -102,31 +102,39 @@ simulated function ServerExplode
|
||||
local Vector dirToVictim;
|
||||
local Vector hitLocation;
|
||||
local float scale1, scale2;
|
||||
local NiceMonster niceVictim;
|
||||
if(Role < ROLE_Authority) return;
|
||||
foreach VisibleActors(class'Actor', victim, explRadius, explLocation){
|
||||
if(victim == none || victim == self) continue;
|
||||
if(victim.role < ROLE_Authority) continue;
|
||||
if(ExtendedZCollision(victim) != none) continue;
|
||||
if(Trigger(victim) != none) continue;
|
||||
dirToVictim = Normal(victim.location - explLocation);
|
||||
hitLocation = victim.location - 0.5 *
|
||||
(victim.collisionHeight + victim.collisionRadius) * dirToVictim;
|
||||
CalculateDamageScales( scale1, scale2,
|
||||
victim, explLocation, explRadius, explExp);
|
||||
// Deal main damage
|
||||
if(scale1 > 0){
|
||||
ServerDealDamage( victim, explDamage * scale1, instigator,
|
||||
hitLocation, scale1 * momentum * dirToVictim,
|
||||
explDmgType);
|
||||
}
|
||||
// Deal secondary damage
|
||||
if(allowDoubleExplosion && victim != none && scale2 > 0){
|
||||
ServerDealDamage( victim, explDamage * scale2, instigator,
|
||||
hitLocation, scale2 * momentum * dirToVictim,
|
||||
explDmgType);
|
||||
}
|
||||
if(NiceMonster(victim) != none && NiceMonster(victim).health <= 0)
|
||||
numKilled ++;
|
||||
if(victim == none || victim == self) continue;
|
||||
if(victim.role < ROLE_Authority) continue;
|
||||
if(ExtendedZCollision(victim) != none) continue;
|
||||
if(Trigger(victim) != none) continue;
|
||||
dirToVictim = Normal(victim.location - explLocation);
|
||||
hitLocation = victim.location - 0.5 *
|
||||
(victim.collisionHeight + victim.collisionRadius) * dirToVictim;
|
||||
CalculateDamageScales( scale1, scale2,
|
||||
victim, explLocation, explRadius, explExp);
|
||||
// Deal main damage
|
||||
if(scale1 > 0){
|
||||
ServerDealDamage( victim, explDamage * scale1, instigator,
|
||||
hitLocation, scale1 * momentum * dirToVictim,
|
||||
explDmgType);
|
||||
}
|
||||
// Deal secondary damage
|
||||
if(allowDoubleExplosion && victim != none && scale2 > 0){
|
||||
ServerDealDamage( victim, explDamage * scale2, instigator,
|
||||
hitLocation, scale2 * momentum * dirToVictim,
|
||||
explDmgType);
|
||||
}
|
||||
niceVictim = NiceMonster(victim);
|
||||
if(NiceMonster(victim) != none) {
|
||||
if (NiceMonster(victim).health <= 0) {
|
||||
numKilled += 1;
|
||||
}
|
||||
else {
|
||||
niceVictim.concussionCountdown = 10.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(numKilled >= 4)
|
||||
KFGameType(level.game).DramaticEvent(0.05);
|
||||
@ -203,34 +211,45 @@ simulated function RemovePoisonAndBleed(NiceHumanPawn healed)
|
||||
}
|
||||
|
||||
// Tells server to heal given human pawn.
|
||||
simulated function ServerHealTarget(NiceHumanPawn healed, float charPotency,
|
||||
Pawn instigator){
|
||||
simulated function ServerHealTarget(
|
||||
NiceHumanPawn healed,
|
||||
float charPotency,
|
||||
Pawn instigator
|
||||
) {
|
||||
local NiceHumanPawn healer;
|
||||
local PlayerController healedPC;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local NiceMedicGun healingTool;
|
||||
local float healTotal;
|
||||
local float healPotency;
|
||||
|
||||
if(instigator == none || healed == none) return;
|
||||
if(healed.health <= 0 || healed.health >= healed.healthMax) return;
|
||||
KFPRI = KFPlayerReplicationInfo(instigator.PlayerReplicationInfo);
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none)
|
||||
return;
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return;
|
||||
healer = NiceHumanPawn(instigator);
|
||||
if(healer == none)
|
||||
return;
|
||||
if(healer == none) return;
|
||||
|
||||
healingTool = NiceMedicGun(healer.weapon);
|
||||
healPotency = KFPRI.ClientVeteranSkill.static.GetHealPotency(KFPRI);
|
||||
healTotal = charPotency * healPotency;
|
||||
|
||||
healer.AlphaAmount = 255;
|
||||
if(NiceMedicGun(healer.weapon) != none)
|
||||
NiceMedicGun(healer.weapon).ClientSuccessfulHeal(healer, healed);
|
||||
if(healed.health >= healed.healthMax){
|
||||
if(healingTool != none) {
|
||||
healingTool.ClientSuccessfulHeal(healer, healed);
|
||||
}
|
||||
healedPC = PlayerController(healed.controller);
|
||||
if(healedPC != none) {
|
||||
healedPC.ClientMessage(
|
||||
"You've been healed by" @ healer.GetPlayerName(),
|
||||
'CriticalEvent');
|
||||
}
|
||||
if(healed.health >= healed.healthMax) {
|
||||
healed.GiveHealth(healTotal, healed.healthMax);
|
||||
return;
|
||||
}
|
||||
HandleNiceHealingMechanicsAndSkills(healer, healed, healPotency);
|
||||
if(healed.health < healed.healthMax){
|
||||
healed.TakeHealing( healed, healTotal, healPotency,
|
||||
KFWeapon(instigator.weapon));
|
||||
if(healed.health < healed.healthMax) {
|
||||
healed.TakeHealing(healed, healTotal, healPotency, healingTool);
|
||||
}
|
||||
RemovePoisonAndBleed(healed);
|
||||
}
|
||||
@ -261,9 +280,6 @@ simulated function HandleNiceDamageMechanicsAndSkills
|
||||
hasSkill(nicePlayer, class'NiceSkillCommandoTranquilizer');
|
||||
hasZEDFrenzy = class'NiceVeterancyTypes'.static.
|
||||
hasSkill(nicePlayer, class'NiceSkillMedicZEDFrenzy');
|
||||
// Medic's suppression
|
||||
if(hasTranquilizer)
|
||||
niceZed.mind = FMin(niceZed.mind, 0.5);
|
||||
// Medic's frenzy
|
||||
if(hasZEDFrenzy && nicePlayer.IsZedTimeActive()){
|
||||
niceZed.madnessCountDown =
|
||||
|
@ -8,6 +8,7 @@ static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealt
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
stoppingPower=0.5
|
||||
stunMultiplier=0.600000
|
||||
bIsExplosive=True
|
||||
DeathString="%o filled %k's body with shrapnel."
|
||||
|
@ -66,15 +66,19 @@ simulated function WeaponTick(float dt){
|
||||
}
|
||||
super.WeaponTick(dt);
|
||||
}
|
||||
simulated function ClientSuccessfulHeal(NiceHumanPawn healer, NiceHumanPawn healed){
|
||||
if(healed == none)
|
||||
return;
|
||||
if(instigator != none && PlayerController(instigator.controller) != none)
|
||||
PlayerController(instigator.controller).
|
||||
ClientMessage("You've healed"@healed.GetPlayerName(), 'CriticalEvent');
|
||||
if(NiceHumanPawn(instigator) != none && PlayerController(healed.controller) != none)
|
||||
PlayerController(healed.controller).
|
||||
ClientMessage("You've been healed by"@healer.GetPlayerName(), 'CriticalEvent');
|
||||
|
||||
simulated function ClientSuccessfulHeal(
|
||||
NiceHumanPawn healer,
|
||||
NiceHumanPawn healed
|
||||
){
|
||||
if(healed == none) {
|
||||
return;
|
||||
}
|
||||
if(instigator != none && PlayerController(instigator.controller) != none) {
|
||||
PlayerController(instigator.controller).ClientMessage(
|
||||
"You've healed" @ healed.GetPlayerName(),
|
||||
'CriticalEvent');
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
|
@ -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 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 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
|
||||
// Scales exp gain according to given HardcoreLevel
|
||||
static function float getScale(int HL){
|
||||
@ -88,6 +89,7 @@ defaultproperties
|
||||
BigZedPenDmgReduction=0.500000
|
||||
BigZedMinHealth=1000
|
||||
MediumZedPenDmgReduction=0.750000
|
||||
stoppingPower=0.0
|
||||
MediumZedMinHealth=500
|
||||
PenDmgReduction=0.700000
|
||||
PawnDamageEmitter=None
|
||||
|
@ -4,8 +4,8 @@ defaultproperties
|
||||
{
|
||||
WeaponPickupClass=class'NiceM41APickup'
|
||||
AmmoPickupAmount=66
|
||||
MaxAmmo=300
|
||||
InitialAmount=75
|
||||
MaxAmmo=264
|
||||
InitialAmount=66
|
||||
PickupClass=class'NiceM41AAmmoPickup'
|
||||
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
|
||||
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
|
||||
|
@ -3,7 +3,7 @@ class NiceM41APickup extends NiceM41APrimaryPickup;
|
||||
defaultproperties
|
||||
{
|
||||
crossPerkIndecies(0)=6
|
||||
AmmoCost=12
|
||||
AmmoCost=24
|
||||
BuyClipSize=1
|
||||
SecondaryAmmoShortName="M41A Frag Grenades"
|
||||
PrimaryWeaponPickup=class'NiceM41APrimaryPickup'
|
||||
|
@ -3,7 +3,7 @@ defaultproperties
|
||||
{
|
||||
cost=750
|
||||
Weight=7.000000
|
||||
AmmoCost=66
|
||||
AmmoCost=25
|
||||
BuyClipSize=66
|
||||
PowerValue=70
|
||||
SpeedValue=100
|
||||
|
@ -3,7 +3,7 @@ defaultproperties
|
||||
{
|
||||
WeaponPickupClass=class'NiceM41APickup'
|
||||
AmmoPickupAmount=1
|
||||
MaxAmmo=8
|
||||
MaxAmmo=5
|
||||
InitialAmount=2
|
||||
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
|
||||
IconCoords=(X1=434,Y1=253,X2=506,Y2=292)
|
||||
|
@ -2,6 +2,7 @@ class NiceDamTypeKrissM extends NiceDamageTypeVetDemolitions
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
HeadShotDamageMult=2.000000
|
||||
stoppingPower=0.25
|
||||
HeadShotDamageMult=1.500000
|
||||
WeaponClass=class'NiceKrissMMedicGun'
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ defaultproperties
|
||||
ShellEjectBoneName="Shell_eject"
|
||||
NoAmmoSoundRef="KF_MP7Snd.MP7_DryFire"
|
||||
DamageType=class'NiceDamTypeKrissM'
|
||||
DamageMin=35
|
||||
DamageMax=35
|
||||
DamageMin=48
|
||||
DamageMax=48
|
||||
Momentum=12500.000000
|
||||
FireRate=0.040000
|
||||
AmmoClass=class'NiceKrissMAmmo'
|
||||
|
@ -2,6 +2,7 @@ class NiceDamTypeM7A3M extends NiceDamageTypeVetDemolitions
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
stoppingPower=0.15
|
||||
HeadShotDamageMult=2.000000
|
||||
WeaponClass=class'NiceM7A3MMedicGun'
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ class NiceDamTypeMP5M extends NiceDamageTypeVetDemolitions
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
stoppingPower=0.15
|
||||
HeadShotDamageMult=2.000000
|
||||
WeaponClass=class'NiceMP5MMedicGun'
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ defaultproperties
|
||||
FireEndStereoSoundRef="KF_MP5Snd.MP5_Fire_Loop_End_S"
|
||||
AmbientFireSoundRef="KF_MP5Snd.MP5_Fire_Loop"
|
||||
ProjectileSpeed=21250.000000
|
||||
RecoilRate=0.0075000
|
||||
maxVerticalRecoilAngle=160
|
||||
maxHorizontalRecoilAngle=80
|
||||
RecoilRate=0.0100000
|
||||
maxVerticalRecoilAngle=40
|
||||
maxHorizontalRecoilAngle=20
|
||||
RecoilVelocityScale=0.000000
|
||||
ShellEjectClass=Class'ROEffects.KFShellEjectMP5SMG'
|
||||
ShellEjectBoneName="Shell_eject"
|
||||
@ -15,7 +15,7 @@ defaultproperties
|
||||
DamageType=class'NiceDamTypeMP5M'
|
||||
DamageMin=35
|
||||
DamageMax=35
|
||||
Spread=500.0
|
||||
Spread=750.0
|
||||
SpreadStyle=SS_Random
|
||||
minimalSpreadScale=0.0
|
||||
activeSpreadScale=0.0
|
||||
|
@ -5,5 +5,6 @@ defaultproperties
|
||||
bPenetrationHSOnly=True
|
||||
MaxPenetrations=1
|
||||
HeadShotDamageMult=2.250000
|
||||
stoppingPower=0.15
|
||||
WeaponClass=class'NiceMP7MMedicGun'
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ defaultproperties
|
||||
ShakeOffsetRate=(X=1000.000000,Y=1000.000000,Z=1000.000000)
|
||||
ShakeOffsetTime=1.250000
|
||||
FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP'
|
||||
Spread=500.0
|
||||
Spread=750.0
|
||||
SpreadStyle=SS_Random
|
||||
minimalSpreadScale=0.0
|
||||
activeSpreadScale=0.0
|
||||
|
@ -59,4 +59,5 @@ defaultproperties
|
||||
BotRefireRate=2.500000
|
||||
aimerror=2.000000
|
||||
Spread=3000.000000
|
||||
FireAnimRate=1.25
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ defaultproperties
|
||||
{
|
||||
WeaponPickupClass=class'NiceNailGunPickup'
|
||||
AmmoPickupAmount=42
|
||||
MaxAmmo=336
|
||||
InitialAmount=84
|
||||
MaxAmmo=210
|
||||
InitialAmount=52
|
||||
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
|
||||
IconCoords=(X1=451,Y1=445,X2=510,Y2=500)
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ defaultproperties
|
||||
{
|
||||
Weight=8.000000
|
||||
cost=250
|
||||
AmmoCost=17
|
||||
AmmoCost=27
|
||||
BuyClipSize=42
|
||||
PowerValue=70
|
||||
SpeedValue=55
|
||||
|
@ -27,23 +27,20 @@ Ignores StartChargingFP;
|
||||
bFrustrated = false;
|
||||
if(Controller != none)
|
||||
NiceZombieFleshPoundController(Controller).RageFrustrationTimer = 0;
|
||||
if( Health>0 && !bZapped )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
ClientChargingAnims();
|
||||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super(NiceMonster).UpdateGroundSpeed();
|
||||
if (!bShotAnim) {
|
||||
groundSpeed *= 2.3;
|
||||
}
|
||||
}
|
||||
function Tick( float Delta )
|
||||
{
|
||||
if( !bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);//2.0;
|
||||
}
|
||||
|
||||
// Keep the flesh pound moving toward its target when attacking
|
||||
if( Role == ROLE_Authority && bShotAnim)
|
||||
{
|
||||
|
@ -915,9 +915,16 @@ state Charging
|
||||
// How many charge attacks we can do randomly 1-3
|
||||
NumChargeAttacks = Rand(2) + 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bShotAnim) {
|
||||
groundSpeed *= 1.25;
|
||||
} else {
|
||||
groundSpeed *= 2.5;
|
||||
}
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bChargingPlayer = False;
|
||||
ChargeDamage = 0;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
@ -942,7 +949,6 @@ state Charging
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
if( LookTarget!=none )
|
||||
{
|
||||
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
||||
@ -956,16 +962,6 @@ state Charging
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
|
||||
// Zapping slows him down, but doesn't stop him
|
||||
if( bZapped )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.5);
|
||||
}
|
||||
}
|
||||
|
||||
Global.Tick(Delta);
|
||||
@ -1071,7 +1067,6 @@ State Escaping extends Charging // Got hurt and running away...
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1081,23 +1076,20 @@ State Escaping extends Charging // Got hurt and running away...
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
|
||||
// Zapping slows him down, but doesn't stop him
|
||||
if( bZapped )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.5);
|
||||
}
|
||||
}
|
||||
|
||||
Global.Tick(Delta);
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bShotAnim) {
|
||||
groundSpeed *= 1.25;
|
||||
} else {
|
||||
groundSpeed *= 2.5;
|
||||
}
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bChargingPlayer = False;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
|
@ -98,6 +98,9 @@ defaultproperties
|
||||
HealthMax=8000.000000
|
||||
Health=8000
|
||||
HeadScale=1.300000
|
||||
stoppingRecoveryRate=0.1
|
||||
maxStoppingEffect=0.2
|
||||
minStoppingThreshold=0.6
|
||||
MenuName="Nice Patriarch"
|
||||
MovementAnims(0)="WalkF"
|
||||
MovementAnims(1)="WalkF"
|
||||
|
@ -182,18 +182,6 @@ function TakeDamageClient(int Damage, Pawn InstigatedBy, Vector HitLocation, Vec
|
||||
if (bDecapitated)
|
||||
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()
|
||||
{
|
||||
local KFHumanPawn HumanTarget;
|
||||
@ -311,19 +299,16 @@ Ignores StartCharging;
|
||||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed = groundSpeed + ((groundSpeed * 0.75 / maxRageCounter * (rageCounter + 1) * rageSpeedTween));
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
bChargingPlayer = false;
|
||||
|
||||
NiceZombieBruteController(Controller).RageFrustrationTimer = 0;
|
||||
|
||||
if (Health > 0)
|
||||
{
|
||||
GroundSpeed = GetOriginalGroundSpeed();
|
||||
if (bBurnified)
|
||||
GroundSpeed *= BurnGroundSpeedMul;
|
||||
}
|
||||
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
ClientChargingAnims();
|
||||
|
||||
@ -331,12 +316,8 @@ Ignores StartCharging;
|
||||
}
|
||||
function Tick(float Delta)
|
||||
{
|
||||
if (!bShotAnim)
|
||||
{
|
||||
if (!bShotAnim) {
|
||||
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);
|
||||
|
@ -33,7 +33,6 @@ var bool bServerBlock;
|
||||
var bool bClientBlock;
|
||||
var float BlockDmgMul; // Multiplier for damage taken from blocked shots
|
||||
var float BlockFireDmgMul;
|
||||
var float BurnGroundSpeedMul; // Multiplier for ground speed when burning
|
||||
replication
|
||||
{
|
||||
reliable if(Role == ROLE_Authority)
|
||||
@ -61,7 +60,6 @@ defaultproperties
|
||||
BlockAddScale=2.500000
|
||||
BlockDmgMul=0.100000
|
||||
BlockFireDmgMul=1.000000
|
||||
BurnGroundSpeedMul=0.700000
|
||||
StunThreshold=4.000000
|
||||
flameFuel=0.500000
|
||||
clientHeadshotScale=1.300000
|
||||
@ -110,6 +108,7 @@ defaultproperties
|
||||
Health=1000
|
||||
HeadHeight=2.500000
|
||||
HeadScale=1.300000
|
||||
minStoppingThreshold=0.1
|
||||
MenuName="Brute"
|
||||
MovementAnims(0)="BruteWalkC"
|
||||
MovementAnims(1)="BruteWalkC"
|
||||
|
@ -49,7 +49,6 @@ function SetMindControlled(bool bNewMindControlled)
|
||||
|
||||
if( bNewMindControlled != bZedUnderControl )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
Health *= 1.25;
|
||||
HealthMax *= 1.25;
|
||||
}
|
||||
@ -252,21 +251,21 @@ Ignores StartChargingFP;
|
||||
if(fpController == none)
|
||||
fpController.RageFrustrationTimer = 0;
|
||||
|
||||
if( Health>0 && !bZapped )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
ClientChargingAnims();
|
||||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (!bShotAnim) {
|
||||
groundSpeed *= 2.3;
|
||||
}
|
||||
}
|
||||
function Tick( float Delta )
|
||||
{
|
||||
if( !bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);//2.0;
|
||||
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
||||
{
|
||||
GoToState('');
|
||||
@ -330,11 +329,16 @@ Ignores StartChargingFP;
|
||||
state ChargeToMarker extends RageCharging
|
||||
{
|
||||
Ignores StartChargingFP;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (!bShotAnim) {
|
||||
groundSpeed *= 2.3;
|
||||
}
|
||||
}
|
||||
function Tick( float Delta )
|
||||
{
|
||||
if( !bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);
|
||||
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
||||
{
|
||||
GoToState('');
|
||||
|
@ -80,6 +80,8 @@ defaultproperties
|
||||
Health=1650
|
||||
HeadHeight=2.500000
|
||||
HeadScale=1.300000
|
||||
maxStoppingEffect=0.05
|
||||
minStoppingThreshold=0.68
|
||||
MenuName="Nice Flesh Pound"
|
||||
MovementAnims(0)="PoundWalk"
|
||||
MovementAnims(1)="WalkB"
|
||||
|
@ -45,7 +45,6 @@ function SetMindControlled(bool bNewMindControlled)
|
||||
|
||||
if( bNewMindControlled != bZedUnderControl )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
Health *= 1.25;
|
||||
HealthMax *= 1.25;
|
||||
}
|
||||
@ -73,13 +72,6 @@ function RangedAttack(Actor A){
|
||||
if(!bShotAnim && !bDecapitated && VSize(A.Location - Location) <= 700)
|
||||
GoToState('RunningState');
|
||||
}
|
||||
simulated function Tick(float DeltaTime){
|
||||
super.Tick(DeltaTime);
|
||||
if(IsInState('RunningState'))
|
||||
SetGroundSpeed(GetOriginalGroundSpeed() * 1.875);
|
||||
else
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
state RunningState{
|
||||
// Set the zed to the zapped behavior
|
||||
simulated function SetZappedBehavior(){
|
||||
@ -94,7 +86,6 @@ state RunningState{
|
||||
if(bZapped)
|
||||
GoToState('');
|
||||
else{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.875);
|
||||
bRunning = true;
|
||||
if(Level.NetMode != NM_DedicatedServer)
|
||||
PostNetReceive();
|
||||
@ -103,7 +94,6 @@ state RunningState{
|
||||
}
|
||||
}
|
||||
function EndState(){
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bRunning = false;
|
||||
if(Level.NetMode != NM_DedicatedServer)
|
||||
PostNetReceive();
|
||||
@ -112,6 +102,10 @@ state RunningState{
|
||||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= 1.875;
|
||||
}
|
||||
function RemoveHead(){
|
||||
GoToState('');
|
||||
Global.RemoveHead();
|
||||
|
@ -60,6 +60,7 @@ defaultproperties
|
||||
HeadHeight=1.000000
|
||||
HeadScale=1.350000
|
||||
AmbientSoundScaling=8.000000
|
||||
stoppingRecoveryRate=0.05
|
||||
MenuName="Nice Husk"
|
||||
MovementAnims(0)="WalkF"
|
||||
MovementAnims(1)="WalkB"
|
||||
|
@ -105,15 +105,11 @@ State SawingLoop
|
||||
else GoToState('');
|
||||
}
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed()
|
||||
{
|
||||
local float result;
|
||||
result = OriginalGroundSpeed;
|
||||
if ( bWasRaged || bCharging )
|
||||
result *= 3.5;
|
||||
else if( bZedUnderControl )
|
||||
result *= 1.25;
|
||||
return result;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bWasRaged || bCharging) {
|
||||
groundSpeed *= 3.5;
|
||||
}
|
||||
}
|
||||
state RunningState
|
||||
{
|
||||
@ -124,7 +120,6 @@ state RunningState
|
||||
GoToState('');
|
||||
else {
|
||||
bCharging = true;
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
@ -133,8 +128,6 @@ state RunningState
|
||||
function EndState()
|
||||
{
|
||||
bCharging = False;
|
||||
if( !bZapped )
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
@ -163,6 +156,8 @@ defaultproperties
|
||||
ChallengeSound(2)=None
|
||||
ChallengeSound(3)=None
|
||||
ScoringValue=300
|
||||
maxStoppingEffect=0.25
|
||||
minStoppingThreshold=0.25
|
||||
MenuName="Jason"
|
||||
AmbientSound=Sound'ScrnZedPack_S.Jason.Jason_Sound'
|
||||
Mesh=SkeletalMesh'ScrnZedPack_A.JasonMesh'
|
||||
|
@ -83,7 +83,6 @@ function SetMindControlled(bool bNewMindControlled)
|
||||
|
||||
if( bNewMindControlled != bZedUnderControl )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
Health *= 1.25;
|
||||
HealthMax *= 1.25;
|
||||
}
|
||||
@ -185,8 +184,9 @@ state RunningState
|
||||
{
|
||||
return false;
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed() {
|
||||
return 3.5 * OriginalGroundSpeed;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= 3.5;
|
||||
}
|
||||
function BeginState(){
|
||||
local NiceHumanPawn rageTarget, rageCause;
|
||||
@ -214,7 +214,6 @@ state RunningState
|
||||
if(bZapped)
|
||||
GoToState('');
|
||||
else{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 3.5);
|
||||
bCharging = true;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
@ -224,10 +223,6 @@ state RunningState
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
if( !bZapped )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
bCharging = False;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
@ -265,8 +260,9 @@ State SawingLoop
|
||||
{
|
||||
return false;
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed() {
|
||||
return OriginalGroundSpeed * AttackChargeRate;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= attackChargeRate;
|
||||
}
|
||||
function bool CanGetOutOfWay()
|
||||
{
|
||||
@ -279,7 +275,6 @@ State SawingLoop
|
||||
// Randomly have the scrake charge during an attack so it will be less predictable
|
||||
if(Health/HealthMax < 0.5 || FRand() <= 0.95)
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * AttackChargeRate);
|
||||
bCharging = true;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
@ -327,8 +322,6 @@ State SawingLoop
|
||||
{
|
||||
AmbientSound=default.AmbientSound;
|
||||
MeleeDamage = Max( DifficultyDamageModifer() * default.MeleeDamage, 1 );
|
||||
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bCharging = False;
|
||||
if(Level.NetMode != NM_DedicatedServer)
|
||||
PostNetReceive();
|
||||
|
@ -63,6 +63,8 @@ defaultproperties
|
||||
HealthMax=1000.000000
|
||||
Health=1000
|
||||
HeadHeight=2.200000
|
||||
maxStoppingEffect=0.15
|
||||
minStoppingThreshold=0.15
|
||||
MenuName="Nice Scrake"
|
||||
MovementAnims(0)="SawZombieWalk"
|
||||
MovementAnims(1)="SawZombieWalk"
|
||||
|
@ -179,7 +179,6 @@ state Running
|
||||
Global.Tick(Delta);
|
||||
if (RunUntilTime < Level.TimeSeconds)
|
||||
GotoState('');
|
||||
GroundSpeed = GetOriginalGroundSpeed();
|
||||
}
|
||||
function BeginState()
|
||||
{
|
||||
@ -190,13 +189,12 @@ state Running
|
||||
function EndState()
|
||||
{
|
||||
bRunning = false;
|
||||
GroundSpeed = global.GetOriginalGroundSpeed();
|
||||
RunCooldownEnd = Level.TimeSeconds + PeriodRunCoolBase + FRand() * PeriodRunCoolRan;
|
||||
MovementAnims[0] = WalkAnim;
|
||||
}
|
||||
function float GetOriginalGroundSpeed()
|
||||
{
|
||||
return global.GetOriginalGroundSpeed() * 2.5;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= 2.5;
|
||||
}
|
||||
function bool CanSpeedAdjust()
|
||||
{
|
||||
@ -219,14 +217,6 @@ simulated function bool AnimNeedsWait(name TestAnim)
|
||||
}
|
||||
return ExpectingChannel == 0;
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed()
|
||||
{
|
||||
local float result;
|
||||
result = OriginalGroundSpeed;
|
||||
if( bZedUnderControl )
|
||||
result *= 1.25;
|
||||
return result;
|
||||
}
|
||||
simulated function HandleAnimation(float Delta)
|
||||
{
|
||||
// hehehe
|
||||
|
@ -281,6 +281,12 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
||||
function RemoveHead(){
|
||||
Super.RemoveHead();
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bShotAnim) {
|
||||
groundSpeed *= 0.65;
|
||||
}
|
||||
}
|
||||
simulated function Tick( float Delta )
|
||||
{
|
||||
local float currScreamTime;
|
||||
@ -295,17 +301,11 @@ simulated function Tick( float Delta )
|
||||
{
|
||||
if( bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed() * 0.65);
|
||||
|
||||
if( LookTarget!=none )
|
||||
{
|
||||
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
}
|
||||
if(Role == ROLE_Authority && screamStartTime > 0){
|
||||
currScreamTime = Level.TimeSeconds - screamStartTime;
|
||||
|
@ -709,7 +709,6 @@ defaultproperties
|
||||
HealEnergyDrain=0.200000
|
||||
ProjectileFireInterval=5.000000
|
||||
BurnDamageScale=1.000000
|
||||
mind=0.000000
|
||||
bFireImmune=False
|
||||
MoanVoice=SoundGroup'KF_EnemiesFinalSnd_CIRCUS.Husk.Husk_Talk'
|
||||
BleedOutDuration=5.000000
|
||||
|
@ -24,6 +24,7 @@ class NiceMonster extends KFMonster
|
||||
#exec OBJ LOAD FILE=KF_EnemyGlobalSndTwo.uax
|
||||
#exec OBJ LOAD FILE=KFZED_FX_T.utx
|
||||
|
||||
var bool initializationComplete;
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
// > Affliction system
|
||||
@ -75,13 +76,15 @@ var float stunLoopStart, stunLoopEnd, idleInsertFrame;
|
||||
var bool bWasIdleStun; // Were we using idleanimation for stun?
|
||||
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:
|
||||
// 1. Dealing head damage increases accumulated damage
|
||||
// 2. If head damage was received for a certain time period, -
|
||||
// accumulated damage starts to decrease
|
||||
// 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
|
||||
var float accHeadDamage;
|
||||
// Rate (per second) at which accumulated head damage diminishes
|
||||
@ -91,16 +94,6 @@ var float headRecoveryTime;
|
||||
// Count down variable for above mentioned time
|
||||
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
|
||||
@ -148,16 +141,14 @@ var bool bFrugalFuelUsage;
|
||||
// Is a value from 0.0 to 1.0 and `1 - stoppingEffect` acts as speed multiplier
|
||||
// for the zed
|
||||
var float stoppingEffect;
|
||||
// (Absolute) Point in time at which recovery would start, updated when zeds
|
||||
// receives another stopping effect from somewhere
|
||||
var float stoppingRecoveryStartTime;
|
||||
// How much stopping effect would be rcovred in a second
|
||||
// How much stopping effect would be recovred in a second
|
||||
var float stoppingRecoveryRate;
|
||||
// Maximum stopping effect this zed can tank
|
||||
// Maximum `stoppingEffect` value zed can accumulate
|
||||
var float maxStoppingEffect;
|
||||
// Minimal stopping threshold for the zed (supposed to be subtracted from
|
||||
// incoming effects' strenght).
|
||||
var float minStoppingThreshold;
|
||||
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
// > Miscellaneous variables
|
||||
@ -241,6 +232,7 @@ simulated function PostBeginPlay(){
|
||||
SavedExtCollision = MyExtCollision.bCollideActors;
|
||||
}
|
||||
}
|
||||
initializationComplete = true;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@ -381,6 +373,15 @@ simulated function FearTick(float deltaTime){
|
||||
+ 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
|
||||
simulated function CalcRemainigStunStructure( name seqName,
|
||||
float oFrame,
|
||||
@ -470,14 +471,14 @@ simulated function StunTick(float deltaTime){
|
||||
}
|
||||
//==============================================================================
|
||||
// >> Set of functions to handle stun from head damage accumulation
|
||||
function AccumulateHeadDamage( float addDamage,
|
||||
function AccumulateHeadDamage( float addDamage,
|
||||
bool bIsHeadshot,
|
||||
NicePlayerController nicePlayer){
|
||||
if(bIsHeadshot){
|
||||
AccHeadDamage += addDamage;
|
||||
HeadRecoveryCountDown = HeadRecoveryTime;
|
||||
if(AccHeadDamage > (default.HeadHealth / 1.5)
|
||||
&& (Mind <= AccStunMindLvl && IsStunPossible()))
|
||||
&& (concussionCountdown > 0.0 && IsStunPossible()))
|
||||
DoStun(nicePlayer.pawn,,,, 1.0);
|
||||
}
|
||||
else if(HeadRecoveryCountDown > 0.0)
|
||||
@ -485,11 +486,13 @@ function AccumulateHeadDamage( float addDamage,
|
||||
HeadRecoveryTime / 2);
|
||||
}
|
||||
function HeadDamageRecoveryTick(float delta){
|
||||
HeadRecoveryCountDown -= delta;
|
||||
HeadRecoveryCountDown = FMax(0.0, HeadRecoveryCountDown);
|
||||
if(HeadRecoveryCountDown <= 0.0)
|
||||
AccHeadDamage -= delta * HeadDamageRecoveryRate;
|
||||
AccHeadDamage = FMax(AccHeadDamage, 0.0);
|
||||
concussionCountdown -= delta;
|
||||
concussionCountdown = FMax(0.0, concussionCountdown);
|
||||
headRecoveryCountDown -= delta;
|
||||
headRecoveryCountDown = FMax(0.0, headRecoveryCountDown);
|
||||
if(headRecoveryCountDown <= 0.0)
|
||||
accHeadDamage -= delta * HeadDamageRecoveryRate;
|
||||
accHeadDamage = FMax(accHeadDamage, 0.0);
|
||||
}
|
||||
//==============================================================================
|
||||
// >> Function that calls actual 'HeatTick' when needed
|
||||
@ -546,15 +549,6 @@ simulated function FakeHeatTick(float deltaTime){
|
||||
// >> Ticks from TWI's code
|
||||
// Updates zed's speed if it's not relevant;
|
||||
// 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
|
||||
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(bDestroyNextTick && TimeSetDestroyNextTickTime < Level.TimeSeconds)
|
||||
Destroy();
|
||||
NonRelevantSpeedupTick(deltaTime);
|
||||
// Reset AnimAction
|
||||
if(bResetAnimAct && ResetAnimActTime < Level.TimeSeconds){
|
||||
AnimAction = '';
|
||||
@ -628,8 +621,10 @@ simulated function Tick(float deltaTime){
|
||||
DecapTick(deltaTime);
|
||||
FearTick(deltaTime);
|
||||
StunTick(deltaTime);
|
||||
StoppingPowerTick(deltaTime);
|
||||
HeadDamageRecoveryTick(deltaTime);
|
||||
FakeHeatTick(deltaTime);
|
||||
UpdateGroundSpeed();
|
||||
// TWI's tick
|
||||
TWITick(deltaTime);
|
||||
}
|
||||
@ -1613,7 +1608,7 @@ function UnFreeze(){
|
||||
GroundSpeed = GetOriginalGroundSpeed();
|
||||
bFrozenZed = false;
|
||||
}
|
||||
function TakeDamageClient( int damage,
|
||||
function TakeDamageClient( int damage,
|
||||
Pawn instigatedBy,
|
||||
Vector hitLocation,
|
||||
Vector momentum,
|
||||
@ -1632,22 +1627,24 @@ function TakeDamageClient( int damage,
|
||||
KFPRI = KFPlayerReplicationInfo(instigatedBy.PlayerReplicationInfo);
|
||||
if(headHealth <= 0)
|
||||
headshotLevel = 0.0;
|
||||
// Handle special weapon effects
|
||||
HandleStoppingPower(damageType, headshotLevel);
|
||||
// Handle elemental damage components
|
||||
ExtractElementalDamage( regDamage, heatDamage, damage,
|
||||
ExtractElementalDamage(regDamage, heatDamage, damage,
|
||||
instigatedBy, hitLocation, momentum,
|
||||
damageType, KFPRI, headshotLevel, lockonTime);
|
||||
FireDamageEffects( HeatDamage, instigatedBy, hitLocation, momentum,
|
||||
FireDamageEffects( HeatDamage, instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
FrostEffects( instigatedBy, hitLocation, momentum,
|
||||
FrostEffects( instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
// Handle body parts damage components
|
||||
ExtractPartsDamage( bodyDamage, headDamage, painDamage,
|
||||
ExtractPartsDamage( bodyDamage, headDamage, painDamage,
|
||||
RegDamage + HeatDamage, instigatedBy,
|
||||
hitLocation, momentum, damageType, KFPRI,
|
||||
headshotLevel, lockonTime);
|
||||
DoRightPainReaction( painDamage, instigatedBy, hitLocation, momentum,
|
||||
DoRightPainReaction( painDamage, instigatedBy, hitLocation, momentum,
|
||||
damageType, headshotLevel, KFPRI);
|
||||
DealPartsDamage( bodyDamage, headDamage, instigatedBy,
|
||||
DealPartsDamage( bodyDamage, headDamage, instigatedBy,
|
||||
hitLocation, momentum, damageType, KFPRI,
|
||||
headshotLevel, lockonTime);
|
||||
AddKillAssistant(instigatedBy, bodyDamage);
|
||||
@ -1658,6 +1655,28 @@ function TakeDamageClient( int damage,
|
||||
// like why the fuck is it being done HERE? Makes no fucking sense
|
||||
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,
|
||||
Pawn instigatedBy,
|
||||
Vector hitLocation,
|
||||
@ -1798,7 +1817,6 @@ simulated function UnSetBurningBehavior(){
|
||||
if(Role == Role_Authority){
|
||||
Intelligence = default.Intelligence;
|
||||
if(!bZapped){
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
AirSpeed = default.AirSpeed;
|
||||
WaterSpeed = default.WaterSpeed;
|
||||
}
|
||||
@ -1810,6 +1828,39 @@ simulated function UnSetBurningBehavior(){
|
||||
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){
|
||||
if(nicePawn == none) return;
|
||||
if(Health > 0)
|
||||
@ -1827,7 +1878,7 @@ simulated function RemoveHead(){
|
||||
if(kfDmgType != none && kfDmgType.default.bIsMeleeDamage)
|
||||
bMeleeDecapitated = true;
|
||||
SetAnimAction('HitF');
|
||||
SetGroundSpeed(GroundSpeed *= 0.80);
|
||||
UpdateGroundSpeed();
|
||||
// No more raspy breathin'...cuz he has no throat or mouth :S
|
||||
AmbientSound = MiscSound;
|
||||
if(Health > 0)
|
||||
@ -2220,8 +2271,6 @@ defaultproperties
|
||||
lastStunTime=-1.000000
|
||||
headDamageRecoveryRate=100.000000
|
||||
headRecoveryTime=1.000000
|
||||
mind=1.000000
|
||||
accStunMindLvl=0.500000
|
||||
bCanBurn=True
|
||||
fuelRatio=0.750000
|
||||
heatDissipationRate=0.666000
|
||||
@ -2236,9 +2285,8 @@ defaultproperties
|
||||
RagdollLifeSpan=120.000000
|
||||
ControllerClass=class'NiceMonsterController'
|
||||
stoppingEffect=0.0
|
||||
stoppingRecoveryStartTime=2.0
|
||||
stoppingRecoveryRate=0.5
|
||||
maxStoppingEffect=0.5
|
||||
stoppingRecoveryRate=0.025
|
||||
maxStoppingEffect=0.25
|
||||
minStoppingThreshold=0.0
|
||||
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
||||
KConvulseSpacing=(Max=2.200000)
|
||||
|
Loading…
Reference in New Issue
Block a user