📄 m_boss31.c
字号:
/*
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.
*/
/*
==============================================================================
jorg
==============================================================================
*/
#include "g_local.h"
#include "m_boss31.h"
extern SP_monster_makron (edict_t *self);
qboolean visible (edict_t *self, edict_t *other);
static int sound_pain1;
static int sound_pain2;
static int sound_pain3;
static int sound_idle;
static int sound_death;
static int sound_search1;
static int sound_search2;
static int sound_search3;
static int sound_attack1;
static int sound_attack2;
static int sound_firegun;
static int sound_step_left;
static int sound_step_right;
static int sound_death_hit;
void BossExplode (edict_t *self);
void MakronToss (edict_t *self);
void jorg_search (edict_t *self)
{
float r;
r = random();
if (r <= 0.3)
gi.sound (self, CHAN_VOICE, sound_search1, 1, ATTN_NORM, 0);
else if (r <= 0.6)
gi.sound (self, CHAN_VOICE, sound_search2, 1, ATTN_NORM, 0);
else
gi.sound (self, CHAN_VOICE, sound_search3, 1, ATTN_NORM, 0);
}
void jorg_dead (edict_t *self);
void jorgBFG (edict_t *self);
void jorgMachineGun (edict_t *self);
void jorg_firebullet (edict_t *self);
void jorg_reattack1(edict_t *self);
void jorg_attack1(edict_t *self);
void jorg_idle(edict_t *self);
void jorg_step_left(edict_t *self);
void jorg_step_right(edict_t *self);
void jorg_death_hit(edict_t *self);
//
// stand
//
mframe_t jorg_frames_stand []=
{
ai_stand, 0, jorg_idle,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL, // 10
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL, // 20
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL, // 30
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 19, NULL,
ai_stand, 11, jorg_step_left,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 6, NULL,
ai_stand, 9, jorg_step_right,
ai_stand, 0, NULL, // 40
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, -2, NULL,
ai_stand, -17, jorg_step_left,
ai_stand, 0, NULL,
ai_stand, -12, NULL, // 50
ai_stand, -14, jorg_step_right // 51
};
mmove_t jorg_move_stand = {FRAME_stand01, FRAME_stand51, jorg_frames_stand, NULL};
void jorg_idle (edict_t *self)
{
gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_NORM,0);
}
void jorg_death_hit (edict_t *self)
{
gi.sound (self, CHAN_BODY, sound_death_hit, 1, ATTN_NORM,0);
}
void jorg_step_left (edict_t *self)
{
gi.sound (self, CHAN_BODY, sound_step_left, 1, ATTN_NORM,0);
}
void jorg_step_right (edict_t *self)
{
gi.sound (self, CHAN_BODY, sound_step_right, 1, ATTN_NORM,0);
}
void jorg_stand (edict_t *self)
{
self->monsterinfo.currentmove = &jorg_move_stand;
}
mframe_t jorg_frames_run [] =
{
ai_run, 17, jorg_step_left,
ai_run, 0, NULL,
ai_run, 0, NULL,
ai_run, 0, NULL,
ai_run, 12, NULL,
ai_run, 8, NULL,
ai_run, 10, NULL,
ai_run, 33, jorg_step_right,
ai_run, 0, NULL,
ai_run, 0, NULL,
ai_run, 0, NULL,
ai_run, 9, NULL,
ai_run, 9, NULL,
ai_run, 9, NULL
};
mmove_t jorg_move_run = {FRAME_walk06, FRAME_walk19, jorg_frames_run, NULL};
//
// walk
//
mframe_t jorg_frames_start_walk [] =
{
ai_walk, 5, NULL,
ai_walk, 6, NULL,
ai_walk, 7, NULL,
ai_walk, 9, NULL,
ai_walk, 15, NULL
};
mmove_t jorg_move_start_walk = {FRAME_walk01, FRAME_walk05, jorg_frames_start_walk, NULL};
mframe_t jorg_frames_walk [] =
{
ai_walk, 17, NULL,
ai_walk, 0, NULL,
ai_walk, 0, NULL,
ai_walk, 0, NULL,
ai_walk, 12, NULL,
ai_walk, 8, NULL,
ai_walk, 10, NULL,
ai_walk, 33, NULL,
ai_walk, 0, NULL,
ai_walk, 0, NULL,
ai_walk, 0, NULL,
ai_walk, 9, NULL,
ai_walk, 9, NULL,
ai_walk, 9, NULL
};
mmove_t jorg_move_walk = {FRAME_walk06, FRAME_walk19, jorg_frames_walk, NULL};
mframe_t jorg_frames_end_walk [] =
{
ai_walk, 11, NULL,
ai_walk, 0, NULL,
ai_walk, 0, NULL,
ai_walk, 0, NULL,
ai_walk, 8, NULL,
ai_walk, -8, NULL
};
mmove_t jorg_move_end_walk = {FRAME_walk20, FRAME_walk25, jorg_frames_end_walk, NULL};
void jorg_walk (edict_t *self)
{
self->monsterinfo.currentmove = &jorg_move_walk;
}
void jorg_run (edict_t *self)
{
if (self->monsterinfo.aiflags & AI_STAND_GROUND)
self->monsterinfo.currentmove = &jorg_move_stand;
else
self->monsterinfo.currentmove = &jorg_move_run;
}
mframe_t jorg_frames_pain3 [] =
{
ai_move, -28, NULL,
ai_move, -6, NULL,
ai_move, -3, jorg_step_left,
ai_move, -9, NULL,
ai_move, 0, jorg_step_right,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, -7, NULL,
ai_move, 1, NULL,
ai_move, -11, NULL,
ai_move, -4, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 10, NULL,
ai_move, 11, NULL,
ai_move, 0, NULL,
ai_move, 10, NULL,
ai_move, 3, NULL,
ai_move, 10, NULL,
ai_move, 7, jorg_step_left,
ai_move, 17, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, jorg_step_right
};
mmove_t jorg_move_pain3 = {FRAME_pain301, FRAME_pain325, jorg_frames_pain3, jorg_run};
mframe_t jorg_frames_pain2 [] =
{
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL
};
mmove_t jorg_move_pain2 = {FRAME_pain201, FRAME_pain203, jorg_frames_pain2, jorg_run};
mframe_t jorg_frames_pain1 [] =
{
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL
};
mmove_t jorg_move_pain1 = {FRAME_pain101, FRAME_pain103, jorg_frames_pain1, jorg_run};
mframe_t jorg_frames_death1 [] =
{
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL, // 10
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL, // 20
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL, // 30
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL, // 40
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, MakronToss,
ai_move, 0, BossExplode // 50
};
mmove_t jorg_move_death = {FRAME_death01, FRAME_death50, jorg_frames_death1, jorg_dead};
mframe_t jorg_frames_attack2 []=
{
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, jorgBFG,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL
};
mmove_t jorg_move_attack2 = {FRAME_attak201, FRAME_attak213, jorg_frames_attack2, jorg_run};
mframe_t jorg_frames_start_attack1 [] =
{
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL,
ai_charge, 0, NULL
};
mmove_t jorg_move_start_attack1 = {FRAME_attak101, FRAME_attak108, jorg_frames_start_attack1, jorg_attack1};
mframe_t jorg_frames_attack1[]=
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -