diff --git a/src/game/baseq2/monster/medic/medic.c b/src/game/baseq2/monster/medic/medic.c index c25364f6..26957341 100644 --- a/src/game/baseq2/monster/medic/medic.c +++ b/src/game/baseq2/monster/medic/medic.c @@ -1,126 +1,172 @@ /* -Copyright (C) 1997-2001 Id Software, Inc. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -/* -============================================================================== - -MEDIC - -============================================================================== -*/ + * Copyright (C) 1997-2001 Id Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * ======================================================================= + * + * Medic. + * + * ======================================================================= + */ #include "../../header/local.h" #include "medic.h" -qboolean visible (edict_t *self, edict_t *other); +qboolean visible(edict_t *self, edict_t *other); +static int sound_idle1; +static int sound_pain1; +static int sound_pain2; +static int sound_die; +static int sound_sight; +static int sound_search; +static int sound_hook_launch; +static int sound_hook_hit; +static int sound_hook_heal; +static int sound_hook_retract; -static int sound_idle1; -static int sound_pain1; -static int sound_pain2; -static int sound_die; -static int sound_sight; -static int sound_search; -static int sound_hook_launch; -static int sound_hook_hit; -static int sound_hook_heal; -static int sound_hook_retract; - - -edict_t *medic_FindDeadMonster (edict_t *self) +edict_t * +medic_FindDeadMonster(edict_t *self) { - edict_t *ent = NULL; - edict_t *best = NULL; - + edict_t *ent = NULL; + edict_t *best = NULL; + + if (!self) + { + return NULL; + } + while ((ent = findradius(ent, self->s.origin, 1024)) != NULL) { if (ent == self) + { continue; + } + if (!(ent->svflags & SVF_MONSTER)) + { continue; + } + if (ent->monsterinfo.aiflags & AI_GOOD_GUY) + { continue; + } + if (ent->owner) + { continue; + } + if (ent->health > 0) + { continue; + } + if (ent->nextthink) + { continue; + } + if (!visible(self, ent)) + { continue; + } + if (!best) { best = ent; continue; } + if (ent->max_health <= best->max_health) + { continue; + } + best = ent; } return best; } -void medic_idle (edict_t *self) +void +medic_idle(edict_t *self) { - edict_t *ent; - - gi.sound (self, CHAN_VOICE, sound_idle1, 1, ATTN_IDLE, 0); + edict_t *ent; + + if (!self) + { + return; + } + + gi.sound(self, CHAN_VOICE, sound_idle1, 1, ATTN_IDLE, 0); ent = medic_FindDeadMonster(self); + if (ent) { self->enemy = ent; self->enemy->owner = self; self->monsterinfo.aiflags |= AI_MEDIC; - FoundTarget (self); + FoundTarget(self); } } -void medic_search (edict_t *self) +void +medic_search(edict_t *self) { - edict_t *ent; - - gi.sound (self, CHAN_VOICE, sound_search, 1, ATTN_IDLE, 0); + edict_t *ent; + + if (!self) + { + return; + } + + gi.sound(self, CHAN_VOICE, sound_search, 1, ATTN_IDLE, 0); if (!self->oldenemy) { ent = medic_FindDeadMonster(self); + if (ent) { self->oldenemy = self->enemy; self->enemy = ent; self->enemy->owner = self; self->monsterinfo.aiflags |= AI_MEDIC; - FoundTarget (self); + FoundTarget(self); } } } -void medic_sight (edict_t *self, edict_t *other) -{ - gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0); +void +medic_sight(edict_t *self, edict_t *other /* unused */) +{ + if (!self) + { + return; + } + + gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0); } - -mframe_t medic_frames_stand [] = -{ +mframe_t medic_frames_stand[] = { {ai_stand, 0, medic_idle}, {ai_stand, 0, NULL}, {ai_stand, 0, NULL}, @@ -211,78 +257,114 @@ mframe_t medic_frames_stand [] = {ai_stand, 0, NULL}, {ai_stand, 0, NULL}, {ai_stand, 0, NULL}, - }; -mmove_t medic_move_stand = {FRAME_wait1, FRAME_wait90, medic_frames_stand, NULL}; -void medic_stand (edict_t *self) +mmove_t medic_move_stand = { + FRAME_wait1, + FRAME_wait90, + medic_frames_stand, + NULL +}; + +void +medic_stand(edict_t *self) +{ + if (!self) + { + return; + } + self->monsterinfo.currentmove = &medic_move_stand; } - -mframe_t medic_frames_walk [] = -{ - {ai_walk, 6.2, NULL}, - {ai_walk, 18.1, NULL}, - {ai_walk, 1, NULL}, - {ai_walk, 9, NULL}, - {ai_walk, 10, NULL}, - {ai_walk, 9, NULL}, - {ai_walk, 11, NULL}, - {ai_walk, 11.6, NULL}, - {ai_walk, 2, NULL}, - {ai_walk, 9.9, NULL}, - {ai_walk, 14, NULL}, - {ai_walk, 9.3, NULL} +mframe_t medic_frames_walk[] = { + {ai_walk, 6.2, NULL}, + {ai_walk, 18.1, NULL}, + {ai_walk, 1, NULL}, + {ai_walk, 9, NULL}, + {ai_walk, 10, NULL}, + {ai_walk, 9, NULL}, + {ai_walk, 11, NULL}, + {ai_walk, 11.6, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 9.9, NULL}, + {ai_walk, 14, NULL}, + {ai_walk, 9.3, NULL} }; -mmove_t medic_move_walk = {FRAME_walk1, FRAME_walk12, medic_frames_walk, NULL}; -void medic_walk (edict_t *self) +mmove_t medic_move_walk = { + FRAME_walk1, + FRAME_walk12, + medic_frames_walk, + NULL +}; + +void +medic_walk(edict_t *self) +{ + if (!self) + { + return; + } + self->monsterinfo.currentmove = &medic_move_walk; } - -mframe_t medic_frames_run [] = -{ - {ai_run, 18, NULL}, - {ai_run, 22.5, NULL}, - {ai_run, 25.4, NULL}, - {ai_run, 23.4, NULL}, - {ai_run, 24, NULL}, - {ai_run, 35.6, NULL} - +mframe_t medic_frames_run[] = { + {ai_run, 18, NULL}, + {ai_run, 22.5, NULL}, + {ai_run, 25.4, NULL}, + {ai_run, 23.4, NULL}, + {ai_run, 24, NULL}, + {ai_run, 35.6, NULL} }; -mmove_t medic_move_run = {FRAME_run1, FRAME_run6, medic_frames_run, NULL}; -void medic_run (edict_t *self) +mmove_t medic_move_run = { + FRAME_run1, + FRAME_run6, + medic_frames_run, + NULL +}; + +void +medic_run(edict_t *self) +{ + if (!self) + { + return; + } + if (!(self->monsterinfo.aiflags & AI_MEDIC)) { - edict_t *ent; + edict_t *ent; ent = medic_FindDeadMonster(self); + if (ent) { self->oldenemy = self->enemy; self->enemy = ent; self->enemy->owner = self; self->monsterinfo.aiflags |= AI_MEDIC; - FoundTarget (self); + FoundTarget(self); return; } } if (self->monsterinfo.aiflags & AI_STAND_GROUND) + { self->monsterinfo.currentmove = &medic_move_stand; + } else + { self->monsterinfo.currentmove = &medic_move_run; + } } - -mframe_t medic_frames_pain1 [] = -{ +mframe_t medic_frames_pain1[] = { {ai_move, 0, NULL}, {ai_move, 0, NULL}, {ai_move, 0, NULL}, @@ -292,10 +374,16 @@ mframe_t medic_frames_pain1 [] = {ai_move, 0, NULL}, {ai_move, 0, NULL} }; -mmove_t medic_move_pain1 = {FRAME_paina1, FRAME_paina8, medic_frames_pain1, medic_run}; -mframe_t medic_frames_pain2 [] = +mmove_t medic_move_pain1 = { + FRAME_paina1, + FRAME_paina8, + medic_frames_pain1, + medic_run +}; + +mframe_t medic_frames_pain2[] = { {ai_move, 0, NULL}, {ai_move, 0, NULL}, {ai_move, 0, NULL}, @@ -312,71 +400,111 @@ mframe_t medic_frames_pain2 [] = {ai_move, 0, NULL}, {ai_move, 0, NULL} }; -mmove_t medic_move_pain2 = {FRAME_painb1, FRAME_painb15, medic_frames_pain2, medic_run}; -void medic_pain (edict_t *self, edict_t *other, float kick, int damage) +mmove_t medic_move_pain2 = { + FRAME_painb1, + FRAME_painb15, + medic_frames_pain2, + medic_run +}; + +void +medic_pain(edict_t *self, edict_t *other /* unused */, + float kick, int damage /* unused */) +{ + if (!self) + { + return; + } + if (self->health < (self->max_health / 2)) + { self->s.skinnum = 1; + } if (level.time < self->pain_debounce_time) + { return; + } self->pain_debounce_time = level.time + 3; if (skill->value == 3) - return; // no pain anims in nightmare + { + return; /* no pain anims in nightmare */ + } if (random() < 0.5) { self->monsterinfo.currentmove = &medic_move_pain1; - gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0); + gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0); } else { self->monsterinfo.currentmove = &medic_move_pain2; - gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0); + gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0); } } -void medic_fire_blaster (edict_t *self) +void +medic_fire_blaster(edict_t *self) { - vec3_t start; - vec3_t forward, right; - vec3_t end; - vec3_t dir; - int effect; - + vec3_t start; + vec3_t forward, right; + vec3_t end; + vec3_t dir; + int effect; + + if (!self) + { + return; + } + if ((self->s.frame == FRAME_attack9) || (self->s.frame == FRAME_attack12)) + { effect = EF_BLASTER; - else if ((self->s.frame == FRAME_attack19) || (self->s.frame == FRAME_attack22) || (self->s.frame == FRAME_attack25) || (self->s.frame == FRAME_attack28)) + } + else if ((self->s.frame == FRAME_attack19) || + (self->s.frame == FRAME_attack22) || + (self->s.frame == FRAME_attack25) || + (self->s.frame == FRAME_attack28)) + { effect = EF_HYPERBLASTER; + } else + { effect = 0; + } - AngleVectors (self->s.angles, forward, right, NULL); - G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_MEDIC_BLASTER_1], forward, right, start); + AngleVectors(self->s.angles, forward, right, NULL); + G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_MEDIC_BLASTER_1], + forward, right, start); - VectorCopy (self->enemy->s.origin, end); + VectorCopy(self->enemy->s.origin, end); end[2] += self->enemy->viewheight; - VectorSubtract (end, start, dir); + VectorSubtract(end, start, dir); - monster_fire_blaster (self, start, dir, 2, 1000, MZ2_MEDIC_BLASTER_1, effect); + monster_fire_blaster(self, start, dir, 2, 1000, MZ2_MEDIC_BLASTER_1, effect); } - -void medic_dead (edict_t *self) -{ - VectorSet (self->mins, -16, -16, -24); - VectorSet (self->maxs, 16, 16, -8); +void +medic_dead(edict_t *self) +{ + if (!self) + { + return; + } + + VectorSet(self->mins, -16, -16, -24); + VectorSet(self->maxs, 16, 16, -8); self->movetype = MOVETYPE_TOSS; self->svflags |= SVF_DEADMONSTER; self->nextthink = 0; - gi.linkentity (self); + gi.linkentity(self); } -mframe_t medic_frames_death [] = -{ +mframe_t medic_frames_death[] = { {ai_move, 0, NULL}, {ai_move, 0, NULL}, {ai_move, 0, NULL}, @@ -408,163 +536,245 @@ mframe_t medic_frames_death [] = {ai_move, 0, NULL}, {ai_move, 0, NULL} }; -mmove_t medic_move_death = {FRAME_death1, FRAME_death30, medic_frames_death, medic_dead}; -void medic_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) +mmove_t medic_move_death = { - int n; + FRAME_death1, + FRAME_death30, + medic_frames_death, + medic_dead +}; - // if we had a pending patient, free him up for another medic +void +medic_die(edict_t *self, edict_t *inflictor /* unused */, + edict_t *attacker /* unused */, int damage, + vec3_t point /* unused */) +{ + int n; + + if (!self) + { + return; + } + + /* if we had a pending patient, free him up for another medic */ if ((self->enemy) && (self->enemy->owner == self)) + { self->enemy->owner = NULL; + } - // check for gib + /* 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); + 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; return; } if (self->deadflag == DEAD_DEAD) + { return; + } - // regular death - gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0); + /* regular death */ + gi.sound(self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0); self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; self->monsterinfo.currentmove = &medic_move_death; } - -void medic_duck_down (edict_t *self) -{ - if (self->monsterinfo.aiflags & AI_DUCKED) +void +medic_duck_down(edict_t *self) +{ + if (!self) + { return; + } + + if (self->monsterinfo.aiflags & AI_DUCKED) + { + return; + } + self->monsterinfo.aiflags |= AI_DUCKED; self->maxs[2] -= 32; self->takedamage = DAMAGE_YES; self->monsterinfo.pausetime = level.time + 1; - gi.linkentity (self); + gi.linkentity(self); } -void medic_duck_hold (edict_t *self) -{ +void +medic_duck_hold(edict_t *self) +{ + if (!self) + { + return; + } + if (level.time >= self->monsterinfo.pausetime) + { self->monsterinfo.aiflags &= ~AI_HOLD_FRAME; + } else + { self->monsterinfo.aiflags |= AI_HOLD_FRAME; + } } -void medic_duck_up (edict_t *self) -{ +void +medic_duck_up(edict_t *self) +{ + if (!self) + { + return; + } + self->monsterinfo.aiflags &= ~AI_DUCKED; self->maxs[2] += 32; self->takedamage = DAMAGE_AIM; - gi.linkentity (self); + gi.linkentity(self); } -mframe_t medic_frames_duck [] = -{ - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, medic_duck_down}, - {ai_move, -1, medic_duck_hold}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, medic_duck_up}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL}, - {ai_move, -1, NULL} +mframe_t medic_frames_duck[] = { + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, medic_duck_down}, + {ai_move, -1, medic_duck_hold}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, medic_duck_up}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL} }; -mmove_t medic_move_duck = {FRAME_duck1, FRAME_duck16, medic_frames_duck, medic_run}; -void medic_dodge (edict_t *self, edict_t *attacker, float eta) +mmove_t medic_move_duck = +{ + FRAME_duck1, + FRAME_duck16, + medic_frames_duck, + medic_run +}; + +void +medic_dodge(edict_t *self, edict_t *attacker, float eta) { if (random() > 0.25) + { return; + } if (!self->enemy) + { self->enemy = attacker; + } self->monsterinfo.currentmove = &medic_move_duck; } -mframe_t medic_frames_attackHyperBlaster [] = -{ - {ai_charge, 0, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, medic_fire_blaster} +mframe_t medic_frames_attackHyperBlaster[] = { + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, medic_fire_blaster} }; -mmove_t medic_move_attackHyperBlaster = {FRAME_attack15, FRAME_attack30, medic_frames_attackHyperBlaster, medic_run}; - -void medic_continue (edict_t *self) +mmove_t medic_move_attackHyperBlaster = { - if (visible (self, self->enemy) ) + FRAME_attack15, + FRAME_attack30, + medic_frames_attackHyperBlaster, + medic_run +}; + +void +medic_continue(edict_t *self) +{ + if (!self) + { + return; + } + + if (visible(self, self->enemy)) + { if (random() <= 0.95) + { self->monsterinfo.currentmove = &medic_move_attackHyperBlaster; + } + } } - -mframe_t medic_frames_attackBlaster [] = -{ - {ai_charge, 0, NULL}, - {ai_charge, 5, NULL}, - {ai_charge, 5, NULL}, - {ai_charge, 3, NULL}, - {ai_charge, 2, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, NULL}, - {ai_charge, 0, NULL}, - {ai_charge, 0, medic_fire_blaster}, - {ai_charge, 0, NULL}, - {ai_charge, 0, medic_continue} // Change to medic_continue... Else, go to frame 32 +mframe_t medic_frames_attackBlaster[] = { + {ai_charge, 0, NULL}, + {ai_charge, 5, NULL}, + {ai_charge, 5, NULL}, + {ai_charge, 3, NULL}, + {ai_charge, 2, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, medic_fire_blaster}, + {ai_charge, 0, NULL}, + {ai_charge, 0, medic_continue} }; -mmove_t medic_move_attackBlaster = {FRAME_attack1, FRAME_attack14, medic_frames_attackBlaster, medic_run}; +mmove_t medic_move_attackBlaster = +{FRAME_attack1, FRAME_attack14, medic_frames_attackBlaster, medic_run}; - -void medic_hook_launch (edict_t *self) -{ - gi.sound (self, CHAN_WEAPON, sound_hook_launch, 1, ATTN_NORM, 0); +void +medic_hook_launch(edict_t *self) +{ + if (!self) + { + return; + } + + gi.sound(self, CHAN_WEAPON, sound_hook_launch, 1, ATTN_NORM, 0); } -void ED_CallSpawn (edict_t *ent); +void ED_CallSpawn(edict_t *ent); -static vec3_t medic_cable_offsets[] = -{ - {45.0, -9.2, 15.5}, - {48.4, -9.7, 15.2}, - {47.8, -9.8, 15.8}, - {47.3, -9.3, 14.3}, +static vec3_t medic_cable_offsets[] = { + {45.0, -9.2, 15.5}, + {48.4, -9.7, 15.2}, + {47.8, -9.8, 15.8}, + {47.3, -9.3, 14.3}, {45.4, -10.1, 13.1}, {41.9, -12.7, 12.0}, {37.8, -15.8, 11.2}, @@ -573,40 +783,60 @@ static vec3_t medic_cable_offsets[] = {32.7, -19.7, 10.4} }; -void medic_cable_attack (edict_t *self) +void +medic_cable_attack(edict_t *self) { - vec3_t offset, start, end, f, r; - trace_t tr; - vec3_t dir, angles; - float distance; - + vec3_t offset, start, end, f, r; + trace_t tr; + vec3_t dir, angles; + float distance; + + if (!self) + { + return; + } + if (!self->enemy->inuse) + { return; + } - AngleVectors (self->s.angles, f, r, NULL); - VectorCopy (medic_cable_offsets[self->s.frame - FRAME_attack42], offset); - G_ProjectSource (self->s.origin, offset, f, r, start); + AngleVectors(self->s.angles, f, r, NULL); + VectorCopy(medic_cable_offsets[self->s.frame - FRAME_attack42], offset); + G_ProjectSource(self->s.origin, offset, f, r, start); - // check for max distance - VectorSubtract (start, self->enemy->s.origin, dir); + /* check for max distance */ + VectorSubtract(start, self->enemy->s.origin, dir); distance = VectorLength(dir); + if (distance > 256) + { return; + } + + /* check for min/max pitch */ + vectoangles(dir, angles); - // check for min/max pitch - vectoangles (dir, angles); if (angles[0] < -180) + { angles[0] += 360; - if (fabs(angles[0]) > 45) - return; + } - tr = gi.trace (start, NULL, NULL, self->enemy->s.origin, self, MASK_SHOT); - if (tr.fraction != 1.0 && tr.ent != self->enemy) + if (fabs(angles[0]) > 45) + { return; + } + + tr = gi.trace(start, NULL, NULL, self->enemy->s.origin, self, MASK_SHOT); + + if ((tr.fraction != 1.0) && (tr.ent != self->enemy)) + { + return; + } if (self->s.frame == FRAME_attack43) { - gi.sound (self->enemy, CHAN_AUTO, sound_hook_hit, 1, ATTN_NORM, 0); + gi.sound(self->enemy, CHAN_AUTO, sound_hook_hit, 1, ATTN_NORM, 0); self->enemy->monsterinfo.aiflags |= AI_RESURRECTING; } else if (self->s.frame == FRAME_attack50) @@ -618,129 +848,167 @@ void medic_cable_attack (edict_t *self) self->enemy->combattarget = NULL; self->enemy->deathtarget = NULL; self->enemy->owner = self; - ED_CallSpawn (self->enemy); + ED_CallSpawn(self->enemy); self->enemy->owner = NULL; + if (self->enemy->think) { self->enemy->nextthink = level.time; - self->enemy->think (self->enemy); + self->enemy->think(self->enemy); } + self->enemy->monsterinfo.aiflags |= AI_RESURRECTING; + if (self->oldenemy && self->oldenemy->client) { self->enemy->enemy = self->oldenemy; - FoundTarget (self->enemy); + FoundTarget(self->enemy); } } else { if (self->s.frame == FRAME_attack44) - gi.sound (self, CHAN_WEAPON, sound_hook_heal, 1, ATTN_NORM, 0); + { + gi.sound(self, CHAN_WEAPON, sound_hook_heal, 1, ATTN_NORM, 0); + } } - // adjust start for beam origin being in middle of a segment - VectorMA (start, 8, f, start); + /* adjust start for beam origin being in middle of a segment */ + VectorMA(start, 8, f, start); - // adjust end z for end spot since the monster is currently dead - VectorCopy (self->enemy->s.origin, end); + /* adjust end z for end spot since the monster is currently dead */ + VectorCopy(self->enemy->s.origin, end); end[2] = self->enemy->absmin[2] + self->enemy->size[2] / 2; - gi.WriteByte (svc_temp_entity); - gi.WriteByte (TE_MEDIC_CABLE_ATTACK); - gi.WriteShort (self - g_edicts); - gi.WritePosition (start); - gi.WritePosition (end); - gi.multicast (self->s.origin, MULTICAST_PVS); + gi.WriteByte(svc_temp_entity); + gi.WriteByte(TE_MEDIC_CABLE_ATTACK); + gi.WriteShort(self - g_edicts); + gi.WritePosition(start); + gi.WritePosition(end); + gi.multicast(self->s.origin, MULTICAST_PVS); } -void medic_hook_retract (edict_t *self) -{ - gi.sound (self, CHAN_WEAPON, sound_hook_retract, 1, ATTN_NORM, 0); +void +medic_hook_retract(edict_t *self) +{ + if (!self) + { + return; + } + + gi.sound(self, CHAN_WEAPON, sound_hook_retract, 1, ATTN_NORM, 0); self->enemy->monsterinfo.aiflags &= ~AI_RESURRECTING; } -mframe_t medic_frames_attackCable [] = -{ - {ai_move, 2, NULL}, - {ai_move, 3, NULL}, - {ai_move, 5, NULL}, - {ai_move, 4.4, NULL}, - {ai_charge, 4.7, NULL}, - {ai_charge, 5, NULL}, - {ai_charge, 6, NULL}, - {ai_charge, 4, NULL}, - {ai_charge, 0, NULL}, - {ai_move, 0, medic_hook_launch}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, 0, medic_cable_attack}, - {ai_move, -15, medic_hook_retract}, - {ai_move, -1.5, NULL}, - {ai_move, -1.2, NULL}, - {ai_move, -3, NULL}, - {ai_move, -2, NULL}, - {ai_move, 0.3, NULL}, - {ai_move, 0.7, NULL}, - {ai_move, 1.2, NULL}, - {ai_move, 1.3, NULL} +mframe_t medic_frames_attackCable[] = { + {ai_move, 2, NULL}, + {ai_move, 3, NULL}, + {ai_move, 5, NULL}, + {ai_move, 4.4, NULL}, + {ai_charge, 4.7, NULL}, + {ai_charge, 5, NULL}, + {ai_charge, 6, NULL}, + {ai_charge, 4, NULL}, + {ai_charge, 0, NULL}, + {ai_move, 0, medic_hook_launch}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, 0, medic_cable_attack}, + {ai_move, -15, medic_hook_retract}, + {ai_move, -1.5, NULL}, + {ai_move, -1.2, NULL}, + {ai_move, -3, NULL}, + {ai_move, -2, NULL}, + {ai_move, 0.3, NULL}, + {ai_move, 0.7, NULL}, + {ai_move, 1.2, NULL}, + {ai_move, 1.3, NULL} }; -mmove_t medic_move_attackCable = {FRAME_attack33, FRAME_attack60, medic_frames_attackCable, medic_run}; - -void medic_attack(edict_t *self) +mmove_t medic_move_attackCable = { + FRAME_attack33, + FRAME_attack60, + medic_frames_attackCable, + medic_run +}; + +void +medic_attack(edict_t *self) +{ + if (!self) + { + return; + } + if (self->monsterinfo.aiflags & AI_MEDIC) + { self->monsterinfo.currentmove = &medic_move_attackCable; + } else + { self->monsterinfo.currentmove = &medic_move_attackBlaster; + } } -qboolean medic_checkattack (edict_t *self) -{ +qboolean +medic_checkattack(edict_t *self) +{ + if (!self) + { + return false; + } + if (self->monsterinfo.aiflags & AI_MEDIC) { medic_attack(self); return true; } - return M_CheckAttack (self); + return M_CheckAttack(self); } - -/*QUAKED monster_medic (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight -*/ -void SP_monster_medic (edict_t *self) -{ +/* + * QUAKED monster_medic (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight + */ +void +SP_monster_medic(edict_t *self) +{ + if (!self) + { + return; + } + if (deathmatch->value) { - G_FreeEdict (self); + G_FreeEdict(self); return; } - sound_idle1 = gi.soundindex ("medic/idle.wav"); - sound_pain1 = gi.soundindex ("medic/medpain1.wav"); - sound_pain2 = gi.soundindex ("medic/medpain2.wav"); - sound_die = gi.soundindex ("medic/meddeth1.wav"); - sound_sight = gi.soundindex ("medic/medsght1.wav"); - sound_search = gi.soundindex ("medic/medsrch1.wav"); - sound_hook_launch = gi.soundindex ("medic/medatck2.wav"); - sound_hook_hit = gi.soundindex ("medic/medatck3.wav"); - sound_hook_heal = gi.soundindex ("medic/medatck4.wav"); - sound_hook_retract = gi.soundindex ("medic/medatck5.wav"); + sound_idle1 = gi.soundindex("medic/idle.wav"); + sound_pain1 = gi.soundindex("medic/medpain1.wav"); + sound_pain2 = gi.soundindex("medic/medpain2.wav"); + sound_die = gi.soundindex("medic/meddeth1.wav"); + sound_sight = gi.soundindex("medic/medsght1.wav"); + sound_search = gi.soundindex("medic/medsrch1.wav"); + sound_hook_launch = gi.soundindex("medic/medatck2.wav"); + sound_hook_hit = gi.soundindex("medic/medatck3.wav"); + sound_hook_heal = gi.soundindex("medic/medatck4.wav"); + sound_hook_retract = gi.soundindex("medic/medatck5.wav"); - gi.soundindex ("medic/medatck1.wav"); + gi.soundindex("medic/medatck1.wav"); self->movetype = MOVETYPE_STEP; self->solid = SOLID_BBOX; - self->s.modelindex = gi.modelindex ("models/monsters/medic/tris.md2"); - VectorSet (self->mins, -24, -24, -24); - VectorSet (self->maxs, 24, 24, 32); + self->s.modelindex = gi.modelindex("models/monsters/medic/tris.md2"); + VectorSet(self->mins, -24, -24, -24); + VectorSet(self->maxs, 24, 24, 32); self->health = 300; self->gib_health = -130; @@ -760,11 +1028,11 @@ void SP_monster_medic (edict_t *self) self->monsterinfo.search = medic_search; self->monsterinfo.checkattack = medic_checkattack; - gi.linkentity (self); + gi.linkentity(self); self->monsterinfo.currentmove = &medic_move_stand; self->monsterinfo.scale = MODEL_SCALE; - walkmonster_start (self); + walkmonster_start(self); } diff --git a/src/game/baseq2/monster/medic/medic.h b/src/game/baseq2/monster/medic/medic.h index 88675c94..ade708f0 100644 --- a/src/game/baseq2/monster/medic/medic.h +++ b/src/game/baseq2/monster/medic/medic.h @@ -1,262 +1,265 @@ /* -Copyright (C) 1997-2001 Id Software, Inc. + * Copyright (C) 1997-2001 Id Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * ======================================================================= + * + * Medic animations. + * + * ======================================================================= + */ -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. +#define FRAME_walk1 0 +#define FRAME_walk2 1 +#define FRAME_walk3 2 +#define FRAME_walk4 3 +#define FRAME_walk5 4 +#define FRAME_walk6 5 +#define FRAME_walk7 6 +#define FRAME_walk8 7 +#define FRAME_walk9 8 +#define FRAME_walk10 9 +#define FRAME_walk11 10 +#define FRAME_walk12 11 +#define FRAME_wait1 12 +#define FRAME_wait2 13 +#define FRAME_wait3 14 +#define FRAME_wait4 15 +#define FRAME_wait5 16 +#define FRAME_wait6 17 +#define FRAME_wait7 18 +#define FRAME_wait8 19 +#define FRAME_wait9 20 +#define FRAME_wait10 21 +#define FRAME_wait11 22 +#define FRAME_wait12 23 +#define FRAME_wait13 24 +#define FRAME_wait14 25 +#define FRAME_wait15 26 +#define FRAME_wait16 27 +#define FRAME_wait17 28 +#define FRAME_wait18 29 +#define FRAME_wait19 30 +#define FRAME_wait20 31 +#define FRAME_wait21 32 +#define FRAME_wait22 33 +#define FRAME_wait23 34 +#define FRAME_wait24 35 +#define FRAME_wait25 36 +#define FRAME_wait26 37 +#define FRAME_wait27 38 +#define FRAME_wait28 39 +#define FRAME_wait29 40 +#define FRAME_wait30 41 +#define FRAME_wait31 42 +#define FRAME_wait32 43 +#define FRAME_wait33 44 +#define FRAME_wait34 45 +#define FRAME_wait35 46 +#define FRAME_wait36 47 +#define FRAME_wait37 48 +#define FRAME_wait38 49 +#define FRAME_wait39 50 +#define FRAME_wait40 51 +#define FRAME_wait41 52 +#define FRAME_wait42 53 +#define FRAME_wait43 54 +#define FRAME_wait44 55 +#define FRAME_wait45 56 +#define FRAME_wait46 57 +#define FRAME_wait47 58 +#define FRAME_wait48 59 +#define FRAME_wait49 60 +#define FRAME_wait50 61 +#define FRAME_wait51 62 +#define FRAME_wait52 63 +#define FRAME_wait53 64 +#define FRAME_wait54 65 +#define FRAME_wait55 66 +#define FRAME_wait56 67 +#define FRAME_wait57 68 +#define FRAME_wait58 69 +#define FRAME_wait59 70 +#define FRAME_wait60 71 +#define FRAME_wait61 72 +#define FRAME_wait62 73 +#define FRAME_wait63 74 +#define FRAME_wait64 75 +#define FRAME_wait65 76 +#define FRAME_wait66 77 +#define FRAME_wait67 78 +#define FRAME_wait68 79 +#define FRAME_wait69 80 +#define FRAME_wait70 81 +#define FRAME_wait71 82 +#define FRAME_wait72 83 +#define FRAME_wait73 84 +#define FRAME_wait74 85 +#define FRAME_wait75 86 +#define FRAME_wait76 87 +#define FRAME_wait77 88 +#define FRAME_wait78 89 +#define FRAME_wait79 90 +#define FRAME_wait80 91 +#define FRAME_wait81 92 +#define FRAME_wait82 93 +#define FRAME_wait83 94 +#define FRAME_wait84 95 +#define FRAME_wait85 96 +#define FRAME_wait86 97 +#define FRAME_wait87 98 +#define FRAME_wait88 99 +#define FRAME_wait89 100 +#define FRAME_wait90 101 +#define FRAME_run1 102 +#define FRAME_run2 103 +#define FRAME_run3 104 +#define FRAME_run4 105 +#define FRAME_run5 106 +#define FRAME_run6 107 +#define FRAME_paina1 108 +#define FRAME_paina2 109 +#define FRAME_paina3 110 +#define FRAME_paina4 111 +#define FRAME_paina5 112 +#define FRAME_paina6 113 +#define FRAME_paina7 114 +#define FRAME_paina8 115 +#define FRAME_painb1 116 +#define FRAME_painb2 117 +#define FRAME_painb3 118 +#define FRAME_painb4 119 +#define FRAME_painb5 120 +#define FRAME_painb6 121 +#define FRAME_painb7 122 +#define FRAME_painb8 123 +#define FRAME_painb9 124 +#define FRAME_painb10 125 +#define FRAME_painb11 126 +#define FRAME_painb12 127 +#define FRAME_painb13 128 +#define FRAME_painb14 129 +#define FRAME_painb15 130 +#define FRAME_duck1 131 +#define FRAME_duck2 132 +#define FRAME_duck3 133 +#define FRAME_duck4 134 +#define FRAME_duck5 135 +#define FRAME_duck6 136 +#define FRAME_duck7 137 +#define FRAME_duck8 138 +#define FRAME_duck9 139 +#define FRAME_duck10 140 +#define FRAME_duck11 141 +#define FRAME_duck12 142 +#define FRAME_duck13 143 +#define FRAME_duck14 144 +#define FRAME_duck15 145 +#define FRAME_duck16 146 +#define FRAME_death1 147 +#define FRAME_death2 148 +#define FRAME_death3 149 +#define FRAME_death4 150 +#define FRAME_death5 151 +#define FRAME_death6 152 +#define FRAME_death7 153 +#define FRAME_death8 154 +#define FRAME_death9 155 +#define FRAME_death10 156 +#define FRAME_death11 157 +#define FRAME_death12 158 +#define FRAME_death13 159 +#define FRAME_death14 160 +#define FRAME_death15 161 +#define FRAME_death16 162 +#define FRAME_death17 163 +#define FRAME_death18 164 +#define FRAME_death19 165 +#define FRAME_death20 166 +#define FRAME_death21 167 +#define FRAME_death22 168 +#define FRAME_death23 169 +#define FRAME_death24 170 +#define FRAME_death25 171 +#define FRAME_death26 172 +#define FRAME_death27 173 +#define FRAME_death28 174 +#define FRAME_death29 175 +#define FRAME_death30 176 +#define FRAME_attack1 177 +#define FRAME_attack2 178 +#define FRAME_attack3 179 +#define FRAME_attack4 180 +#define FRAME_attack5 181 +#define FRAME_attack6 182 +#define FRAME_attack7 183 +#define FRAME_attack8 184 +#define FRAME_attack9 185 +#define FRAME_attack10 186 +#define FRAME_attack11 187 +#define FRAME_attack12 188 +#define FRAME_attack13 189 +#define FRAME_attack14 190 +#define FRAME_attack15 191 +#define FRAME_attack16 192 +#define FRAME_attack17 193 +#define FRAME_attack18 194 +#define FRAME_attack19 195 +#define FRAME_attack20 196 +#define FRAME_attack21 197 +#define FRAME_attack22 198 +#define FRAME_attack23 199 +#define FRAME_attack24 200 +#define FRAME_attack25 201 +#define FRAME_attack26 202 +#define FRAME_attack27 203 +#define FRAME_attack28 204 +#define FRAME_attack29 205 +#define FRAME_attack30 206 +#define FRAME_attack31 207 +#define FRAME_attack32 208 +#define FRAME_attack33 209 +#define FRAME_attack34 210 +#define FRAME_attack35 211 +#define FRAME_attack36 212 +#define FRAME_attack37 213 +#define FRAME_attack38 214 +#define FRAME_attack39 215 +#define FRAME_attack40 216 +#define FRAME_attack41 217 +#define FRAME_attack42 218 +#define FRAME_attack43 219 +#define FRAME_attack44 220 +#define FRAME_attack45 221 +#define FRAME_attack46 222 +#define FRAME_attack47 223 +#define FRAME_attack48 224 +#define FRAME_attack49 225 +#define FRAME_attack50 226 +#define FRAME_attack51 227 +#define FRAME_attack52 228 +#define FRAME_attack53 229 +#define FRAME_attack54 230 +#define FRAME_attack55 231 +#define FRAME_attack56 232 +#define FRAME_attack57 233 +#define FRAME_attack58 234 +#define FRAME_attack59 235 +#define FRAME_attack60 236 -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -// G:\quake2\baseq2\models/monsters/medic - -// This file generated by ModelGen - Do NOT Modify - -#define FRAME_walk1 0 -#define FRAME_walk2 1 -#define FRAME_walk3 2 -#define FRAME_walk4 3 -#define FRAME_walk5 4 -#define FRAME_walk6 5 -#define FRAME_walk7 6 -#define FRAME_walk8 7 -#define FRAME_walk9 8 -#define FRAME_walk10 9 -#define FRAME_walk11 10 -#define FRAME_walk12 11 -#define FRAME_wait1 12 -#define FRAME_wait2 13 -#define FRAME_wait3 14 -#define FRAME_wait4 15 -#define FRAME_wait5 16 -#define FRAME_wait6 17 -#define FRAME_wait7 18 -#define FRAME_wait8 19 -#define FRAME_wait9 20 -#define FRAME_wait10 21 -#define FRAME_wait11 22 -#define FRAME_wait12 23 -#define FRAME_wait13 24 -#define FRAME_wait14 25 -#define FRAME_wait15 26 -#define FRAME_wait16 27 -#define FRAME_wait17 28 -#define FRAME_wait18 29 -#define FRAME_wait19 30 -#define FRAME_wait20 31 -#define FRAME_wait21 32 -#define FRAME_wait22 33 -#define FRAME_wait23 34 -#define FRAME_wait24 35 -#define FRAME_wait25 36 -#define FRAME_wait26 37 -#define FRAME_wait27 38 -#define FRAME_wait28 39 -#define FRAME_wait29 40 -#define FRAME_wait30 41 -#define FRAME_wait31 42 -#define FRAME_wait32 43 -#define FRAME_wait33 44 -#define FRAME_wait34 45 -#define FRAME_wait35 46 -#define FRAME_wait36 47 -#define FRAME_wait37 48 -#define FRAME_wait38 49 -#define FRAME_wait39 50 -#define FRAME_wait40 51 -#define FRAME_wait41 52 -#define FRAME_wait42 53 -#define FRAME_wait43 54 -#define FRAME_wait44 55 -#define FRAME_wait45 56 -#define FRAME_wait46 57 -#define FRAME_wait47 58 -#define FRAME_wait48 59 -#define FRAME_wait49 60 -#define FRAME_wait50 61 -#define FRAME_wait51 62 -#define FRAME_wait52 63 -#define FRAME_wait53 64 -#define FRAME_wait54 65 -#define FRAME_wait55 66 -#define FRAME_wait56 67 -#define FRAME_wait57 68 -#define FRAME_wait58 69 -#define FRAME_wait59 70 -#define FRAME_wait60 71 -#define FRAME_wait61 72 -#define FRAME_wait62 73 -#define FRAME_wait63 74 -#define FRAME_wait64 75 -#define FRAME_wait65 76 -#define FRAME_wait66 77 -#define FRAME_wait67 78 -#define FRAME_wait68 79 -#define FRAME_wait69 80 -#define FRAME_wait70 81 -#define FRAME_wait71 82 -#define FRAME_wait72 83 -#define FRAME_wait73 84 -#define FRAME_wait74 85 -#define FRAME_wait75 86 -#define FRAME_wait76 87 -#define FRAME_wait77 88 -#define FRAME_wait78 89 -#define FRAME_wait79 90 -#define FRAME_wait80 91 -#define FRAME_wait81 92 -#define FRAME_wait82 93 -#define FRAME_wait83 94 -#define FRAME_wait84 95 -#define FRAME_wait85 96 -#define FRAME_wait86 97 -#define FRAME_wait87 98 -#define FRAME_wait88 99 -#define FRAME_wait89 100 -#define FRAME_wait90 101 -#define FRAME_run1 102 -#define FRAME_run2 103 -#define FRAME_run3 104 -#define FRAME_run4 105 -#define FRAME_run5 106 -#define FRAME_run6 107 -#define FRAME_paina1 108 -#define FRAME_paina2 109 -#define FRAME_paina3 110 -#define FRAME_paina4 111 -#define FRAME_paina5 112 -#define FRAME_paina6 113 -#define FRAME_paina7 114 -#define FRAME_paina8 115 -#define FRAME_painb1 116 -#define FRAME_painb2 117 -#define FRAME_painb3 118 -#define FRAME_painb4 119 -#define FRAME_painb5 120 -#define FRAME_painb6 121 -#define FRAME_painb7 122 -#define FRAME_painb8 123 -#define FRAME_painb9 124 -#define FRAME_painb10 125 -#define FRAME_painb11 126 -#define FRAME_painb12 127 -#define FRAME_painb13 128 -#define FRAME_painb14 129 -#define FRAME_painb15 130 -#define FRAME_duck1 131 -#define FRAME_duck2 132 -#define FRAME_duck3 133 -#define FRAME_duck4 134 -#define FRAME_duck5 135 -#define FRAME_duck6 136 -#define FRAME_duck7 137 -#define FRAME_duck8 138 -#define FRAME_duck9 139 -#define FRAME_duck10 140 -#define FRAME_duck11 141 -#define FRAME_duck12 142 -#define FRAME_duck13 143 -#define FRAME_duck14 144 -#define FRAME_duck15 145 -#define FRAME_duck16 146 -#define FRAME_death1 147 -#define FRAME_death2 148 -#define FRAME_death3 149 -#define FRAME_death4 150 -#define FRAME_death5 151 -#define FRAME_death6 152 -#define FRAME_death7 153 -#define FRAME_death8 154 -#define FRAME_death9 155 -#define FRAME_death10 156 -#define FRAME_death11 157 -#define FRAME_death12 158 -#define FRAME_death13 159 -#define FRAME_death14 160 -#define FRAME_death15 161 -#define FRAME_death16 162 -#define FRAME_death17 163 -#define FRAME_death18 164 -#define FRAME_death19 165 -#define FRAME_death20 166 -#define FRAME_death21 167 -#define FRAME_death22 168 -#define FRAME_death23 169 -#define FRAME_death24 170 -#define FRAME_death25 171 -#define FRAME_death26 172 -#define FRAME_death27 173 -#define FRAME_death28 174 -#define FRAME_death29 175 -#define FRAME_death30 176 -#define FRAME_attack1 177 -#define FRAME_attack2 178 -#define FRAME_attack3 179 -#define FRAME_attack4 180 -#define FRAME_attack5 181 -#define FRAME_attack6 182 -#define FRAME_attack7 183 -#define FRAME_attack8 184 -#define FRAME_attack9 185 -#define FRAME_attack10 186 -#define FRAME_attack11 187 -#define FRAME_attack12 188 -#define FRAME_attack13 189 -#define FRAME_attack14 190 -#define FRAME_attack15 191 -#define FRAME_attack16 192 -#define FRAME_attack17 193 -#define FRAME_attack18 194 -#define FRAME_attack19 195 -#define FRAME_attack20 196 -#define FRAME_attack21 197 -#define FRAME_attack22 198 -#define FRAME_attack23 199 -#define FRAME_attack24 200 -#define FRAME_attack25 201 -#define FRAME_attack26 202 -#define FRAME_attack27 203 -#define FRAME_attack28 204 -#define FRAME_attack29 205 -#define FRAME_attack30 206 -#define FRAME_attack31 207 -#define FRAME_attack32 208 -#define FRAME_attack33 209 -#define FRAME_attack34 210 -#define FRAME_attack35 211 -#define FRAME_attack36 212 -#define FRAME_attack37 213 -#define FRAME_attack38 214 -#define FRAME_attack39 215 -#define FRAME_attack40 216 -#define FRAME_attack41 217 -#define FRAME_attack42 218 -#define FRAME_attack43 219 -#define FRAME_attack44 220 -#define FRAME_attack45 221 -#define FRAME_attack46 222 -#define FRAME_attack47 223 -#define FRAME_attack48 224 -#define FRAME_attack49 225 -#define FRAME_attack50 226 -#define FRAME_attack51 227 -#define FRAME_attack52 228 -#define FRAME_attack53 229 -#define FRAME_attack54 230 -#define FRAME_attack55 231 -#define FRAME_attack56 232 -#define FRAME_attack57 233 -#define FRAME_attack58 234 -#define FRAME_attack59 235 -#define FRAME_attack60 236 - -#define MODEL_SCALE 1.000000 +#define MODEL_SCALE 1.000000