From a736b0f96a72136223465cbca9f22d4590f38c14 Mon Sep 17 00:00:00 2001 From: Wikot235 <149392035+Wikot235@users.noreply.github.com> Date: Sun, 28 Jul 2024 14:11:06 +0200 Subject: [PATCH] Added new spawnflag --- sp/src/game/server/hl2/npc_BaseZombie.cpp | 2 +- sp/src/game/server/hl2/npc_BaseZombie.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sp/src/game/server/hl2/npc_BaseZombie.cpp b/sp/src/game/server/hl2/npc_BaseZombie.cpp index 1c5cde10..0799fcf6 100644 --- a/sp/src/game/server/hl2/npc_BaseZombie.cpp +++ b/sp/src/game/server/hl2/npc_BaseZombie.cpp @@ -787,7 +787,7 @@ bool CNPC_BaseZombie::ShouldBecomeTorso( const CTakeDamageInfo &info, float flDa HeadcrabRelease_t CNPC_BaseZombie::ShouldReleaseHeadcrab( const CTakeDamageInfo &info, float flDamageThreshold ) { #ifdef MAPBASE - if ( m_iHealth <= 0 && !m_fIsHeadless ) + if ( m_iHealth <= 0 && !m_fIsHeadless && !HasSpawnFlags(SF_ZOMBIE_NO_HEADCRAB_SPAWN)) #else if ( m_iHealth <= 0 ) #endif diff --git a/sp/src/game/server/hl2/npc_BaseZombie.h b/sp/src/game/server/hl2/npc_BaseZombie.h index aa7541c1..16ca0db9 100644 --- a/sp/src/game/server/hl2/npc_BaseZombie.h +++ b/sp/src/game/server/hl2/npc_BaseZombie.h @@ -43,6 +43,7 @@ extern int AE_ZOMBIE_POUND; #ifdef MAPBASE #define SF_ZOMBIE_NO_TORSO ( 1 << 15 ) +#define SF_ZOMBIE_NO_HEADCRAB_SPAWN ( 1 << 16 ) #endif