void makron_die(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker /* unused */, int damage /* unused */, vec3_t point /* unused */) { edict_t *tempent; int n; if (!self) { return; } self->s.sound = 0; /* 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 < 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); } ThrowHead(self, "models/objects/gibs/gear/tris.md2", damage, GIB_METALLIC); self->deadflag = DEAD_DEAD; return; } if (self->deadflag == DEAD_DEAD) { return; } /* regular death */ gi.sound(self, CHAN_VOICE, sound_death, 1, ATTN_NONE, 0); self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; tempent = G_Spawn(); VectorCopy(self->s.origin, tempent->s.origin); VectorCopy(self->s.angles, tempent->s.angles); tempent->s.origin[1] -= 84; makron_torso(tempent); self->monsterinfo.currentmove = &makron_move_death2; }
void makron_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) { edict_t *tempent; int n; self->s.sound = 0; self->s.skinnum |= 1; if (!(self->fogclip & 2)) //custom bloodtype flag check self->blood_type = 3; //sparks and blood self->monsterinfo.power_armor_type = POWER_ARMOR_NONE; // check for gib if (self->health <= self->gib_health && !(self->spawnflags & SF_MONSTER_NOGIB)) { gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0); for (n= 0; n < 4 /*4*/; 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); ThrowHead (self, "models/objects/gibs/gear/tris.md2", damage, GIB_METALLIC); self->deadflag = DEAD_DEAD; return; } if (self->deadflag == DEAD_DEAD) return; // regular death gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NONE, 0); self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; tempent = G_Spawn(); VectorCopy (self->s.origin, tempent->s.origin); VectorCopy (self->s.angles, tempent->s.angles); #ifdef KMQUAKE2_ENGINE_MOD // If Makron was transparent, make the torso transparent if (self->s.alpha) tempent->s.alpha = self->s.alpha; #endif tempent->s.origin[1] -= 84; makron_torso (tempent); self->monsterinfo.currentmove = &makron_move_death2; }