Skip to content

Commit

Permalink
Merge pull request #24 from NSHoffman/dev
Browse files Browse the repository at this point in the history
release/2023-05-05/1.2.1
  • Loading branch information
NSHoffman committed May 5, 2023
2 parents 439d8e8 + 84a3de4 commit 742add1
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 227 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# N7 Zeds Changelog

## `1.2.0`

### Features

- Although custom skins are turned on by default, it is now possible to switch them off and get back to original textures by setting `bUseOriginalZedSkins` to `True` in configuration file.

### Fixes

#### `1.2.1`

- Fixed issue with vanilla textured stalkers blinking and not going invisible
22 changes: 20 additions & 2 deletions Classes/N7_Boss.uc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ simulated function AnimEnd(int Channel)
}
}

/**
* The whole purpose of overriding the method below
* is to provide different material sources
*/

simulated function CloakBoss()
{
local Controller C;
Expand Down Expand Up @@ -236,8 +241,8 @@ simulated function CloakBoss()
return;
}

Skins[0] = Shader'KF_Specimens_Trip_T.patriarch_invisible_gun';
Skins[1] = Shader'KF_Specimens_Trip_T.patriarch_invisible';
Skins[0] = default.Skins[2];
Skins[1] = default.Skins[3];

if (PlayerShadow != None)
{
Expand Down Expand Up @@ -611,6 +616,11 @@ function SpawnPseudoSquad()
MinPseudoSquadSize = CombatStages[SyringeCount].MinPseudos;
MaxPseudoSquadSize = CombatStages[SyringeCount].MaxPseudos;

if (MaxPseudoSquadSize <= 0 || MaxPseudoSquadSize < MinPseudoSquadSize)
{
return;
}

PseudoSquadSize = MinPseudoSquadSize + Rand(MaxPseudoSquadSize - MinPseudoSquadSize + 1);

for (i = 0; i < PseudoSquadSize; i++)
Expand All @@ -628,6 +638,11 @@ function KillPseudoSquad()
{
local int i;

if (PseudoSquad.Length == 0)
{
return;
}

for (i = 0; i < PseudoSquad.Length; i++)
{
if (PseudoSquad[i] != None)
Expand Down Expand Up @@ -1091,4 +1106,7 @@ defaultProperties
ClawMeleeDamageRange=75
ImpaleMeleeDamageRange=90.000000
PseudoClass=class'N7_PseudoBoss'

Skins(2)=Shader'KF_Specimens_Trip_T.patriarch_invisible_gun'
Skins(3)=Shader'KF_Specimens_Trip_T.patriarch_invisible'
}
79 changes: 2 additions & 77 deletions Classes/N7_Boss_SAVAGE.uc
Original file line number Diff line number Diff line change
@@ -1,82 +1,5 @@
class N7_Boss_SAVAGE extends N7_Boss;

/**
* The whole purpose of overriding the method below
* is to provide different material sources
*/

simulated function CloakBoss()
{
local Controller C;
local int index;

if (bZapped)
{
return;
}

if (bSpotted)
{
Visibility = 120;

if (Level.NetMode == NM_DedicatedServer)
{
return;
}

Skins[0] = Finalblend'KFX.StalkerGlow';
Skins[1] = Finalblend'KFX.StalkerGlow';
bUnlit = True;
return;
}

Visibility = 1;
bCloaked = True;
if (Level.NetMode != NM_Client)
{
for (C = Level.ControllerList; C != None; C = C.NextController)
{
if (C.bIsPlayer && C.Enemy == self)
{
C.Enemy = None;
}
}
}

if (Level.NetMode == NM_DedicatedServer)
{
return;
}

Skins[0] = Shader'KF_Specimens_Trip_N7.patriarch_invisible_gun';
Skins[1] = Shader'KF_Specimens_Trip_N7.patriarch_invisible';

if (PlayerShadow != None)
{
PlayerShadow.bShadowActive = False;
}
Projectors.Remove(0, Projectors.Length);
bAcceptsProjectors = False;

if (FRand() < 0.10)
{
index = Rand(Level.Game.NumPlayers);

for (C = Level.ControllerList; C != None; C = C.NextController)
{
if (PlayerController(C) != None)
{
if (index == 0)
{
PlayerController(C).Speech('AUTO', 8, "");
break;
}
index--;
}
}
}
}

defaultProperties
{
DetachedArmClass=class'N7_SeveredArmPatriarch'
Expand All @@ -85,4 +8,6 @@ defaultProperties
DetachedSpecialArmClass=class'N7_SeveredRocketArmPatriarch'
Skins(0)=Combiner'KF_Specimens_Trip_N7.gatling_cmb'
Skins(1)=Combiner'KF_Specimens_Trip_N7.patriarch_cmb'
Skins(2)=Shader'KF_Specimens_Trip_N7.patriarch_invisible_gun'
Skins(3)=Shader'KF_Specimens_Trip_N7.patriarch_invisible'
}
160 changes: 156 additions & 4 deletions Classes/N7_Stalker.uc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class N7_Stalker extends KFChar.ZombieStalker_STANDARD;
class N7_Stalker extends KFChar.ZombieStalker_STANDARD
config(N7ZedsMut);

/**
* Each stalker has a chance to spawn
Expand Down Expand Up @@ -69,7 +70,7 @@ simulated function int AttackAndMoveDoAnimAction(name AnimName)
return super(KFMonster).DoAnimAction(AnimName);
}

simulated function Tick(float DeltaTime)
simulated function Tick(float DeltaTime)
{
local bool bKeepAccelerationWhileAttacking;
bKeepAccelerationWhileAttacking = LookTarget != None && bShotAnim && !bWaitForAnim;
Expand Down Expand Up @@ -105,7 +106,7 @@ simulated function Tick(float DeltaTime)
bSpotted = False;
}

if (!bSpotted && !bCloaked && Skins[0] != Combiner'KF_Specimens_Trip_N7.stalker_cmb')
if (!bSpotted && !bCloaked && Skins[0] != default.Skins[3])
{
UncloakStalker();
}
Expand All @@ -116,7 +117,7 @@ simulated function Tick(float DeltaTime)
bUnlit = False;
CloakStalker();
}
else if (Skins[0] != Shader'KF_Specimens_Trip_N7.stalker_invisible')
else if (Skins[0] != default.Skins[0])
{
CloakStalker();
}
Expand Down Expand Up @@ -148,6 +149,11 @@ function SpawnPseudoSquad()
local int PseudoSquadSize, i;
local N7_Stalker CurrentPseudoStalker;

if (MaxPseudoSquadSize <= 0 || MaxPseudoSquadSize < MinPseudoSquadSize)
{
return;
}

PseudoSquadSize = MinPseudoSquadSize + Rand(MaxPseudoSquadSize - MinPseudoSquadSize + 1);

for (i = 0; i < PseudoSquadSize; i++)
Expand All @@ -165,6 +171,11 @@ function KillPseudoSquad()
{
local int i;

if (PseudoSquad.Length == 0)
{
return;
}

for (i = 0; i < PseudoSquad.Length; i++)
{
if (PseudoSquad[i] != None)
Expand All @@ -177,6 +188,145 @@ function KillPseudoSquad()
PseudoSquad.Length = 0;
}

/**
* The whole purpose of overriding the methods below
* is to replace hardcoded materials with property values
*/

function RemoveHead()
{
super.RemoveHead();

if (!bCrispified)
{
Skins[1] = default.Skins[2];
Skins[0] = default.Skins[3];
}
}

simulated function CloakStalker()
{
if (bZapped)
{
return;
}

if (bSpotted)
{
if (Level.NetMode == NM_DedicatedServer)
return;

Skins[0] = Finalblend'KFX.StalkerGlow';
Skins[1] = Finalblend'KFX.StalkerGlow';
bUnlit = True;
return;
}

if (!bDecapitated && !bCrispified)
{
Visibility = 1;
bCloaked = True;

if (Level.NetMode == NM_DedicatedServer)
return;

Skins[0] = default.Skins[0];
Skins[1] = default.Skins[1];

if (PlayerShadow != None)
PlayerShadow.bShadowActive = False;
if (RealTimeShadow != None)
RealTimeShadow.Destroy();

Projectors.Remove(0, Projectors.Length);
bAcceptsProjectors = False;
SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, True);
}
}

simulated function UnCloakStalker()
{
if (bZapped)
{
return;
}

if (!bCrispified)
{
LastUncloakTime = Level.TimeSeconds;

Visibility = default.Visibility;
bCloaked = False;
bUnlit = False;

// 25% chance of our Enemy saying something about us being invisible
if (
Level.NetMode != NM_Client
&& !KFGameType(Level.Game).bDidStalkerInvisibleMessage
&& FRand() < 0.25
&& Controller.Enemy != None
&& PlayerController(Controller.Enemy.Controller) != None
)
{
PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, "");
KFGameType(Level.Game).bDidStalkerInvisibleMessage = True;
}

if (Level.NetMode == NM_DedicatedServer)
return;

if (Skins[0] != default.Skins[3])
{
Skins[1] = default.Skins[2];
Skins[0] = default.Skins[3];

if (PlayerShadow != None)
PlayerShadow.bShadowActive = True;

bAcceptsProjectors = True;
SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, True);
}
}
}

simulated function SetZappedBehavior()
{
super.SetZappedBehavior();

bUnlit = False;

// Handle setting the zed to uncloaked so the zapped overlay works properly
if (Level.Netmode != NM_DedicatedServer)
{
Skins[1] = default.Skins[2];
Skins[0] = default.Skins[3];

if (PlayerShadow != None)
PlayerShadow.bShadowActive = True;

bAcceptsProjectors = True;
SetOverlayMaterial(Material'KFZED_FX_T.Energy.ZED_overlay_Hit_Shdr', 999, True);
}
}

simulated function PlayDying(class<DamageType> DamageType, Vector HitLoc)
{
super(KFMonster).PlayDying(DamageType, HitLoc);

KillPseudoSquad();

if (bUnlit)
bUnlit = !bUnlit;

LocalKFHumanPawn = None;

if (!bCrispified)
{
Skins[1] = default.Skins[2];
Skins[0] = default.Skins[3];
}
}

defaultProperties
{
MenuName="N7 Stalker"
Expand All @@ -185,4 +335,6 @@ defaultProperties
MinPseudoSquadSize=0
MaxPseudoSquadSize=3
PseudoClass=class'N7_PseudoStalker'
Skins(2)=FinalBlend'KF_Specimens_Trip_T.stalker_fb'
Skins(3)=Combiner'KF_Specimens_Trip_T.stalker_cmb'
}
Loading

0 comments on commit 742add1

Please sign in to comment.