m_chick.c 16 KB

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