game: quake1 monsters, use defines instead frame number

This commit is contained in:
Denis Pauk 2024-05-11 23:52:36 +03:00
parent 75b05838a1
commit 5709e2c746
15 changed files with 548 additions and 112 deletions

View file

@ -84,6 +84,17 @@ void plat2_kill_danger_area(edict_t *ent);
void Think_AccelMove(edict_t *ent);
void plat_go_down(edict_t *ent);
void
showme(edict_t *self)
{
if (!self)
{
return;
}
gi.dprintf("frame %d\n", self->s.frame);
}
/*
* =========================================================
*

View file

@ -41,7 +41,13 @@ static mframe_t army_frames_stand [] =
{ai_stand, 0, NULL},
{ai_stand, 0, NULL},
};
mmove_t army_move_stand = {0, 7, army_frames_stand, NULL};
mmove_t army_move_stand =
{
FRAME_stand1,
FRAME_stand8,
army_frames_stand,
NULL
};
void army_stand(edict_t *self)
{
@ -61,7 +67,13 @@ static mframe_t army_frames_run [] =
{ai_run, 10, NULL},
{ai_run, 8, NULL}
};
mmove_t army_move_run = {73, 80, army_frames_run, NULL};
mmove_t army_move_run =
{
FRAME_run1,
FRAME_run8,
army_frames_run,
NULL
};
void army_run(edict_t *self)
{
@ -99,7 +111,13 @@ static mframe_t army_frames_attack [] =
{ai_charge, 0, NULL}
};
mmove_t army_move_attack = {81, 89, army_frames_attack, army_run};
mmove_t army_move_attack =
{
FRAME_shoot1,
FRAME_shoot9,
army_frames_attack,
army_run
};
void army_attack(edict_t *self)
{
@ -129,7 +147,13 @@ static mframe_t army_frames_pain1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t army_move_pain1 = {40, 45, army_frames_pain1, army_run};
mmove_t army_move_pain1 =
{
FRAME_pain1,
FRAME_pain6,
army_frames_pain1,
army_run
};
// Pain (2)
static mframe_t army_frames_pain2 [] =
@ -152,7 +176,13 @@ static mframe_t army_frames_pain2 [] =
{ai_move, 2, NULL},
{ai_move, 0, NULL}
};
mmove_t army_move_pain2 = {46, 59, army_frames_pain2, army_run};
mmove_t army_move_pain2 =
{
FRAME_painb1,
FRAME_painb14,
army_frames_pain2,
army_run
};
// Pain (3)
static mframe_t army_frames_pain3 [] =
@ -174,7 +204,13 @@ static mframe_t army_frames_pain3 [] =
{ai_move, 2, NULL}
};
mmove_t army_move_pain3 = {60, 72, army_frames_pain3, army_run};
mmove_t army_move_pain3 =
{
FRAME_painc1,
FRAME_painc13,
army_frames_pain3,
army_run
};
void army_pain(edict_t *self, edict_t *other /* unused */,
float kick /* unused */, int damage)
@ -234,7 +270,13 @@ static mframe_t army_frames_death1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t army_move_death1 = {8, 17, army_frames_death1, army_dead};
mmove_t army_move_death1 =
{
FRAME_death1,
FRAME_death10,
army_frames_death1,
army_dead
};
// Death (2)
static mframe_t army_frames_death2 [] =
@ -253,7 +295,13 @@ static mframe_t army_frames_death2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t army_move_death2 = {18, 28, army_frames_death2, army_dead};
mmove_t army_move_death2 =
{
FRAME_deathc1,
FRAME_deathc11,
army_frames_death2,
army_dead
};
void army_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{
@ -264,24 +312,38 @@ void army_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage,
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;
}
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 = &army_move_death1;
}
else
{
self->monsterinfo.currentmove = &army_move_death2;
}
}
void SP_monster_army(edict_t *self)

View file

@ -49,7 +49,13 @@ static mframe_t demon_frames_stand [] =
{ai_stand, 0, NULL},
};
mmove_t demon_move_stand = {0, 12, demon_frames_stand, NULL};
mmove_t demon_move_stand =
{
FRAME_stand1,
FRAME_stand13,
demon_frames_stand,
NULL
};
void demon_stand(edict_t *self)
{
@ -67,7 +73,13 @@ static mframe_t demon_frames_run [] =
{ai_run, 15, NULL},
{ai_run, 36, NULL}
};
mmove_t demon_move_run = {21, 26, demon_frames_run, NULL};
mmove_t demon_move_run =
{
FRAME_run1,
FRAME_run6,
demon_frames_run,
NULL
};
void demon_run(edict_t *self)
{
@ -165,7 +177,13 @@ static mframe_t demon_frames_jump [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t demon_move_jump = {27, 38, demon_frames_jump, demon_run};
mmove_t demon_move_jump =
{
FRAME_leap1,
FRAME_leap12,
demon_frames_jump,
demon_run
};
void demon_attack(edict_t *self)
{
@ -213,7 +231,13 @@ static mframe_t demon_frames_melee [] =
{ai_charge, 4, NULL},
{ai_charge, 4, NULL}
};
mmove_t demon_move_melee = {54, 68, demon_frames_melee, demon_run};
mmove_t demon_move_melee =
{
FRAME_attacka1,
FRAME_attacka15,
demon_frames_melee,
demon_run
};
void demon_melee(edict_t *self)
{
@ -231,7 +255,13 @@ static mframe_t demon_frames_pain [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t demon_move_pain = {39, 44, demon_frames_pain, demon_run};
mmove_t demon_move_pain =
{
FRAME_pain1,
FRAME_pain6,
demon_frames_pain,
demon_run
};
void demon_pain(edict_t *self, edict_t *other, float kick, int damage)
{
@ -275,7 +305,13 @@ static mframe_t demon_frames_die [] =
{ai_move, 0, NULL}
};
mmove_t demon_move_die = {45, 53, demon_frames_die, demon_dead};
mmove_t demon_move_die =
{
FRAME_death1,
FRAME_death9,
demon_frames_die,
demon_dead
};
void demon_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{

View file

@ -44,7 +44,13 @@ static mframe_t dog_frames_stand [] =
{ai_stand, 0, NULL},
};
mmove_t dog_move_stand = {69, 77, dog_frames_stand, NULL};
mmove_t dog_move_stand =
{
FRAME_stand1,
FRAME_stand9,
dog_frames_stand,
NULL
};
void dog_stand(edict_t *self)
{
@ -69,7 +75,13 @@ static mframe_t dog_frames_run [] =
{ai_run, 64, NULL},
{ai_run, 32, dog_leap}
};
mmove_t dog_move_run = {48, 59, dog_frames_run, NULL};
mmove_t dog_move_run =
{
FRAME_run1,
FRAME_run12,
dog_frames_run,
NULL
};
void dog_run(edict_t *self)
{
@ -130,7 +142,13 @@ static mframe_t dog_frames_leap [] =
{ai_move, 0, NULL}
};
mmove_t dog_move_leap = {60, 68, dog_frames_leap, dog_run};
mmove_t dog_move_leap =
{
FRAME_leap1,
FRAME_leap9,
dog_frames_leap,
dog_run
};
void dog_leap(edict_t *self)
{
@ -169,7 +187,13 @@ static mframe_t dog_frames_melee [] =
{ai_charge, 10, NULL},
{ai_charge, 10, NULL}
};
mmove_t dog_move_melee = {0, 7, dog_frames_melee, dog_run};
mmove_t dog_move_melee =
{
FRAME_attack1,
FRAME_attack8,
dog_frames_melee,
dog_run
};
void dog_melee(edict_t *self)
{
@ -199,7 +223,13 @@ static mframe_t dog_frames_pain1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t dog_move_pain1 = {26, 31, dog_frames_pain1, dog_run};
mmove_t dog_move_pain1 =
{
FRAME_pain1,
FRAME_pain6,
dog_frames_pain1,
dog_run
};
// Pain (2)
static mframe_t dog_frames_pain2 [] =
@ -224,7 +254,13 @@ static mframe_t dog_frames_pain2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t dog_move_pain2 = {32, 47, dog_frames_pain2, dog_run};
mmove_t dog_move_pain2 =
{
FRAME_painb1,
FRAME_painb16,
dog_frames_pain2,
dog_run
};
void dog_pain(edict_t *self, edict_t *other /* unused */,
float kick /* unused */, int damage)
@ -264,7 +300,13 @@ static mframe_t dog_frames_die1 [] =
{ai_move, 0, NULL}
};
mmove_t dog_move_die1 = {8, 16, dog_frames_die1, dog_dead};
mmove_t dog_move_die1 =
{
FRAME_death1,
FRAME_death9,
dog_frames_die1,
dog_dead
};
// Death (2)
static mframe_t dog_frames_die2 [] =
@ -281,7 +323,13 @@ static mframe_t dog_frames_die2 [] =
{ai_move, 0, NULL}
};
mmove_t dog_move_die2 = {17, 25, dog_frames_die2, dog_dead};
mmove_t dog_move_die2 =
{
FRAME_deathb1,
FRAME_deathb9,
dog_frames_die2,
dog_dead
};
void dog_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{

View file

@ -44,7 +44,8 @@ static mframe_t enforcer_frames_stand [] =
{ai_stand, 0, NULL},
{ai_stand, 0, NULL},
};
mmove_t enforcer_move_stand = {
mmove_t enforcer_move_stand =
{
FRAME_stand1,
FRAME_stand7,
enforcer_frames_stand,
@ -78,7 +79,8 @@ static mframe_t enforcer_frames_walk [] =
{ai_walk, 0, NULL}
};
mmove_t enforcer_move_walk = {
mmove_t enforcer_move_walk =
{
FRAME_walk1,
FRAME_walk16,
enforcer_frames_walk,
@ -104,7 +106,8 @@ static mframe_t enforcer_frames_run [] =
{ai_run, 7, NULL},
{ai_run, 11, NULL}
};
mmove_t enforcer_move_run = {
mmove_t enforcer_move_run =
{
FRAME_run1,
FRAME_run8,
enforcer_frames_run,
@ -225,7 +228,8 @@ static mframe_t enforcer_frames_attack2 [] =
{ai_charge, 0, NULL},
{ai_charge, 0, NULL}
};
mmove_t enforcer_move_attack2 = {
mmove_t enforcer_move_attack2 =
{
FRAME_attack5,
FRAME_attack10,
enforcer_frames_attack2,
@ -235,7 +239,7 @@ mmove_t enforcer_move_attack2 = {
static void
enforcer_attack_again(edict_t *self)
{
self->s.frame = 34;
self->s.frame = FRAME_attack4;
self->monsterinfo.currentmove = &enforcer_move_attack2;
}
@ -252,7 +256,8 @@ static mframe_t enforcer_frames_attack1 [] =
{ai_charge, 0, NULL},
{ai_charge, 0, NULL}
};
mmove_t enforcer_move_attack1 = {
mmove_t enforcer_move_attack1 =
{
FRAME_attack1,
FRAME_attack8,
enforcer_frames_attack1,
@ -296,7 +301,8 @@ static mframe_t enforcer_frames_pain1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t enforcer_move_pain1 = {
mmove_t enforcer_move_pain1 =
{
FRAME_paina1,
FRAME_paina4,
enforcer_frames_pain1,
@ -313,7 +319,8 @@ static mframe_t enforcer_frames_pain2 [] =
{ai_move, 0, NULL}
};
mmove_t enforcer_move_pain2 = {
mmove_t enforcer_move_pain2 =
{
FRAME_painb1,
FRAME_painb5,
enforcer_frames_pain2,
@ -333,7 +340,8 @@ static mframe_t enforcer_frames_pain3 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t enforcer_move_pain3 = {
mmove_t enforcer_move_pain3 =
{
FRAME_painc1,
FRAME_painc8,
enforcer_frames_pain3,
@ -367,7 +375,8 @@ static mframe_t enforcer_frames_pain4 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t enforcer_move_pain4 = {
mmove_t enforcer_move_pain4 =
{
FRAME_paind1,
FRAME_paind19,
enforcer_frames_pain4,
@ -446,7 +455,8 @@ static mframe_t enforcer_frames_death1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t enforcer_move_death1 = {
mmove_t enforcer_move_death1 =
{
FRAME_death1,
FRAME_death14,
enforcer_frames_death1,
@ -470,7 +480,8 @@ static mframe_t enforcer_frames_death2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t enforcer_move_death2 = {
mmove_t enforcer_move_death2 =
{
FRAME_fdeath1,
FRAME_fdeath11,
enforcer_frames_death2,

View file

@ -51,7 +51,13 @@ static mframe_t fish_frames_stand [] =
{ai_stand, 0, NULL},
{ai_stand, 0, NULL},
};
mmove_t fish_move_stand = {39, 56, fish_frames_stand, NULL};
mmove_t fish_move_stand =
{
FRAME_swim1,
FRAME_swim18,
fish_frames_stand,
NULL
};
void fish_stand(edict_t *self)
{
@ -84,7 +90,13 @@ static mframe_t fish_frames_run [] =
{ai_run, 12, NULL},
{ai_run, 12, NULL}
};
mmove_t fish_move_run = {39, 56, fish_frames_run, NULL};
mmove_t fish_move_run =
{
FRAME_swim1,
FRAME_swim18,
fish_frames_run,
NULL
};
void fish_run(edict_t *self)
{
@ -136,7 +148,13 @@ static mframe_t fish_frames_melee [] =
{ai_run, 10, NULL},
{ai_run, 10, NULL}
};
mmove_t fish_move_melee = {0, 17, fish_frames_melee, fish_run};
mmove_t fish_move_melee =
{
FRAME_attack1,
FRAME_attack18,
fish_frames_melee,
fish_run
};
void fish_melee(edict_t *self)
{
@ -189,7 +207,13 @@ static mframe_t fish_frames_death [] =
{ai_move, 0, NULL}
};
mmove_t fish_move_death = {18, 38, fish_frames_death, fish_dead};
mmove_t fish_move_death =
{
FRAME_death1,
FRAME_death21,
fish_frames_death,
fish_dead
};
void fish_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{
@ -242,7 +266,13 @@ static mframe_t fish_frames_pain [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t fish_move_pain = {57, 65, fish_frames_pain, fish_run};
mmove_t fish_move_pain =
{
FRAME_pain1,
FRAME_pain9,
fish_frames_pain,
fish_run
};
void fish_pain(edict_t *self, edict_t *other /* unused */,
float kick /* unused */, int damage)

View file

@ -47,7 +47,13 @@ static mframe_t hknight_frames_stand [] =
{ai_stand, 0, NULL},
};
mmove_t hknight_move_stand = {0, 8, hknight_frames_stand, NULL};
mmove_t hknight_move_stand =
{
FRAME_stand1,
FRAME_stand9,
hknight_frames_stand,
NULL
};
void hknight_stand(edict_t *self)
{
@ -77,7 +83,13 @@ static mframe_t hknight_frames_charge [] =
{ai_charge, 25, NULL},
{ai_charge, 21, NULL},
};
mmove_t hknight_move_charge = {63, 78, hknight_frames_charge, hknight_run};
mmove_t hknight_move_charge =
{
FRAME_char_a1,
FRAME_char_a16,
hknight_frames_charge,
hknight_run
};
qboolean CheckForCharge(edict_t *self)
{
@ -105,7 +117,13 @@ static mframe_t hknight_frames_run [] =
{ai_run, 21, NULL},
{ai_run, 13, NULL}
};
mmove_t hknight_move_run = {29, 36, hknight_frames_run, NULL};
mmove_t hknight_move_run =
{
FRAME_run1,
FRAME_run8,
hknight_frames_run,
NULL
};
void hknight_run(edict_t *self)
{
@ -223,7 +241,13 @@ static mframe_t hknight_frames_attack [] =
{ai_charge, 0, FireMagic},
{ai_charge, 0, FireMagic}
};
mmove_t hknight_move_attack = {155, 165, hknight_frames_attack, hknight_run};
mmove_t hknight_move_attack =
{
FRAME_magicc1,
FRAME_magicc11,
hknight_frames_attack,
hknight_run
};
void hknight_attack(edict_t *self)
{
@ -251,7 +275,13 @@ static mframe_t hknight_frames_slice [] =
{ai_charge, 0, SwingSword},
{ai_charge, 3, NULL}
};
mmove_t hknight_move_slice = {112, 121, hknight_frames_slice, hknight_run};
mmove_t hknight_move_slice =
{
FRAME_slice1,
FRAME_slice10,
hknight_frames_slice,
hknight_run
};
// Smash
static mframe_t hknight_frames_smash [] =
@ -270,7 +300,13 @@ static mframe_t hknight_frames_smash [] =
{ai_charge, 0, NULL},
{ai_charge, 0, NULL}
};
mmove_t hknight_move_smash = {122, 132, hknight_frames_smash, hknight_run};
mmove_t hknight_move_smash =
{
FRAME_smash1,
FRAME_smash11,
hknight_frames_smash,
hknight_run
};
// Watk
static mframe_t hknight_frames_watk [] =
@ -304,7 +340,13 @@ static mframe_t hknight_frames_watk [] =
{ai_charge, 3, NULL},
};
mmove_t hknight_move_watk = {133, 154, hknight_frames_watk, hknight_run};
mmove_t hknight_move_watk =
{
FRAME_w_attack1,
FRAME_w_attack22,
hknight_frames_watk,
hknight_run
};
// Melee
void hknight_melee(edict_t *self)
@ -333,7 +375,13 @@ static mframe_t hknight_frames_pain [] =
{ai_move, 0, NULL}
};
mmove_t hknight_move_pain = {37, 41, hknight_frames_pain, hknight_run};
mmove_t hknight_move_pain =
{
FRAME_pain1,
FRAME_pain5,
hknight_frames_pain,
hknight_run
};
void hknight_pain(edict_t *self, edict_t *other, float kick, int damage)
{
@ -385,7 +433,13 @@ static mframe_t hknight_frames_die1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t hknight_move_die1 = {42, 53, hknight_frames_die1, hknight_dead};
mmove_t hknight_move_die1 =
{
FRAME_death1,
FRAME_death12,
hknight_frames_die1,
hknight_dead
};
// Death (2)
static mframe_t hknight_frames_die2 [] =
@ -402,7 +456,13 @@ static mframe_t hknight_frames_die2 [] =
{ai_move, 0, NULL}
};
mmove_t hknight_move_die2 = {54, 62, hknight_frames_die2, hknight_dead};
mmove_t hknight_move_die2 =
{
FRAME_deathb1,
FRAME_deathb9,
hknight_frames_die2,
hknight_dead
};
void hknight_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{

View file

@ -45,7 +45,13 @@ static mframe_t knight_frames_stand [] =
{ai_stand, 0, NULL},
};
mmove_t knight_move_stand = {0, 8, knight_frames_stand, NULL};
mmove_t knight_move_stand =
{
FRAME_stand1,
FRAME_stand9,
knight_frames_stand,
NULL
};
void knight_stand(edict_t *self)
{
@ -65,7 +71,13 @@ static mframe_t knight_frames_run [] =
{ai_run, 14, NULL},
{ai_run, 6, knight_attack}
};
mmove_t knight_move_run = {9, 16, knight_frames_run, NULL};
mmove_t knight_move_run =
{
FRAME_runb1,
FRAME_runb8,
knight_frames_run,
NULL
};
void knight_run(edict_t *self)
{
@ -124,9 +136,10 @@ static mframe_t knight_frames_attack [] =
{ai_charge, 10, NULL},
{ai_charge, 7, NULL}
};
mmove_t knight_move_attack = {
17,
27,
mmove_t knight_move_attack =
{
FRAME_runattack1,
FRAME_runattack11,
knight_frames_attack,
knight_run
};
@ -155,6 +168,7 @@ static mframe_t knight_frames_melee [] =
{ai_charge, 7, NULL},
{ai_charge, 4, NULL},
{ai_charge, 0, NULL},
{ai_charge, 0, NULL},
{ai_charge, 4, SwingSword},
{ai_charge, 4, SwingSword},
@ -164,7 +178,13 @@ static mframe_t knight_frames_melee [] =
{ai_charge, 1, NULL},
{ai_charge, 5, NULL}
};
mmove_t knight_move_melee = {43, 52, knight_frames_melee, knight_run};
mmove_t knight_move_melee =
{
FRAME_attackb1,
FRAME_attackb11,
knight_frames_melee,
knight_run
};
void knight_melee(edict_t *self)
{
@ -178,7 +198,13 @@ static mframe_t knight_frames_pain1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t knight_move_pain1 = {28, 30, knight_frames_pain1, knight_run};
mmove_t knight_move_pain1 =
{
FRAME_pain1,
FRAME_pain3,
knight_frames_pain1,
knight_run
};
// Pain (2)
static mframe_t knight_frames_pain2 [] =
@ -197,7 +223,13 @@ static mframe_t knight_frames_pain2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t knight_move_pain2 = {31, 41, knight_frames_pain2, knight_run};
mmove_t knight_move_pain2 =
{
FRAME_painb1,
FRAME_painb11,
knight_frames_pain2,
knight_run
};
void knight_pain(edict_t *self, edict_t *other /* unused */,
float kick /* unused */, int damage)
@ -241,7 +273,13 @@ static mframe_t knight_frames_die1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t knight_move_die1 = {76, 85, knight_frames_die1, knight_dead};
mmove_t knight_move_die1 =
{
FRAME_death1,
FRAME_death10,
knight_frames_die1,
knight_dead
};
// Death (2)
static mframe_t knight_frames_die2 [] =
@ -260,7 +298,13 @@ static mframe_t knight_frames_die2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t knight_move_die2 = {86, 96, knight_frames_die2, knight_dead};
mmove_t knight_move_die2 =
{
FRAME_deathb1,
FRAME_deathb11,
knight_frames_die2,
knight_dead
};
void knight_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{

View file

@ -50,7 +50,13 @@ static mframe_t ogre_frames_stand [] =
{ai_stand, 0, NULL},
};
mmove_t ogre_move_stand = {0, 8, ogre_frames_stand, NULL};
mmove_t ogre_move_stand =
{
FRAME_stand1,
FRAME_stand9,
ogre_frames_stand,
NULL
};
void ogre_stand(edict_t *self)
{
@ -70,9 +76,10 @@ static mframe_t ogre_frames_run [] =
{ai_run, 13, NULL},
{ai_run, 24, NULL}
};
mmove_t ogre_move_run = {
25,
32,
mmove_t ogre_move_run =
{
FRAME_run1,
FRAME_run8,
ogre_frames_run,
NULL
};
@ -120,9 +127,10 @@ static mframe_t ogre_frames_smash [] =
{ai_charge, 12, NULL},
{ai_charge, 0, NULL}
};
mmove_t ogre_move_smash = {
47,
60,
mmove_t ogre_move_smash =
{
FRAME_smash1,
FRAME_smash14,
ogre_frames_smash,
ogre_run
};
@ -148,7 +156,13 @@ static mframe_t ogre_frames_swing [] =
{ai_charge, 9, NULL},
{ai_charge, 0, NULL}
};
mmove_t ogre_move_swing = {33, 46, ogre_frames_swing, ogre_run};
mmove_t ogre_move_swing =
{
FRAME_swing1,
FRAME_swing14,
ogre_frames_swing,
ogre_run
};
// Melee
void ogre_melee(edict_t *self)
@ -185,7 +199,13 @@ static mframe_t ogre_frames_attack [] =
{ai_charge, 0, NULL},
{ai_charge, 0, NULL}
};
mmove_t ogre_move_attack = {61, 66, ogre_frames_attack, ogre_run};
mmove_t ogre_move_attack =
{
FRAME_shoot1,
FRAME_shoot6,
ogre_frames_attack,
ogre_run
};
void ogre_attack(edict_t *self)
{
@ -202,7 +222,13 @@ static mframe_t ogre_frames_pain1 [] =
{ai_move, 0, NULL}
};
mmove_t ogre_move_pain1 = {67, 71, ogre_frames_pain1, ogre_run};
mmove_t ogre_move_pain1 =
{
FRAME_pain1,
FRAME_pain5,
ogre_frames_pain1,
ogre_run
};
// Pain (2)
static mframe_t ogre_frames_pain2 [] =
@ -211,7 +237,13 @@ static mframe_t ogre_frames_pain2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t ogre_move_pain2 = {72, 74, ogre_frames_pain2, ogre_run};
mmove_t ogre_move_pain2 =
{
FRAME_painb1,
FRAME_painb3,
ogre_frames_pain2,
ogre_run
};
// Pain (3)
static mframe_t ogre_frames_pain3 [] =
@ -224,7 +256,13 @@ static mframe_t ogre_frames_pain3 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t ogre_move_pain3 = {75, 80, ogre_frames_pain3, ogre_run};
mmove_t ogre_move_pain3 =
{
FRAME_painc1,
FRAME_painc6,
ogre_frames_pain3,
ogre_run
};
// Pain (4)
static mframe_t ogre_frames_pain4 [] =
@ -249,7 +287,13 @@ static mframe_t ogre_frames_pain4 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t ogre_move_pain4 = {81, 96, ogre_frames_pain4, ogre_run};
mmove_t ogre_move_pain4 =
{
FRAME_paind1,
FRAME_paind16,
ogre_frames_pain4,
ogre_run
};
// Pain (5)
static mframe_t ogre_frames_pain5 [] =
@ -273,9 +317,10 @@ static mframe_t ogre_frames_pain5 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t ogre_move_pain5 = {
97,
111,
mmove_t ogre_move_pain5 =
{
FRAME_paine1,
FRAME_paine15,
ogre_frames_pain5,
ogre_run
};
@ -352,7 +397,13 @@ static mframe_t ogre_frames_death1 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t ogre_move_death1 = {112, 125, ogre_frames_death1, ogre_dead};
mmove_t ogre_move_death1 =
{
FRAME_death1,
FRAME_death14,
ogre_frames_death1,
ogre_dead
};
// Death (2)
static mframe_t ogre_frames_death2 [] =
@ -370,7 +421,13 @@ static mframe_t ogre_frames_death2 [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t ogre_move_death2 = {126, 135, ogre_frames_death2, ogre_dead};
mmove_t ogre_move_death2 =
{
FRAME_bdeath1,
FRAME_bdeath10,
ogre_frames_death2,
ogre_dead
};
// Death
void ogre_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)

View file

@ -33,7 +33,14 @@ static mframe_t shalrath_frames_stand [] =
{
{ai_stand, 0, NULL},
};
mmove_t shalrath_move_stand = {0, 0, shalrath_frames_stand, NULL};
mmove_t shalrath_move_stand =
{
FRAME_attack1,
FRAME_attack1,
shalrath_frames_stand,
NULL
};
void shalrath_stand(edict_t *self)
{
@ -58,7 +65,13 @@ static mframe_t shalrath_frames_run [] =
{ai_run, 4, NULL},
{ai_run, 5, NULL}
};
mmove_t shalrath_move_run = {23, 34, shalrath_frames_run, NULL};
mmove_t shalrath_move_run =
{
FRAME_walk1,
FRAME_walk12,
shalrath_frames_run,
NULL
};
void shalrath_run(edict_t *self)
{
@ -199,7 +212,13 @@ static mframe_t shalrath_frames_attack [] =
{ai_charge, 0, NULL},
{ai_charge, 0, NULL}
};
mmove_t shalrath_move_attack = {0, 10, shalrath_frames_attack, shalrath_run};
mmove_t shalrath_move_attack =
{
FRAME_attack1,
FRAME_attack11,
shalrath_frames_attack,
shalrath_run
};
void shalrath_attack(edict_t *self)
{
@ -216,7 +235,13 @@ static mframe_t shalrath_frames_pain [] =
{ai_move, 0, NULL}
};
mmove_t shalrath_move_pain = {11, 15, shalrath_frames_pain, shalrath_run};
mmove_t shalrath_move_pain =
{
FRAME_pain1,
FRAME_pain5,
shalrath_frames_pain,
shalrath_run
};
void shalrath_pain(edict_t *self, edict_t *other /* unused */,
float kick /* unused */, int damage)
@ -254,7 +279,13 @@ static mframe_t shalrath_frames_death [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t shalrath_move_death = {16, 22, shalrath_frames_death, shalrath_dead};
mmove_t shalrath_move_death =
{
FRAME_death1,
FRAME_death7,
shalrath_frames_death,
shalrath_dead
};
void shalrath_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{

View file

@ -38,7 +38,13 @@ static mframe_t tarbaby_frames_stand [] =
{
{ai_stand, 0, tarbaby_unbounce}
};
mmove_t tarbaby_move_stand = {0, 0, tarbaby_frames_stand, NULL};
mmove_t tarbaby_move_stand =
{
FRAME_walk1,
FRAME_walk1,
tarbaby_frames_stand,
NULL
};
void tarbaby_stand(edict_t *self)
{
@ -80,7 +86,13 @@ static mframe_t tarbaby_frames_run [] =
{ai_run, 2, NULL}
};
mmove_t tarbaby_move_run = {25, 49, tarbaby_frames_run, NULL};
mmove_t tarbaby_move_run =
{
FRAME_run1,
FRAME_run25,
tarbaby_frames_run,
NULL
};
void tarbaby_run(edict_t *self)
{
@ -142,7 +154,13 @@ static mframe_t tarbaby_frames_fly [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t tarbaby_move_fly = {56, 59, tarbaby_frames_fly, tarbaby_rejump};
mmove_t tarbaby_move_fly =
{
FRAME_fly1,
FRAME_fly4,
tarbaby_frames_fly,
tarbaby_rejump
};
void tarbaby_fly(edict_t *self)
{
@ -160,7 +178,13 @@ static mframe_t tarbaby_frames_jump [] =
{ai_charge, 0, TarBabyJump},
{ai_charge, 0, NULL}
};
mmove_t tarbaby_move_jump = {50, 55, tarbaby_frames_jump, tarbaby_fly};
mmove_t tarbaby_move_jump =
{
FRAME_jump1,
FRAME_jump6,
tarbaby_frames_jump,
tarbaby_fly
};
void tarbaby_rejump(edict_t *self)
{
@ -199,7 +223,7 @@ void tarbaby_die(edict_t *self, edict_t *inflictor /* unused */,
{
if (self->deadflag == DEAD_DEAD)
return;
self->s.frame = 60;
self->s.frame = FRAME_exp;
self->deadflag = DEAD_DEAD;
self->think = tarbaby_explode;
self->nextthink = level.time + 0.1;

View file

@ -97,17 +97,6 @@ void WidowCalcSlots(edict_t *self);
void drawbbox(edict_t *self);
void
showme(edict_t *self)
{
if (!self)
{
return;
}
gi.dprintf("frame %d\n", self->s.frame);
}
void
widow_search(edict_t *self)
{

View file

@ -92,7 +92,6 @@ void WidowExplosionLeg(edict_t *self);
void ThrowArm1(edict_t *self);
void ThrowArm2(edict_t *self);
void ClipGibVelocity(edict_t *ent);
void showme(edict_t *self);
/* these offsets used by the tongue */
static vec3_t offsets[] = {

View file

@ -51,7 +51,13 @@ static mframe_t wizard_frames_stand [] =
{ai_stand, 0, NULL},
{ai_stand, 0, NULL},
};
mmove_t wizard_move_stand = {0, 14, wizard_frames_stand, NULL};
mmove_t wizard_move_stand =
{
FRAME_hover1,
FRAME_hover15,
wizard_frames_stand,
NULL
};
void wizard_stand(edict_t *self)
{
@ -80,9 +86,10 @@ static mframe_t wizard_frames_run [] =
{ai_run, 16, NULL},
{ai_run, 16, NULL}
};
mmove_t wizard_move_run = {
15,
28,
mmove_t wizard_move_run =
{
FRAME_fly1,
FRAME_fly14,
wizard_frames_run,
NULL
};
@ -96,7 +103,7 @@ void wizard_frame(edict_t *self)
{
static int frame = 0;
self->s.frame = (33 - frame);
self->s.frame = (FRAME_magatt5 - frame);
frame++;
if (frame > 5)
@ -115,7 +122,13 @@ static mframe_t wizard_frames_finish [] =
{ai_charge, 0, wizard_frame}
};
mmove_t wizard_move_finish = {29, 33, wizard_frames_finish, wizard_run};
mmove_t wizard_move_finish =
{
FRAME_magatt1,
FRAME_magatt5,
wizard_frames_finish,
wizard_run
};
void wizard_finish_attack(edict_t *self)
{
@ -228,7 +241,13 @@ static mframe_t wizard_frames_attack [] =
{ai_charge, 0, WizardSpit},
{ai_charge, 0, NULL}
};
mmove_t wizard_move_attack = {29, 34, wizard_frames_attack, wizard_finish_attack};
mmove_t wizard_move_attack =
{
FRAME_magatt1,
FRAME_magatt6,
wizard_frames_attack,
wizard_finish_attack
};
void wizard_attack(edict_t *self)
{
@ -243,7 +262,13 @@ static mframe_t wizard_frames_pain [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t wizard_move_pain = {42, 45, wizard_frames_pain, wizard_run};
mmove_t wizard_move_pain =
{
FRAME_pain1,
FRAME_pain4,
wizard_frames_pain,
wizard_run
};
void wizard_pain(edict_t *self, edict_t *other /* unused */,
float kick /* unused */, int damage)
@ -291,7 +316,13 @@ static mframe_t wizard_frames_death [] =
{ai_move, 0, NULL},
{ai_move, 0, NULL}
};
mmove_t wizard_move_death = {46, 53, wizard_frames_death, wizard_dead};
mmove_t wizard_move_death =
{
FRAME_death1,
FRAME_death8,
wizard_frames_death,
wizard_dead
};
void wizard_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{

View file

@ -55,7 +55,8 @@ static mframe_t zombie_frames_stand [] =
{ai_stand, 0, NULL},
{ai_stand, 0, NULL},
};
mmove_t zombie_move_stand = {
mmove_t zombie_move_stand =
{
FRAME_stand1,
FRAME_stand15,
zombie_frames_stand,
@ -95,7 +96,8 @@ static mframe_t zombie_frames_run[] =
{ai_run, 8, NULL}
};
mmove_t zombie_move_run = {
mmove_t zombie_move_run =
{
FRAME_run1,
FRAME_run18,
zombie_frames_run,
@ -136,7 +138,8 @@ static mframe_t zombie_frames_walk[] =
{ai_walk, 0, NULL}
};
mmove_t zombie_move_walk = {
mmove_t zombie_move_walk =
{
FRAME_walk1,
FRAME_walk19,
zombie_frames_walk,
@ -444,7 +447,7 @@ zombie_get_up_attempt(edict_t *self)
zombie_get_up(self);
return;
}
self->s.frame = 172;
self->s.frame = FRAME_paine11;
self->monsterinfo.currentmove = &zombie_move_get_up_attempt;
down++;