mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-20 19:02:23 +00:00
game: fix guardian and shambler save
This commit is contained in:
parent
38f2442d84
commit
dab662c8ba
6 changed files with 155 additions and 16 deletions
|
@ -118,7 +118,8 @@ guardian_stand(edict_t *self)
|
|||
|
||||
static int sound_step;
|
||||
|
||||
void guardian_footstep(edict_t *self)
|
||||
void
|
||||
guardian_footstep(edict_t *self)
|
||||
{
|
||||
gi.sound(self, CHAN_BODY, sound_step, 1.f, ATTN_NORM, 0.0f);
|
||||
}
|
||||
|
@ -240,7 +241,7 @@ mmove_t guardian_move_pain1 =
|
|||
|
||||
void
|
||||
guardian_pain(edict_t *self, edict_t *other /* other */,
|
||||
float kick /* other */, int damage)
|
||||
float kick /* other */, int damage)
|
||||
{
|
||||
if (!self)
|
||||
{
|
||||
|
@ -386,7 +387,8 @@ mmove_t guardian_move_atk1_spin =
|
|||
guardian_atk1_finish
|
||||
};
|
||||
|
||||
void guardian_atk1(edict_t *self)
|
||||
void
|
||||
guardian_atk1(edict_t *self)
|
||||
{
|
||||
if (!self)
|
||||
{
|
||||
|
@ -443,8 +445,8 @@ guardian_atk2_out(edict_t *self)
|
|||
static int sound_laser;
|
||||
|
||||
static vec3_t laser_positions[] = {
|
||||
{ 125.0f, -70.f, 60.f},
|
||||
{ 112.0f, -62.f, 60.f }
|
||||
{125.0f, -70.f, 60.f},
|
||||
{112.0f, -62.f, 60.f}
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -509,7 +511,8 @@ mmove_t guardian_move_atk2_fire =
|
|||
guardian_atk2_out
|
||||
};
|
||||
|
||||
void guardian_atk2(edict_t *self)
|
||||
void
|
||||
guardian_atk2(edict_t *self)
|
||||
{
|
||||
if (!self)
|
||||
{
|
||||
|
@ -604,7 +607,8 @@ guardian_attack(edict_t *self)
|
|||
// death
|
||||
//
|
||||
|
||||
void guardian_explode(edict_t *self)
|
||||
void
|
||||
guardian_explode(edict_t *self)
|
||||
{
|
||||
vec3_t start, pos;
|
||||
int i;
|
||||
|
@ -635,7 +639,8 @@ static const char *gibs[] = {
|
|||
"models/monsters/guardian/gib7.md2"
|
||||
};
|
||||
|
||||
void guardian_dead(edict_t *self)
|
||||
void
|
||||
guardian_dead(edict_t *self)
|
||||
{
|
||||
int i, n;
|
||||
|
||||
|
|
|
@ -86,7 +86,8 @@ shambler_lightning_update(edict_t *self)
|
|||
gi.linkentity(lightning);
|
||||
}
|
||||
|
||||
void shambler_windup(edict_t* self)
|
||||
void
|
||||
shambler_windup(edict_t* self)
|
||||
{
|
||||
gi.sound(self, CHAN_WEAPON, sound_windup, 1, ATTN_NORM, 0);
|
||||
|
||||
|
@ -398,12 +399,14 @@ shambler_attack(edict_t* self)
|
|||
// melee
|
||||
//
|
||||
|
||||
void shambler_melee1(edict_t* self)
|
||||
void
|
||||
shambler_melee1(edict_t* self)
|
||||
{
|
||||
gi.sound(self, CHAN_WEAPON, sound_melee1, 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
||||
void shambler_melee2(edict_t* self)
|
||||
void
|
||||
shambler_melee2(edict_t* self)
|
||||
{
|
||||
gi.sound(self, CHAN_WEAPON, sound_melee2, 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
@ -411,7 +414,8 @@ void shambler_melee2(edict_t* self)
|
|||
void sham_swingl9(edict_t* self);
|
||||
void sham_swingr9(edict_t* self);
|
||||
|
||||
void sham_smash10(edict_t* self)
|
||||
void
|
||||
sham_smash10(edict_t* self)
|
||||
{
|
||||
if (!self->enemy)
|
||||
return;
|
||||
|
@ -429,7 +433,8 @@ void sham_smash10(edict_t* self)
|
|||
}
|
||||
};
|
||||
|
||||
void ShamClaw(edict_t* self)
|
||||
void
|
||||
ShamClaw(edict_t* self)
|
||||
{
|
||||
if (!self->enemy)
|
||||
return;
|
||||
|
@ -595,7 +600,7 @@ shambler_dead(edict_t* self)
|
|||
gi.linkentity(self);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
shambler_shrink(edict_t* self)
|
||||
{
|
||||
self->maxs[2] = 0;
|
||||
|
@ -648,9 +653,11 @@ shambler_die(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker /
|
|||
}
|
||||
|
||||
if (self->deadflag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// regular death
|
||||
/* regular death */
|
||||
gi.sound(self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
|
||||
self->deadflag = true;
|
||||
self->takedamage = true;
|
||||
|
@ -658,7 +665,8 @@ shambler_die(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker /
|
|||
self->monsterinfo.currentmove = &shambler_move_death;
|
||||
}
|
||||
|
||||
void SP_monster_shambler(edict_t* self)
|
||||
void
|
||||
SP_monster_shambler(edict_t* self)
|
||||
{
|
||||
if (!self)
|
||||
{
|
||||
|
|
|
@ -810,6 +810,48 @@ extern void floater_fire_blaster ( edict_t * self ) ;
|
|||
extern void floater_idle ( edict_t * self ) ;
|
||||
extern void floater_sight ( edict_t * self , edict_t * other ) ;
|
||||
extern void SP_monster_flipper ( edict_t * self ) ;
|
||||
extern void guardian_stand(edict_t *self);
|
||||
extern void guardian_footstep(edict_t *self);
|
||||
extern void guardian_walk(edict_t *self);
|
||||
extern void guardian_run(edict_t *self);
|
||||
extern void guardian_pain(edict_t *self, edict_t *other /* other */, float kick /* other */, int damage);
|
||||
extern void guardian_atk1_finish(edict_t *self);
|
||||
extern void guardian_atk1_charge(edict_t *self);
|
||||
extern void guardian_fire_blaster(edict_t *self);
|
||||
extern void guardian_hyper_sound(edict_t *self);
|
||||
extern void guardian_atk1(edict_t *self);
|
||||
extern void guardian_atk2_out(edict_t *self);
|
||||
extern void guardian_laser_fire(edict_t *self);
|
||||
extern void guardian_atk2(edict_t *self);
|
||||
extern void guardian_kick(edict_t *self);
|
||||
extern void guardian_attack(edict_t *self);
|
||||
extern void guardian_explode(edict_t *self);
|
||||
extern void guardian_dead(edict_t *self);
|
||||
extern void guardian_die(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker /* unused */, int damage, vec3_t point /* unused */);
|
||||
extern void SP_monster_guardian(edict_t *self);
|
||||
extern void shambler_sight(edict_t* self, edict_t* other);
|
||||
extern void shambler_lightning_update(edict_t *self);
|
||||
extern void shambler_windup(edict_t* self);
|
||||
extern void shambler_idle(edict_t* self);
|
||||
extern void shambler_maybe_idle(edict_t* self);
|
||||
extern void shambler_stand(edict_t* self);
|
||||
extern void shambler_walk(edict_t* self);
|
||||
extern void shambler_run(edict_t* self);
|
||||
extern void shambler_pain(edict_t *self, edict_t *other /* unused */, float kick /* unused */, int damage /* unused */);
|
||||
extern void ShamblerSaveLoc(edict_t* self);
|
||||
extern void ShamblerCastLightning(edict_t* self);
|
||||
extern void shambler_attack(edict_t* self);
|
||||
extern void shambler_melee1(edict_t* self);
|
||||
extern void shambler_melee2(edict_t* self);
|
||||
extern void sham_smash10(edict_t* self);
|
||||
extern void ShamClaw(edict_t* self);
|
||||
extern void sham_swingl9(edict_t* self);
|
||||
extern void sham_swingr9(edict_t* self);
|
||||
extern void shambler_melee(edict_t* self);
|
||||
extern void shambler_dead(edict_t* self);
|
||||
extern void shambler_shrink(edict_t* self);
|
||||
extern void shambler_die(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker /* unused */, int damage, vec3_t point /* unused */);
|
||||
extern void SP_monster_shambler(edict_t* self);
|
||||
extern void flipper_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void flipper_sight ( edict_t * self , edict_t * other ) ;
|
||||
extern void flipper_dead ( edict_t * self ) ;
|
||||
|
|
|
@ -811,6 +811,48 @@
|
|||
{"floater_fire_blaster", (byte *)floater_fire_blaster},
|
||||
{"floater_idle", (byte *)floater_idle},
|
||||
{"floater_sight", (byte *)floater_sight},
|
||||
{"guardian_stand", (byte *)guardian_stand},
|
||||
{"guardian_footstep", (byte *)guardian_footstep},
|
||||
{"guardian_walk", (byte *)guardian_walk},
|
||||
{"guardian_run", (byte *)guardian_run},
|
||||
{"guardian_pain", (byte *)guardian_pain},
|
||||
{"guardian_atk1_finish", (byte *)guardian_atk1_finish},
|
||||
{"guardian_atk1_charge", (byte *)guardian_atk1_charge},
|
||||
{"guardian_fire_blaster", (byte *)guardian_fire_blaster},
|
||||
{"guardian_hyper_sound", (byte *)guardian_hyper_sound},
|
||||
{"guardian_atk1", (byte *)guardian_atk1},
|
||||
{"guardian_atk2_out", (byte *)guardian_atk2_out},
|
||||
{"guardian_laser_fire", (byte *)guardian_laser_fire},
|
||||
{"guardian_atk2", (byte *)guardian_atk2},
|
||||
{"guardian_kick", (byte *)guardian_kick},
|
||||
{"guardian_attack", (byte *)guardian_attack},
|
||||
{"guardian_explode", (byte *)guardian_explode},
|
||||
{"guardian_dead", (byte *)guardian_dead},
|
||||
{"guardian_die", (byte *)guardian_die},
|
||||
{"SP_monster_guardian", (byte *)SP_monster_guardian},
|
||||
{"shambler_sight", (byte *)shambler_sight},
|
||||
{"shambler_lightning_update", (byte *)shambler_lightning_update},
|
||||
{"shambler_windup", (byte *)shambler_windup},
|
||||
{"shambler_idle", (byte *)shambler_idle},
|
||||
{"shambler_maybe_idle", (byte *)shambler_maybe_idle},
|
||||
{"shambler_stand", (byte *)shambler_stand},
|
||||
{"shambler_walk", (byte *)shambler_walk},
|
||||
{"shambler_run", (byte *)shambler_run},
|
||||
{"shambler_pain", (byte *)shambler_pain},
|
||||
{"ShamblerSaveLoc", (byte *)ShamblerSaveLoc},
|
||||
{"ShamblerCastLightning", (byte *)ShamblerCastLightning},
|
||||
{"shambler_attack", (byte *)shambler_attack},
|
||||
{"shambler_melee1", (byte *)shambler_melee1},
|
||||
{"shambler_melee2", (byte *)shambler_melee2},
|
||||
{"sham_smash10", (byte *)sham_smash10},
|
||||
{"ShamClaw", (byte *)ShamClaw},
|
||||
{"sham_swingl9", (byte *)sham_swingl9},
|
||||
{"sham_swingr9", (byte *)sham_swingr9},
|
||||
{"shambler_melee", (byte *)shambler_melee},
|
||||
{"shambler_dead", (byte *)shambler_dead},
|
||||
{"shambler_shrink", (byte *)shambler_shrink},
|
||||
{"shambler_die", (byte *)shambler_die},
|
||||
{"SP_monster_shambler", (byte *)SP_monster_shambler},
|
||||
{"SP_monster_flipper", (byte *)SP_monster_flipper},
|
||||
{"flipper_die", (byte *)flipper_die},
|
||||
{"flipper_sight", (byte *)flipper_sight},
|
||||
|
|
|
@ -503,3 +503,24 @@ extern mmove_t arachnid_attack1 ;
|
|||
extern mmove_t arachnid_attack_up1 ;
|
||||
extern mmove_t arachnid_melee ;
|
||||
extern mmove_t arachnid_move_death ;
|
||||
extern mmove_t shambler_move_stand ;
|
||||
extern mmove_t shambler_move_walk ;
|
||||
extern mmove_t shambler_move_run ;
|
||||
extern mmove_t shambler_move_pain ;
|
||||
extern mmove_t shambler_attack_magic ;
|
||||
extern mmove_t shambler_attack_smash ;
|
||||
extern mmove_t shambler_attack_swingl ;
|
||||
extern mmove_t shambler_attack_swingr ;
|
||||
extern mmove_t shambler_move_death ;
|
||||
extern mmove_t guardian_move_stand ;
|
||||
extern mmove_t guardian_move_walk ;
|
||||
extern mmove_t guardian_move_run ;
|
||||
extern mmove_t guardian_move_pain1 ;
|
||||
extern mmove_t guardian_atk1_out ;
|
||||
extern mmove_t guardian_move_atk1_spin ;
|
||||
extern mmove_t guardian_move_atk1_in ;
|
||||
extern mmove_t guardian_move_atk2_out ;
|
||||
extern mmove_t guardian_move_atk2_fire ;
|
||||
extern mmove_t guardian_move_atk2_in ;
|
||||
extern mmove_t guardian_move_kick ;
|
||||
extern mmove_t guardian_move_death ;
|
||||
|
|
|
@ -502,4 +502,25 @@
|
|||
{"arachnid_attack_up1", &arachnid_attack_up1},
|
||||
{"arachnid_melee", &arachnid_melee},
|
||||
{"arachnid_move_death", &arachnid_move_death},
|
||||
{"shambler_move_stand", &shambler_move_stand},
|
||||
{"shambler_move_walk", &shambler_move_walk},
|
||||
{"shambler_move_run", &shambler_move_run},
|
||||
{"shambler_move_pain", &shambler_move_pain},
|
||||
{"shambler_attack_magic", &shambler_attack_magic},
|
||||
{"shambler_attack_smash", &shambler_attack_smash},
|
||||
{"shambler_attack_swingl", &shambler_attack_swingl},
|
||||
{"shambler_attack_swingr", &shambler_attack_swingr},
|
||||
{"shambler_move_death", &shambler_move_death},
|
||||
{"guardian_move_stand", &guardian_move_stand},
|
||||
{"guardian_move_walk", &guardian_move_walk},
|
||||
{"guardian_move_run", &guardian_move_run},
|
||||
{"guardian_move_pain1", &guardian_move_pain1},
|
||||
{"guardian_atk1_out", &guardian_atk1_out},
|
||||
{"guardian_move_atk1_spin", &guardian_move_atk1_spin},
|
||||
{"guardian_move_atk1_in", &guardian_move_atk1_in},
|
||||
{"guardian_move_atk2_out", &guardian_move_atk2_out},
|
||||
{"guardian_move_atk2_fire", &guardian_move_atk2_fire},
|
||||
{"guardian_move_atk2_in", &guardian_move_atk2_in},
|
||||
{"guardian_move_kick", &guardian_move_kick},
|
||||
{"guardian_move_death", &guardian_move_death},
|
||||
{0, 0}
|
||||
|
|
Loading…
Reference in a new issue