1 /*
2  * Copyright (C) 1997-2001 Id Software, Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 2 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59
17  * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18  *
19  */
20 
21 /*
22  *
23  * ============================================================================
24  * ==
25  *
26  * chick
27  *
28  * =====
29  * ========================================================================
30  */
31 
32 #include "g_local.h"
33 #include "m_chick.h"
34 
35 qboolean	visible(edict_t * self, edict_t * other);
36 
37 void		chick_stand(edict_t * self);
38 void		chick_run (edict_t * self);
39 void		chick_reslash(edict_t * self);
40 void		chick_rerocket(edict_t * self);
41 void		chick_attack1(edict_t * self);
42 
43 static int	sound_missile_prelaunch;
44 static int	sound_missile_launch;
45 static int	sound_melee_swing;
46 static int	sound_melee_hit;
47 static int	sound_missile_reload;
48 static int	sound_death1;
49 static int	sound_death2;
50 static int	sound_fall_down;
51 static int	sound_idle1;
52 static int	sound_idle2;
53 static int	sound_pain1;
54 static int	sound_pain2;
55 static int	sound_pain3;
56 static int	sound_sight;
57 static int	sound_search;
58 
59 
60 void
ChickMoan(edict_t * self)61 ChickMoan(edict_t * self)
62 {
63 	if (random() < 0.5)
64 		gi.sound(self, CHAN_VOICE, sound_idle1, 1, ATTN_IDLE, 0);
65 	else
66 		gi.sound(self, CHAN_VOICE, sound_idle2, 1, ATTN_IDLE, 0);
67 }
68 
69 mframe_t	chick_frames_fidget[] =
70 {
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, ChickMoan},
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 	{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 };
102 mmove_t		chick_move_fidget = {FRAME_stand201, FRAME_stand230, chick_frames_fidget, chick_stand};
103 
104 void
chick_fidget(edict_t * self)105 chick_fidget(edict_t * self)
106 {
107 	if (self->monsterinfo.aiflags & AI_STAND_GROUND)
108 		return;
109 	if (random() <= 0.3)
110 		self->monsterinfo.currentmove = &chick_move_fidget;
111 }
112 
113 mframe_t	chick_frames_stand[] =
114 {
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, NULL},
123 	{ai_stand, 0, NULL},
124 	{ai_stand, 0, NULL},
125 	{ai_stand, 0, NULL},
126 	{ai_stand, 0, NULL},
127 	{ai_stand, 0, NULL},
128 	{ai_stand, 0, NULL},
129 	{ai_stand, 0, NULL},
130 	{ai_stand, 0, NULL},
131 	{ai_stand, 0, NULL},
132 	{ai_stand, 0, NULL},
133 	{ai_stand, 0, NULL},
134 	{ai_stand, 0, NULL},
135 	{ai_stand, 0, NULL},
136 	{ai_stand, 0, NULL},
137 	{ai_stand, 0, NULL},
138 	{ai_stand, 0, NULL},
139 	{ai_stand, 0, NULL},
140 	{ai_stand, 0, NULL},
141 	{ai_stand, 0, NULL},
142 	{ai_stand, 0, NULL},
143 	{ai_stand, 0, NULL},
144 	{ai_stand, 0, chick_fidget},
145 
146 };
147 mmove_t		chick_move_stand = {FRAME_stand101, FRAME_stand130, chick_frames_stand, NULL};
148 
149 void
chick_stand(edict_t * self)150 chick_stand(edict_t * self)
151 {
152 	self->monsterinfo.currentmove = &chick_move_stand;
153 }
154 
155 mframe_t	chick_frames_start_run[] =
156 {
157 	{ai_run, 1, NULL},
158 	{ai_run, 0, NULL},
159 	{ai_run, 0, NULL},
160 	{ai_run, -1, NULL},
161 	{ai_run, -1, NULL},
162 	{ai_run, 0, NULL},
163 	{ai_run, 1, NULL},
164 	{ai_run, 3, NULL},
165 	{ai_run, 6, NULL},
166 	{ai_run, 3, NULL}
167 };
168 mmove_t		chick_move_start_run = {FRAME_walk01, FRAME_walk10, chick_frames_start_run, chick_run};
169 
170 mframe_t	chick_frames_run[] =
171 {
172 	{ai_run, 6, NULL},
173 	{ai_run, 8, NULL},
174 	{ai_run, 13, NULL},
175 	{ai_run, 5, NULL},
176 	{ai_run, 7, NULL},
177 	{ai_run, 4, NULL},
178 	{ai_run, 11, NULL},
179 	{ai_run, 5, NULL},
180 	{ai_run, 9, NULL},
181 	{ai_run, 7, NULL}
182 
183 };
184 
185 mmove_t		chick_move_run = {FRAME_walk11, FRAME_walk20, chick_frames_run, NULL};
186 
187 mframe_t	chick_frames_walk[] =
188 {
189 	{ai_walk, 6, NULL},
190 	{ai_walk, 8, NULL},
191 	{ai_walk, 13, NULL},
192 	{ai_walk, 5, NULL},
193 	{ai_walk, 7, NULL},
194 	{ai_walk, 4, NULL},
195 	{ai_walk, 11, NULL},
196 	{ai_walk, 5, NULL},
197 	{ai_walk, 9, NULL},
198 	{ai_walk, 7, NULL}
199 };
200 
201 mmove_t		chick_move_walk = {FRAME_walk11, FRAME_walk20, chick_frames_walk, NULL};
202 
203 void
chick_walk(edict_t * self)204 chick_walk(edict_t * self)
205 {
206 	self->monsterinfo.currentmove = &chick_move_walk;
207 }
208 
209 void
chick_run(edict_t * self)210 chick_run(edict_t * self)
211 {
212 	if (self->monsterinfo.aiflags & AI_STAND_GROUND) {
213 		self->monsterinfo.currentmove = &chick_move_stand;
214 		return;
215 	}
216 	if (self->monsterinfo.currentmove == &chick_move_walk ||
217 	    self->monsterinfo.currentmove == &chick_move_start_run) {
218 		self->monsterinfo.currentmove = &chick_move_run;
219 	} else {
220 		self->monsterinfo.currentmove = &chick_move_start_run;
221 	}
222 }
223 
224 mframe_t	chick_frames_pain1[] =
225 {
226 	{ai_move, 0, NULL},
227 	{ai_move, 0, NULL},
228 	{ai_move, 0, NULL},
229 	{ai_move, 0, NULL},
230 	{ai_move, 0, NULL}
231 };
232 mmove_t		chick_move_pain1 = {FRAME_pain101, FRAME_pain105, chick_frames_pain1, chick_run};
233 
234 mframe_t	chick_frames_pain2[] =
235 {
236 	{ai_move, 0, NULL},
237 	{ai_move, 0, NULL},
238 	{ai_move, 0, NULL},
239 	{ai_move, 0, NULL},
240 	{ai_move, 0, NULL}
241 };
242 mmove_t		chick_move_pain2 = {FRAME_pain201, FRAME_pain205, chick_frames_pain2, chick_run};
243 
244 mframe_t	chick_frames_pain3[] =
245 {
246 	{ai_move, 0, NULL},
247 	{ai_move, 0, NULL},
248 	{ai_move, -6, NULL},
249 	{ai_move, 3, NULL},
250 	{ai_move, 11, NULL},
251 	{ai_move, 3, NULL},
252 	{ai_move, 0, NULL},
253 	{ai_move, 0, NULL},
254 	{ai_move, 4, NULL},
255 	{ai_move, 1, NULL},
256 	{ai_move, 0, NULL},
257 	{ai_move, -3, NULL},
258 	{ai_move, -4, NULL},
259 	{ai_move, 5, NULL},
260 	{ai_move, 7, NULL},
261 	{ai_move, -2, NULL},
262 	{ai_move, 3, NULL},
263 	{ai_move, -5, NULL},
264 	{ai_move, -2, NULL},
265 	{ai_move, -8, NULL},
266 	{ai_move, 2, NULL}
267 };
268 mmove_t		chick_move_pain3 = {FRAME_pain301, FRAME_pain321, chick_frames_pain3, chick_run};
269 
270 void
chick_pain(edict_t * self,edict_t * other,float kick,int damage)271 chick_pain(edict_t * self, edict_t * other, float kick, int damage)
272 {
273 	float		r;
274 
275 	if (self->health < (self->max_health / 2))
276 		self->s.skinnum = 1;
277 
278 	if (level.time < self->pain_debounce_time)
279 		return;
280 
281 	self->pain_debounce_time = level.time + 3;
282 
283 	r = random();
284 	if (r < 0.33)
285 		gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
286 	else if (r < 0.66)
287 		gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
288 	else
289 		gi.sound(self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0);
290 
291 	if (skill->value == 3)
292 		return;		/* no pain anims in nightmare */
293 
294 	if (damage <= 10)
295 		self->monsterinfo.currentmove = &chick_move_pain1;
296 	else if (damage <= 25)
297 		self->monsterinfo.currentmove = &chick_move_pain2;
298 	else
299 		self->monsterinfo.currentmove = &chick_move_pain3;
300 }
301 
302 void
chick_dead(edict_t * self)303 chick_dead(edict_t * self)
304 {
305 	VectorSet(self->mins, -16, -16, 0);
306 	VectorSet(self->maxs, 16, 16, 16);
307 	self->movetype = MOVETYPE_TOSS;
308 	self->svflags |= SVF_DEADMONSTER;
309 	self->nextthink = 0;
310 	gi.linkentity(self);
311 }
312 
313 mframe_t	chick_frames_death2[] =
314 {
315 	{ai_move, -6, NULL},
316 	{ai_move, 0, NULL},
317 	{ai_move, -1, NULL},
318 	{ai_move, -5, NULL},
319 	{ai_move, 0, NULL},
320 	{ai_move, -1, NULL},
321 	{ai_move, -2, NULL},
322 	{ai_move, 1, NULL},
323 	{ai_move, 10, NULL},
324 	{ai_move, 2, NULL},
325 	{ai_move, 3, NULL},
326 	{ai_move, 1, NULL},
327 	{ai_move, 2, NULL},
328 	{ai_move, 0, NULL},
329 	{ai_move, 3, NULL},
330 	{ai_move, 3, NULL},
331 	{ai_move, 1, NULL},
332 	{ai_move, -3, NULL},
333 	{ai_move, -5, NULL},
334 	{ai_move, 4, NULL},
335 	{ai_move, 15, NULL},
336 	{ai_move, 14, NULL},
337 	{ai_move, 1, NULL}
338 };
339 mmove_t		chick_move_death2 = {FRAME_death201, FRAME_death223, chick_frames_death2, chick_dead};
340 
341 mframe_t	chick_frames_death1[] =
342 {
343 	{ai_move, 0, NULL},
344 	{ai_move, 0, NULL},
345 	{ai_move, -7, NULL},
346 	{ai_move, 4, NULL},
347 	{ai_move, 11, NULL},
348 	{ai_move, 0, NULL},
349 	{ai_move, 0, NULL},
350 	{ai_move, 0, NULL},
351 	{ai_move, 0, NULL},
352 	{ai_move, 0, NULL},
353 	{ai_move, 0, NULL},
354 	{ai_move, 0, NULL}
355 
356 };
357 mmove_t		chick_move_death1 = {FRAME_death101, FRAME_death112, chick_frames_death1, chick_dead};
358 
359 void
chick_die(edict_t * self,edict_t * inflictor,edict_t * attacker,int damage,vec3_t point)360 chick_die(edict_t * self, edict_t * inflictor, edict_t * attacker, int damage, vec3_t point)
361 {
362 	int		n;
363 
364 	/* check for gib */
365 	if (self->health <= self->gib_health) {
366 		gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
367 		for (n = 0; n < 2; n++)
368 			ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
369 		for (n = 0; n < 4; n++)
370 			ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
371 		ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
372 		self->deadflag = DEAD_DEAD;
373 		return;
374 	}
375 	if (self->deadflag == DEAD_DEAD)
376 		return;
377 
378 	/* regular death */
379 	self->deadflag = DEAD_DEAD;
380 	self->takedamage = DAMAGE_YES;
381 
382 	n = rand() % 2;
383 	if (n == 0) {
384 		self->monsterinfo.currentmove = &chick_move_death1;
385 		gi.sound(self, CHAN_VOICE, sound_death1, 1, ATTN_NORM, 0);
386 	} else {
387 		self->monsterinfo.currentmove = &chick_move_death2;
388 		gi.sound(self, CHAN_VOICE, sound_death2, 1, ATTN_NORM, 0);
389 	}
390 }
391 
392 
393 void
chick_duck_down(edict_t * self)394 chick_duck_down(edict_t * self)
395 {
396 	if (self->monsterinfo.aiflags & AI_DUCKED)
397 		return;
398 	self->monsterinfo.aiflags |= AI_DUCKED;
399 	self->maxs[2] -= 32;
400 	self->takedamage = DAMAGE_YES;
401 	self->monsterinfo.pausetime = level.time + 1;
402 	gi.linkentity(self);
403 }
404 
405 void
chick_duck_hold(edict_t * self)406 chick_duck_hold(edict_t * self)
407 {
408 	if (level.time >= self->monsterinfo.pausetime)
409 		self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
410 	else
411 		self->monsterinfo.aiflags |= AI_HOLD_FRAME;
412 }
413 
414 void
chick_duck_up(edict_t * self)415 chick_duck_up(edict_t * self)
416 {
417 	self->monsterinfo.aiflags &= ~AI_DUCKED;
418 	self->maxs[2] += 32;
419 	self->takedamage = DAMAGE_AIM;
420 	gi.linkentity(self);
421 }
422 
423 mframe_t	chick_frames_duck[] =
424 {
425 	{ai_move, 0, chick_duck_down},
426 	{ai_move, 1, NULL},
427 	{ai_move, 4, chick_duck_hold},
428 	{ai_move, -4, NULL},
429 	{ai_move, -5, chick_duck_up},
430 	{ai_move, 3, NULL},
431 	{ai_move, 1, NULL}
432 };
433 mmove_t		chick_move_duck = {FRAME_duck01, FRAME_duck07, chick_frames_duck, chick_run};
434 
435 void
chick_dodge(edict_t * self,edict_t * attacker,float eta)436 chick_dodge(edict_t * self, edict_t * attacker, float eta)
437 {
438 	if (random() > 0.25)
439 		return;
440 
441 	if (!self->enemy)
442 		self->enemy = attacker;
443 
444 	self->monsterinfo.currentmove = &chick_move_duck;
445 }
446 
447 void
ChickSlash(edict_t * self)448 ChickSlash(edict_t * self)
449 {
450 	vec3_t		aim;
451 
452 	VectorSet(aim, MELEE_DISTANCE, self->mins[0], 10);
453 	gi.sound(self, CHAN_WEAPON, sound_melee_swing, 1, ATTN_NORM, 0);
454 	fire_hit(self, aim, (10 + (rand() % 6)), 100);
455 }
456 
457 
458 void
ChickRocket(edict_t * self)459 ChickRocket(edict_t * self)
460 {
461 	vec3_t		forward, right;
462 	vec3_t		start;
463 	vec3_t		dir;
464 	vec3_t		vec;
465 
466 	AngleVectors(self->s.angles, forward, right, NULL);
467 	G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_CHICK_ROCKET_1], forward, right, start);
468 
469 	VectorCopy(self->enemy->s.origin, vec);
470 	vec[2] += self->enemy->viewheight;
471 	VectorSubtract(vec, start, dir);
472 	VectorNormalize(dir);
473 
474 	monster_fire_rocket(self, start, dir, 50, 500, MZ2_CHICK_ROCKET_1);
475 }
476 
477 void
Chick_PreAttack1(edict_t * self)478 Chick_PreAttack1(edict_t * self)
479 {
480 	gi.sound(self, CHAN_VOICE, sound_missile_prelaunch, 1, ATTN_NORM, 0);
481 }
482 
483 void
ChickReload(edict_t * self)484 ChickReload(edict_t * self)
485 {
486 	gi.sound(self, CHAN_VOICE, sound_missile_reload, 1, ATTN_NORM, 0);
487 }
488 
489 
490 mframe_t	chick_frames_start_attack1[] =
491 {
492 	{ai_charge, 0, Chick_PreAttack1},
493 	{ai_charge, 0, NULL},
494 	{ai_charge, 0, NULL},
495 	{ai_charge, 4, NULL},
496 	{ai_charge, 0, NULL},
497 	{ai_charge, -3, NULL},
498 	{ai_charge, 3, NULL},
499 	{ai_charge, 5, NULL},
500 	{ai_charge, 7, NULL},
501 	{ai_charge, 0, NULL},
502 	{ai_charge, 0, NULL},
503 	{ai_charge, 0, NULL},
504 	{ai_charge, 0, chick_attack1}
505 };
506 mmove_t		chick_move_start_attack1 = {FRAME_attak101, FRAME_attak113, chick_frames_start_attack1, NULL};
507 
508 
509 mframe_t	chick_frames_attack1[] =
510 {
511 	{ai_charge, 19, ChickRocket},
512 	{ai_charge, -6, NULL},
513 	{ai_charge, -5, NULL},
514 	{ai_charge, -2, NULL},
515 	{ai_charge, -7, NULL},
516 	{ai_charge, 0, NULL},
517 	{ai_charge, 1, NULL},
518 	{ai_charge, 10, ChickReload},
519 	{ai_charge, 4, NULL},
520 	{ai_charge, 5, NULL},
521 	{ai_charge, 6, NULL},
522 	{ai_charge, 6, NULL},
523 	{ai_charge, 4, NULL},
524 	{ai_charge, 3, chick_rerocket}
525 
526 };
527 mmove_t		chick_move_attack1 = {FRAME_attak114, FRAME_attak127, chick_frames_attack1, NULL};
528 
529 mframe_t	chick_frames_end_attack1[] =
530 {
531 	{ai_charge, -3, NULL},
532 	{ai_charge, 0, NULL},
533 	{ai_charge, -6, NULL},
534 	{ai_charge, -4, NULL},
535 	{ai_charge, -2, NULL}
536 };
537 mmove_t		chick_move_end_attack1 = {FRAME_attak128, FRAME_attak132, chick_frames_end_attack1, chick_run};
538 
539 void
chick_rerocket(edict_t * self)540 chick_rerocket(edict_t * self)
541 {
542 	if (self->enemy->health > 0) {
543 		if (range(self, self->enemy) > RANGE_MELEE)
544 			if (visible(self, self->enemy))
545 				if (random() <= 0.6) {
546 					self->monsterinfo.currentmove = &chick_move_attack1;
547 					return;
548 				}
549 	}
550 	self->monsterinfo.currentmove = &chick_move_end_attack1;
551 }
552 
553 void
chick_attack1(edict_t * self)554 chick_attack1(edict_t * self)
555 {
556 	self->monsterinfo.currentmove = &chick_move_attack1;
557 }
558 
559 mframe_t	chick_frames_slash[] =
560 {
561 	{ai_charge, 1, NULL},
562 	{ai_charge, 7, ChickSlash},
563 	{ai_charge, -7, NULL},
564 	{ai_charge, 1, NULL},
565 	{ai_charge, -1, NULL},
566 	{ai_charge, 1, NULL},
567 	{ai_charge, 0, NULL},
568 	{ai_charge, 1, NULL},
569 	{ai_charge, -2, chick_reslash}
570 };
571 mmove_t		chick_move_slash = {FRAME_attak204, FRAME_attak212, chick_frames_slash, NULL};
572 
573 mframe_t	chick_frames_end_slash[] =
574 {
575 	{ai_charge, -6, NULL},
576 	{ai_charge, -1, NULL},
577 	{ai_charge, -6, NULL},
578 	{ai_charge, 0, NULL}
579 };
580 mmove_t		chick_move_end_slash = {FRAME_attak213, FRAME_attak216, chick_frames_end_slash, chick_run};
581 
582 
583 void
chick_reslash(edict_t * self)584 chick_reslash(edict_t * self)
585 {
586 	if (self->enemy->health > 0) {
587 		if (range(self, self->enemy) == RANGE_MELEE) {
588 			if (random() <= 0.9) {
589 				self->monsterinfo.currentmove = &chick_move_slash;
590 				return;
591 			} else {
592 				self->monsterinfo.currentmove = &chick_move_end_slash;
593 				return;
594 			}
595 		}
596 	}
597 	self->monsterinfo.currentmove = &chick_move_end_slash;
598 }
599 
600 void
chick_slash(edict_t * self)601 chick_slash(edict_t * self)
602 {
603 	self->monsterinfo.currentmove = &chick_move_slash;
604 }
605 
606 
607 mframe_t	chick_frames_start_slash[] =
608 {
609 	{ai_charge, 1, NULL},
610 	{ai_charge, 8, NULL},
611 	{ai_charge, 3, NULL}
612 };
613 mmove_t		chick_move_start_slash = {FRAME_attak201, FRAME_attak203, chick_frames_start_slash, chick_slash};
614 
615 
616 
617 void
chick_melee(edict_t * self)618 chick_melee(edict_t * self)
619 {
620 	self->monsterinfo.currentmove = &chick_move_start_slash;
621 }
622 
623 
624 void
chick_attack(edict_t * self)625 chick_attack(edict_t * self)
626 {
627 	self->monsterinfo.currentmove = &chick_move_start_attack1;
628 }
629 
630 void
chick_sight(edict_t * self,edict_t * other)631 chick_sight(edict_t * self, edict_t * other)
632 {
633 	gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
634 }
635 
636 /*
637  * QUAKED monster_chick (1 .5 0) (-16 -16 -24) (16 16 32) Ambush
638  * Trigger_Spawn Sight
639  */
640 void
SP_monster_chick(edict_t * self)641 SP_monster_chick(edict_t * self)
642 {
643 	if (deathmatch->value) {
644 		G_FreeEdict(self);
645 		return;
646 	}
647 	sound_missile_prelaunch = gi.soundindex("chick/chkatck1.wav");
648 	sound_missile_launch = gi.soundindex("chick/chkatck2.wav");
649 	sound_melee_swing = gi.soundindex("chick/chkatck3.wav");
650 	sound_melee_hit = gi.soundindex("chick/chkatck4.wav");
651 	sound_missile_reload = gi.soundindex("chick/chkatck5.wav");
652 	sound_death1 = gi.soundindex("chick/chkdeth1.wav");
653 	sound_death2 = gi.soundindex("chick/chkdeth2.wav");
654 	sound_fall_down = gi.soundindex("chick/chkfall1.wav");
655 	sound_idle1 = gi.soundindex("chick/chkidle1.wav");
656 	sound_idle2 = gi.soundindex("chick/chkidle2.wav");
657 	sound_pain1 = gi.soundindex("chick/chkpain1.wav");
658 	sound_pain2 = gi.soundindex("chick/chkpain2.wav");
659 	sound_pain3 = gi.soundindex("chick/chkpain3.wav");
660 	sound_sight = gi.soundindex("chick/chksght1.wav");
661 	sound_search = gi.soundindex("chick/chksrch1.wav");
662 
663 	self->movetype = MOVETYPE_STEP;
664 	self->solid = SOLID_BBOX;
665 	self->s.modelindex = gi.modelindex("models/monsters/bitch/tris.md2");
666 	VectorSet(self->mins, -16, -16, 0);
667 	VectorSet(self->maxs, 16, 16, 56);
668 
669 	self->health = 175;
670 	self->gib_health = -70;
671 	self->mass = 200;
672 
673 	self->pain = chick_pain;
674 	self->die = chick_die;
675 
676 	self->monsterinfo.stand = chick_stand;
677 	self->monsterinfo.walk = chick_walk;
678 	self->monsterinfo.run = chick_run;
679 	self->monsterinfo.dodge = chick_dodge;
680 	self->monsterinfo.attack = chick_attack;
681 	self->monsterinfo.melee = chick_melee;
682 	self->monsterinfo.sight = chick_sight;
683 
684 	gi.linkentity(self);
685 
686 	self->monsterinfo.currentmove = &chick_move_stand;
687 	self->monsterinfo.scale = MODEL_SCALE;
688 
689 	walkmonster_start(self);
690 }
691