home *** CD-ROM | disk | FTP | other *** search
/ Gambler 19 / GAMBLERCD19.BIN / UTILS / 3D / BRONIE / DUAL_LAU.ZIP / src / m_chick.c < prev    next >
C/C++ Source or Header  |  1997-11-21  |  15KB  |  655 lines

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