700 lines · 16.0 KB · C
RawDownload
#include <u.h>#include <libc.h>#include <stdio.h>#include "../dat.h"#include "../fns.h"#include "m_float.h"  static int	sound_attack2;static int	sound_attack3;static int	sound_death1;static int	sound_idle;static int	sound_pain1;static int	sound_pain2;static int	sound_sight;  void floater_sight (edict_t *self, edict_t *){	gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);} void floater_idle (edict_t *self){	gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);}  //void floater_stand1 (edict_t *self);void floater_dead (edict_t *self);void floater_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);void floater_run (edict_t *self);void floater_wham (edict_t *self);void floater_zap (edict_t *self);  void floater_fire_blaster (edict_t *self){	vec3_t	start;	vec3_t	forward, right;	vec3_t	end;	vec3_t	dir;	int		effect; 	if(!self->enemy || !self->enemy->inuse)		//PGM		return;									//PGM 	if ((self->s.frame == FRAME_attak104) || (self->s.frame == FRAME_attak107))		effect = EF_HYPERBLASTER;	else		effect = 0;	AngleVectors (self->s.angles, forward, right, NULL);	G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_FLOAT_BLASTER_1], forward, right, start); 	VectorCopy (self->enemy->s.origin, end);	end[2] += self->enemy->viewheight;	VectorSubtract (end, start, dir); 	monster_fire_blaster (self, start, dir, 1, 1000, MZ2_FLOAT_BLASTER_1, effect);}  mframe_t floater_frames_stand1 [] ={	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL};mmove_t	floater_move_stand1 = {FRAME_stand101, FRAME_stand152, floater_frames_stand1, NULL}; mframe_t floater_frames_stand2 [] ={	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL,	ai_stand, 0, NULL};mmove_t	floater_move_stand2 = {FRAME_stand201, FRAME_stand252, floater_frames_stand2, NULL}; void floater_stand (edict_t *self){	if (qrandom() <= 0.5)				self->monsterinfo.currentmove = &floater_move_stand1;	else		self->monsterinfo.currentmove = &floater_move_stand2;} mframe_t floater_frames_activate [] ={	ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL,		ai_move,	0,	NULL};mmove_t floater_move_activate = {FRAME_actvat01, FRAME_actvat31, floater_frames_activate, NULL}; mframe_t floater_frames_attack1 [] ={	ai_charge,	0,	NULL,			// Blaster attack	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	floater_fire_blaster,			// BOOM (0, -25.8, 32.5)	-- LOOP Starts	ai_charge,	0,	floater_fire_blaster,	ai_charge,	0,	floater_fire_blaster,	ai_charge,	0,	floater_fire_blaster,	ai_charge,	0,	floater_fire_blaster,	ai_charge,	0,	floater_fire_blaster,	ai_charge,	0,	floater_fire_blaster,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL			//							-- LOOP Ends};mmove_t floater_move_attack1 = {FRAME_attak101, FRAME_attak114, floater_frames_attack1, floater_run}; // PMM - circle strafe framesmframe_t floater_frames_attack1a [] ={	ai_charge,	10,	NULL,			// Blaster attack	ai_charge,	10,	NULL,	ai_charge,	10,	NULL,	ai_charge,	10,	floater_fire_blaster,			// BOOM (0, -25.8, 32.5)	-- LOOP Starts	ai_charge,	10,	floater_fire_blaster,	ai_charge,	10,	floater_fire_blaster,	ai_charge,	10,	floater_fire_blaster,	ai_charge,	10,	floater_fire_blaster,	ai_charge,	10,	floater_fire_blaster,	ai_charge,	10,	floater_fire_blaster,	ai_charge,	10,	NULL,	ai_charge,	10,	NULL,	ai_charge,	10,	NULL,	ai_charge,	10,	NULL			//							-- LOOP Ends};mmove_t floater_move_attack1a = {FRAME_attak101, FRAME_attak114, floater_frames_attack1a, floater_run};//pmmmframe_t floater_frames_attack2 [] ={	ai_charge,	0,	NULL,			// Claws	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	floater_wham,			// WHAM (0, -45, 29.6)		-- LOOP Starts	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,			//							-- LOOP Ends	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL};mmove_t floater_move_attack2 = {FRAME_attak201, FRAME_attak225, floater_frames_attack2, floater_run}; mframe_t floater_frames_attack3 [] ={	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	floater_zap,		//								-- LOOP Starts	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,		//								-- LOOP Ends	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL,	ai_charge,	0,	NULL};mmove_t floater_move_attack3 = {FRAME_attak301, FRAME_attak334, floater_frames_attack3, floater_run}; mframe_t floater_frames_death [] ={	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL};mmove_t floater_move_death = {FRAME_death01, FRAME_death13, floater_frames_death, floater_dead}; mframe_t floater_frames_pain1 [] ={	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL};mmove_t floater_move_pain1 = {FRAME_pain101, FRAME_pain107, floater_frames_pain1, floater_run}; mframe_t floater_frames_pain2 [] ={	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL};mmove_t floater_move_pain2 = {FRAME_pain201, FRAME_pain208, floater_frames_pain2, floater_run}; mframe_t floater_frames_pain3 [] ={	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL,	ai_move,	0,	NULL};mmove_t floater_move_pain3 = {FRAME_pain301, FRAME_pain312, floater_frames_pain3, floater_run}; mframe_t floater_frames_walk [] ={	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL,	ai_walk, 5, NULL};mmove_t	floater_move_walk = {FRAME_stand101, FRAME_stand152, floater_frames_walk, NULL}; mframe_t floater_frames_run [] ={	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL,	ai_run, 13, NULL};mmove_t	floater_move_run = {FRAME_stand101, FRAME_stand152, floater_frames_run, NULL};

Lines 1–500 of 700.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t