|
|
(71 intermediate revisions by 36 users not shown) |
Line 1: |
Line 1: |
| [http://amamon.servemp3.com/articles/busty-bitch.html busty bitch] [http://diaper.servemp3.com/blu-cantrell.htm blu cantrell nude] [http://prozak.servemp3.com/text/taylor-wane.htm taylor wane] [http://perfum.servemp3.com/view/pegboard-mdf.html pegboard mdf] [http://amamon.servemp3.com/articles/inta-gov-ar.html inta gov ar] [http://perfum.servemp3.com/view/french-kiss.html french kiss brother sister] [http://marked.servemp3.com/web/logic-puzzles.html logic puzzles] [http://perfum.servemp3.com/view/beauty-products.html beauty products] [http://amamon.servemp3.com/articles/amateur-men-masturbate.html amateur men masturbate free] [http://mortar.servemp3.com/content/whitening-white.html whitening white tooth] [http://mortar.servemp3.com/content/jade-hsu-gallery.html jade hsu gallery] [http://perfum.servemp3.com/view/american-states.html american states water company] [http://whiff.servemp3.com/library/judy-collins.html judy collins] [http://mortar.servemp3.com/content/emily18.html emily18] [http://toledo.servemp3.com/articles/asian-boob.html asian boob] [http://seeds.servemp3.com/web/word-search-maker.html word search maker] [http://mortar.servemp3.com/content/austin-powers.html austin powers] [http://expuls.servemp3.com/web/naked-gay-men.html naked gay men] [http://amamon.servemp3.com/articles/tied-tits.html tied tits] [http://prozak.servemp3.com/text/mascot.htm mascot] [http://prozak.servemp3.com/text/role-of-men.htm role of men in ancient rome] [http://seeds.servemp3.com/web/white-boxers.html white boxers dogs] [http://prozak.servemp3.com/text/train-travel-virgin.htm train travel virgin] [http://toledo.servemp3.com/articles/oldies-ringtone.html oldies ringtone] [http://toledo.servemp3.com/articles/female-strippers.html female strippers michigan] [http://mortar.servemp3.com/content/music-123.html music 123] [http://diaper.servemp3.com/condo-life.htm condo life] [http://amamon.servemp3.com/articles/stress-vitamins.html stress vitamins] [http://prozak.servemp3.com/text/camp-songs.htm camp songs] [http://prozak.servemp3.com/text/amater.htm amater] [http://marked.servemp3.com/web/gangbanged.html gangbanged] [http://seeds.servemp3.com/web/leuke-technische.html leuke technische vacatures] [http://amamon.servemp3.com/articles/dan-radcliffe.html dan radcliffe] [http://marked.servemp3.com/web/drum-and-bass.html drum and bass] [http://seeds.servemp3.com/web/spa-ozonator.html spa ozonator] [http://mortar.servemp3.com/content/showing-off.html showing off] [http://amamon.servemp3.com/articles/science-exhibitions.html science exhibitions] [http://prozak.servemp3.com/text/krivon.htm krivon] [http://marked.servemp3.com/web/nurse-hentai.html nurse hentai] [http://seeds.servemp3.com/web/lingerie-for-young.html lingerie for young teens] [http://expuls.servemp3.com/web/teddy.html teddy] [http://seeds.servemp3.com/web/formula-one.html formula one] [http://expuls.servemp3.com/web/klm-airline.html klm airline] [http://safely.servemp3.com/articles/auto-discount-rental.html auto discount rental vancouver] [http://perfum.servemp3.com/view/priority-one.html priority one financial services] [http://amamon.servemp3.com/articles/amature-wife.html amature wife] [http://whiff.servemp3.com/library/pennsylvania.html pennsylvania realtor] [http://expuls.servemp3.com/web/the-olsen-twins.html the olsen twins naked] [http://whiff.servemp3.com/library/john-laurens.html john laurens] [http://safely.servemp3.com/articles/eastern-kentucky.html eastern kentucky university] [http://expuls.servemp3.com/web/baby-shower-ideas.html baby shower ideas] [http://diaper.servemp3.com/free-paris-hilton.htm free paris hilton xxx] [http://expuls.servemp3.com/web/motels.html motels] [http://seeds.servemp3.com/web/its-just-a-ride.html its just a ride its just a ride] [http://chopt.servemp3.com/stone-temple-pilots.htm stone temple pilots creep] [http://perfum.servemp3.com/view/masturbation-technique.html masturbation technique] [http://seeds.servemp3.com/web/ag-export-promotions.html ag export promotions] [http://chopt.servemp3.com/cool-pictures.htm cool pictures] [http://seeds.servemp3.com/web/zinnia.html zinnia] [http://marked.servemp3.com/web/youth-and-community.html youth and community development] [http://perfum.servemp3.com/view/school-christmas.html school christmas plays] [http://expuls.servemp3.com/web/product-life-cycle.html product life cycle] [http://toledo.servemp3.com/articles/gardening.html gardening] [http://perfum.servemp3.com/view/hardcore-lolita.html hardcore lolita] [http://perfum.servemp3.com/view/contacts.html contacts] [http://prozak.servemp3.com/text/asian-women-seeking.htm asian women seeking men] [http://diaper.servemp3.com/teacher-quotes.htm teacher quotes] [http://chopt.servemp3.com/las-vegas-nv.htm las vegas nv real estate] [http://marked.servemp3.com/web/downtown-milwaukee.html downtown milwaukee wisconsin senior real estate specialist] [http://seeds.servemp3.com/web/melina-velba.html melina velba] [http://seeds.servemp3.com/web/1m-business-in.html 1m business in ma] [http://chopt.servemp3.com/pleural-effusion.htm pleural effusion] [http://prozak.servemp3.com/text/teen-brunette.htm teen brunette] [http://diaper.servemp3.com/swimming-pool-tunnel.htm swimming pool tunnel slide] [http://seeds.servemp3.com/web/rankbrasil-kazaa.html rankbrasil kazaa] [http://diaper.servemp3.com/dunn-and-bradstreet.htm dunn and bradstreet] [http://expuls.servemp3.com/web/chuck-taylor.html chuck taylor] [http://whiff.servemp3.com/library/montana-legislative.html montana legislative services] [http://prozak.servemp3.com/text/order-ionamin.htm order ionamin] [http://whiff.servemp3.com/library/ford-ranger.html ford ranger] [http://diaper.servemp3.com/licked.htm licked] [http://marked.servemp3.com/web/fantasy-costumes.html fantasy costumes] [http://chopt.servemp3.com/cell-mobile-phone.htm cell mobile phone sidekicks t] [http://perfum.servemp3.com/view/tulsa-zoo.html tulsa zoo] [http://chopt.servemp3.com/ryan.htm ryan] [http://mortar.servemp3.com/content/camel-exotic-blends.html camel exotic blends] [http://expuls.servemp3.com/web/travel-agent-discounts.html travel agent discounts] [http://expuls.servemp3.com/web/johnny-horton.html johnny horton] [http://chopt.servemp3.com/untapped-teens.htm untapped teens] [http://whiff.servemp3.com/library/male-sexual-enlargement.html male sexual enlargement] [http://seeds.servemp3.com/web/albany-job-search.html albany job search] [http://marked.servemp3.com/web/candida.html candida] [http://safely.servemp3.com/articles/travis-tritt.html travis tritt] [http://seeds.servemp3.com/web/sex- sex index] [http://chopt.servemp3.com/viagra-pill.htm viagra pill] [http://seeds.servemp3.com/web/rent-a-car-sint.html rent a car sint maarten] [http://seeds.servemp3.com/web/pre-teen-fashion.html pre teen fashion models] [http://toledo.servemp3.com/articles/nude-elf-women.html nude elf women] [http://marked.servemp3.com/web/very-young-girls.html very young girls having sex] [http://chopt.servemp3.com/nice-place-to.htm nice place to live]
| | {{lang|npc_zombie}} |
| {{wrongtitle|title=npc_zombie}}
| | {{tabs|npc_zombie|source=1|source2=1|custom1=monster_zombie (GoldSrc)|custom1alt=GoldSrc|custom2=monster_zombie (Half-Life: Source)|custom2alt=Half-Life: Source}} |
| | {{CD|CZombie|base=CAI_BlendingHost_CNPC_BaseZombie|file1=1}} |
| | {{this is a|model entity|name=npc_zombie|game=Half-Life 2 series}} |
| | [[File:zombie.jpg|right|Zombie]] |
| | These "classic" [[zombie]]s, being wonderfully slow and stupid, are best used in groups to swarm the player. While it is unlikely the player will view them as a real threat, they are a great way to add tension and benefit from working with other [[zombie]] types, such as the {{ent|npc_fastzombie}} or the {{ent|npc_poisonzombie}}. Some [[Ravenholm]] areas use as many as 4-5 zombies at a time. |
|
| |
|
| == Entity description ==
| | When advancing upon the player, zombies will knock small [[prop_physics|physics props]] that are blocking them at the player, with surprising force. |
| [[Image:zombie.jpg|frame|right|Zombie]] | |
| These "classic" Zombies, being wonderfully slow and stupid, are best used in groups to swarm the player. While it is unlikely the player will view them as a real threat, they are a great way to add tension and benefit from working with other zombie types, such as the [[npc_fastzombie|fast zombie]] or the [[npc_poisonzombie|poison zombie]]. In fact, some [[Ravenholm]] areas used as many as 4-5 of these zombies at a time.
| |
|
| |
|
| If the zombie's host body is sufficiently damaged, the controlling [[Npc_headcrab|headcrab]] may detach and attack on its own. | | If the zombie's host body is sufficiently damaged, the controlling {{ent|npc_headcrab}} may detach and attack independently. |
| | {{NPCNote}} |
|
| |
|
| {{npcnote}} | | ==Dedicated [[Console Variable]]s== |
| | {{varcom|start}} |
| | {{varcom|sk_zombie_health|50|int|A zombie's spawn health}} |
| | {{varcom|sk_zombie_dmg_one_slash|10|int|Zombie melee damage}} |
| | {{varcom|sk_zombie_dmg_both_slash|25|int|Zombie melee damage (Not used.)}} |
| | {{varcom|end}} |
|
| |
|
| == Dedicated CVARs ==
| | {{note|The zombie will only deal the damage set in ''sk_zombie_dmg_one_slash'' for all of its attacks (even when using both hands). This may be due to a simple mistype in ''npc_BaseZombie.cpp'' that can easily be corrected.}} |
| * '''sk_zombie_health'''
| |
| : <integer> A zombie's spawn health
| |
| * '''sk_zombie_dmg_one_slash'''
| |
| : <integer> Melee damage
| |
| * '''sk_zombie_dmg_both_slash'''
| |
| : <integer> Melee damage
| |
|
| |
|
| == Keyvalues == | | == Keyvalues == |
| * {{kv basenpc}}
| | {{KV Targetname}} |
| | {{KV BaseNPC}} |
| | |
| ==Flags== | | ==Flags== |
| * {{fl basenpc}}
| | {{Fl BaseNPC}} |
| | |
| ==Inputs== | | ==Inputs== |
| * {{i basenpc}}
| | {{I BaseNPC}} |
| | |
| ==Outputs== | | ==Outputs== |
| * {{o basenpc}}
| | {{O|OnCrab {{only|{{Mapbase}}}}|Fired when this NPC spawns a live [[Npc_headcrab|headcrab]]. {{activator|headcrab}}}} |
| | {{O|OnSwattedProp {{only|{{Mapbase}}}}|Fired when this NPC swats a [[physics object]], such as [[prop_physics]] or [[func_physbox]]. {{activator|swatted object}}}} |
| | {{O BaseNPC}} |
| | |
| | [[Category:C++]] |
| | == Replace zombie blood with human blood == |
| | In {{file|src/game/server/hl2/npc_zombie.cpp}}, go to line 279. |
| | |
| | <source lang="cpp"> |
| | #ifdef HL2_EPISODIC |
| | SetBloodColor ( BLOOD_COLOR_ZOMBIE ); |
| | </source> |
| | |
| | Modify it to look like this: |
| | <source lang="cpp"> |
| | #ifdef HL2_EPISODIC |
| | SetBloodColor ( BLOOD_COLOR_RED ); |
| | </source> |
| | |
| | == Remove headcrab from zombies == |
| | How to remove headcrab from zombies. |
| | |
| | In {{file|src/game/server/hl2/npc_zombie|cpp}} look for <code>void CZombie::Spawn( void )</code> then find this line. |
| | <source lang="cpp"> |
| | m_fIsHeadless = false; |
| | </source> |
| | |
| | and simply change it to this |
| | <source lang="cpp"> |
| | m_fIsHeadless = true; |
| | </source> |
| | |
| | Now open {{file|src/game/server/hl2/npc_BaseZombie|cpp}} and change the <code>HeadcrabRelease_t CNPC_BaseZombie::ShouldReleaseHeadcrab( const CTakeDamageInfo &info, float flDamageThreshold )</code> section to look like this: |
| | <source lang="cpp"> |
| | //----------------------------------------------------------------------------- |
| | // Purpose: A zombie has taken damage. Determine whether he release his headcrab. |
| | // Output : YES, IMMEDIATE, or SCHEDULED (see HeadcrabRelease_t) |
| | //----------------------------------------------------------------------------- |
| | HeadcrabRelease_t CNPC_BaseZombie::ShouldReleaseHeadcrab( const CTakeDamageInfo &info, float flDamageThreshold ) |
| | { |
| | return ( m_iHealth <= 0 && m_fIsTorso && IsChopped( info ) ) ? RELEASE_RAGDOLL_SLICED_OFF : RELEASE_NO; |
| | } |
| | </source> |
| | |
| | Alternatively, if you are using {{mapbase|4.1}}, replace the {{ent|npc_zombie}} entity with a {{ent|npc_zombie_custom}} entity and set "Headcrabless" to true |
|
| |
|
| == See also == | | == See also == |
| * [[npc_poisonzombie]] | | * {{ent|npc_poisonzombie}} |
| * [[npc_fastzombie]]
| | * {{ent|npc_fastzombie}} |
| * [[npc_zombie_torso]] | | * {{ent|npc_zombie_torso}} |
| | |
| {{otherlang:en}} | |
| {{otherlang:en:ru|Npc_zombie_(ru)}} | |
|
| |
|
| [[Category:Entities]] | | [[Category:Half-Life 2 NPCs|Z]] |
| [[Category:NPCs]]
| |
npc_zombie
is a model entity available in
Half-Life 2 series.
These "classic" zombies, being wonderfully slow and stupid, are best used in groups to swarm the player. While it is unlikely the player will view them as a real threat, they are a great way to add tension and benefit from working with other zombie types, such as the npc_fastzombie or the npc_poisonzombie. Some Ravenholm areas use as many as 4-5 zombies at a time.
When advancing upon the player, zombies will knock small physics props that are blocking them at the player, with surprising force.
If the zombie's host body is sufficiently damaged, the controlling npc_headcrab may detach and attack independently.
Cvar/Command |
Parameters or default value |
Descriptor |
Effect |
sk_zombie_health |
50 |
int
|
A zombie's spawn health |
sk_zombie_dmg_one_slash |
10 |
int
|
Zombie melee damage |
sk_zombie_dmg_both_slash |
25 |
int
|
Zombie melee damage (Not used.) |
Note:The zombie will only deal the damage set in sk_zombie_dmg_one_slash for all of its attacks (even when using both hands). This may be due to a simple mistype in npc_BaseZombie.cpp that can easily be corrected.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
or target
).
Also displayed in Hammer's 2D views and Entity Report.
BaseNPC keyvalues
CBaseCombatCharacter:
- Relationship (Relationship) <string> !FGD
- <string|targetname or classname> <string|disposition> <int|rank>
- Changes whether this entity likes or dislikes certain other things. Used like the ai_relationship entity, with this entity as the subject.
- Values for
disposition are:
D_HT : Hate
D_FR : Fear
D_LI : Like
D_NU : Neutral
- Physics Impact Damage Scale (physdamagescale) <float>
- Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
CAI_BaseNPC:
- Target Path Corner (target) <targetname>
- The path_corner that this NPC will move to after spawning.
- Squad Name (squadname) <string>
- NPCs that are in the same squad (i.e., have matching squad names) will share information about enemies and will take turns attacking and covering each other.
- Hint Group (hintgroup) <string>
- Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC.
- Hint Limit Nav (hintlimiting) <boolean>
- Limits NPC to using specified hint group for navigation requests. Does not limit local navigation.
- Sleep State (sleepstate) <choices>
- Holds the NPC in stasis until specified condition. See also Wake Radius and Wake Squad.
- 0: None
- 1: Waiting for threat
- 2: Waiting for PVS
- 3: Waiting for input, ignore PVS
- 4: Auto PVS
- 5: Auto PVS after PVS
- Wake Radius (wakeradius) <float>
- Auto-wake if player comes within this distance.
- Wake Squad (wakesquad) <boolean>
- Wake all of the NPCs squadmates if the NPC is woken.
- Enemy Filter (enemyfilter) <targetname>
- Filter entity to test targets against.
- Ignore unseen enemies (ignoreunseenenemies) <boolean>
- Prefers visible enemies, regardless of distance or relationship priority.
DamageFilter:
- Damage Filter (damagefilter) <targetname>
- Name of the filter_damage_type entity that controls which entities can damage us.
|
Flags
BaseNPC flags
- Wait Till Seen : [1]
- Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
- Gag : [2]
- Won't make IDLE sounds until it's angry.
- Fall to ground (unchecked means teleport to ground) : [4]
- Drop Healthkit : [8]
- Causes this NPC to drop an item_healthvial upon dying.
- Efficient : [16]
- Don't acquire enemies or avoid obstacles
- Wait For Script : [128]
- Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
- Long Visibility/Shoot : [256]
- By default, increases a NPC's sight range to
6,000
units and allows it to attack from anywhere within that distance.
- Fade Corpse : [512]
- Think outside PVS : [1024]
- Allows this NPC to run its regular AI outside of any player's PVS.
- Template NPC : [2048]
- Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
- Do Alternate collision for this NPC (player avoidance) : [4096]
Note:This flag is disabled in
episodic for player companions, because the StartScripting
input does this.
- Don't drop weapons : [8192]
- Ignore player push : [16384] (in all games since
)
- Entity won't give way to player.
Inputs
BaseNPC inputs
CAI_BaseNPC:
- ActivateSpeedModifier !FGD
- DisableSpeedModifier !FGD
- Break
- Smash into pieces. If this is not possible, disappear.
- BecomeRagdoll (in all games since
)
- Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. outputs will NOT be fired.
- ForceInteractionWithNPC <string> <string> (in all games since
)
- Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.
- ForgetEntity <targetnameRedirectInput/string>
- Clears out the NPC's knowledge of a named entity.
- UpdateEnemyMemory (in all games since
)
- Update (or create) this NPC's memory of of the given entity.
- GagEnable
- GagDisable
- Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
- HolsterWeapon (in all games since
)
- UnholsterWeapon (in all games since
)
- Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
- HolsterAndDestroyWeapon (in all games since
)
- Same as
HolsterWeapon
, except the weapon is destroyed once it has been concealed.
- IgnoreDangerSounds <floatRedirectInput/float>
- Ignore danger sounds for the specified number of seconds.
- InsideTransition !FGD
- OutsideTransition !FGD
- SetBodyGroup <integerRedirectInput/integer>
- HACK: Sets this NPC's body group (from 0–n).
- SetEnemyFilter <stringRedirectInput/string>
- SetHealth <integerRedirectInput/integer>
- Set the NPC's health.
- SetMaxLookDistance <floatRedirectInput/float> (only in
)
- Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.
- SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
- Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject.
- Values for
disposition
are:
D_HT
: Hate
D_FR
: Fear
D_LI
: Like
D_NU
: Neutral
- SetSquad <stringRedirectInput/string>
- Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
- StartScripting
- StopScripting
- Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore +Use, don't idle speak or respond to other NPCs' idle speech, and so on.
- Wake
- Wakes up the NPC if it is sleeping.
CBaseCombatCharacter:
- KilledNPC !FGD
- Tells the entity it killed something. Despite the name, this can include a player. This input will be automatically sent by the victim when they die.
- physdamagescale <floatRedirectInput/float>
- Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.
DamageFilter:
- SetDamageFilter <stringRedirectInput/string>
- Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.
Outputs
- OnCrab (only in
)
- Fired when this NPC spawns a live headcrab. (!activator is the headcrab)
- OnSwattedProp (only in
)
- Fired when this NPC swats a physics object, such as prop_physics or func_physbox. (!activator is the swatted object)
BaseNPC Outputs
- OnDamaged
- Fired when this NPC takes damage (!activator is the damage inflictor).
- OnDamagedByPlayer
- Fired when this NPC is hurt by a player (!activator is the attacker or vehicle driver [if friendly fire]).
- OnDamagedByPlayerSquad
- Fired when this NPC is hurt by a player OR by one of the player's squadmates (!activator is the attacker or vehicle driver [if friendly fire]).
- OnDeath
- Fired when this NPC is killed (!activator is the killer).
- OnDenyCommanderUse
- Fired when this NPC has refused to join the player's squad.
- OnForcedInteractionAborted
- Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc.).
- OnForcedInteractionStarted
- Fired when the NPC starts a forced interaction.
- OnForcedInteractionFinished
- "NPCs in actbusies can no longer perform dynamic interactions."
Todo: What does this mean?
- OnHalfHealth
- Fired when this NPC reaches half of its maximum health.
- OnHearCombat
- Fired when this NPC hears combat sounds.
- OnHearPlayer
- Fired when this NPC hears the player.
- OnHearWorld
- Fired when this NPC hears a sound (other than combat or the player).
- OnFoundEnemy <targetname*RedirectOutput/ehandle>
- Fired when this NPC establishes line of sight to its enemy.
- OnLostEnemy
- Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
- OnLostEnemyLOS
- Fired when this NPC loses line of sight to its enemy.
- OnFoundPlayer <targetname*RedirectOutput/ehandle>
- Fired when this NPC establishes line of sight to its enemy, and that enemy is a player.
- OnLostPlayer
- Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
- OnLostPlayerLOS
- Fired when this NPC loses line of sight to its enemy, and that enemy is a player.
- OnSleep
- Fired when this NPC enters a sleep state.
- OnWake
- Fired when this NPC comes out of a sleep state.
|
Replace zombie blood with human blood
In 
src/game/server/hl2/npc_zombie.cpp
, go to line 279.
#ifdef HL2_EPISODIC
SetBloodColor ( BLOOD_COLOR_ZOMBIE );
Modify it to look like this:
#ifdef HL2_EPISODIC
SetBloodColor ( BLOOD_COLOR_RED );
Remove headcrab from zombies
How to remove headcrab from zombies.
In 
src/game/server/hl2/npc_zombie.cpp
look for void CZombie::Spawn( void )
then find this line.
and simply change it to this
Now open 
src/game/server/hl2/npc_BaseZombie.cpp
and change the HeadcrabRelease_t CNPC_BaseZombie::ShouldReleaseHeadcrab( const CTakeDamageInfo &info, float flDamageThreshold )
section to look like this:
//-----------------------------------------------------------------------------
// Purpose: A zombie has taken damage. Determine whether he release his headcrab.
// Output : YES, IMMEDIATE, or SCHEDULED (see HeadcrabRelease_t)
//-----------------------------------------------------------------------------
HeadcrabRelease_t CNPC_BaseZombie::ShouldReleaseHeadcrab( const CTakeDamageInfo &info, float flDamageThreshold )
{
return ( m_iHealth <= 0 && m_fIsTorso && IsChopped( info ) ) ? RELEASE_RAGDOLL_SLICED_OFF : RELEASE_NO;
}
Alternatively, if you are using
Mapbase, replace the npc_zombie entity with a npc_zombie_custom entity and set "Headcrabless" to true
See also