From 2384dc34d122582e4202514fab0aa37ddc4c8e06 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Tue, 29 Oct 2024 02:52:55 +0700 Subject: [PATCH 1/7] Remove Shivers' collision removal on teleport This should hopefully remove any issues with them not taking any damage during teleport --- sources/Zeds/Nice/NiceZombieShiver.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieShiver.uc b/sources/Zeds/Nice/NiceZombieShiver.uc index 72c110e..8e88b16 100644 --- a/sources/Zeds/Nice/NiceZombieShiver.uc +++ b/sources/Zeds/Nice/NiceZombieShiver.uc @@ -281,7 +281,7 @@ simulated function Tick(float Delta) { SetCollision(true, true); FlashTeleport(); - SetCollision(false, false); + SetCollision(true, false); FadeStage = 2; } } @@ -322,7 +322,7 @@ function StartTeleport() { FadeStage = 1; AlphaFader = 255; - SetCollision(false, false); + SetCollision(true, false); bFlashTeleporting = true; } function FlashTeleport() -- 2.20.1 From 8dc8f35b08738ad095af6803a95cc184f237da2d Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Tue, 29 Oct 2024 03:00:45 +0700 Subject: [PATCH 2/7] Remove `Claw3` animation from Shiver --- sources/Zeds/Nice/NiceZombieShiver.uc | 43 +++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieShiver.uc b/sources/Zeds/Nice/NiceZombieShiver.uc index 8e88b16..1a883ff 100644 --- a/sources/Zeds/Nice/NiceZombieShiver.uc +++ b/sources/Zeds/Nice/NiceZombieShiver.uc @@ -38,6 +38,33 @@ simulated function PostBeginPlay() } } } + +simulated event SetAnimAction(name NewAction) { + local int meleeAnimIndex; + + if (bFrozenZed) return; + if (newAction == '') return; + + if (newAction == 'Claw') { + meleeAnimIndex = Rand(2); // Shivers only have two animations now + newAction = meleeAnims[meleeAnimIndex]; + currentDamtype = zombieDamType[meleeAnimIndex]; + } else if(newAction == 'DoorBash') { + currentDamtype = zombieDamType[Rand(3)]; + } + expectingChannel = DoAnimAction(NewAction); + if (AnimNeedsWait(newAction)) { + bWaitForAnim = true; + } else { + bWaitForAnim = false; + } + if (level.netMode != NM_Client) { + animAction = newAction; + bResetAnimAct = True; + resetAnimActTime = level.timeSeconds + 0.3; + } +} + simulated function Destroyed() { if (Level.NetMode != NM_DedicatedServer && MatAlphaSkin != none) @@ -429,10 +456,16 @@ simulated function int DoAnimAction( name AnimName ) } defaultproperties { - HeadOffsetY=-3.000000 + headOffsetY=-3.000000 idleInsertFrame=0.468000 - OnlineHeadshotOffset=(X=19.000000,Z=39.000000) - ScoringValue=15 - HeadRadius=8.000000 - HeadHeight=3.000000 + onlineHeadshotOffset=(X=19.000000,Z=39.000000) + scoringValue=15 + headRadius=8.000000 + headHeight=3.000000 + // Override third animation just in case. + // However it shouldn't be required since we've already changed + // `SetAnimAction` function to only use first two animations + meleeAnims(0)="Claw" + meleeAnims(1)="Claw2" + meleeAnims(2)="Claw" } -- 2.20.1 From 8f5511e899ed70c8a60cdfb24414137a1f853143 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Tue, 29 Oct 2024 03:17:30 +0700 Subject: [PATCH 3/7] Add attack delay to Shivers right after teleport Now shivers cannot attack for 0.5 seconds after teleporting, which should help with them getting cheap shots on players. --- sources/Zeds/Nice/NiceZombieShiver.uc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/Zeds/Nice/NiceZombieShiver.uc b/sources/Zeds/Nice/NiceZombieShiver.uc index 1a883ff..a28b0d1 100644 --- a/sources/Zeds/Nice/NiceZombieShiver.uc +++ b/sources/Zeds/Nice/NiceZombieShiver.uc @@ -3,6 +3,7 @@ class NiceZombieShiver extends NiceZombieShiverBase; var float TeleportBlockTime; var float HeadOffsetY; var transient bool bRunning, bClientRunning; +var float teleportAttackCooldownEndTime; replication { reliable if ( Role == ROLE_Authority) @@ -39,6 +40,12 @@ simulated function PostBeginPlay() } } +function bool CanAttack(Actor target) { + if (level.timeSeconds < teleportAttackCooldownEndTime) + return false; + return super.CanAttack(target); +} + simulated event SetAnimAction(name NewAction) { local int meleeAnimIndex; @@ -407,6 +414,7 @@ function FlashTeleport() Teleported: bFlashTeleporting = false; LastFlashTime = Level.TimeSeconds; + teleportAttackCooldownEndTime = level.timeSeconds + 0.5; } function Died(Controller Killer, class damageType, vector HitLocation) { -- 2.20.1 From a003061d6df8a9c157733389ad66285b22856643 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Tue, 29 Oct 2024 03:36:40 +0700 Subject: [PATCH 4/7] Add zeds changing `moveTarget` when in-fighting starts --- sources/Zeds/NiceMonsterController.uc | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/Zeds/NiceMonsterController.uc b/sources/Zeds/NiceMonsterController.uc index 1bcb5ab..59fd849 100644 --- a/sources/Zeds/NiceMonsterController.uc +++ b/sources/Zeds/NiceMonsterController.uc @@ -480,6 +480,7 @@ function bool SetEnemy( pawn newEnemy, // Do fight if we can if(bCanForceFight) { + moveTarget = newEnemy; ChangeEnemy(newEnemy, true); FightEnemy(false); return true; -- 2.20.1 From 324e644db4e243f1ae1688f95ba35609f11e6270 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Tue, 29 Oct 2024 03:57:46 +0700 Subject: [PATCH 5/7] Add mechanic that buffs clots from the siren's scream Increase their speed by 50% and tankiness by not receving any body damage upon decapitation while under the effects. --- sources/Zeds/Nice/NiceZombieClot.uc | 26 ++++++++++++++++++++++++++ sources/Zeds/Nice/NiceZombieSiren.uc | 5 +++++ 2 files changed, 31 insertions(+) diff --git a/sources/Zeds/Nice/NiceZombieClot.uc b/sources/Zeds/Nice/NiceZombieClot.uc index 57875e8..71f8939 100644 --- a/sources/Zeds/Nice/NiceZombieClot.uc +++ b/sources/Zeds/Nice/NiceZombieClot.uc @@ -5,6 +5,8 @@ class NiceZombieClot extends NiceZombieClotBase; #exec OBJ LOAD FILE=KF_Specimens_Trip_T.utx #exec OBJ LOAD FILE=MeanZedSkins.utx +var float sirenBoostTimeout; + function ClawDamageTarget() { local vector PushDir; @@ -109,9 +111,33 @@ simulated function int DoAnimAction( name AnimName ) } return super.DoAnimAction( AnimName ); } +function DealDecapDamage( int damage, + Pawn instigatedBy, + Vector hitLocation, + Vector momentum, + class damageType, + float headshotLevel, + KFPlayerReplicationInfo KFPRI, + optional float lockonTime) { + if (sirenBoostTimeout > 0) { + RemoveHead(); + } else { + super.DealDecapDamage(damage, instigatedBy, hitLocation, momentum, + damageType, headshotLevel, KFPRI, lockonTime); + } +} +simulated function UpdateGroundSpeed() { + super.UpdateGroundSpeed(); + if (sirenBoostTimeout > 0) { + groundSpeed *= 1.5; + } +} simulated function Tick(float DeltaTime) { super.Tick(DeltaTime); + if (sirenBoostTimeout >= 0) { + sirenBoostTimeout -= deltaTime; + } if( bShotAnim && Role == ROLE_Authority ) { if( LookTarget!=none ) diff --git a/sources/Zeds/Nice/NiceZombieSiren.uc b/sources/Zeds/Nice/NiceZombieSiren.uc index 6f13cf4..aa15090 100644 --- a/sources/Zeds/Nice/NiceZombieSiren.uc +++ b/sources/Zeds/Nice/NiceZombieSiren.uc @@ -226,6 +226,7 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class niceVet; + local NiceZombieClot niceClot; if (bHurtEntry || Health <= 0 || HeadHealth <= 0 || bIsStunned) return; @@ -243,6 +244,10 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class Date: Tue, 29 Oct 2024 04:15:16 +0700 Subject: [PATCH 6/7] Add distance to target limit for mean husks' spam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Husks now only spam fireballs in a rage when within 30 units of their target. They’ll still keep track of the number of shots and enter this enraged state regardless of distance, but close proximity is required for rapid-fire. --- sources/Zeds/Mean/MeanZombieHusk.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Zeds/Mean/MeanZombieHusk.uc b/sources/Zeds/Mean/MeanZombieHusk.uc index b0ada50..efbb5fb 100644 --- a/sources/Zeds/Mean/MeanZombieHusk.uc +++ b/sources/Zeds/Mean/MeanZombieHusk.uc @@ -37,7 +37,7 @@ function RangedAttack(Actor A) { //Increment the number of consecutive shtos taken and apply the cool down if needed totalShots ++; consecutiveShots ++; - if(consecutiveShots < 3 && totalShots > maxNormalShots) + if(consecutiveShots < 3 && totalShots > maxNormalShots && VSize(a.location - location) <= 900) NextFireProjectileTime = Level.TimeSeconds; else{ NextFireProjectileTime = Level.TimeSeconds + ProjectileFireInterval + (FRand() * 2.0); -- 2.20.1 From 501662a7d77d7fe56f687e30db27f27b5e85185d Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Wed, 30 Oct 2024 03:21:47 +0700 Subject: [PATCH 7/7] Fix harpoon badly attaching to some static meshes Just needed to add proper computation of relative location, that takes into account mesh's own rotation. --- sources/Weapons/NiceBullet.uc | 2 +- sources/Weapons/NiceProjectileSpawner.uc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/Weapons/NiceBullet.uc b/sources/Weapons/NiceBullet.uc index 8e03861..216ee99 100644 --- a/sources/Weapons/NiceBullet.uc +++ b/sources/Weapons/NiceBullet.uc @@ -710,7 +710,7 @@ function Stick(Actor target, Vector hitLocation) { expData.affectedByScream = charAffectedByScream; if (!target.IsA('NiceMonster')) { - hitLocation -= target.location; + hitLocation = (hitLocation - target.location) << target.rotation; boneStick = 'None'; resultTarget = target; } else { diff --git a/sources/Weapons/NiceProjectileSpawner.uc b/sources/Weapons/NiceProjectileSpawner.uc index 5334af4..a8ee953 100644 --- a/sources/Weapons/NiceProjectileSpawner.uc +++ b/sources/Weapons/NiceProjectileSpawner.uc @@ -259,6 +259,7 @@ static function SpawnStuckProjectile( } else { spawnedBullet.SetBase(base); spawnedBullet.SetRelativeLocation(shift); + spawnedBullet.SetRelativeRotation(direction - base.rotation); } } -- 2.20.1