public override void Die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; if (self.health <= self.gib_health) { GameBase.gi.Sound(self, Defines.CHAN_VOICE, GameBase.gi.Soundindex("misc/udeath.wav"), 1, Defines.ATTN_NORM, 0); for (n = 0; n < 2; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, Defines.GIB_ORGANIC); } for (n = 0; n < 4; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, Defines.GIB_ORGANIC); } GameMisc.ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, Defines.GIB_ORGANIC); self.deadflag = Defines.DEAD_DEAD; return; } if (self.deadflag == Defines.DEAD_DEAD) { return; } GameBase.gi.Sound(self, Defines.CHAN_VOICE, sound_death, 1, Defines.ATTN_NORM, 0); self.deadflag = Defines.DEAD_DEAD; self.takedamage = Defines.DAMAGE_YES; self.monsterinfo.currentmove = gunner_move_death; }
public override void Die(edict_t self, edict_t inflictor, edict_t attacker, Int32 damage, Single[] point) { Int32 n; if (self.health <= self.gib_health) { GameBase.gi.Sound(self, Defines.CHAN_VOICE, GameBase.gi.Soundindex("misc/udeath.wav"), 1, Defines.ATTN_IDLE, 0); for (n = 0; n < 2; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, Defines.GIB_ORGANIC); } for (n = 0; n < 4; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, Defines.GIB_ORGANIC); } GameMisc.ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, Defines.GIB_ORGANIC); self.deadflag = Defines.DEAD_DEAD; return; } if (self.deadflag == Defines.DEAD_DEAD) { return; } GameBase.gi.Sound(self, Defines.CHAN_VOICE, GameBase.gi.Soundindex("player/male/death" + ((Lib.Rand() % 4) + 1) + ".wav"), 1, Defines.ATTN_IDLE, 0); self.deadflag = Defines.DEAD_DEAD; self.takedamage = Defines.DAMAGE_YES; if ((self.spawnflags & 8) != 0) { insane_dead.Think(self); } else { if (((self.s.frame >= FRAME_crawl1) && (self.s.frame <= FRAME_crawl9)) || ((self.s.frame >= FRAME_stand99) && (self.s.frame <= FRAME_stand160))) { self.monsterinfo.currentmove = insane_move_crawl_death; } else { self.monsterinfo.currentmove = insane_move_stand_death; } } }
public override void Die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point) { int n; self.s.effects = 0; self.monsterinfo.power_armor_type = Defines.POWER_ARMOR_NONE; if (self.health <= self.gib_health) { GameBase.gi.Sound(self, Defines.CHAN_VOICE, GameBase.gi.Soundindex("misc/udeath.wav"), 1, Defines.ATTN_NORM, 0); for (n = 0; n < 2; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, Defines.GIB_ORGANIC); } for (n = 0; n < 4; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, Defines.GIB_ORGANIC); } GameMisc.ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, Defines.GIB_ORGANIC); self.deadflag = Defines.DEAD_DEAD; return; } if (self.deadflag == Defines.DEAD_DEAD) { return; } GameBase.gi.Sound(self, Defines.CHAN_VOICE, sound_death, 1, Defines.ATTN_NORM, 0); self.deadflag = Defines.DEAD_DEAD; self.takedamage = Defines.DAMAGE_YES; if (Lib.Random() <= 0.5) { self.monsterinfo.currentmove = brain_move_death1; } else { self.monsterinfo.currentmove = brain_move_death2; } }
public override bool Think(edict_t self) { float[] org = new float[] { 0, 0, 0 }; int n; self.think = BossExplode; Math3D.VectorCopy(self.s.origin, org); org[2] += 24 + (Lib.Rand() & 15); switch (self.count++) { case 0: org[0] -= 24; org[1] -= 24; break; case 1: org[0] += 24; org[1] += 24; break; case 2: org[0] += 24; org[1] -= 24; break; case 3: org[0] -= 24; org[1] += 24; break; case 4: org[0] -= 48; org[1] -= 48; break; case 5: org[0] += 48; org[1] += 48; break; case 6: org[0] -= 48; org[1] += 48; break; case 7: org[0] += 48; org[1] -= 48; break; case 8: self.s.sound = 0; for (n = 0; n < 4; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", 500, Defines.GIB_ORGANIC); } for (n = 0; n < 8; n++) { GameMisc.ThrowGib(self, "models/objects/gibs/sm_metal/tris.md2", 500, Defines.GIB_METALLIC); } GameMisc.ThrowGib(self, "models/objects/gibs/chest/tris.md2", 500, Defines.GIB_ORGANIC); GameMisc.ThrowHead(self, "models/objects/gibs/gear/tris.md2", 500, Defines.GIB_METALLIC); self.deadflag = Defines.DEAD_DEAD; return(true); } GameBase.gi.WriteByte(Defines.svc_temp_entity); GameBase.gi.WriteByte(Defines.TE_EXPLOSION1); GameBase.gi.WritePosition(org); GameBase.gi.Multicast(self.s.origin, Defines.MULTICAST_PVS); self.nextthink = GameBase.level.time + 0.1F; return(true); }