From a68d4e906f9d8edac4885dbaddcce5c4ead84dac Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Wed, 7 Oct 2009 09:54:15 +0000 Subject: [PATCH] Soldir, Supertank und Tank. Damit sind nun alle auch im Hauptspiel vorhandenen Moster auf dessen Stand --- src/m_soldier.c | 1031 ++++++++++++++++++++------------------------- src/m_supertank.c | 565 ++++++++++++------------- src/m_tank.c | 603 +++++++++++++------------- 3 files changed, 1025 insertions(+), 1174 deletions(-) diff --git a/src/m_soldier.c b/src/m_soldier.c index faa12e5..8c69b49 100644 --- a/src/m_soldier.c +++ b/src/m_soldier.c @@ -43,151 +43,88 @@ void soldier_stand (edict_t *self); mframe_t soldier_frames_stand1 [] = { - ai_stand, 0, soldier_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, + {ai_stand, 0, soldier_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}, - 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, 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} }; mmove_t soldier_move_stand1 = {FRAME_stand101, FRAME_stand130, soldier_frames_stand1, soldier_stand}; mframe_t soldier_frames_stand3 [] = { - 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, 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, soldier_cock, - 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, soldier_cock}, + {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} }; mmove_t soldier_move_stand3 = {FRAME_stand301, FRAME_stand339, soldier_frames_stand3, soldier_stand}; -#if 0 -mframe_t soldier_frames_stand4 [] = -{ - 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, 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, 4, NULL, - ai_stand, 1, NULL, - ai_stand, -1, NULL, - ai_stand, -2, NULL, - - ai_stand, 0, NULL, - ai_stand, 0, NULL -}; -mmove_t soldier_move_stand4 = {FRAME_stand401, FRAME_stand452, soldier_frames_stand4, NULL}; -#endif void soldier_stand (edict_t *self) { @@ -210,54 +147,54 @@ void soldier_walk1_random (edict_t *self) mframe_t soldier_frames_walk1 [] = { - ai_walk, 3, NULL, - ai_walk, 6, NULL, - ai_walk, 2, NULL, - ai_walk, 2, NULL, - ai_walk, 2, NULL, - ai_walk, 1, NULL, - ai_walk, 6, NULL, - ai_walk, 5, NULL, - ai_walk, 3, NULL, - ai_walk, -1, soldier_walk1_random, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL + {ai_walk, 3, NULL}, + {ai_walk, 6, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 1, NULL}, + {ai_walk, 6, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 3, NULL}, + {ai_walk, -1, soldier_walk1_random}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL} }; mmove_t soldier_move_walk1 = {FRAME_walk101, FRAME_walk133, soldier_frames_walk1, NULL}; mframe_t soldier_frames_walk2 [] = { - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 9, NULL, - ai_walk, 8, NULL, - ai_walk, 5, NULL, - ai_walk, 1, NULL, - ai_walk, 3, NULL, - ai_walk, 7, NULL, - ai_walk, 6, NULL, - ai_walk, 7, NULL + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 9, NULL}, + {ai_walk, 8, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 1, NULL}, + {ai_walk, 3, NULL}, + {ai_walk, 7, NULL}, + {ai_walk, 6, NULL}, + {ai_walk, 7, NULL} }; mmove_t soldier_move_walk2 = {FRAME_walk209, FRAME_walk218, soldier_frames_walk2, NULL}; @@ -278,19 +215,19 @@ void soldier_run (edict_t *self); mframe_t soldier_frames_start_run [] = { - ai_run, 7, NULL, - ai_run, 5, NULL + {ai_run, 7, NULL}, + {ai_run, 5, NULL} }; mmove_t soldier_move_start_run = {FRAME_run01, FRAME_run02, soldier_frames_start_run, soldier_run}; mframe_t soldier_frames_run [] = { - ai_run, 10, NULL, - ai_run, 11, NULL, - ai_run, 11, NULL, - ai_run, 16, NULL, - ai_run, 10, NULL, - ai_run, 15, NULL + {ai_run, 10, NULL}, + {ai_run, 11, NULL}, + {ai_run, 11, NULL}, + {ai_run, 16, NULL}, + {ai_run, 10, NULL}, + {ai_run, 15, NULL} }; mmove_t soldier_move_run = {FRAME_run03, FRAME_run08, soldier_frames_run, NULL}; @@ -321,68 +258,68 @@ void soldier_run (edict_t *self) mframe_t soldier_frames_pain1 [] = { - ai_move, -3, NULL, - ai_move, 4, NULL, - ai_move, 1, NULL, - ai_move, 1, NULL, - ai_move, 0, NULL + {ai_move, -3, NULL}, + {ai_move, 4, NULL}, + {ai_move, 1, NULL}, + {ai_move, 1, NULL}, + {ai_move, 0, NULL} }; mmove_t soldier_move_pain1 = {FRAME_pain101, FRAME_pain105, soldier_frames_pain1, soldier_run}; mframe_t soldier_frames_pain2 [] = { - ai_move, -13, NULL, - ai_move, -1, NULL, - ai_move, 2, NULL, - ai_move, 4, NULL, - ai_move, 2, NULL, - ai_move, 3, NULL, - ai_move, 2, NULL + {ai_move, -13, NULL}, + {ai_move, -1, NULL}, + {ai_move, 2, NULL}, + {ai_move, 4, NULL}, + {ai_move, 2, NULL}, + {ai_move, 3, NULL}, + {ai_move, 2, NULL} }; mmove_t soldier_move_pain2 = {FRAME_pain201, FRAME_pain207, soldier_frames_pain2, soldier_run}; mframe_t soldier_frames_pain3 [] = { - ai_move, -8, NULL, - ai_move, 10, NULL, - ai_move, -4, NULL, - ai_move, -1, NULL, - ai_move, -3, NULL, - ai_move, 0, NULL, - ai_move, 3, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 1, NULL, - ai_move, 0, NULL, - ai_move, 1, NULL, - ai_move, 2, NULL, - ai_move, 4, NULL, - ai_move, 3, NULL, - ai_move, 2, NULL + {ai_move, -8, NULL}, + {ai_move, 10, NULL}, + {ai_move, -4, NULL}, + {ai_move, -1, NULL}, + {ai_move, -3, NULL}, + {ai_move, 0, NULL}, + {ai_move, 3, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 1, NULL}, + {ai_move, 0, NULL}, + {ai_move, 1, NULL}, + {ai_move, 2, NULL}, + {ai_move, 4, NULL}, + {ai_move, 3, NULL}, + {ai_move, 2, NULL} }; mmove_t soldier_move_pain3 = {FRAME_pain301, FRAME_pain318, soldier_frames_pain3, soldier_run}; mframe_t soldier_frames_pain4 [] = { - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, -10, NULL, - ai_move, -6, NULL, - ai_move, 8, NULL, - ai_move, 4, NULL, - ai_move, 1, NULL, - ai_move, 0, NULL, - ai_move, 2, NULL, - ai_move, 5, NULL, - ai_move, 2, NULL, - ai_move, -1, NULL, - ai_move, -1, NULL, - ai_move, 3, NULL, - ai_move, 2, NULL, - ai_move, 0, NULL + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, -10, NULL}, + {ai_move, -6, NULL}, + {ai_move, 8, NULL}, + {ai_move, 4, NULL}, + {ai_move, 1, NULL}, + {ai_move, 0, NULL}, + {ai_move, 2, NULL}, + {ai_move, 5, NULL}, + {ai_move, 2, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, 3, NULL}, + {ai_move, 2, NULL}, + {ai_move, 0, NULL} }; mmove_t soldier_move_pain4 = {FRAME_pain401, FRAME_pain417, soldier_frames_pain4, soldier_run}; @@ -539,18 +476,18 @@ void soldier_attack1_refire2 (edict_t *self) mframe_t soldier_frames_attack1 [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_fire1, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_attack1_refire1, - ai_charge, 0, NULL, - ai_charge, 0, soldier_cock, - ai_charge, 0, soldier_attack1_refire2, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_fire1}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_attack1_refire1}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_cock}, + {ai_charge, 0, soldier_attack1_refire2}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL} }; mmove_t soldier_move_attack1 = {FRAME_attak101, FRAME_attak112, soldier_frames_attack1, soldier_run}; @@ -589,24 +526,24 @@ void soldier_attack2_refire2 (edict_t *self) mframe_t soldier_frames_attack2 [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_fire2, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_attack2_refire1, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_cock, - ai_charge, 0, NULL, - ai_charge, 0, soldier_attack2_refire2, - 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, soldier_fire2}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_attack2_refire1}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_cock}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_attack2_refire2}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL} }; mmove_t soldier_move_attack2 = {FRAME_attak201, FRAME_attak218, soldier_frames_attack2, soldier_run}; @@ -645,15 +582,15 @@ void soldier_attack3_refire (edict_t *self) mframe_t soldier_frames_attack3 [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_fire3, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_attack3_refire, - ai_charge, 0, soldier_duck_up, - ai_charge, 0, NULL, - ai_charge, 0, NULL + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_fire3}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_attack3_refire}, + {ai_charge, 0, soldier_duck_up}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL} }; mmove_t soldier_move_attack3 = {FRAME_attak301, FRAME_attak309, soldier_frames_attack3, soldier_run}; @@ -662,56 +599,20 @@ mmove_t soldier_move_attack3 = {FRAME_attak301, FRAME_attak309, soldier_frames_a void soldier_fire4 (edict_t *self) { soldier_fire (self, 3); -// -// if (self->enemy->health <= 0) -// return; -// -// if ( ((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE) ) -// self->monsterinfo.nextframe = FRAME_attak402; + self->monsterinfo.nextframe = FRAME_attak402; } mframe_t soldier_frames_attack4 [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_fire4, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, soldier_fire4}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL} }; mmove_t soldier_move_attack4 = {FRAME_attak401, FRAME_attak406, soldier_frames_attack4, soldier_run}; -#if 0 -// ATTACK5 (prone) - -void soldier_fire5 (edict_t *self) -{ - soldier_fire (self, 4); -} - -void soldier_attack5_refire (edict_t *self) -{ - if (self->enemy->health <= 0) - return; - - if ( ((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE) ) - self->monsterinfo.nextframe = FRAME_attak505; -} - -mframe_t soldier_frames_attack5 [] = -{ - ai_charge, 8, NULL, - ai_charge, 8, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_fire5, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, soldier_attack5_refire -}; -mmove_t soldier_move_attack5 = {FRAME_attak501, FRAME_attak508, soldier_frames_attack5, soldier_run}; -#endif - // ATTACK6 (run & shoot) void soldier_fire8 (edict_t *self) @@ -733,20 +634,20 @@ void soldier_attack6_refire (edict_t *self) mframe_t soldier_frames_attack6 [] = { - ai_charge, 10, NULL, - ai_charge, 4, NULL, - ai_charge, 12, NULL, - ai_charge, 11, soldier_fire8, - ai_charge, 13, NULL, - ai_charge, 18, NULL, - ai_charge, 15, NULL, - ai_charge, 14, NULL, - ai_charge, 11, NULL, - ai_charge, 8, NULL, - ai_charge, 11, NULL, - ai_charge, 12, NULL, - ai_charge, 12, NULL, - ai_charge, 17, soldier_attack6_refire + {ai_charge, 10, NULL}, + {ai_charge, 4, NULL}, + {ai_charge, 12, NULL}, + {ai_charge, 11, soldier_fire8}, + {ai_charge, 13, NULL}, + {ai_charge, 18, NULL}, + {ai_charge, 15, NULL}, + {ai_charge, 14, NULL}, + {ai_charge, 11, NULL}, + {ai_charge, 8, NULL}, + {ai_charge, 11, NULL}, + {ai_charge, 12, NULL}, + {ai_charge, 12, NULL}, + {ai_charge, 17, soldier_attack6_refire} }; mmove_t soldier_move_attack6 = {FRAME_runs01, FRAME_runs14, soldier_frames_attack6, soldier_run}; @@ -798,11 +699,11 @@ void soldier_duck_hold (edict_t *self) mframe_t soldier_frames_duck [] = { - ai_move, 5, soldier_duck_down, - ai_move, -1, soldier_duck_hold, - ai_move, 1, NULL, - ai_move, 0, soldier_duck_up, - ai_move, 5, NULL + {ai_move, 5, soldier_duck_down}, + {ai_move, -1, soldier_duck_hold}, + {ai_move, 1, NULL}, + {ai_move, 0, soldier_duck_up}, + {ai_move, 5, NULL} }; mmove_t soldier_move_duck = {FRAME_duck01, FRAME_duck05, soldier_frames_duck, soldier_run}; @@ -874,251 +775,251 @@ void soldier_dead (edict_t *self) mframe_t soldier_frames_death1 [] = { - ai_move, 0, NULL, - ai_move, -10, NULL, - ai_move, -10, NULL, - ai_move, -10, NULL, - ai_move, -5, 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, -10, NULL}, + {ai_move, -10, NULL}, + {ai_move, -10, NULL}, + {ai_move, -5, 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, - 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, soldier_fire6, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, soldier_fire7, - 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, soldier_fire6}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, soldier_fire7}, + {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}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL} }; mmove_t soldier_move_death1 = {FRAME_death101, FRAME_death136, soldier_frames_death1, soldier_dead}; mframe_t soldier_frames_death2 [] = { - ai_move, -5, NULL, - ai_move, -5, NULL, - ai_move, -5, 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, -5, NULL}, + {ai_move, -5, NULL}, + {ai_move, -5, 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, - 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, - 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}, + {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} }; mmove_t soldier_move_death2 = {FRAME_death201, FRAME_death235, soldier_frames_death2, soldier_dead}; mframe_t soldier_frames_death3 [] = { - ai_move, -5, NULL, - ai_move, -5, NULL, - ai_move, -5, 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, -5, NULL}, + {ai_move, -5, NULL}, + {ai_move, -5, 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, - 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, - 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}, + {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}, + {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}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, }; mmove_t soldier_move_death3 = {FRAME_death301, FRAME_death345, soldier_frames_death3, soldier_dead}; mframe_t soldier_frames_death4 [] = { - 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}, + {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, + {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, - 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}, - 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}, + {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, + {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}, + {ai_move, 0, NULL} }; mmove_t soldier_move_death4 = {FRAME_death401, FRAME_death453, soldier_frames_death4, soldier_dead}; mframe_t soldier_frames_death5 [] = { - ai_move, -5, NULL, - ai_move, -5, NULL, - ai_move, -5, 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, -5, NULL}, + {ai_move, -5, NULL}, + {ai_move, -5, 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, - 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, - 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 soldier_move_death5 = {FRAME_death501, FRAME_death524, soldier_frames_death5, soldier_dead}; mframe_t soldier_frames_death6 [] = { - 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}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL} }; mmove_t soldier_move_death6 = {FRAME_death601, FRAME_death610, soldier_frames_death6, soldier_dead}; @@ -1126,7 +1027,7 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama { int n; -// 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); @@ -1141,7 +1042,7 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama if (self->deadflag == DEAD_DEAD) return; -// regular death + // regular death self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; self->s.skinnum |= 1; @@ -1150,7 +1051,7 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama gi.sound (self, CHAN_VOICE, sound_death_light, 1, ATTN_NORM, 0); else if (self->s.skinnum == 3) gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0); - else // (self->s.skinnum == 5) + else gi.sound (self, CHAN_VOICE, sound_death_ss, 1, ATTN_NORM, 0); if (fabs((self->s.origin[2] + self->viewheight) - point[2]) <= 4) @@ -1178,15 +1079,6 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama // SPAWN // -void SP_monster_soldier_x_precache(void) -{ - sound_idle = gi.soundindex ("soldier/solidle1.wav"); - sound_sight1 = gi.soundindex ("soldier/solsght1.wav"); - sound_sight2 = gi.soundindex ("soldier/solsrch1.wav"); - sound_cock = gi.soundindex ("infantry/infatck3.wav"); -} - - void SP_monster_soldier_x (edict_t *self) { @@ -1197,6 +1089,11 @@ void SP_monster_soldier_x (edict_t *self) self->movetype = MOVETYPE_STEP; self->solid = SOLID_BBOX; + sound_idle = gi.soundindex ("soldier/solidle1.wav"); + sound_sight1 = gi.soundindex ("soldier/solsght1.wav"); + sound_sight2 = gi.soundindex ("soldier/solsrch1.wav"); + sound_cock = gi.soundindex ("infantry/infatck3.wav"); + self->mass = 100; self->pain = soldier_pain; @@ -1218,16 +1115,6 @@ void SP_monster_soldier_x (edict_t *self) } - -void SP_monster_soldier_light_precache(void) -{ - SP_monster_soldier_x_precache(); - - sound_pain_light = gi.soundindex ("soldier/solpain2.wav"); - sound_death_light = gi.soundindex ("soldier/soldeth2.wav"); -} - - /*QUAKED monster_soldier_light (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight */ void SP_monster_soldier_light (edict_t *self) @@ -1238,9 +1125,10 @@ void SP_monster_soldier_light (edict_t *self) return; } - SP_monster_soldier_light_precache(); SP_monster_soldier_x (self); + sound_pain_light = gi.soundindex ("soldier/solpain2.wav"); + sound_death_light = gi.soundindex ("soldier/soldeth2.wav"); gi.modelindex ("models/objects/laser/tris.md2"); gi.soundindex ("misc/lasfly.wav"); gi.soundindex ("soldier/solatck2.wav"); @@ -1250,17 +1138,6 @@ void SP_monster_soldier_light (edict_t *self) self->gib_health = -30; } - - -void SP_monster_soldier_precache(void) -{ - SP_monster_soldier_x_precache(); - - sound_pain = gi.soundindex ("soldier/solpain1.wav"); - sound_death = gi.soundindex ("soldier/soldeth1.wav"); -} - - /*QUAKED monster_soldier (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight */ void SP_monster_soldier (edict_t *self) @@ -1271,9 +1148,10 @@ void SP_monster_soldier (edict_t *self) return; } - SP_monster_soldier_precache(); SP_monster_soldier_x (self); + sound_pain = gi.soundindex ("soldier/solpain1.wav"); + sound_death = gi.soundindex ("soldier/soldeth1.wav"); gi.soundindex ("soldier/solatck1.wav"); self->s.skinnum = 2; @@ -1281,17 +1159,6 @@ void SP_monster_soldier (edict_t *self) self->gib_health = -30; } - - -void SP_monster_soldier_ss_precache(void) -{ - SP_monster_soldier_x_precache(); - - sound_pain_ss = gi.soundindex ("soldier/solpain3.wav"); - sound_death_ss = gi.soundindex ("soldier/soldeth3.wav"); -} - - /*QUAKED monster_soldier_ss (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight */ void SP_monster_soldier_ss (edict_t *self) @@ -1302,12 +1169,14 @@ void SP_monster_soldier_ss (edict_t *self) return; } - SP_monster_soldier_ss_precache(); SP_monster_soldier_x (self); + sound_pain_ss = gi.soundindex ("soldier/solpain3.wav"); + sound_death_ss = gi.soundindex ("soldier/soldeth3.wav"); gi.soundindex ("soldier/solatck3.wav"); self->s.skinnum = 4; self->health = 40; self->gib_health = -30; } + diff --git a/src/m_supertank.c b/src/m_supertank.c index f9c0376..a118d24 100644 --- a/src/m_supertank.c +++ b/src/m_supertank.c @@ -48,66 +48,66 @@ void supertank_reattack1(edict_t *self); mframe_t supertank_frames_stand []= { - 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, 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, 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, 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, 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} }; mmove_t supertank_move_stand = {FRAME_stand_1, FRAME_stand_60, supertank_frames_stand, NULL}; @@ -119,24 +119,24 @@ void supertank_stand (edict_t *self) mframe_t supertank_frames_run [] = { - ai_run, 12, TreadSound, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL, - ai_run, 12, NULL + {ai_run, 12, TreadSound}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL}, + {ai_run, 12, NULL} }; mmove_t supertank_move_run = {FRAME_forwrd_1, FRAME_forwrd_18, supertank_frames_run, NULL}; @@ -147,24 +147,24 @@ mmove_t supertank_move_run = {FRAME_forwrd_1, FRAME_forwrd_18, supertank_frames_ mframe_t supertank_frames_forward [] = { - ai_walk, 4, TreadSound, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL, - ai_walk, 4, NULL + {ai_walk, 4, TreadSound}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, NULL} }; mmove_t supertank_move_forward = {FRAME_forwrd_1, FRAME_forwrd_18, supertank_frames_forward, NULL}; @@ -188,233 +188,233 @@ void supertank_run (edict_t *self) mframe_t supertank_frames_turn_right [] = { - ai_move, 0, TreadSound, - 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, - ai_move, 0, NULL, - ai_move, 0, NULL + {ai_move, 0, TreadSound}, + {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}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL} }; mmove_t supertank_move_turn_right = {FRAME_right_1, FRAME_right_18, supertank_frames_turn_right, supertank_run}; mframe_t supertank_frames_turn_left [] = { - ai_move, 0, TreadSound, - 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, - ai_move, 0, NULL, - ai_move, 0, NULL + {ai_move, 0, TreadSound}, + {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}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL} }; mmove_t supertank_move_turn_left = {FRAME_left_1, FRAME_left_18, supertank_frames_turn_left, supertank_run}; mframe_t supertank_frames_pain3 [] = { - 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 supertank_move_pain3 = {FRAME_pain3_9, FRAME_pain3_12, supertank_frames_pain3, supertank_run}; mframe_t supertank_frames_pain2 [] = { - 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 supertank_move_pain2 = {FRAME_pain2_5, FRAME_pain2_8, supertank_frames_pain2, supertank_run}; mframe_t supertank_frames_pain1 [] = { - 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 supertank_move_pain1 = {FRAME_pain1_1, FRAME_pain1_4, supertank_frames_pain1, supertank_run}; mframe_t supertank_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, - 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, BossExplode + {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}, + {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, BossExplode} }; mmove_t supertank_move_death = {FRAME_death_1, FRAME_death_24, supertank_frames_death1, supertank_dead}; mframe_t supertank_frames_backward[] = { - ai_walk, 0, TreadSound, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL, - ai_walk, 0, NULL + {ai_walk, 0, TreadSound}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL}, + {ai_walk, 0, NULL} }; mmove_t supertank_move_backward = {FRAME_backwd_1, FRAME_backwd_18, supertank_frames_backward, NULL}; mframe_t supertank_frames_attack4[]= { - 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} }; mmove_t supertank_move_attack4 = {FRAME_attak4_1, FRAME_attak4_6, supertank_frames_attack4, supertank_run}; mframe_t supertank_frames_attack3[]= { - 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, - 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}, + {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}, + {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 supertank_move_attack3 = {FRAME_attak3_1, FRAME_attak3_27, supertank_frames_attack3, supertank_run}; mframe_t supertank_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, NULL, - ai_charge, 0, supertankRocket, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, supertankRocket, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, supertankRocket, - 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_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, supertankRocket}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, supertankRocket}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, supertankRocket}, + {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} }; mmove_t supertank_move_attack2 = {FRAME_attak2_1, FRAME_attak2_27, supertank_frames_attack2, supertank_run}; mframe_t supertank_frames_attack1[]= { - ai_charge, 0, supertankMachineGun, - ai_charge, 0, supertankMachineGun, - ai_charge, 0, supertankMachineGun, - ai_charge, 0, supertankMachineGun, - ai_charge, 0, supertankMachineGun, - ai_charge, 0, supertankMachineGun, + {ai_charge, 0, supertankMachineGun}, + {ai_charge, 0, supertankMachineGun}, + {ai_charge, 0, supertankMachineGun}, + {ai_charge, 0, supertankMachineGun}, + {ai_charge, 0, supertankMachineGun}, + {ai_charge, 0, supertankMachineGun}, }; mmove_t supertank_move_attack1 = {FRAME_attak1_1, FRAME_attak1_6, supertank_frames_attack1, supertank_reattack1}; mframe_t supertank_frames_end_attack1[]= { - 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}, + {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} }; mmove_t supertank_move_end_attack1 = {FRAME_attak1_7, FRAME_attak1_20, supertank_frames_end_attack1, supertank_run}; @@ -469,7 +469,7 @@ void supertank_pain (edict_t *self, edict_t *other, float kick, int damage) gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM,0); self->monsterinfo.currentmove = &supertank_move_pain3; } -}; +} void supertankRocket (edict_t *self) @@ -484,7 +484,7 @@ void supertankRocket (edict_t *self) flash_number = MZ2_SUPERTANK_ROCKET_1; else if (self->s.frame == FRAME_attak2_11) flash_number = MZ2_SUPERTANK_ROCKET_2; - else // (self->s.frame == FRAME_attak2_14) + else flash_number = MZ2_SUPERTANK_ROCKET_3; AngleVectors (self->s.angles, forward, right, NULL); @@ -539,16 +539,10 @@ void supertank_attack(edict_t *self) { vec3_t vec; float range; - //float r; VectorSubtract (self->enemy->s.origin, self->s.origin, vec); range = VectorLength (vec); - //r = random(); - - // Attack 1 == Chaingun - // Attack 2 == Rocket Launcher - if (range <= 160) { self->monsterinfo.currentmove = &supertank_move_attack1; @@ -654,19 +648,6 @@ void supertank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int da // monster_supertank // - -void SP_monster_supertank_precache(void) -{ - sound_pain1 = gi.soundindex ("bosstank/btkpain1.wav"); - sound_pain2 = gi.soundindex ("bosstank/btkpain2.wav"); - sound_pain3 = gi.soundindex ("bosstank/btkpain3.wav"); - sound_death = gi.soundindex ("bosstank/btkdeth1.wav"); - sound_search1 = gi.soundindex ("bosstank/btkunqv1.wav"); - sound_search2 = gi.soundindex ("bosstank/btkunqv2.wav"); - tread_sound = gi.soundindex ("bosstank/btkengn1.wav"); -} - - /*QUAKED monster_supertank (1 .5 0) (-64 -64 0) (64 64 72) Ambush Trigger_Spawn Sight */ void SP_monster_supertank (edict_t *self) @@ -677,9 +658,14 @@ void SP_monster_supertank (edict_t *self) return; } - SP_monster_supertank_precache(); + sound_pain1 = gi.soundindex ("bosstank/btkpain1.wav"); + sound_pain2 = gi.soundindex ("bosstank/btkpain2.wav"); + sound_pain3 = gi.soundindex ("bosstank/btkpain3.wav"); + sound_death = gi.soundindex ("bosstank/btkdeth1.wav"); + sound_search1 = gi.soundindex ("bosstank/btkunqv1.wav"); + sound_search2 = gi.soundindex ("bosstank/btkunqv2.wav"); -// self->s.sound = gi.soundindex ("bosstank/btkengn1.wav"); + tread_sound = gi.soundindex ("bosstank/btkengn1.wav"); self->movetype = MOVETYPE_STEP; self->solid = SOLID_BBOX; @@ -709,3 +695,4 @@ void SP_monster_supertank (edict_t *self) walkmonster_start(self); } + diff --git a/src/m_tank.c b/src/m_tank.c index f33a596..6e8f4ed 100644 --- a/src/m_tank.c +++ b/src/m_tank.c @@ -60,36 +60,36 @@ void tank_idle (edict_t *self) mframe_t tank_frames_stand []= { - 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, 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, NULL}, + {ai_stand, 0, NULL}, + {ai_stand, 0, NULL}, + {ai_stand, 0, NULL} }; mmove_t tank_move_stand = {FRAME_stand01, FRAME_stand30, tank_frames_stand, NULL}; @@ -107,41 +107,41 @@ void tank_walk (edict_t *self); mframe_t tank_frames_start_walk [] = { - ai_walk, 0, NULL, - ai_walk, 6, NULL, - ai_walk, 6, NULL, - ai_walk, 11, tank_footstep + {ai_walk, 0, NULL}, + {ai_walk, 6, NULL}, + {ai_walk, 6, NULL}, + {ai_walk, 11, tank_footstep} }; mmove_t tank_move_start_walk = {FRAME_walk01, FRAME_walk04, tank_frames_start_walk, tank_walk}; mframe_t tank_frames_walk [] = { - ai_walk, 4, NULL, - ai_walk, 5, NULL, - ai_walk, 3, NULL, - ai_walk, 2, NULL, - ai_walk, 5, NULL, - ai_walk, 5, NULL, - ai_walk, 4, NULL, - ai_walk, 4, tank_footstep, - ai_walk, 3, NULL, - ai_walk, 5, NULL, - ai_walk, 4, NULL, - ai_walk, 5, NULL, - ai_walk, 7, NULL, - ai_walk, 7, NULL, - ai_walk, 6, NULL, - ai_walk, 6, tank_footstep + {ai_walk, 4, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 3, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 4, tank_footstep}, + {ai_walk, 3, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 4, NULL}, + {ai_walk, 5, NULL}, + {ai_walk, 7, NULL}, + {ai_walk, 7, NULL}, + {ai_walk, 6, NULL}, + {ai_walk, 6, tank_footstep} }; mmove_t tank_move_walk = {FRAME_walk05, FRAME_walk20, tank_frames_walk, NULL}; mframe_t tank_frames_stop_walk [] = { - ai_walk, 3, NULL, - ai_walk, 3, NULL, - ai_walk, 2, NULL, - ai_walk, 2, NULL, - ai_walk, 4, tank_footstep + {ai_walk, 3, NULL}, + {ai_walk, 3, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 2, NULL}, + {ai_walk, 4, tank_footstep} }; mmove_t tank_move_stop_walk = {FRAME_walk21, FRAME_walk25, tank_frames_stop_walk, tank_stand}; @@ -159,41 +159,41 @@ void tank_run (edict_t *self); mframe_t tank_frames_start_run [] = { - ai_run, 0, NULL, - ai_run, 6, NULL, - ai_run, 6, NULL, - ai_run, 11, tank_footstep + {ai_run, 0, NULL}, + {ai_run, 6, NULL}, + {ai_run, 6, NULL}, + {ai_run, 11, tank_footstep} }; mmove_t tank_move_start_run = {FRAME_walk01, FRAME_walk04, tank_frames_start_run, tank_run}; mframe_t tank_frames_run [] = { - ai_run, 4, NULL, - ai_run, 5, NULL, - ai_run, 3, NULL, - ai_run, 2, NULL, - ai_run, 5, NULL, - ai_run, 5, NULL, - ai_run, 4, NULL, - ai_run, 4, tank_footstep, - ai_run, 3, NULL, - ai_run, 5, NULL, - ai_run, 4, NULL, - ai_run, 5, NULL, - ai_run, 7, NULL, - ai_run, 7, NULL, - ai_run, 6, NULL, - ai_run, 6, tank_footstep + {ai_run, 4, NULL}, + {ai_run, 5, NULL}, + {ai_run, 3, NULL}, + {ai_run, 2, NULL}, + {ai_run, 5, NULL}, + {ai_run, 5, NULL}, + {ai_run, 4, NULL}, + {ai_run, 4, tank_footstep}, + {ai_run, 3, NULL}, + {ai_run, 5, NULL}, + {ai_run, 4, NULL}, + {ai_run, 5, NULL}, + {ai_run, 7, NULL}, + {ai_run, 7, NULL}, + {ai_run, 6, NULL}, + {ai_run, 6, tank_footstep} }; mmove_t tank_move_run = {FRAME_walk05, FRAME_walk20, tank_frames_run, NULL}; mframe_t tank_frames_stop_run [] = { - ai_run, 3, NULL, - ai_run, 3, NULL, - ai_run, 2, NULL, - ai_run, 2, NULL, - ai_run, 4, tank_footstep + {ai_run, 3, NULL}, + {ai_run, 3, NULL}, + {ai_run, 2, NULL}, + {ai_run, 2, NULL}, + {ai_run, 4, tank_footstep} }; mmove_t tank_move_stop_run = {FRAME_walk21, FRAME_walk25, tank_frames_stop_run, tank_walk}; @@ -227,41 +227,41 @@ void tank_run (edict_t *self) mframe_t tank_frames_pain1 [] = { - 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 tank_move_pain1 = {FRAME_pain101, FRAME_pain104, tank_frames_pain1, tank_run}; mframe_t tank_frames_pain2 [] = { - 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 tank_move_pain2 = {FRAME_pain201, FRAME_pain205, tank_frames_pain2, tank_run}; mframe_t tank_frames_pain3 [] = { - ai_move, -7, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 2, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 3, NULL, - ai_move, 0, NULL, - ai_move, 2, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, tank_footstep + {ai_move, -7, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 2, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 3, NULL}, + {ai_move, 0, NULL}, + {ai_move, 2, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, tank_footstep} }; mmove_t tank_move_pain3 = {FRAME_pain301, FRAME_pain316, tank_frames_pain3, tank_run}; @@ -302,7 +302,7 @@ void tank_pain (edict_t *self, edict_t *other, float kick, int damage) self->monsterinfo.currentmove = &tank_move_pain2; else self->monsterinfo.currentmove = &tank_move_pain3; -}; +} // @@ -321,7 +321,7 @@ void TankBlaster (edict_t *self) flash_number = MZ2_TANK_BLASTER_1; else if (self->s.frame == FRAME_attak113) flash_number = MZ2_TANK_BLASTER_2; - else // (self->s.frame == FRAME_attak116) + else flash_number = MZ2_TANK_BLASTER_3; AngleVectors (self->s.angles, forward, right, NULL); @@ -351,7 +351,7 @@ void TankRocket (edict_t *self) flash_number = MZ2_TANK_ROCKET_1; else if (self->s.frame == FRAME_attak327) flash_number = MZ2_TANK_ROCKET_2; - else // (self->s.frame == FRAME_attak330) + else flash_number = MZ2_TANK_ROCKET_3; AngleVectors (self->s.angles, forward, right, NULL); @@ -410,44 +410,44 @@ void TankMachineGun (edict_t *self) mframe_t tank_frames_attack_blast [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, -1, NULL, - ai_charge, -2, NULL, - ai_charge, -1, NULL, - ai_charge, -1, NULL, - ai_charge, 0, NULL, - ai_charge, 0, TankBlaster, // 10 - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, TankBlaster, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, TankBlaster // 16 + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, -1, NULL}, + {ai_charge, -2, NULL}, + {ai_charge, -1, NULL}, + {ai_charge, -1, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, TankBlaster}, // 10 + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, TankBlaster}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, TankBlaster} // 16 }; mmove_t tank_move_attack_blast = {FRAME_attak101, FRAME_attak116, tank_frames_attack_blast, tank_reattack_blaster}; mframe_t tank_frames_reattack_blast [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, TankBlaster, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, TankBlaster // 16 + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, TankBlaster}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, TankBlaster} // 16 }; mmove_t tank_move_reattack_blast = {FRAME_attak111, FRAME_attak116, tank_frames_reattack_blast, tank_reattack_blaster}; mframe_t tank_frames_attack_post_blast [] = { - ai_move, 0, NULL, // 17 - ai_move, 0, NULL, - ai_move, 2, NULL, - ai_move, 3, NULL, - ai_move, 2, NULL, - ai_move, -2, tank_footstep // 22 + {ai_move, 0, NULL}, // 17 + {ai_move, 0, NULL}, + {ai_move, 2, NULL}, + {ai_move, 3, NULL}, + {ai_move, 2, NULL}, + {ai_move, -2, tank_footstep} // 22 }; mmove_t tank_move_attack_post_blast = {FRAME_attak117, FRAME_attak122, tank_frames_attack_post_blast, tank_run}; @@ -473,150 +473,150 @@ void tank_poststrike (edict_t *self) mframe_t tank_frames_attack_strike [] = { - ai_move, 3, NULL, - ai_move, 2, NULL, - ai_move, 2, NULL, - ai_move, 1, NULL, - ai_move, 6, NULL, - ai_move, 7, NULL, - ai_move, 9, tank_footstep, - ai_move, 2, NULL, - ai_move, 1, NULL, - ai_move, 2, NULL, - ai_move, 2, tank_footstep, - ai_move, 2, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, -2, NULL, - ai_move, -2, NULL, - ai_move, 0, tank_windup, - 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, TankStrike, - ai_move, 0, NULL, - ai_move, -1, NULL, - ai_move, -1, NULL, - ai_move, -1, NULL, - ai_move, -1, NULL, - ai_move, -1, NULL, - ai_move, -3, NULL, - ai_move, -10, NULL, - ai_move, -10, NULL, - ai_move, -2, NULL, - ai_move, -3, NULL, - ai_move, -2, tank_footstep + {ai_move, 3, NULL}, + {ai_move, 2, NULL}, + {ai_move, 2, NULL}, + {ai_move, 1, NULL}, + {ai_move, 6, NULL}, + {ai_move, 7, NULL}, + {ai_move, 9, tank_footstep}, + {ai_move, 2, NULL}, + {ai_move, 1, NULL}, + {ai_move, 2, NULL}, + {ai_move, 2, tank_footstep}, + {ai_move, 2, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, -2, NULL}, + {ai_move, -2, NULL}, + {ai_move, 0, tank_windup}, + {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, TankStrike}, + {ai_move, 0, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -1, NULL}, + {ai_move, -3, NULL}, + {ai_move, -10, NULL}, + {ai_move, -10, NULL}, + {ai_move, -2, NULL}, + {ai_move, -3, NULL}, + {ai_move, -2, tank_footstep} }; mmove_t tank_move_attack_strike = {FRAME_attak201, FRAME_attak238, tank_frames_attack_strike, tank_poststrike}; mframe_t tank_frames_attack_pre_rocket [] = { - 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, - ai_charge, 0, NULL, - ai_charge, 0, NULL, // 10 + {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}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, // 10 - ai_charge, 0, NULL, - ai_charge, 1, NULL, - ai_charge, 2, NULL, - ai_charge, 7, NULL, - ai_charge, 7, NULL, - ai_charge, 7, tank_footstep, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, // 20 + {ai_charge, 0, NULL}, + {ai_charge, 1, NULL}, + {ai_charge, 2, NULL}, + {ai_charge, 7, NULL}, + {ai_charge, 7, NULL}, + {ai_charge, 7, tank_footstep}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, // 20 - ai_charge, -3, NULL + {ai_charge, -3, NULL} }; mmove_t tank_move_attack_pre_rocket = {FRAME_attak301, FRAME_attak321, tank_frames_attack_pre_rocket, tank_doattack_rocket}; mframe_t tank_frames_attack_fire_rocket [] = { - ai_charge, -3, NULL, // Loop Start 22 - ai_charge, 0, NULL, - ai_charge, 0, TankRocket, // 24 - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, TankRocket, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, -1, TankRocket // 30 Loop End + {ai_charge, -3, NULL}, // Loop Start 22 + {ai_charge, 0, NULL}, + {ai_charge, 0, TankRocket}, // 24 + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, TankRocket}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, -1, TankRocket} // 30 Loop End }; mmove_t tank_move_attack_fire_rocket = {FRAME_attak322, FRAME_attak330, tank_frames_attack_fire_rocket, tank_refire_rocket}; mframe_t tank_frames_attack_post_rocket [] = { - ai_charge, 0, NULL, // 31 - ai_charge, -1, NULL, - ai_charge, -1, NULL, - ai_charge, 0, NULL, - ai_charge, 2, NULL, - ai_charge, 3, NULL, - ai_charge, 4, NULL, - ai_charge, 2, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, // 40 + {ai_charge, 0, NULL}, // 31 + {ai_charge, -1, NULL}, + {ai_charge, -1, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 2, NULL}, + {ai_charge, 3, NULL}, + {ai_charge, 4, NULL}, + {ai_charge, 2, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, // 40 - ai_charge, 0, NULL, - ai_charge, -9, NULL, - ai_charge, -8, NULL, - ai_charge, -7, NULL, - ai_charge, -1, NULL, - ai_charge, -1, tank_footstep, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, // 50 + {ai_charge, 0, NULL}, + {ai_charge, -9, NULL}, + {ai_charge, -8, NULL}, + {ai_charge, -7, NULL}, + {ai_charge, -1, NULL}, + {ai_charge, -1, tank_footstep}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, // 50 - 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 tank_move_attack_post_rocket = {FRAME_attak331, FRAME_attak353, tank_frames_attack_post_rocket, tank_run}; mframe_t tank_frames_attack_chain [] = { - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - ai_charge, 0, NULL, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - NULL, 0, TankMachineGun, - 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}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {NULL, 0, TankMachineGun}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL}, + {ai_charge, 0, NULL} }; mmove_t tank_move_attack_chain = {FRAME_attak401, FRAME_attak429, tank_frames_attack_chain, tank_run}; @@ -702,38 +702,38 @@ void tank_dead (edict_t *self) mframe_t tank_frames_death1 [] = { - ai_move, -7, NULL, - ai_move, -2, NULL, - ai_move, -2, NULL, - ai_move, 1, NULL, - ai_move, 3, NULL, - ai_move, 6, NULL, - ai_move, 1, NULL, - ai_move, 1, NULL, - ai_move, 2, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, -2, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, -3, 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, -4, NULL, - ai_move, -6, NULL, - ai_move, -4, NULL, - ai_move, -5, NULL, - ai_move, -7, NULL, - ai_move, -15, tank_thud, - ai_move, -5, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL, - ai_move, 0, NULL + {ai_move, -7, NULL}, + {ai_move, -2, NULL}, + {ai_move, -2, NULL}, + {ai_move, 1, NULL}, + {ai_move, 3, NULL}, + {ai_move, 6, NULL}, + {ai_move, 1, NULL}, + {ai_move, 1, NULL}, + {ai_move, 2, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, -2, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, -3, 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, -4, NULL}, + {ai_move, -6, NULL}, + {ai_move, -4, NULL}, + {ai_move, -5, NULL}, + {ai_move, -7, NULL}, + {ai_move, -15, tank_thud}, + {ai_move, -5, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL}, + {ai_move, 0, NULL} }; mmove_t tank_move_death = {FRAME_death101, FRAME_death132, tank_frames_death1, tank_dead}; @@ -741,7 +741,7 @@ void tank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, { int n; -// 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); @@ -758,7 +758,7 @@ void tank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, if (self->deadflag == DEAD_DEAD) return; -// regular death + // regular death gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0); self->deadflag = DEAD_DEAD; self->takedamage = DAMAGE_YES; @@ -776,19 +776,6 @@ void tank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, */ /*QUAKED monster_tank_commander (1 .5 0) (-32 -32 -16) (32 32 72) Ambush Trigger_Spawn Sight */ - -void SP_monster_tank_precache(void) -{ - sound_pain = gi.soundindex ("tank/tnkpain2.wav"); - sound_thud = gi.soundindex ("tank/tnkdeth2.wav"); - sound_idle = gi.soundindex ("tank/tnkidle1.wav"); - sound_die = gi.soundindex ("tank/death.wav"); - sound_step = gi.soundindex ("tank/step.wav"); - sound_windup = gi.soundindex ("tank/tnkatck4.wav"); - sound_strike = gi.soundindex ("tank/tnkatck5.wav"); - sound_sight = gi.soundindex ("tank/sight1.wav"); -} - void SP_monster_tank (edict_t *self) { if (deathmatch->value) @@ -803,7 +790,14 @@ void SP_monster_tank (edict_t *self) self->movetype = MOVETYPE_STEP; self->solid = SOLID_BBOX; - SP_monster_tank_precache(); + sound_pain = gi.soundindex ("tank/tnkpain2.wav"); + sound_thud = gi.soundindex ("tank/tnkdeth2.wav"); + sound_idle = gi.soundindex ("tank/tnkidle1.wav"); + sound_die = gi.soundindex ("tank/death.wav"); + sound_step = gi.soundindex ("tank/step.wav"); + sound_windup = gi.soundindex ("tank/tnkatck4.wav"); + sound_strike = gi.soundindex ("tank/tnkatck5.wav"); + sound_sight = gi.soundindex ("tank/sight1.wav"); gi.soundindex ("tank/tnkatck1.wav"); gi.soundindex ("tank/tnkatk2a.wav"); @@ -847,3 +841,4 @@ void SP_monster_tank (edict_t *self) if (strcmp(self->classname, "monster_tank_commander") == 0) self->s.skinnum = 2; } +