mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 03:41:15 +00:00
SERVER: Insta-Kill always gibs Zombie head
This commit is contained in:
parent
bc2aec1a96
commit
d94ce26392
2 changed files with 20 additions and 8 deletions
|
@ -1126,6 +1126,25 @@ void(entity ent) Zombie_Death_Cleanup = {
|
|||
if(ent.aistatus == "0") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Insta-Kill should always cause the head to gib on Zombie death.
|
||||
if (ent.head && instakill_finished > time) {
|
||||
makevectors(ent.head.owner.angles);
|
||||
vector where = ent.origin + (ent.head.view_ofs_x * v_right) + (ent.head.view_ofs_y * v_forward) + (ent.head.view_ofs_z * v_up);
|
||||
spawn_gibs(where);
|
||||
ent.head.deadflag = false;
|
||||
ent.head.solid = SOLID_NOT;
|
||||
setmodel(ent.head, "");
|
||||
ent.head.frame = 0;
|
||||
|
||||
#ifndef FTE
|
||||
|
||||
updateLimb (ent, 0, world);
|
||||
|
||||
#endif // FTE
|
||||
|
||||
}
|
||||
|
||||
ent.aistatus = "0";
|
||||
ent.solid = SOLID_NOT;
|
||||
ent.movetype = MOVETYPE_NONE;
|
||||
|
|
|
@ -649,7 +649,7 @@ void Parse_Damage () = // DO NOT TOUCH
|
|||
// now. -- cypress (5 nov 2023)
|
||||
if (Zombie_HeadCanGib(body_ent, self.weapon)) {
|
||||
makevectors(body_ent.head.owner.angles);
|
||||
vector where = body_ent.head.owner.origin + (body_ent.head.view_ofs_x * v_right) + (body_ent.head.view_ofs_y * v_forward) + (body_ent.head.view_ofs_z * v_up);
|
||||
vector where = body_ent.origin + (body_ent.head.view_ofs_x * v_right) + (body_ent.head.view_ofs_y * v_forward) + (body_ent.head.view_ofs_z * v_up);
|
||||
spawn_gibs(where);
|
||||
|
||||
body_ent.head.deadflag = false;
|
||||
|
@ -1199,13 +1199,6 @@ void() WeaponCore_Melee =
|
|||
if (trace_ent.owner.head == trace_ent || trace_ent.owner.larm == trace_ent || trace_ent.owner.rarm == trace_ent)
|
||||
trace_ent = trace_ent.owner;
|
||||
|
||||
// Additionally, if the Zombie has a head and Insta-Kill is active,
|
||||
// remove its head.
|
||||
if (trace_ent.head) {
|
||||
spawn_gibs(trace_ent.head.origin);
|
||||
setmodel(trace_ent.head, "");
|
||||
}
|
||||
|
||||
// Play a flesh-y impact sound, spawn blood.
|
||||
sound (self, CHAN_WEAPON, "sounds/weapons/knife/knife_hitbod.wav", 1, ATTN_NORM);
|
||||
SpawnBlood(trace_source + (v_forward * 20), trace_source + (v_forward * 20), 50);
|
||||
|
|
Loading…
Reference in a new issue