From 556ebe9db6818399d4818b413eda6fb09480ba99 Mon Sep 17 00:00:00 2001 From: UndeadZeratul Date: Tue, 23 Jun 2026 18:30:13 -0500 Subject: [PATCH 1/5] Use new linear HSV-to-RGB GetPercentColor() helper method Also only draw the bar if there's actually any pixels worth drawing --- zscript/CommandMenu.zsc | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/zscript/CommandMenu.zsc b/zscript/CommandMenu.zsc index 706707e..31536d1 100644 --- a/zscript/CommandMenu.zsc +++ b/zscript/CommandMenu.zsc @@ -811,7 +811,7 @@ extend class FollowerHandler sb.Fill(Color(DarkAlpha, 0, 0, 0), pos.x + 1, pos.y + (size.y - 3), size.x - 2, 2, flags); int mag = MaxMag == 1 ? int(wpn.ChamberedRound == wpn.CRType_Chambered) : wpn.Mag; double amPercent = clamp(mag / double(MaxMag), 0, 1.0); - sb.Fill(GetPercentColor(amPercent), pos.x + 1, pos.y + (size.y - 3), (size.x - 2) * AmPercent, 2, flags); + if ((size.x - 2) * AmPercent > 0) sb.Fill(HDCore.GetPercentColor(amPercent, 192, true), pos.x + 1, pos.y + (size.y - 3), (size.x - 2) * AmPercent, 2, flags); } } @@ -2172,26 +2172,6 @@ extend class FollowerHandler } } - private ui Color GetPercentColor(double percent) - { - if (percent >= 0.75) - { - return Color(192, 0, 224, 0); - } - else if (percent >= 0.50) - { - return Color(192, 255, 255, 0); - } - else if (percent >= 0.25) - { - return Color(192, 255, 128, 0); - } - else - { - return Color(192, 255, 0, 0); - } - } - private ui string GetTruncatedText(string text, int length) { if (text.Length() > length) From f32a2c1049fc04a6dbbd091cb5e242fe34301503 Mon Sep 17 00:00:00 2001 From: UndeadZeratul Date: Tue, 23 Jun 2026 18:31:02 -0500 Subject: [PATCH 2/5] Cache default-block actor height, take recruited marine's current height --- ZSCRIPT.zsc | 6 ++++++ zscript/AI.zsc | 5 +++-- zscript/Recruitment.zsc | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ZSCRIPT.zsc b/ZSCRIPT.zsc index 8758295..62cd3ed 100644 --- a/ZSCRIPT.zsc +++ b/ZSCRIPT.zsc @@ -240,6 +240,9 @@ class HDFollower : HDHumanoid abstract Handler = FollowerHandler(EventHandler.Find('FollowerHandler')); Super.BeginPlay(); + + baseScale = scale; + baseSize = (radius, height); } override void PostBeginPlay() @@ -290,6 +293,9 @@ class HDFollower : HDHumanoid abstract int MissPlayer; property MissPlayer : MissPlayer; int DodgeTimer; + + Vector2 baseScale; + Vector2 baseSize; Default { diff --git a/zscript/AI.zsc b/zscript/AI.zsc index 2e8f6a6..04c5beb 100644 --- a/zscript/AI.zsc +++ b/zscript/AI.zsc @@ -308,8 +308,9 @@ extend class HDFollower CrouchFactor = max(CrouchFactor - 0.10, 0); } - scale.y = default.scale.y * (1.0 - CrouchFactor); - A_SetSize(-1, default.Height * (1.0 - CrouchFactor)); + A_SetScale(baseScale.x, baseScale.y * (1.0 - CrouchFactor)); + A_SetSize(-1, baseSize.y * (1.0 - CrouchFactor)); + cameraheight=GetDefaultByType("HDMobBase").CameraHeight * (1.0 - CrouchFactor); gunheight=cameraheight-1.5; diff --git a/zscript/Recruitment.zsc b/zscript/Recruitment.zsc index 5e1cd79..619ef24 100644 --- a/zscript/Recruitment.zsc +++ b/zscript/Recruitment.zsc @@ -98,6 +98,8 @@ extend class FollowerHandler recruit.SetTag(GetUniqueMarineName(gender)); recruit.Translation = m.Translation; recruit.voicepitch = m.voicepitch; + recruit.baseSize = (m.radius, m.height); + recruit.baseScale = m.scale; FollowerWeapon fw; From be3ffdd6a3fccfa6b066113f248fe0ed93673603 Mon Sep 17 00:00:00 2001 From: UndeadZeratul Date: Tue, 23 Jun 2026 18:31:10 -0500 Subject: [PATCH 3/5] Minor formatting --- zscript/Wearables.zsc | 3 --- 1 file changed, 3 deletions(-) diff --git a/zscript/Wearables.zsc b/zscript/Wearables.zsc index 01817f1..5729caf 100644 --- a/zscript/Wearables.zsc +++ b/zscript/Wearables.zsc @@ -162,9 +162,6 @@ extend class HDFollower { HDCore.log("Follower."..getClassName(), LOGGING_DEBUG, "Giving Shield Badge."); - - - HDF.Give(self, "VirWeakShields"); let sss = HDPickup(FindInventory("VirWeakShields")); if (sss) From 65b70095b19fa40f5083149e6936a9d87f2daabd Mon Sep 17 00:00:00 2001 From: UndeadZeratul Date: Mon, 24 Aug 2026 18:11:15 -0500 Subject: [PATCH 4/5] Soften Dependency on Slogstin's Shield Badges Oops --- zscript/Wearables.zsc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zscript/Wearables.zsc b/zscript/Wearables.zsc index 5729caf..32a1749 100644 --- a/zscript/Wearables.zsc +++ b/zscript/Wearables.zsc @@ -162,8 +162,10 @@ extend class HDFollower { HDCore.log("Follower."..getClassName(), LOGGING_DEBUG, "Giving Shield Badge."); - HDF.Give(self, "VirWeakShields"); - let sss = HDPickup(FindInventory("VirWeakShields")); + name shieldName = 'VirWeakShields'; + + HDF.Give(self, shieldName); + let sss = HDPickup(FindInventory(shieldName)); if (sss) { sss.amount = 1; From d37b66ae85f00bc6260e6a6898b4b8ad7b132dd7 Mon Sep 17 00:00:00 2001 From: UndeadZeratul Date: Mon, 21 Sep 2026 18:44:34 -0500 Subject: [PATCH 5/5] Updates for latest main --- zscript/Weapons/Liberator.zsc | 40 +++++++++++++++++------------------ zscript/Weapons/ZM66.zsc | 20 +++++++++--------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/zscript/Weapons/Liberator.zsc b/zscript/Weapons/Liberator.zsc index 4964648..d7f82ad 100644 --- a/zscript/Weapons/Liberator.zsc +++ b/zscript/Weapons/Liberator.zsc @@ -120,18 +120,18 @@ class FW_Liberator : FollowerWeapon { Mag = wpn.WeaponStatus[LIBS_MAG]; ChamberedRound = wpn.WeaponStatus[LIBS_CHAMBER]; - if (wpn.WeaponStatus[LIBS_FLAGS] & LIBF_GRENADELOADED) + if (wpn.WeaponStatus[0] & LIBF_GRENADELOADED) { Owner.A_DropItem('HDRocketAmmo', 1); Owner.A_StartSound("weapons/grenopen",CHAN_WEAPON); } - nogl = wpn.WeaponStatus[LIBS_FLAGS] & LIBF_NOLAUNCHER? 1 : 0; - nobull = wpn.WeaponStatus[LIBS_FLAGS] & LIBF_NOBULLPUP? 1 : 0; - noauto = wpn.WeaponStatus[LIBS_FLAGS] & LIBF_NOAUTO? 1 : 0; - lefty = wpn.WeaponStatus[LIBS_FLAGS] & LIBF_LEFTY? 1 : 0; - altreticle = wpn.WeaponStatus[LIBS_FLAGS] & LIBF_ALTRETICLE? 1 : 0; - frontreticle = wpn.WeaponStatus[LIBS_FLAGS] & LIBF_FRONTRETICLE? 1 : 0; + nogl = wpn.WeaponStatus[0] & LIBF_NOLAUNCHER? 1 : 0; + nobull = wpn.WeaponStatus[0] & LIBF_NOBULLPUP? 1 : 0; + noauto = wpn.WeaponStatus[0] & LIBF_NOAUTO? 1 : 0; + lefty = wpn.WeaponStatus[0] & LIBF_LEFTY? 1 : 0; + altreticle = wpn.WeaponStatus[0] & LIBF_ALTRETICLE? 1 : 0; + frontreticle = wpn.WeaponStatus[0] & LIBF_FRONTRETICLE? 1 : 0; Crossdot = wpn.weaponstatus[LIBS_DOT]; } @@ -139,26 +139,26 @@ class FW_Liberator : FollowerWeapon { wpn.WeaponStatus[LIBS_MAG] = Mag; wpn.WeaponStatus[LIBS_CHAMBER] = ChamberedRound; - wpn.weaponstatus[LIBS_FLAGS]&=~LIBF_GRENADELOADED; + wpn.weaponstatus[0]&=~LIBF_GRENADELOADED; - if(nogl>0)wpn.WeaponStatus[LIBS_FLAGS]|=LIBF_NOLAUNCHER; - else wpn.WeaponStatus[LIBS_FLAGS]&=~LIBF_NOLAUNCHER; + if(nogl>0)wpn.WeaponStatus[0]|=LIBF_NOLAUNCHER; + else wpn.WeaponStatus[0]&=~LIBF_NOLAUNCHER; - if(nobull>0)wpn.WeaponStatus[LIBS_FLAGS]|=LIBF_NOBULLPUP; - else wpn.WeaponStatus[LIBS_FLAGS]&=~LIBF_NOBULLPUP; + if(nobull>0)wpn.WeaponStatus[0]|=LIBF_NOBULLPUP; + else wpn.WeaponStatus[0]&=~LIBF_NOBULLPUP; - if(noauto>0)wpn.WeaponStatus[LIBS_FLAGS]|=LIBF_NOAUTO; - else wpn.WeaponStatus[LIBS_FLAGS]&=~LIBF_NOAUTO; + if(noauto>0)wpn.WeaponStatus[0]|=LIBF_NOAUTO; + else wpn.WeaponStatus[0]&=~LIBF_NOAUTO; - if(lefty>0)wpn.WeaponStatus[LIBS_FLAGS]|=LIBF_LEFTY; - else wpn.WeaponStatus[LIBS_FLAGS]&=~LIBF_LEFTY; + if(lefty>0)wpn.WeaponStatus[0]|=LIBF_LEFTY; + else wpn.WeaponStatus[0]&=~LIBF_LEFTY; - if(altreticle>0)wpn.WeaponStatus[LIBS_FLAGS]|=LIBF_ALTRETICLE; - else wpn.WeaponStatus[LIBS_FLAGS]&=~LIBF_ALTRETICLE; + if(altreticle>0)wpn.WeaponStatus[0]|=LIBF_ALTRETICLE; + else wpn.WeaponStatus[0]&=~LIBF_ALTRETICLE; - if(frontreticle>0)wpn.WeaponStatus[LIBS_FLAGS]|=LIBF_FRONTRETICLE; - else wpn.WeaponStatus[LIBS_FLAGS]&=~LIBF_FRONTRETICLE; + if(frontreticle>0)wpn.WeaponStatus[0]|=LIBF_FRONTRETICLE; + else wpn.WeaponStatus[0]&=~LIBF_FRONTRETICLE; wpn.weaponstatus[LIBS_DOT] = Crossdot; diff --git a/zscript/Weapons/ZM66.zsc b/zscript/Weapons/ZM66.zsc index 86d0258..e75c569 100644 --- a/zscript/Weapons/ZM66.zsc +++ b/zscript/Weapons/ZM66.zsc @@ -120,15 +120,15 @@ class FW_ZM66 : FollowerWeapon override void OnTransfer(HDWeapon wpn) { Mag = wpn.WeaponStatus[ZM66S_MAG]; - ChamberedRound = wpn.WeaponStatus[ZM66S_FLAGS] & ZM66F_CHAMBER ? 2 : 0; + ChamberedRound = wpn.WeaponStatus[0] & ZM66F_CHAMBER ? 2 : 0; if (wpn.WeaponStatus[0] & ZM66F_GRENADELOADED) { Owner.A_DropItem('HDRocketAmmo', 1); Owner.A_StartSound("weapons/grenopen",CHAN_WEAPON); } - nogl = wpn.WeaponStatus[ZM66S_FLAGS] & ZM66F_NOLAUNCHER? 1 : 0; - noauto = wpn.WeaponStatus[ZM66S_FLAGS] & ZM66F_NOFIRESELECT? 1 : 0; + nogl = wpn.WeaponStatus[0] & ZM66F_NOLAUNCHER? 1 : 0; + noauto = wpn.WeaponStatus[0] & ZM66F_NOFIRESELECT? 1 : 0; Crossdot = wpn.weaponstatus[ZM66S_DOT]; } @@ -136,16 +136,16 @@ class FW_ZM66 : FollowerWeapon { wpn.WeaponStatus[ZM66S_MAG] = Mag; - wpn.weaponstatus[ZM66S_FLAGS]&=~ZM66F_GRENADELOADED; + wpn.weaponstatus[0]&=~ZM66F_GRENADELOADED; - if(ChamberedRound > 0)wpn.weaponstatus[ZM66S_FLAGS]|=ZM66F_CHAMBER; - else wpn.weaponstatus[ZM66S_FLAGS]&=~ZM66F_CHAMBER; + if(ChamberedRound > 0)wpn.weaponstatus[0]|=ZM66F_CHAMBER; + else wpn.weaponstatus[0]&=~ZM66F_CHAMBER; - if(nogl>0)wpn.WeaponStatus[ZM66S_FLAGS]|=ZM66F_NOLAUNCHER; - else wpn.WeaponStatus[ZM66S_FLAGS]&=~ZM66F_NOLAUNCHER; + if(nogl>0)wpn.WeaponStatus[0]|=ZM66F_NOLAUNCHER; + else wpn.WeaponStatus[0]&=~ZM66F_NOLAUNCHER; - if(noauto>0)wpn.WeaponStatus[ZM66S_FLAGS]|=ZM66F_NOFIRESELECT; - else wpn.WeaponStatus[ZM66S_FLAGS]&=~ZM66F_NOFIRESELECT; + if(noauto>0)wpn.WeaponStatus[0]|=ZM66F_NOFIRESELECT; + else wpn.WeaponStatus[0]&=~ZM66F_NOFIRESELECT; wpn.weaponstatus[ZM66S_DOT] = Crossdot; }