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 mychick_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); //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 self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; //level.total_monsters--; n = rand() % 2; if (n == 0) { self->monsterinfo.currentmove = &mychick_move_death1; gi.sound (self, CHAN_VOICE, sound_death1, 1, ATTN_NORM, 0); } else { self->monsterinfo.currentmove = &mychick_move_death2; gi.sound (self, CHAN_VOICE, sound_death2, 1, ATTN_NORM, 0); } // gi.dprintf("mychick_die end()\n"); }
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 decoy_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) { int n; M_Notify(self); // check for gib if (self->health <= self->gib_health) { 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; M_Remove(self, false, false); return; } if (self->deadflag == DEAD_DEAD) return; self->deadflag = DEAD_DEAD; //Talent: Exploding Decoy /* if(damage > 0 && self->activator && getTalentLevel(self->activator, TALENT_EXPLODING_DECOY) != -1) { int talentLevel = getTalentLevel(self->activator, TALENT_EXPLODING_DECOY); int decoyDamage = 100 + talentLevel * 50; int decoyRadius = 100 + talentLevel * 25; T_RadiusDamage(self, self->activator, decoyDamage, self, decoyRadius, MOD_EXPLODING_DECOY); self->takedamage = DAMAGE_NO; self->think = BecomeExplosion1; self->nextthink = level.time + FRAMETIME; return; }*/ // regular death self->takedamage = DAMAGE_YES; self->s.modelindex2 = 0; n = rand() % 2; if (n == 0) self->monsterinfo.currentmove = &actor_move_death1; else self->monsterinfo.currentmove = &actor_move_death2; }
void mytank_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 if (nolag->value) { M_Remove(self, false, true); return; } // 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 < 1; n++) ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC); for (n= 0; n < 4; n++) ThrowGib (self, "models/objects/gibs/sm_metal/tris.md2", damage, GIB_METALLIC); ThrowGib (self, "models/objects/gibs/chest/tris.md2", damage, GIB_ORGANIC); //ThrowHead (self, "models/objects/gibs/gear/tris.md2", damage, GIB_METALLIC); //self->deadflag = DEAD_DEAD; M_Remove(self, false, false); 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 = &mytank_move_death; }
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); } }