void mybrain_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) { int n; M_Notify(self); // reduce lag by removing the entity right away #ifdef OLD_NOLAG_STYLE if (nolag->value) { M_Remove(self, false, true); return; } #endif self->s.effects = 0; self->monsterinfo.power_armor_type = POWER_ARMOR_NONE; self->monsterinfo.power_armor_power = 0; //GHz: Check for gibbed body if (self->health <= self->gib_health) { gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0); for (n= 0; n < 2; n++) ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC); for (n= 0; n < 4; n++) ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC); //ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC); #ifdef OLD_NOLAG_STYLE M_Remove(self, false, false); #else if (nolag->value) M_Remove(self, false, true); else M_Remove(self, false, false); #endif return; } if (self->deadflag == DEAD_DEAD) return; //GHz: Begin death sequence gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0); self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; if (random() <= 0.5) self->monsterinfo.currentmove = &mybrain_move_death1; else self->monsterinfo.currentmove = &mybrain_move_death2; DroneList_Remove(self); if (self->activator && !self->activator->client) { self->activator->num_monsters_real--; // gi.bprintf(PRINT_HIGH, "releasing %p (%d)\n", self, self->activator->num_monsters_real); } }
void gladiator_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) { int n; M_Notify(self); // reduce lag by removing the entity right away #ifdef OLD_NOLAG_STYLE if (nolag->value) { M_Remove(self, false, true); return; } #endif // check for gib if (self->health <= self->gib_health) { gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0); for (n= 0; n < 2; n++) ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC); for (n= 0; n < 4; n++) ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC); #ifdef OLD_NOLAG_STYLE M_Remove(self, false, false); #else if (nolag->value) M_Remove(self, false, true); else M_Remove(self, false, false); #endif return; } if (self->deadflag == DEAD_DEAD) return; // begin death sequence gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0); self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; self->monsterinfo.currentmove = &gladiator_move_death; DroneList_Remove(self); if (self->activator && !self->activator->client) { self->activator->num_monsters_real--; // gi.bprintf(PRINT_HIGH, "releasing %p (%d)\n", self, self->activator->num_monsters_real); } }
void m_soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) { int n; // notify the owner that the monster is dead M_Notify(self); #ifdef OLD_NOLAG_STYLE // reduce lag by removing the entity right away if (nolag->value) { M_Remove(self, false, true); return; } #endif // check for gib if (self->health <= self->gib_health) { gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0); for (n= 0; n < 2; n++) ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC); for (n= 0; n < 4; n++) ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC); //ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC); //self->deadflag = DEAD_DEAD; #ifdef OLD_NOLAG_STYLE M_Remove(self, false, false); #else if (nolag->value) M_Remove(self, false, true); else M_Remove(self, false, false); #endif return; } if (self->deadflag == DEAD_DEAD) return; // regular death gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0); self->takedamage = DAMAGE_YES; self->deadflag = DEAD_DEAD; n = GetRandom(1, 6); switch (n) { case 1: self->monsterinfo.currentmove = &m_soldier_move_death1; break; case 2: self->monsterinfo.currentmove = &m_soldier_move_death2; break; case 3: self->monsterinfo.currentmove = &m_soldier_move_death3; break; case 4: self->monsterinfo.currentmove = &m_soldier_move_death4; break; case 5: self->monsterinfo.currentmove = &m_soldier_move_death5; break; case 6: self->monsterinfo.currentmove = &m_soldier_move_death6; break; } DroneList_Remove(self); if (self->activator && !self->activator->client) { self->activator->num_monsters_real--; // gi.bprintf(PRINT_HIGH, "releasing %p (%d)\n", self, self->activator->num_monsters_real); } }