📄 m_insane.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.
*/
/*
==============================================================================
insane
==============================================================================
*/
#include "g_local.h"
#include "m_insane.h"
static int sound_fist;
static int sound_shake;
static int sound_moan;
static int sound_scream[8];
void insane_fist (edict_t *self)
{
gi.sound (self, CHAN_VOICE, sound_fist, 1, ATTN_IDLE, 0);
}
void insane_shake (edict_t *self)
{
gi.sound (self, CHAN_VOICE, sound_shake, 1, ATTN_IDLE, 0);
}
void insane_moan (edict_t *self)
{
gi.sound (self, CHAN_VOICE, sound_moan, 1, ATTN_IDLE, 0);
}
void insane_scream (edict_t *self)
{
gi.sound (self, CHAN_VOICE, sound_scream[rand()%8], 1, ATTN_IDLE, 0);
}
void insane_stand (edict_t *self);
void insane_dead (edict_t *self);
void insane_cross (edict_t *self);
void insane_walk (edict_t *self);
void insane_run (edict_t *self);
void insane_checkdown (edict_t *self);
void insane_checkup (edict_t *self);
void insane_onground (edict_t *self);
mframe_t insane_frames_stand_normal [] =
{
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, NULL,
ai_stand, 0, insane_checkdown
};
mmove_t insane_move_stand_normal = {FRAME_stand60, FRAME_stand65, insane_frames_stand_normal, insane_stand};
mframe_t insane_frames_stand_insane [] =
{
ai_stand, 0, insane_shake,
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,
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,
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, insane_checkdown
};
mmove_t insane_move_stand_insane = {FRAME_stand65, FRAME_stand94, insane_frames_stand_insane, insane_stand};
mframe_t insane_frames_uptodown [] =
{
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, insane_moan,
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,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 2.7, NULL,
ai_move, 4.1, NULL,
ai_move, 6, NULL,
ai_move, 7.6, NULL,
ai_move, 3.6, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, insane_fist,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, insane_fist,
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 insane_move_uptodown = {FRAME_stand1, FRAME_stand40, insane_frames_uptodown, insane_onground};
mframe_t insane_frames_downtoup [] =
{
ai_move, -0.7, NULL, // 41
ai_move, -1.2, NULL, // 42
ai_move, -1.5, NULL, // 43
ai_move, -4.5, NULL, // 44
ai_move, -3.5, NULL, // 45
ai_move, -0.2, NULL, // 46
ai_move, 0, NULL, // 47
ai_move, -1.3, NULL, // 48
ai_move, -3, NULL, // 49
ai_move, -2, NULL, // 50
ai_move, 0, NULL, // 51
ai_move, 0, NULL, // 52
ai_move, 0, NULL, // 53
ai_move, -3.3, NULL, // 54
ai_move, -1.6, NULL, // 55
ai_move, -0.3, NULL, // 56
ai_move, 0, NULL, // 57
ai_move, 0, NULL, // 58
ai_move, 0, NULL // 59
};
mmove_t insane_move_downtoup = {FRAME_stand41, FRAME_stand59, insane_frames_downtoup, insane_stand};
mframe_t insane_frames_jumpdown [] =
{
ai_move, 0.2, NULL,
ai_move, 11.5, NULL,
ai_move, 5.1, NULL,
ai_move, 7.1, NULL,
ai_move, 0, NULL
};
mmove_t insane_move_jumpdown = {FRAME_stand96, FRAME_stand100, insane_frames_jumpdown, insane_onground};
mframe_t insane_frames_down [] =
{
ai_move, 0, NULL, // 100
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, // 110
ai_move, -1.7, NULL,
ai_move, -1.6, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, insane_fist,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL, // 120
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, // 130
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, insane_moan,
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, // 140
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, // 150
ai_move, 0.5, NULL,
ai_move, 0, NULL,
ai_move, -0.2, insane_scream,
ai_move, 0, NULL,
ai_move, 0.2, NULL,
ai_move, 0.4, NULL,
ai_move, 0.6, NULL,
ai_move, 0.8, NULL,
ai_move, 0.7, NULL,
ai_move, 0, insane_checkup // 160
};
mmove_t insane_move_down = {FRAME_stand100, FRAME_stand160, insane_frames_down, insane_onground};
mframe_t insane_frames_walk_normal [] =
{
ai_walk, 0, insane_scream,
ai_walk, 2.5, NULL,
ai_walk, 3.5, NULL,
ai_walk, 1.7, NULL,
ai_walk, 2.3, NULL,
ai_walk, 2.4, NULL,
ai_walk, 2.2, NULL,
ai_walk, 4.2, NULL,
ai_walk, 5.6, NULL,
ai_walk, 3.3, NULL,
ai_walk, 2.4, NULL,
ai_walk, 0.9, NULL,
ai_walk, 0, NULL
};
mmove_t insane_move_walk_normal = {FRAME_walk27, FRAME_walk39, insane_frames_walk_normal, insane_walk};
mmove_t insane_move_run_normal = {FRAME_walk27, FRAME_walk39, insane_frames_walk_normal, insane_run};
mframe_t insane_frames_walk_insane [] =
{
ai_walk, 0, insane_scream, // walk 1
ai_walk, 3.4, NULL, // walk 2
ai_walk, 3.6, NULL, // 3
ai_walk, 2.9, NULL, // 4
ai_walk, 2.2, NULL, // 5
ai_walk, 2.6, NULL, // 6
ai_walk, 0, NULL, // 7
ai_walk, 0.7, NULL, // 8
ai_walk, 4.8, NULL, // 9
ai_walk, 5.3, NULL, // 10
ai_walk, 1.1, NULL, // 11
ai_walk, 2, NULL, // 12
ai_walk, 0.5, NULL, // 13
ai_walk, 0, NULL, // 14
ai_walk, 0, NULL, // 15
ai_walk, 4.9, NULL, // 16
ai_walk, 6.7, NULL, // 17
ai_walk, 3.8, NULL, // 18
ai_walk, 2, NULL, // 19
ai_walk, 0.2, NULL, // 20
ai_walk, 0, NULL, // 21
ai_walk, 3.4, NULL, // 22
ai_walk, 6.4, NULL, // 23
ai_walk, 5, NULL, // 24
ai_walk, 1.8, NULL, // 25
ai_walk, 0, NULL // 26
};
mmove_t insane_move_walk_insane = {FRAME_walk1, FRAME_walk26, insane_frames_walk_insane, insane_walk};
mmove_t insane_move_run_insane = {FRAME_walk1, FRAME_walk26, insane_frames_walk_insane, insane_run};
mframe_t insane_frames_stand_pain [] =
{
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,
ai_move, 0, NULL
};
mmove_t insane_move_stand_pain = {FRAME_st_pain2, FRAME_st_pain12, insane_frames_stand_pain, insane_run};
mframe_t insane_frames_stand_death [] =
{
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,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
ai_move, 0, NULL,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -