1 /*
2 ==============================================================================
3 
4 parasite
5 
6 ==============================================================================
7 */
8 
9 #include "g_local.h"
10 #include "m_parasite.h"
11 
12 
13 static int	sound_pain1;
14 static int	sound_pain2;
15 static int	sound_die;
16 static int	sound_launch;
17 static int	sound_impact;
18 static int	sound_suck;
19 static int	sound_reelin;
20 static int	sound_sight;
21 static int	sound_tap;
22 static int	sound_scratch;
23 static int	sound_search;
24 
25 
26 void parasite_stand (edict_t *self);
27 void parasite_start_run (edict_t *self);
28 void parasite_run (edict_t *self);
29 void parasite_walk (edict_t *self);
30 void parasite_start_walk (edict_t *self);
31 void parasite_end_fidget (edict_t *self);
32 void parasite_do_fidget (edict_t *self);
33 void parasite_refidget (edict_t *self);
34 
35 
parasite_launch(edict_t * self)36 void parasite_launch (edict_t *self)
37 {
38 	gi.sound (self, CHAN_WEAPON, sound_launch, 1, ATTN_NORM, 0);
39 }
40 
parasite_reel_in(edict_t * self)41 void parasite_reel_in (edict_t *self)
42 {
43 	gi.sound (self, CHAN_WEAPON, sound_reelin, 1, ATTN_NORM, 0);
44 }
45 
parasite_sight(edict_t * self,edict_t * other)46 void parasite_sight (edict_t *self, edict_t *other)
47 {
48 	gi.sound (self, CHAN_WEAPON, sound_sight, 1, ATTN_NORM, 0);
49 }
50 
parasite_tap(edict_t * self)51 void parasite_tap (edict_t *self)
52 {
53 	gi.sound (self, CHAN_WEAPON, sound_tap, 1, ATTN_IDLE, 0);
54 }
55 
parasite_scratch(edict_t * self)56 void parasite_scratch (edict_t *self)
57 {
58 	gi.sound (self, CHAN_WEAPON, sound_scratch, 1, ATTN_IDLE, 0);
59 }
60 
parasite_search(edict_t * self)61 void parasite_search (edict_t *self)
62 {
63 	gi.sound (self, CHAN_WEAPON, sound_search, 1, ATTN_IDLE, 0);
64 }
65 
66 
67 mframe_t parasite_frames_start_fidget [] =
68 {
69 	ai_stand, 0, NULL,
70 	ai_stand, 0, NULL,
71 	ai_stand, 0, NULL,
72 	ai_stand, 0, NULL
73 };
74 mmove_t parasite_move_start_fidget = {FRAME_stand18, FRAME_stand21, parasite_frames_start_fidget, parasite_do_fidget};
75 
76 mframe_t parasite_frames_fidget [] =
77 {
78 	ai_stand, 0, parasite_scratch,
79 	ai_stand, 0, NULL,
80 	ai_stand, 0, NULL,
81 	ai_stand, 0, parasite_scratch,
82 	ai_stand, 0, NULL,
83 	ai_stand, 0, NULL
84 };
85 mmove_t parasite_move_fidget = {FRAME_stand22, FRAME_stand27, parasite_frames_fidget, parasite_refidget};
86 
87 mframe_t parasite_frames_end_fidget [] =
88 {
89 	ai_stand, 0, parasite_scratch,
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 };
98 mmove_t parasite_move_end_fidget = {FRAME_stand28, FRAME_stand35, parasite_frames_end_fidget, parasite_stand};
99 
parasite_end_fidget(edict_t * self)100 void parasite_end_fidget (edict_t *self)
101 {
102 	self->monsterinfo.currentmove = &parasite_move_end_fidget;
103 }
104 
parasite_do_fidget(edict_t * self)105 void parasite_do_fidget (edict_t *self)
106 {
107 	self->monsterinfo.currentmove = &parasite_move_fidget;
108 }
109 
parasite_refidget(edict_t * self)110 void parasite_refidget (edict_t *self)
111 {
112 	if (random() <= 0.8)
113 		self->monsterinfo.currentmove = &parasite_move_fidget;
114 	else
115 		self->monsterinfo.currentmove = &parasite_move_end_fidget;
116 }
117 
parasite_idle(edict_t * self)118 void parasite_idle (edict_t *self)
119 {
120 	self->monsterinfo.currentmove = &parasite_move_start_fidget;
121 }
122 
123 
124 mframe_t parasite_frames_stand [] =
125 {
126 	ai_stand, 0, NULL,
127 	ai_stand, 0, NULL,
128 	ai_stand, 0, parasite_tap,
129 	ai_stand, 0, NULL,
130 	ai_stand, 0, parasite_tap,
131 	ai_stand, 0, NULL,
132 	ai_stand, 0, NULL,
133 	ai_stand, 0, NULL,
134 	ai_stand, 0, parasite_tap,
135 	ai_stand, 0, NULL,
136 	ai_stand, 0, parasite_tap,
137 	ai_stand, 0, NULL,
138 	ai_stand, 0, NULL,
139 	ai_stand, 0, NULL,
140 	ai_stand, 0, parasite_tap,
141 	ai_stand, 0, NULL,
142 	ai_stand, 0, parasite_tap
143 };
144 mmove_t	parasite_move_stand = {FRAME_stand01, FRAME_stand17, parasite_frames_stand, parasite_stand};
145 
parasite_stand(edict_t * self)146 void parasite_stand (edict_t *self)
147 {
148 	self->monsterinfo.currentmove = &parasite_move_stand;
149 }
150 
151 
152 mframe_t parasite_frames_run [] =
153 {
154 	ai_run, 30, NULL,
155 	ai_run, 30, NULL,
156 	ai_run, 22, NULL,
157 	ai_run, 19, NULL,
158 	ai_run, 24, NULL,
159 	ai_run, 28, NULL,
160 	ai_run, 25, NULL
161 };
162 mmove_t parasite_move_run = {FRAME_run03, FRAME_run09, parasite_frames_run, NULL};
163 
164 mframe_t parasite_frames_start_run [] =
165 {
166 	ai_run, 0,	NULL,
167 	ai_run, 30, NULL,
168 };
169 mmove_t parasite_move_start_run = {FRAME_run01, FRAME_run02, parasite_frames_start_run, parasite_run};
170 
171 mframe_t parasite_frames_stop_run [] =
172 {
173 	ai_run, 20, NULL,
174 	ai_run, 20,	NULL,
175 	ai_run, 12, NULL,
176 	ai_run, 10, NULL,
177 	ai_run, 0,  NULL,
178 	ai_run, 0,  NULL
179 };
180 mmove_t parasite_move_stop_run = {FRAME_run10, FRAME_run15, parasite_frames_stop_run, NULL};
181 
parasite_start_run(edict_t * self)182 void parasite_start_run (edict_t *self)
183 {
184 	if (self->monsterinfo.aiflags & AI_STAND_GROUND)
185 		self->monsterinfo.currentmove = &parasite_move_stand;
186 	else
187 		self->monsterinfo.currentmove = &parasite_move_start_run;
188 }
189 
parasite_run(edict_t * self)190 void parasite_run (edict_t *self)
191 {
192 	if (self->monsterinfo.aiflags & AI_STAND_GROUND)
193 		self->monsterinfo.currentmove = &parasite_move_stand;
194 	else
195 		self->monsterinfo.currentmove = &parasite_move_run;
196 }
197 
198 
199 mframe_t parasite_frames_walk [] =
200 {
201 	ai_walk, 30, NULL,
202 	ai_walk, 30, NULL,
203 	ai_walk, 22, NULL,
204 	ai_walk, 19, NULL,
205 	ai_walk, 24, NULL,
206 	ai_walk, 28, NULL,
207 	ai_walk, 25, NULL
208 };
209 mmove_t parasite_move_walk = {FRAME_run03, FRAME_run09, parasite_frames_walk, parasite_walk};
210 
211 mframe_t parasite_frames_start_walk [] =
212 {
213 	ai_walk, 0,	NULL,
214 	ai_walk, 30, parasite_walk
215 };
216 mmove_t parasite_move_start_walk = {FRAME_run01, FRAME_run02, parasite_frames_start_walk, NULL};
217 
218 mframe_t parasite_frames_stop_walk [] =
219 {
220 	ai_walk, 20, NULL,
221 	ai_walk, 20,	NULL,
222 	ai_walk, 12, NULL,
223 	ai_walk, 10, NULL,
224 	ai_walk, 0,  NULL,
225 	ai_walk, 0,  NULL
226 };
227 mmove_t parasite_move_stop_walk = {FRAME_run10, FRAME_run15, parasite_frames_stop_walk, NULL};
228 
parasite_start_walk(edict_t * self)229 void parasite_start_walk (edict_t *self)
230 {
231 	self->monsterinfo.currentmove = &parasite_move_start_walk;
232 }
233 
parasite_walk(edict_t * self)234 void parasite_walk (edict_t *self)
235 {
236 	self->monsterinfo.currentmove = &parasite_move_walk;
237 }
238 
239 
240 mframe_t parasite_frames_pain1 [] =
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, 6,	NULL,
249 	ai_move, 16, NULL,
250 	ai_move, -6, NULL,
251 	ai_move, -7, NULL,
252 	ai_move, 0, NULL
253 };
254 mmove_t parasite_move_pain1 = {FRAME_pain101, FRAME_pain111, parasite_frames_pain1, parasite_start_run};
255 
parasite_pain(edict_t * self,edict_t * other,float kick,int damage)256 void parasite_pain (edict_t *self, edict_t *other, float kick, int damage)
257 {
258 	if (self->health < (self->max_health / 2))
259 		self->s.skinnum = 1;
260 
261 	if (level.time < self->pain_debounce_time)
262 		return;
263 
264 	self->pain_debounce_time = level.time + 3;
265 
266 	if (skill->value == 3)
267 		return;		// no pain anims in nightmare
268 
269 	if (random() < 0.5)
270 		gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
271 	else
272 		gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
273 
274 	self->monsterinfo.currentmove = &parasite_move_pain1;
275 }
276 
277 
278 //static qboolean parasite_drain_attack_ok (vec3_t start, vec3_t end)
parasite_drain_attack_ok(vec3_t start,vec3_t end)279 qboolean parasite_drain_attack_ok (vec3_t start, vec3_t end)
280 {
281 	vec3_t	dir, angles;
282 
283 	// check for max distance
284 	VectorSubtract (start, end, dir);
285 	if (VectorLength(dir) > 256)
286 		return false;
287 
288 	// check for min/max pitch
289 	vectoangles (dir, angles);
290 	if (angles[0] < -180)
291 		angles[0] += 360;
292 	if (fabs(angles[0]) > 30)
293 		return false;
294 
295 	return true;
296 }
297 
parasite_drain_attack(edict_t * self)298 void parasite_drain_attack (edict_t *self)
299 {
300 	vec3_t	offset, start, f, r, end, dir;
301 	trace_t	tr;
302 	int damage;
303 
304 	AngleVectors (self->s.angles, f, r, NULL);
305 	VectorSet (offset, 24, 0, 6);
306 	G_ProjectSource (self->s.origin, offset, f, r, start);
307 
308 	VectorCopy (self->enemy->s.origin, end);
309 	if (!parasite_drain_attack_ok(start, end))
310 	{
311 		end[2] = self->enemy->s.origin[2] + self->enemy->maxs[2] - 8;
312 		if (!parasite_drain_attack_ok(start, end))
313 		{
314 			end[2] = self->enemy->s.origin[2] + self->enemy->mins[2] + 8;
315 			if (!parasite_drain_attack_ok(start, end))
316 				return;
317 		}
318 	}
319 	VectorCopy (self->enemy->s.origin, end);
320 
321 	tr = gi.trace (start, NULL, NULL, end, self, MASK_SHOT);
322 	if (tr.ent != self->enemy)
323 		return;
324 
325 	if (self->s.frame == FRAME_drain03)
326 	{
327 		damage = 5;
328 		gi.sound (self->enemy, CHAN_AUTO, sound_impact, 1, ATTN_NORM, 0);
329 	}
330 	else
331 	{
332 		if (self->s.frame == FRAME_drain04)
333 			gi.sound (self, CHAN_WEAPON, sound_suck, 1, ATTN_NORM, 0);
334 		damage = 2;
335 	}
336 
337 	gi.WriteByte (svc_temp_entity);
338 	gi.WriteByte (TE_PARASITE_ATTACK);
339 	gi.WriteShort (self - g_edicts);
340 	gi.WritePosition (start);
341 	gi.WritePosition (end);
342 	gi.multicast (self->s.origin, MULTICAST_PVS);
343 
344 	VectorSubtract (start, end, dir);
345 	T_Damage (self->enemy, self, self, dir, self->enemy->s.origin, vec3_origin, damage, 0, DAMAGE_NO_KNOCKBACK, MOD_UNKNOWN);
346 }
347 
348 mframe_t parasite_frames_drain [] =
349 {
350 	ai_charge, 0,	parasite_launch,
351 	ai_charge, 0,	NULL,
352 	ai_charge, 15,	parasite_drain_attack,			// Target hits
353 	ai_charge, 0,	parasite_drain_attack,			// drain
354 	ai_charge, 0,	parasite_drain_attack,			// drain
355 	ai_charge, 0,	parasite_drain_attack,			// drain
356 	ai_charge, 0,	parasite_drain_attack,			// drain
357 	ai_charge, -2,  parasite_drain_attack,			// drain
358 	ai_charge, -2,	parasite_drain_attack,			// drain
359 	ai_charge, -3,	parasite_drain_attack,			// drain
360 	ai_charge, -2,	parasite_drain_attack,			// drain
361 	ai_charge, 0,	parasite_drain_attack,			// drain
362 	ai_charge, -1,  parasite_drain_attack,			// drain
363 	ai_charge, 0,	parasite_reel_in,				// let go
364 	ai_charge, -2,	NULL,
365 	ai_charge, -2,	NULL,
366 	ai_charge, -3,	NULL,
367 	ai_charge, 0,	NULL
368 };
369 mmove_t parasite_move_drain = {FRAME_drain01, FRAME_drain18, parasite_frames_drain, parasite_start_run};
370 
371 
372 mframe_t parasite_frames_break [] =
373 {
374 	ai_charge, 0,	NULL,
375 	ai_charge, -3,	NULL,
376 	ai_charge, 1,	NULL,
377 	ai_charge, 2,	NULL,
378 	ai_charge, -3,	NULL,
379 	ai_charge, 1,	NULL,
380 	ai_charge, 1,	NULL,
381 	ai_charge, 3,	NULL,
382 	ai_charge, 0,	NULL,
383 	ai_charge, -18,	NULL,
384 	ai_charge, 3,	NULL,
385 	ai_charge, 9,	NULL,
386 	ai_charge, 6,	NULL,
387 	ai_charge, 0,	NULL,
388 	ai_charge, -18,	NULL,
389 	ai_charge, 0,	NULL,
390 	ai_charge, 8,	NULL,
391 	ai_charge, 9,	NULL,
392 	ai_charge, 0,	NULL,
393 	ai_charge, -18,	NULL,
394 	ai_charge, 0,	NULL,
395 	ai_charge, 0,	NULL,		// airborne
396 	ai_charge, 0,	NULL,		// airborne
397 	ai_charge, 0,	NULL,		// slides
398 	ai_charge, 0,	NULL,		// slides
399 	ai_charge, 0,	NULL,		// slides
400 	ai_charge, 0,	NULL,		// slides
401 	ai_charge, 4,	NULL,
402 	ai_charge, 11,	NULL,
403 	ai_charge, -2,	NULL,
404 	ai_charge, -5,	NULL,
405 	ai_charge, 1,	NULL
406 };
407 mmove_t parasite_move_break = {FRAME_break01, FRAME_break32, parasite_frames_break, parasite_start_run};
408 
409 /*
410 ===
411 Break Stuff Ends
412 ===
413 */
414 
parasite_attack(edict_t * self)415 void parasite_attack (edict_t *self)
416 {
417 //	if (random() <= 0.2)
418 //		self->monsterinfo.currentmove = &parasite_move_break;
419 //	else
420 		self->monsterinfo.currentmove = &parasite_move_drain;
421 }
422 
423 
424 //================
425 //ROGUE
parasite_jump_down(edict_t * self)426 void parasite_jump_down (edict_t *self)
427 {
428 	vec3_t	forward,up;
429 
430 	monster_jump_start (self);
431 
432 	AngleVectors (self->s.angles, forward, NULL, up);
433 	VectorMA(self->velocity, 100, forward, self->velocity);
434 	VectorMA(self->velocity, 300, up, self->velocity);
435 }
436 
parasite_jump_up(edict_t * self)437 void parasite_jump_up (edict_t *self)
438 {
439 	vec3_t	forward,up;
440 
441 	monster_jump_start (self);
442 
443 	AngleVectors (self->s.angles, forward, NULL, up);
444 	VectorMA(self->velocity, 200, forward, self->velocity);
445 	VectorMA(self->velocity, 450, up, self->velocity);
446 }
447 
parasite_jump_wait_land(edict_t * self)448 void parasite_jump_wait_land (edict_t *self)
449 {
450 	if(self->groundentity == NULL)
451 	{
452 		self->monsterinfo.nextframe = self->s.frame;
453 
454 		if(monster_jump_finished (self))
455 			self->monsterinfo.nextframe = self->s.frame + 1;
456 	}
457 	else
458 		self->monsterinfo.nextframe = self->s.frame + 1;
459 }
460 
461 mframe_t parasite_frames_jump_up [] =
462 {
463 	ai_move, -8, NULL,
464 	ai_move, -8, NULL,
465 	ai_move, -8, NULL,
466 	ai_move, -8, parasite_jump_up,
467 	ai_move, 0, NULL,
468 	ai_move, 0, NULL,
469 	ai_move, 0, parasite_jump_wait_land,
470 	ai_move, 0, NULL
471 };
472 mmove_t parasite_move_jump_up = { FRAME_jump01, FRAME_jump08, parasite_frames_jump_up, parasite_run };
473 
474 mframe_t parasite_frames_jump_down [] =
475 {
476 	ai_move, 0, NULL,
477 	ai_move, 0, NULL,
478 	ai_move, 0, NULL,
479 	ai_move, 0, parasite_jump_down,
480 	ai_move, 0, NULL,
481 	ai_move, 0, NULL,
482 	ai_move, 0, parasite_jump_wait_land,
483 	ai_move, 0, NULL
484 };
485 mmove_t parasite_move_jump_down = { FRAME_jump01, FRAME_jump08, parasite_frames_jump_down, parasite_run };
486 
parasite_jump(edict_t * self)487 void parasite_jump (edict_t *self)
488 {
489 	if(!self->enemy)
490 		return;
491 
492 	if(self->enemy->s.origin[2] > self->s.origin[2])
493 		self->monsterinfo.currentmove = &parasite_move_jump_up;
494 	else
495 		self->monsterinfo.currentmove = &parasite_move_jump_down;
496 }
497 
498 /*
499 ===
500 Blocked
501 ===
502 */
parasite_blocked(edict_t * self,float dist)503 qboolean parasite_blocked (edict_t *self, float dist)
504 {
505 	if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
506 		return true;
507 
508 	if(blocked_checkjump (self, dist, 256, 68))
509 	{
510 		parasite_jump (self);
511 		return true;
512 	}
513 
514 	if(blocked_checkplat (self, dist))
515 		return true;
516 }
517 //ROGUE
518 //================
519 
520 
parasite_checkattack(edict_t * self)521 qboolean parasite_checkattack (edict_t *self)
522 {
523 	vec3_t	f, r, offset, start, end;
524 	trace_t	tr;
525 	qboolean retval;
526 
527 	retval = M_CheckAttack (self);
528 
529 	if (!retval)
530 		return false;
531 
532 	AngleVectors (self->s.angles, f, r, NULL);
533 	VectorSet (offset, 24, 0, 6);
534 	G_ProjectSource (self->s.origin, offset, f, r, start);
535 
536 	VectorCopy (self->enemy->s.origin, end);
537 	if (!parasite_drain_attack_ok(start, end))
538 	{
539 		end[2] = self->enemy->s.origin[2] + self->enemy->maxs[2] - 8;
540 		if (!parasite_drain_attack_ok(start, end))
541 		{
542 			end[2] = self->enemy->s.origin[2] + self->enemy->mins[2] + 8;
543 			if (!parasite_drain_attack_ok(start, end))
544 				return false;
545 		}
546 	}
547 	VectorCopy (self->enemy->s.origin, end);
548 
549 	tr = gi.trace (start, NULL, NULL, end, self, MASK_SHOT);
550 	if (tr.ent != self->enemy)
551 	{
552 		self->monsterinfo.aiflags |= AI_BLOCKED;
553 
554 		if(self->monsterinfo.attack)
555 			self->monsterinfo.attack(self);
556 
557 		self->monsterinfo.aiflags &= ~AI_BLOCKED;
558 		return true;
559 	}
560 }
561 
562 
563 /*
564 ===
565 Death Stuff Starts
566 ===
567 */
568 
parasite_dead(edict_t * self)569 void parasite_dead (edict_t *self)
570 {
571 	VectorSet (self->mins, -16, -16, -24);
572 	VectorSet (self->maxs, 16, 16, -8);
573 	self->movetype = MOVETYPE_TOSS;
574 	self->svflags |= SVF_DEADMONSTER;
575 	self->nextthink = 0;
576 	gi.linkentity (self);
577 }
578 
579 mframe_t parasite_frames_death [] =
580 {
581 	ai_move, 0,	 NULL,
582 	ai_move, 0,	 NULL,
583 	ai_move, 0,	 NULL,
584 	ai_move, 0,	 NULL,
585 	ai_move, 0,	 NULL,
586 	ai_move, 0,	 NULL,
587 	ai_move, 0,	 NULL
588 };
589 mmove_t parasite_move_death = {FRAME_death101, FRAME_death107, parasite_frames_death, parasite_dead};
590 
parasite_die(edict_t * self,edict_t * inflictor,edict_t * attacker,int damage,vec3_t point)591 void parasite_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
592 {
593 	int		n;
594 
595 // check for gib
596 	if (self->health <= self->gib_health)
597 	{
598 		gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
599 		for (n= 0; n < 2; n++)
600 			ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
601 		for (n= 0; n < 4; n++)
602 			ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
603 		ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
604 		self->deadflag = DEAD_DEAD;
605 		return;
606 	}
607 
608 	if (self->deadflag == DEAD_DEAD)
609 		return;
610 
611 // regular death
612 	gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
613 	self->deadflag = DEAD_DEAD;
614 	self->takedamage = DAMAGE_YES;
615 	self->monsterinfo.currentmove = &parasite_move_death;
616 }
617 
618 /*
619 ===
620 End Death Stuff
621 ===
622 */
623 
624 /*QUAKED monster_parasite (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
625 */
SP_monster_parasite(edict_t * self)626 void SP_monster_parasite (edict_t *self)
627 {
628 	if (deathmatch->value)
629 	{
630 		G_FreeEdict (self);
631 		return;
632 	}
633 
634 	sound_pain1 = gi.soundindex ("parasite/parpain1.wav");
635 	sound_pain2 = gi.soundindex ("parasite/parpain2.wav");
636 	sound_die = gi.soundindex ("parasite/pardeth1.wav");
637 	sound_launch = gi.soundindex("parasite/paratck1.wav");
638 	sound_impact = gi.soundindex("parasite/paratck2.wav");
639 	sound_suck = gi.soundindex("parasite/paratck3.wav");
640 	sound_reelin = gi.soundindex("parasite/paratck4.wav");
641 	sound_sight = gi.soundindex("parasite/parsght1.wav");
642 	sound_tap = gi.soundindex("parasite/paridle1.wav");
643 	sound_scratch = gi.soundindex("parasite/paridle2.wav");
644 	sound_search = gi.soundindex("parasite/parsrch1.wav");
645 
646 	self->s.modelindex = gi.modelindex ("models/monsters/parasite/tris.md2");
647 	VectorSet (self->mins, -16, -16, -24);
648 	VectorSet (self->maxs, 16, 16, 24);
649 	self->movetype = MOVETYPE_STEP;
650 	self->solid = SOLID_BBOX;
651 
652 	self->health = 175;
653 	self->gib_health = -50;
654 	self->mass = 250;
655 
656 	self->pain = parasite_pain;
657 	self->die = parasite_die;
658 
659 	self->monsterinfo.stand = parasite_stand;
660 	self->monsterinfo.walk = parasite_start_walk;
661 	self->monsterinfo.run = parasite_start_run;
662 	self->monsterinfo.attack = parasite_attack;
663 	self->monsterinfo.sight = parasite_sight;
664 	self->monsterinfo.idle = parasite_idle;
665 	self->monsterinfo.blocked = parasite_blocked;		// PGM
666 	self->monsterinfo.checkattack = parasite_checkattack;
667 
668 	gi.linkentity (self);
669 
670 	self->monsterinfo.currentmove = &parasite_move_stand;
671 	self->monsterinfo.scale = MODEL_SCALE;
672 
673 	walkmonster_start (self);
674 }
675