m_flyer.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*
  2. Copyright (C) 1997-2001 Id Software, Inc.
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. /*
  16. ==============================================================================
  17. flyer
  18. ==============================================================================
  19. */
  20. #include "g_local.h"
  21. #include "m_flyer.h"
  22. qboolean visible (edict_t *self, edict_t *other);
  23. static int nextmove; // Used for start/stop frames
  24. static int sound_sight;
  25. static int sound_idle;
  26. static int sound_pain1;
  27. static int sound_pain2;
  28. static int sound_slash;
  29. static int sound_sproing;
  30. static int sound_die;
  31. void flyer_check_melee(edict_t *self);
  32. void flyer_loop_melee (edict_t *self);
  33. void flyer_melee (edict_t *self);
  34. void flyer_setstart (edict_t *self);
  35. void flyer_stand (edict_t *self);
  36. void flyer_nextmove (edict_t *self);
  37. void flyer_sight (edict_t *self, edict_t *other)
  38. {
  39. gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
  40. }
  41. void flyer_idle (edict_t *self)
  42. {
  43. gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
  44. }
  45. void flyer_pop_blades (edict_t *self)
  46. {
  47. gi.sound (self, CHAN_VOICE, sound_sproing, 1, ATTN_NORM, 0);
  48. }
  49. mframe_t flyer_frames_stand [] =
  50. {
  51. ai_stand, 0, NULL,
  52. ai_stand, 0, NULL,
  53. ai_stand, 0, NULL,
  54. ai_stand, 0, NULL,
  55. ai_stand, 0, NULL,
  56. ai_stand, 0, NULL,
  57. ai_stand, 0, NULL,
  58. ai_stand, 0, NULL,
  59. ai_stand, 0, NULL,
  60. ai_stand, 0, NULL,
  61. ai_stand, 0, NULL,
  62. ai_stand, 0, NULL,
  63. ai_stand, 0, NULL,
  64. ai_stand, 0, NULL,
  65. ai_stand, 0, NULL,
  66. ai_stand, 0, NULL,
  67. ai_stand, 0, NULL,
  68. ai_stand, 0, NULL,
  69. ai_stand, 0, NULL,
  70. ai_stand, 0, NULL,
  71. ai_stand, 0, NULL,
  72. ai_stand, 0, NULL,
  73. ai_stand, 0, NULL,
  74. ai_stand, 0, NULL,
  75. ai_stand, 0, NULL,
  76. ai_stand, 0, NULL,
  77. ai_stand, 0, NULL,
  78. ai_stand, 0, NULL,
  79. ai_stand, 0, NULL,
  80. ai_stand, 0, NULL,
  81. ai_stand, 0, NULL,
  82. ai_stand, 0, NULL,
  83. ai_stand, 0, NULL,
  84. ai_stand, 0, NULL,
  85. ai_stand, 0, NULL,
  86. ai_stand, 0, NULL,
  87. ai_stand, 0, NULL,
  88. ai_stand, 0, NULL,
  89. ai_stand, 0, NULL,
  90. ai_stand, 0, NULL,
  91. ai_stand, 0, NULL,
  92. ai_stand, 0, NULL,
  93. ai_stand, 0, NULL,
  94. ai_stand, 0, NULL,
  95. ai_stand, 0, NULL
  96. };
  97. mmove_t flyer_move_stand = {FRAME_stand01, FRAME_stand45, flyer_frames_stand, NULL};
  98. mframe_t flyer_frames_walk [] =
  99. {
  100. ai_walk, 5, NULL,
  101. ai_walk, 5, NULL,
  102. ai_walk, 5, NULL,
  103. ai_walk, 5, NULL,
  104. ai_walk, 5, NULL,
  105. ai_walk, 5, NULL,
  106. ai_walk, 5, NULL,
  107. ai_walk, 5, NULL,
  108. ai_walk, 5, NULL,
  109. ai_walk, 5, NULL,
  110. ai_walk, 5, NULL,
  111. ai_walk, 5, NULL,
  112. ai_walk, 5, NULL,
  113. ai_walk, 5, NULL,
  114. ai_walk, 5, NULL,
  115. ai_walk, 5, NULL,
  116. ai_walk, 5, NULL,
  117. ai_walk, 5, NULL,
  118. ai_walk, 5, NULL,
  119. ai_walk, 5, NULL,
  120. ai_walk, 5, NULL,
  121. ai_walk, 5, NULL,
  122. ai_walk, 5, NULL,
  123. ai_walk, 5, NULL,
  124. ai_walk, 5, NULL,
  125. ai_walk, 5, NULL,
  126. ai_walk, 5, NULL,
  127. ai_walk, 5, NULL,
  128. ai_walk, 5, NULL,
  129. ai_walk, 5, NULL,
  130. ai_walk, 5, NULL,
  131. ai_walk, 5, NULL,
  132. ai_walk, 5, NULL,
  133. ai_walk, 5, NULL,
  134. ai_walk, 5, NULL,
  135. ai_walk, 5, NULL,
  136. ai_walk, 5, NULL,
  137. ai_walk, 5, NULL,
  138. ai_walk, 5, NULL,
  139. ai_walk, 5, NULL,
  140. ai_walk, 5, NULL,
  141. ai_walk, 5, NULL,
  142. ai_walk, 5, NULL,
  143. ai_walk, 5, NULL,
  144. ai_walk, 5, NULL
  145. };
  146. mmove_t flyer_move_walk = {FRAME_stand01, FRAME_stand45, flyer_frames_walk, NULL};
  147. mframe_t flyer_frames_run [] =
  148. {
  149. ai_run, 10, NULL,
  150. ai_run, 10, NULL,
  151. ai_run, 10, NULL,
  152. ai_run, 10, NULL,
  153. ai_run, 10, NULL,
  154. ai_run, 10, NULL,
  155. ai_run, 10, NULL,
  156. ai_run, 10, NULL,
  157. ai_run, 10, NULL,
  158. ai_run, 10, NULL,
  159. ai_run, 10, NULL,
  160. ai_run, 10, NULL,
  161. ai_run, 10, NULL,
  162. ai_run, 10, NULL,
  163. ai_run, 10, NULL,
  164. ai_run, 10, NULL,
  165. ai_run, 10, NULL,
  166. ai_run, 10, NULL,
  167. ai_run, 10, NULL,
  168. ai_run, 10, NULL,
  169. ai_run, 10, NULL,
  170. ai_run, 10, NULL,
  171. ai_run, 10, NULL,
  172. ai_run, 10, NULL,
  173. ai_run, 10, NULL,
  174. ai_run, 10, NULL,
  175. ai_run, 10, NULL,
  176. ai_run, 10, NULL,
  177. ai_run, 10, NULL,
  178. ai_run, 10, NULL,
  179. ai_run, 10, NULL,
  180. ai_run, 10, NULL,
  181. ai_run, 10, NULL,
  182. ai_run, 10, NULL,
  183. ai_run, 10, NULL,
  184. ai_run, 10, NULL,
  185. ai_run, 10, NULL,
  186. ai_run, 10, NULL,
  187. ai_run, 10, NULL,
  188. ai_run, 10, NULL,
  189. ai_run, 10, NULL,
  190. ai_run, 10, NULL,
  191. ai_run, 10, NULL,
  192. ai_run, 10, NULL,
  193. ai_run, 10, NULL
  194. };
  195. mmove_t flyer_move_run = {FRAME_stand01, FRAME_stand45, flyer_frames_run, NULL};
  196. void flyer_run (edict_t *self)
  197. {
  198. if (self->monsterinfo.aiflags & AI_STAND_GROUND)
  199. self->monsterinfo.currentmove = &flyer_move_stand;
  200. else
  201. self->monsterinfo.currentmove = &flyer_move_run;
  202. }
  203. void flyer_walk (edict_t *self)
  204. {
  205. self->monsterinfo.currentmove = &flyer_move_walk;
  206. }
  207. void flyer_stand (edict_t *self)
  208. {
  209. self->monsterinfo.currentmove = &flyer_move_stand;
  210. }
  211. mframe_t flyer_frames_start [] =
  212. {
  213. ai_move, 0, NULL,
  214. ai_move, 0, NULL,
  215. ai_move, 0, NULL,
  216. ai_move, 0, NULL,
  217. ai_move, 0, NULL,
  218. ai_move, 0, flyer_nextmove
  219. };
  220. mmove_t flyer_move_start = {FRAME_start01, FRAME_start06, flyer_frames_start, NULL};
  221. mframe_t flyer_frames_stop [] =
  222. {
  223. ai_move, 0, NULL,
  224. ai_move, 0, NULL,
  225. ai_move, 0, NULL,
  226. ai_move, 0, NULL,
  227. ai_move, 0, NULL,
  228. ai_move, 0, NULL,
  229. ai_move, 0, flyer_nextmove
  230. };
  231. mmove_t flyer_move_stop = {FRAME_stop01, FRAME_stop07, flyer_frames_stop, NULL};
  232. void flyer_stop (edict_t *self)
  233. {
  234. self->monsterinfo.currentmove = &flyer_move_stop;
  235. }
  236. void flyer_start (edict_t *self)
  237. {
  238. self->monsterinfo.currentmove = &flyer_move_start;
  239. }
  240. mframe_t flyer_frames_rollright [] =
  241. {
  242. ai_move, 0, NULL,
  243. ai_move, 0, NULL,
  244. ai_move, 0, NULL,
  245. ai_move, 0, NULL,
  246. ai_move, 0, NULL,
  247. ai_move, 0, NULL,
  248. ai_move, 0, NULL,
  249. ai_move, 0, NULL,
  250. ai_move, 0, NULL
  251. };
  252. mmove_t flyer_move_rollright = {FRAME_rollr01, FRAME_rollr09, flyer_frames_rollright, NULL};
  253. mframe_t flyer_frames_rollleft [] =
  254. {
  255. ai_move, 0, NULL,
  256. ai_move, 0, NULL,
  257. ai_move, 0, NULL,
  258. ai_move, 0, NULL,
  259. ai_move, 0, NULL,
  260. ai_move, 0, NULL,
  261. ai_move, 0, NULL,
  262. ai_move, 0, NULL,
  263. ai_move, 0, NULL
  264. };
  265. mmove_t flyer_move_rollleft = {FRAME_rollf01, FRAME_rollf09, flyer_frames_rollleft, NULL};
  266. mframe_t flyer_frames_pain3 [] =
  267. {
  268. ai_move, 0, NULL,
  269. ai_move, 0, NULL,
  270. ai_move, 0, NULL,
  271. ai_move, 0, NULL
  272. };
  273. mmove_t flyer_move_pain3 = {FRAME_pain301, FRAME_pain304, flyer_frames_pain3, flyer_run};
  274. mframe_t flyer_frames_pain2 [] =
  275. {
  276. ai_move, 0, NULL,
  277. ai_move, 0, NULL,
  278. ai_move, 0, NULL,
  279. ai_move, 0, NULL
  280. };
  281. mmove_t flyer_move_pain2 = {FRAME_pain201, FRAME_pain204, flyer_frames_pain2, flyer_run};
  282. mframe_t flyer_frames_pain1 [] =
  283. {
  284. ai_move, 0, NULL,
  285. ai_move, 0, NULL,
  286. ai_move, 0, NULL,
  287. ai_move, 0, NULL,
  288. ai_move, 0, NULL,
  289. ai_move, 0, NULL,
  290. ai_move, 0, NULL,
  291. ai_move, 0, NULL,
  292. ai_move, 0, NULL
  293. };
  294. mmove_t flyer_move_pain1 = {FRAME_pain101, FRAME_pain109, flyer_frames_pain1, flyer_run};
  295. mframe_t flyer_frames_defense [] =
  296. {
  297. ai_move, 0, NULL,
  298. ai_move, 0, NULL,
  299. ai_move, 0, NULL, // Hold this frame
  300. ai_move, 0, NULL,
  301. ai_move, 0, NULL,
  302. ai_move, 0, NULL
  303. };
  304. mmove_t flyer_move_defense = {FRAME_defens01, FRAME_defens06, flyer_frames_defense, NULL};
  305. mframe_t flyer_frames_bankright [] =
  306. {
  307. ai_move, 0, NULL,
  308. ai_move, 0, NULL,
  309. ai_move, 0, NULL,
  310. ai_move, 0, NULL,
  311. ai_move, 0, NULL,
  312. ai_move, 0, NULL,
  313. ai_move, 0, NULL
  314. };
  315. mmove_t flyer_move_bankright = {FRAME_bankr01, FRAME_bankr07, flyer_frames_bankright, NULL};
  316. mframe_t flyer_frames_bankleft [] =
  317. {
  318. ai_move, 0, NULL,
  319. ai_move, 0, NULL,
  320. ai_move, 0, NULL,
  321. ai_move, 0, NULL,
  322. ai_move, 0, NULL,
  323. ai_move, 0, NULL,
  324. ai_move, 0, NULL
  325. };
  326. mmove_t flyer_move_bankleft = {FRAME_bankl01, FRAME_bankl07, flyer_frames_bankleft, NULL};
  327. void flyer_fire (edict_t *self, int flash_number)
  328. {
  329. vec3_t start;
  330. vec3_t forward, right;
  331. vec3_t end;
  332. vec3_t dir;
  333. int effect;
  334. if ((self->s.frame == FRAME_attak204) || (self->s.frame == FRAME_attak207) || (self->s.frame == FRAME_attak210))
  335. effect = EF_HYPERBLASTER;
  336. else
  337. effect = 0;
  338. AngleVectors (self->s.angles, forward, right, NULL);
  339. G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
  340. VectorCopy (self->enemy->s.origin, end);
  341. end[2] += self->enemy->viewheight;
  342. VectorSubtract (end, start, dir);
  343. monster_fire_blaster (self, start, dir, 1, 1000, flash_number, effect);
  344. }
  345. void flyer_fireleft (edict_t *self)
  346. {
  347. flyer_fire (self, MZ2_FLYER_BLASTER_1);
  348. }
  349. void flyer_fireright (edict_t *self)
  350. {
  351. flyer_fire (self, MZ2_FLYER_BLASTER_2);
  352. }
  353. mframe_t flyer_frames_attack2 [] =
  354. {
  355. ai_charge, 0, NULL,
  356. ai_charge, 0, NULL,
  357. ai_charge, 0, NULL,
  358. ai_charge, -10, flyer_fireleft, // left gun
  359. ai_charge, -10, flyer_fireright, // right gun
  360. ai_charge, -10, flyer_fireleft, // left gun
  361. ai_charge, -10, flyer_fireright, // right gun
  362. ai_charge, -10, flyer_fireleft, // left gun
  363. ai_charge, -10, flyer_fireright, // right gun
  364. ai_charge, -10, flyer_fireleft, // left gun
  365. ai_charge, -10, flyer_fireright, // right gun
  366. ai_charge, 0, NULL,
  367. ai_charge, 0, NULL,
  368. ai_charge, 0, NULL,
  369. ai_charge, 0, NULL,
  370. ai_charge, 0, NULL,
  371. ai_charge, 0, NULL
  372. };
  373. mmove_t flyer_move_attack2 = {FRAME_attak201, FRAME_attak217, flyer_frames_attack2, flyer_run};
  374. void flyer_slash_left (edict_t *self)
  375. {
  376. vec3_t aim;
  377. VectorSet (aim, MELEE_DISTANCE, self->mins[0], 0);
  378. fire_hit (self, aim, 5, 0);
  379. gi.sound (self, CHAN_WEAPON, sound_slash, 1, ATTN_NORM, 0);
  380. }
  381. void flyer_slash_right (edict_t *self)
  382. {
  383. vec3_t aim;
  384. VectorSet (aim, MELEE_DISTANCE, self->maxs[0], 0);
  385. fire_hit (self, aim, 5, 0);
  386. gi.sound (self, CHAN_WEAPON, sound_slash, 1, ATTN_NORM, 0);
  387. }
  388. mframe_t flyer_frames_start_melee [] =
  389. {
  390. ai_charge, 0, flyer_pop_blades,
  391. ai_charge, 0, NULL,
  392. ai_charge, 0, NULL,
  393. ai_charge, 0, NULL,
  394. ai_charge, 0, NULL,
  395. ai_charge, 0, NULL
  396. };
  397. mmove_t flyer_move_start_melee = {FRAME_attak101, FRAME_attak106, flyer_frames_start_melee, flyer_loop_melee};
  398. mframe_t flyer_frames_end_melee [] =
  399. {
  400. ai_charge, 0, NULL,
  401. ai_charge, 0, NULL,
  402. ai_charge, 0, NULL
  403. };
  404. mmove_t flyer_move_end_melee = {FRAME_attak119, FRAME_attak121, flyer_frames_end_melee, flyer_run};
  405. mframe_t flyer_frames_loop_melee [] =
  406. {
  407. ai_charge, 0, NULL, // Loop Start
  408. ai_charge, 0, NULL,
  409. ai_charge, 0, flyer_slash_left, // Left Wing Strike
  410. ai_charge, 0, NULL,
  411. ai_charge, 0, NULL,
  412. ai_charge, 0, NULL,
  413. ai_charge, 0, NULL,
  414. ai_charge, 0, flyer_slash_right, // Right Wing Strike
  415. ai_charge, 0, NULL,
  416. ai_charge, 0, NULL,
  417. ai_charge, 0, NULL,
  418. ai_charge, 0, NULL // Loop Ends
  419. };
  420. mmove_t flyer_move_loop_melee = {FRAME_attak107, FRAME_attak118, flyer_frames_loop_melee, flyer_check_melee};
  421. void flyer_loop_melee (edict_t *self)
  422. {
  423. /* if (random() <= 0.5)
  424. self->monsterinfo.currentmove = &flyer_move_attack1;
  425. else */
  426. self->monsterinfo.currentmove = &flyer_move_loop_melee;
  427. }
  428. void flyer_attack (edict_t *self)
  429. {
  430. /* if (random() <= 0.5)
  431. self->monsterinfo.currentmove = &flyer_move_attack1;
  432. else */
  433. self->monsterinfo.currentmove = &flyer_move_attack2;
  434. }
  435. void flyer_setstart (edict_t *self)
  436. {
  437. nextmove = ACTION_run;
  438. self->monsterinfo.currentmove = &flyer_move_start;
  439. }
  440. void flyer_nextmove (edict_t *self)
  441. {
  442. if (nextmove == ACTION_attack1)
  443. self->monsterinfo.currentmove = &flyer_move_start_melee;
  444. else if (nextmove == ACTION_attack2)
  445. self->monsterinfo.currentmove = &flyer_move_attack2;
  446. else if (nextmove == ACTION_run)
  447. self->monsterinfo.currentmove = &flyer_move_run;
  448. }
  449. void flyer_melee (edict_t *self)
  450. {
  451. // flyer.nextmove = ACTION_attack1;
  452. // self->monsterinfo.currentmove = &flyer_move_stop;
  453. self->monsterinfo.currentmove = &flyer_move_start_melee;
  454. }
  455. void flyer_check_melee(edict_t *self)
  456. {
  457. if (range (self, self->enemy) == RANGE_MELEE)
  458. if (random() <= 0.8)
  459. self->monsterinfo.currentmove = &flyer_move_loop_melee;
  460. else
  461. self->monsterinfo.currentmove = &flyer_move_end_melee;
  462. else
  463. self->monsterinfo.currentmove = &flyer_move_end_melee;
  464. }
  465. void flyer_pain (edict_t *self, edict_t *other, float kick, int damage)
  466. {
  467. int n;
  468. if (self->health < (self->max_health / 2))
  469. self->s.skinnum = 1;
  470. if (level.time < self->pain_debounce_time)
  471. return;
  472. self->pain_debounce_time = level.time + 3;
  473. if (skill->value == 3)
  474. return; // no pain anims in nightmare
  475. n = rand() % 3;
  476. if (n == 0)
  477. {
  478. gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
  479. self->monsterinfo.currentmove = &flyer_move_pain1;
  480. }
  481. else if (n == 1)
  482. {
  483. gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
  484. self->monsterinfo.currentmove = &flyer_move_pain2;
  485. }
  486. else
  487. {
  488. gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
  489. self->monsterinfo.currentmove = &flyer_move_pain3;
  490. }
  491. }
  492. void flyer_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
  493. {
  494. gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
  495. BecomeExplosion1(self);
  496. }
  497. /*QUAKED monster_flyer (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
  498. */
  499. void SP_monster_flyer (edict_t *self)
  500. {
  501. if (deathmatch->value)
  502. {
  503. G_FreeEdict (self);
  504. return;
  505. }
  506. // fix a map bug in jail5.bsp
  507. if (!Q_stricmp(level.mapname, "jail5") && (self->s.origin[2] == -104))
  508. {
  509. self->targetname = self->target;
  510. self->target = NULL;
  511. }
  512. sound_sight = gi.soundindex ("flyer/flysght1.wav");
  513. sound_idle = gi.soundindex ("flyer/flysrch1.wav");
  514. sound_pain1 = gi.soundindex ("flyer/flypain1.wav");
  515. sound_pain2 = gi.soundindex ("flyer/flypain2.wav");
  516. sound_slash = gi.soundindex ("flyer/flyatck2.wav");
  517. sound_sproing = gi.soundindex ("flyer/flyatck1.wav");
  518. sound_die = gi.soundindex ("flyer/flydeth1.wav");
  519. gi.soundindex ("flyer/flyatck3.wav");
  520. self->s.modelindex = gi.modelindex ("models/monsters/flyer/tris.md2");
  521. VectorSet (self->mins, -16, -16, -24);
  522. VectorSet (self->maxs, 16, 16, 32);
  523. self->movetype = MOVETYPE_STEP;
  524. self->solid = SOLID_BBOX;
  525. self->s.sound = gi.soundindex ("flyer/flyidle1.wav");
  526. self->health = 50;
  527. self->mass = 50;
  528. self->pain = flyer_pain;
  529. self->die = flyer_die;
  530. self->monsterinfo.stand = flyer_stand;
  531. self->monsterinfo.walk = flyer_walk;
  532. self->monsterinfo.run = flyer_run;
  533. self->monsterinfo.attack = flyer_attack;
  534. self->monsterinfo.melee = flyer_melee;
  535. self->monsterinfo.sight = flyer_sight;
  536. self->monsterinfo.idle = flyer_idle;
  537. gi.linkentity (self);
  538. self->monsterinfo.currentmove = &flyer_move_stand;
  539. self->monsterinfo.scale = MODEL_SCALE;
  540. flymonster_start (self);
  541. }