m_chick.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. // Copyright (c) ZeniMax Media Inc.
  2. // Licensed under the GNU General Public License 2.0.
  3. /*
  4. ==============================================================================
  5. chick
  6. ==============================================================================
  7. */
  8. #include "g_local.h"
  9. #include "m_chick.h"
  10. qboolean visible (edict_t *self, edict_t *other);
  11. void chick_stand (edict_t *self);
  12. void chick_run (edict_t *self);
  13. void chick_reslash(edict_t *self);
  14. void chick_rerocket(edict_t *self);
  15. void chick_attack1(edict_t *self);
  16. static int sound_missile_prelaunch;
  17. static int sound_missile_launch;
  18. static int sound_melee_swing;
  19. static int sound_melee_hit;
  20. static int sound_missile_reload;
  21. static int sound_death1;
  22. static int sound_death2;
  23. static int sound_fall_down;
  24. static int sound_idle1;
  25. static int sound_idle2;
  26. static int sound_pain1;
  27. static int sound_pain2;
  28. static int sound_pain3;
  29. static int sound_sight;
  30. static int sound_search;
  31. void ChickMoan (edict_t *self)
  32. {
  33. if (random() < 0.5)
  34. gi.sound (self, CHAN_VOICE, sound_idle1, 1, ATTN_IDLE, 0);
  35. else
  36. gi.sound (self, CHAN_VOICE, sound_idle2, 1, ATTN_IDLE, 0);
  37. }
  38. mframe_t chick_frames_fidget [] =
  39. {
  40. ai_stand, 0, NULL,
  41. ai_stand, 0, NULL,
  42. ai_stand, 0, NULL,
  43. ai_stand, 0, NULL,
  44. ai_stand, 0, NULL,
  45. ai_stand, 0, NULL,
  46. ai_stand, 0, NULL,
  47. ai_stand, 0, NULL,
  48. ai_stand, 0, ChickMoan,
  49. ai_stand, 0, NULL,
  50. ai_stand, 0, NULL,
  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. };
  71. mmove_t chick_move_fidget = {FRAME_stand201, FRAME_stand230, chick_frames_fidget, chick_stand};
  72. void chick_fidget (edict_t *self)
  73. {
  74. if (self->monsterinfo.aiflags & AI_STAND_GROUND)
  75. return;
  76. if (random() <= 0.3)
  77. self->monsterinfo.currentmove = &chick_move_fidget;
  78. }
  79. mframe_t chick_frames_stand [] =
  80. {
  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. ai_stand, 0, NULL,
  97. ai_stand, 0, NULL,
  98. ai_stand, 0, NULL,
  99. ai_stand, 0, NULL,
  100. ai_stand, 0, NULL,
  101. ai_stand, 0, NULL,
  102. ai_stand, 0, NULL,
  103. ai_stand, 0, NULL,
  104. ai_stand, 0, NULL,
  105. ai_stand, 0, NULL,
  106. ai_stand, 0, NULL,
  107. ai_stand, 0, NULL,
  108. ai_stand, 0, NULL,
  109. ai_stand, 0, NULL,
  110. ai_stand, 0, chick_fidget,
  111. };
  112. mmove_t chick_move_stand = {FRAME_stand101, FRAME_stand130, chick_frames_stand, NULL};
  113. void chick_stand (edict_t *self)
  114. {
  115. self->monsterinfo.currentmove = &chick_move_stand;
  116. }
  117. mframe_t chick_frames_start_run [] =
  118. {
  119. ai_run, 1, NULL,
  120. ai_run, 0, NULL,
  121. ai_run, 0, NULL,
  122. ai_run, -1, NULL,
  123. ai_run, -1, NULL,
  124. ai_run, 0, NULL,
  125. ai_run, 1, NULL,
  126. ai_run, 3, NULL,
  127. ai_run, 6, NULL,
  128. ai_run, 3, NULL
  129. };
  130. mmove_t chick_move_start_run = {FRAME_walk01, FRAME_walk10, chick_frames_start_run, chick_run};
  131. mframe_t chick_frames_run [] =
  132. {
  133. ai_run, 6, NULL,
  134. ai_run, 8, NULL,
  135. ai_run, 13, NULL,
  136. ai_run, 5, NULL,
  137. ai_run, 7, NULL,
  138. ai_run, 4, NULL,
  139. ai_run, 11, NULL,
  140. ai_run, 5, NULL,
  141. ai_run, 9, NULL,
  142. ai_run, 7, NULL
  143. };
  144. mmove_t chick_move_run = {FRAME_walk11, FRAME_walk20, chick_frames_run, NULL};
  145. mframe_t chick_frames_walk [] =
  146. {
  147. ai_walk, 6, NULL,
  148. ai_walk, 8, NULL,
  149. ai_walk, 13, NULL,
  150. ai_walk, 5, NULL,
  151. ai_walk, 7, NULL,
  152. ai_walk, 4, NULL,
  153. ai_walk, 11, NULL,
  154. ai_walk, 5, NULL,
  155. ai_walk, 9, NULL,
  156. ai_walk, 7, NULL
  157. };
  158. mmove_t chick_move_walk = {FRAME_walk11, FRAME_walk20, chick_frames_walk, NULL};
  159. void chick_walk (edict_t *self)
  160. {
  161. self->monsterinfo.currentmove = &chick_move_walk;
  162. }
  163. void chick_run (edict_t *self)
  164. {
  165. if (self->monsterinfo.aiflags & AI_STAND_GROUND)
  166. {
  167. self->monsterinfo.currentmove = &chick_move_stand;
  168. return;
  169. }
  170. if (self->monsterinfo.currentmove == &chick_move_walk ||
  171. self->monsterinfo.currentmove == &chick_move_start_run)
  172. {
  173. self->monsterinfo.currentmove = &chick_move_run;
  174. }
  175. else
  176. {
  177. self->monsterinfo.currentmove = &chick_move_start_run;
  178. }
  179. }
  180. mframe_t chick_frames_pain1 [] =
  181. {
  182. ai_move, 0, NULL,
  183. ai_move, 0, NULL,
  184. ai_move, 0, NULL,
  185. ai_move, 0, NULL,
  186. ai_move, 0, NULL
  187. };
  188. mmove_t chick_move_pain1 = {FRAME_pain101, FRAME_pain105, chick_frames_pain1, chick_run};
  189. mframe_t chick_frames_pain2 [] =
  190. {
  191. ai_move, 0, NULL,
  192. ai_move, 0, NULL,
  193. ai_move, 0, NULL,
  194. ai_move, 0, NULL,
  195. ai_move, 0, NULL
  196. };
  197. mmove_t chick_move_pain2 = {FRAME_pain201, FRAME_pain205, chick_frames_pain2, chick_run};
  198. mframe_t chick_frames_pain3 [] =
  199. {
  200. ai_move, 0, NULL,
  201. ai_move, 0, NULL,
  202. ai_move, -6, NULL,
  203. ai_move, 3, NULL,
  204. ai_move, 11, NULL,
  205. ai_move, 3, NULL,
  206. ai_move, 0, NULL,
  207. ai_move, 0, NULL,
  208. ai_move, 4, NULL,
  209. ai_move, 1, NULL,
  210. ai_move, 0, NULL,
  211. ai_move, -3, NULL,
  212. ai_move, -4, NULL,
  213. ai_move, 5, NULL,
  214. ai_move, 7, NULL,
  215. ai_move, -2, NULL,
  216. ai_move, 3, NULL,
  217. ai_move, -5, NULL,
  218. ai_move, -2, NULL,
  219. ai_move, -8, NULL,
  220. ai_move, 2, NULL
  221. };
  222. mmove_t chick_move_pain3 = {FRAME_pain301, FRAME_pain321, chick_frames_pain3, chick_run};
  223. void chick_pain (edict_t *self, edict_t *other, float kick, int damage)
  224. {
  225. float r;
  226. if (self->health < (self->max_health / 2))
  227. self->s.skinnum = 1;
  228. if (level.time < self->pain_debounce_time)
  229. return;
  230. self->pain_debounce_time = level.time + 3;
  231. r = random();
  232. if (r < 0.33)
  233. gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
  234. else if (r < 0.66)
  235. gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
  236. else
  237. gi.sound (self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0);
  238. if (damage <= 10)
  239. self->monsterinfo.currentmove = &chick_move_pain1;
  240. else if (damage <= 25)
  241. self->monsterinfo.currentmove = &chick_move_pain2;
  242. else
  243. self->monsterinfo.currentmove = &chick_move_pain3;
  244. }
  245. void chick_dead (edict_t *self)
  246. {
  247. VectorSet (self->mins, -16, -16, 0);
  248. VectorSet (self->maxs, 16, 16, 16);
  249. self->movetype = MOVETYPE_TOSS;
  250. self->svflags |= SVF_DEADMONSTER;
  251. self->nextthink = 0;
  252. gi.linkentity (self);
  253. }
  254. mframe_t chick_frames_death2 [] =
  255. {
  256. ai_move, -6, NULL,
  257. ai_move, 0, NULL,
  258. ai_move, -1, NULL,
  259. ai_move, -5, NULL,
  260. ai_move, 0, NULL,
  261. ai_move, -1, NULL,
  262. ai_move, -2, NULL,
  263. ai_move, 1, NULL,
  264. ai_move, 10, NULL,
  265. ai_move, 2, NULL,
  266. ai_move, 3, NULL,
  267. ai_move, 1, NULL,
  268. ai_move, 2, NULL,
  269. ai_move, 0, NULL,
  270. ai_move, 3, NULL,
  271. ai_move, 3, NULL,
  272. ai_move, 1, NULL,
  273. ai_move, -3, NULL,
  274. ai_move, -5, NULL,
  275. ai_move, 4, NULL,
  276. ai_move, 15, NULL,
  277. ai_move, 14, NULL,
  278. ai_move, 1, NULL
  279. };
  280. mmove_t chick_move_death2 = {FRAME_death201, FRAME_death223, chick_frames_death2, chick_dead};
  281. mframe_t chick_frames_death1 [] =
  282. {
  283. ai_move, 0, NULL,
  284. ai_move, 0, NULL,
  285. ai_move, -7, NULL,
  286. ai_move, 4, NULL,
  287. ai_move, 11, 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. ai_move, 0, NULL,
  294. ai_move, 0, NULL
  295. };
  296. mmove_t chick_move_death1 = {FRAME_death101, FRAME_death112, chick_frames_death1, chick_dead};
  297. void chick_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
  298. {
  299. int n;
  300. // check for gib
  301. if (self->health <= self->gib_health)
  302. {
  303. gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
  304. for (n= 0; n < 2; n++)
  305. ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
  306. for (n= 0; n < 4; n++)
  307. ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
  308. ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
  309. self->deadflag = DEAD_DEAD;
  310. return;
  311. }
  312. if (self->deadflag == DEAD_DEAD)
  313. return;
  314. // regular death
  315. self->deadflag = DEAD_DEAD;
  316. self->takedamage = DAMAGE_YES;
  317. n = rand() % 2;
  318. if (n == 0)
  319. {
  320. self->monsterinfo.currentmove = &chick_move_death1;
  321. gi.sound (self, CHAN_VOICE, sound_death1, 1, ATTN_NORM, 0);
  322. }
  323. else
  324. {
  325. self->monsterinfo.currentmove = &chick_move_death2;
  326. gi.sound (self, CHAN_VOICE, sound_death2, 1, ATTN_NORM, 0);
  327. }
  328. }
  329. void chick_duck_down (edict_t *self)
  330. {
  331. if (self->monsterinfo.aiflags & AI_DUCKED)
  332. return;
  333. self->monsterinfo.aiflags |= AI_DUCKED;
  334. self->maxs[2] -= 32;
  335. self->takedamage = DAMAGE_YES;
  336. self->monsterinfo.pausetime = level.time + 1;
  337. gi.linkentity (self);
  338. }
  339. void chick_duck_hold (edict_t *self)
  340. {
  341. if (level.time >= self->monsterinfo.pausetime)
  342. self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
  343. else
  344. self->monsterinfo.aiflags |= AI_HOLD_FRAME;
  345. }
  346. void chick_duck_up (edict_t *self)
  347. {
  348. self->monsterinfo.aiflags &= ~AI_DUCKED;
  349. self->maxs[2] += 32;
  350. self->takedamage = DAMAGE_AIM;
  351. gi.linkentity (self);
  352. }
  353. mframe_t chick_frames_duck [] =
  354. {
  355. ai_move, 0, chick_duck_down,
  356. ai_move, 1, NULL,
  357. ai_move, 4, chick_duck_hold,
  358. ai_move, -4, NULL,
  359. ai_move, -5, chick_duck_up,
  360. ai_move, 3, NULL,
  361. ai_move, 1, NULL
  362. };
  363. mmove_t chick_move_duck = {FRAME_duck01, FRAME_duck07, chick_frames_duck, chick_run};
  364. void chick_dodge (edict_t *self, edict_t *attacker, float eta)
  365. {
  366. if (random() > 0.25)
  367. return;
  368. if (!self->enemy)
  369. self->enemy = attacker;
  370. self->monsterinfo.currentmove = &chick_move_duck;
  371. }
  372. void ChickSlash (edict_t *self)
  373. {
  374. vec3_t aim;
  375. VectorSet (aim, MELEE_DISTANCE, self->mins[0], 10);
  376. gi.sound (self, CHAN_WEAPON, sound_melee_swing, 1, ATTN_NORM, 0);
  377. fire_hit (self, aim, (10 + (rand() %6)), 100);
  378. }
  379. void ChickRocket (edict_t *self)
  380. {
  381. vec3_t forward, right;
  382. vec3_t start;
  383. vec3_t dir;
  384. vec3_t vec;
  385. qboolean tone = true;
  386. AngleVectors (self->s.angles, forward, right, NULL);
  387. G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_CHICK_ROCKET_1], forward, right, start);
  388. VectorCopy (self->enemy->s.origin, vec);
  389. vec[2] += self->enemy->viewheight;
  390. VectorSubtract (vec, start, dir);
  391. VectorNormalize (dir);
  392. if (self->s.skinnum > 1)
  393. monster_fire_heat (self, start, dir, 50, 500, MZ2_CHICK_ROCKET_1);
  394. else
  395. monster_fire_rocket (self, start, dir, 50, 500, MZ2_CHICK_ROCKET_1);
  396. }
  397. void Chick_PreAttack1 (edict_t *self)
  398. {
  399. gi.sound (self, CHAN_VOICE, sound_missile_prelaunch, 1, ATTN_NORM, 0);
  400. }
  401. void ChickReload (edict_t *self)
  402. {
  403. gi.sound (self, CHAN_VOICE, sound_missile_reload, 1, ATTN_NORM, 0);
  404. }
  405. mframe_t chick_frames_start_attack1 [] =
  406. {
  407. ai_charge, 0, Chick_PreAttack1,
  408. ai_charge, 0, NULL,
  409. ai_charge, 0, NULL,
  410. ai_charge, 4, NULL,
  411. ai_charge, 0, NULL,
  412. ai_charge, -3, NULL,
  413. ai_charge, 3, NULL,
  414. ai_charge, 5, NULL,
  415. ai_charge, 7, NULL,
  416. ai_charge, 0, NULL,
  417. ai_charge, 0, NULL,
  418. ai_charge, 0, NULL,
  419. ai_charge, 0, chick_attack1
  420. };
  421. mmove_t chick_move_start_attack1 = {FRAME_attak101, FRAME_attak113, chick_frames_start_attack1, NULL};
  422. mframe_t chick_frames_attack1 [] =
  423. {
  424. ai_charge, 19, ChickRocket,
  425. ai_charge, -6, NULL,
  426. ai_charge, -5, NULL,
  427. ai_charge, -2, NULL,
  428. ai_charge, -7, NULL,
  429. ai_charge, 0, NULL,
  430. ai_charge, 1, NULL,
  431. ai_charge, 10, ChickReload,
  432. ai_charge, 4, NULL,
  433. ai_charge, 5, NULL,
  434. ai_charge, 6, NULL,
  435. ai_charge, 6, NULL,
  436. ai_charge, 4, NULL,
  437. ai_charge, 3, chick_rerocket
  438. };
  439. mmove_t chick_move_attack1 = {FRAME_attak114, FRAME_attak127, chick_frames_attack1, NULL};
  440. mframe_t chick_frames_end_attack1 [] =
  441. {
  442. ai_charge, -3, NULL,
  443. ai_charge, 0, NULL,
  444. ai_charge, -6, NULL,
  445. ai_charge, -4, NULL,
  446. ai_charge, -2, NULL
  447. };
  448. mmove_t chick_move_end_attack1 = {FRAME_attak128, FRAME_attak132, chick_frames_end_attack1, chick_run};
  449. void chick_rerocket(edict_t *self)
  450. {
  451. if (self->enemy->health > 0)
  452. {
  453. if (range (self, self->enemy) > RANGE_MELEE)
  454. if ( visible (self, self->enemy) )
  455. if (random() <= 0.6)
  456. {
  457. self->monsterinfo.currentmove = &chick_move_attack1;
  458. return;
  459. }
  460. }
  461. self->monsterinfo.currentmove = &chick_move_end_attack1;
  462. }
  463. void chick_attack1(edict_t *self)
  464. {
  465. self->monsterinfo.currentmove = &chick_move_attack1;
  466. }
  467. mframe_t chick_frames_slash [] =
  468. {
  469. ai_charge, 1, NULL,
  470. ai_charge, 7, ChickSlash,
  471. ai_charge, -7, NULL,
  472. ai_charge, 1, NULL,
  473. ai_charge, -1, NULL,
  474. ai_charge, 1, NULL,
  475. ai_charge, 0, NULL,
  476. ai_charge, 1, NULL,
  477. ai_charge, -2, chick_reslash
  478. };
  479. mmove_t chick_move_slash = {FRAME_attak204, FRAME_attak212, chick_frames_slash, NULL};
  480. mframe_t chick_frames_end_slash [] =
  481. {
  482. ai_charge, -6, NULL,
  483. ai_charge, -1, NULL,
  484. ai_charge, -6, NULL,
  485. ai_charge, 0, NULL
  486. };
  487. mmove_t chick_move_end_slash = {FRAME_attak213, FRAME_attak216, chick_frames_end_slash, chick_run};
  488. void chick_reslash(edict_t *self)
  489. {
  490. if (self->enemy->health > 0)
  491. {
  492. if (range (self, self->enemy) == RANGE_MELEE)
  493. if (random() <= 0.9)
  494. {
  495. self->monsterinfo.currentmove = &chick_move_slash;
  496. return;
  497. }
  498. else
  499. {
  500. self->monsterinfo.currentmove = &chick_move_end_slash;
  501. return;
  502. }
  503. }
  504. self->monsterinfo.currentmove = &chick_move_end_slash;
  505. }
  506. void chick_slash(edict_t *self)
  507. {
  508. self->monsterinfo.currentmove = &chick_move_slash;
  509. }
  510. mframe_t chick_frames_start_slash [] =
  511. {
  512. ai_charge, 1, NULL,
  513. ai_charge, 8, NULL,
  514. ai_charge, 3, NULL
  515. };
  516. mmove_t chick_move_start_slash = {FRAME_attak201, FRAME_attak203, chick_frames_start_slash, chick_slash};
  517. void chick_melee(edict_t *self)
  518. {
  519. self->monsterinfo.currentmove = &chick_move_start_slash;
  520. }
  521. void chick_attack(edict_t *self)
  522. {
  523. self->monsterinfo.currentmove = &chick_move_start_attack1;
  524. }
  525. void chick_sight(edict_t *self, edict_t *other)
  526. {
  527. gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
  528. }
  529. /*QUAKED monster_chick (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
  530. */
  531. void SP_monster_chick (edict_t *self)
  532. {
  533. if (deathmatch->value)
  534. {
  535. G_FreeEdict (self);
  536. return;
  537. }
  538. sound_missile_prelaunch = gi.soundindex ("chick/chkatck1.wav");
  539. sound_missile_launch = gi.soundindex ("chick/chkatck2.wav");
  540. sound_melee_swing = gi.soundindex ("chick/chkatck3.wav");
  541. sound_melee_hit = gi.soundindex ("chick/chkatck4.wav");
  542. sound_missile_reload = gi.soundindex ("chick/chkatck5.wav");
  543. sound_death1 = gi.soundindex ("chick/chkdeth1.wav");
  544. sound_death2 = gi.soundindex ("chick/chkdeth2.wav");
  545. sound_fall_down = gi.soundindex ("chick/chkfall1.wav");
  546. sound_idle1 = gi.soundindex ("chick/chkidle1.wav");
  547. sound_idle2 = gi.soundindex ("chick/chkidle2.wav");
  548. sound_pain1 = gi.soundindex ("chick/chkpain1.wav");
  549. sound_pain2 = gi.soundindex ("chick/chkpain2.wav");
  550. sound_pain3 = gi.soundindex ("chick/chkpain3.wav");
  551. sound_sight = gi.soundindex ("chick/chksght1.wav");
  552. sound_search = gi.soundindex ("chick/chksrch1.wav");
  553. self->movetype = MOVETYPE_STEP;
  554. self->solid = SOLID_BBOX;
  555. self->s.modelindex = gi.modelindex ("models/monsters/bitch/tris.md2");
  556. VectorSet (self->mins, -16, -16, 0);
  557. VectorSet (self->maxs, 16, 16, 56);
  558. self->health = 175;
  559. self->gib_health = -70;
  560. self->mass = 200;
  561. self->pain = chick_pain;
  562. self->die = chick_die;
  563. self->monsterinfo.stand = chick_stand;
  564. self->monsterinfo.walk = chick_walk;
  565. self->monsterinfo.run = chick_run;
  566. self->monsterinfo.dodge = chick_dodge;
  567. self->monsterinfo.attack = chick_attack;
  568. self->monsterinfo.melee = chick_melee;
  569. self->monsterinfo.sight = chick_sight;
  570. gi.linkentity (self);
  571. self->monsterinfo.currentmove = &chick_move_stand;
  572. self->monsterinfo.scale = MODEL_SCALE;
  573. walkmonster_start (self);
  574. }
  575. /*QUAKED monster_chick_heat (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
  576. */
  577. void SP_monster_chick_heat (edict_t *self)
  578. {
  579. SP_monster_chick (self);
  580. self->s.skinnum = 3;
  581. }