Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
|
void | monster_fire_bullet (edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype) |
|
void | monster_fire_shotgun (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int flashtype) |
|
void | monster_fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect) |
|
void | monster_fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int flashtype) |
|
void | monster_fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype) |
|
void | monster_fire_railgun (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int flashtype) |
|
void | monster_fire_bfg (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int kick, float damage_radius, int flashtype) |
|
void | M_FliesOff (edict_t *self) |
|
void | M_FliesOn (edict_t *self) |
|
void | M_FlyCheck (edict_t *self) |
|
void | AttackFinished (edict_t *self, float time) |
|
void | M_CheckGround (edict_t *ent) |
|
void | M_CatagorizePosition (edict_t *ent) |
|
void | M_WorldEffects (edict_t *ent) |
|
void | M_droptofloor (edict_t *ent) |
|
void | M_SetEffects (edict_t *ent) |
|
void | M_MoveFrame (edict_t *self) |
|
void | monster_think (edict_t *self) |
|
void | monster_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | monster_start_go (edict_t *self) |
|
void | monster_triggered_spawn (edict_t *self) |
|
void | monster_triggered_spawn_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | monster_triggered_start (edict_t *self) |
|
void | monster_death_use (edict_t *self) |
|
qboolean | monster_start (edict_t *self) |
|
void | walkmonster_start_go (edict_t *self) |
|
void | walkmonster_start (edict_t *self) |
|
void | flymonster_start_go (edict_t *self) |
|
void | flymonster_start (edict_t *self) |
|
void | swimmonster_start_go (edict_t *self) |
|
void | swimmonster_start (edict_t *self) |
|
◆ AttackFinished()
void AttackFinished |
( |
edict_t * |
self, |
|
|
float |
time |
|
) |
| |
◆ flymonster_start()
void flymonster_start |
( |
edict_t * |
self | ) |
|
◆ flymonster_start_go()
void flymonster_start_go |
( |
edict_t * |
self | ) |
|
Definition at line 637 of file g_monster.c.
640 gi.dprintf(
"%s in solid at %s\n", self->classname,
vtos(self->s.origin));
642 if (!self->yaw_speed)
643 self->yaw_speed = 10;
644 self->viewheight = 25;
648 if (self->spawnflags & 2)
Referenced by flymonster_start().
◆ M_CatagorizePosition()
void M_CatagorizePosition |
( |
edict_t * |
ent | ) |
|
Definition at line 178 of file g_monster.c.
186 point[0] = ent->s.origin[0];
187 point[1] = ent->s.origin[1];
188 point[2] = ent->s.origin[2] + ent->mins[2] + 1;
189 cont =
gi.pointcontents(point);
191 if (!(cont & MASK_WATER)) {
197 ent->watertype = cont;
200 cont =
gi.pointcontents(point);
201 if (!(cont & MASK_WATER))
206 cont =
gi.pointcontents(point);
207 if (cont & MASK_WATER)
Referenced by M_droptofloor(), and monster_think().
◆ M_CheckGround()
void M_CheckGround |
( |
edict_t * |
ent | ) |
|
Definition at line 139 of file g_monster.c.
147 if (ent->velocity[2] > 100) {
148 ent->groundentity = NULL;
153 point[0] = ent->s.origin[0];
154 point[1] = ent->s.origin[1];
155 point[2] = ent->s.origin[2] - 0.25;
157 trace =
gi.trace(ent->s.origin, ent->mins, ent->maxs, point, ent, MASK_MONSTERSOLID);
160 if (trace.plane.normal[2] < 0.7 && !trace.startsolid) {
161 ent->groundentity = NULL;
169 if (!trace.startsolid && !trace.allsolid) {
170 VectorCopy(trace.endpos, ent->s.origin);
171 ent->groundentity = trace.ent;
172 ent->groundentity_linkcount = trace.ent->linkcount;
173 ent->velocity[2] = 0;
Referenced by G_RunFrame(), M_droptofloor(), monster_think(), and SV_Physics_Step().
◆ M_droptofloor()
void M_droptofloor |
( |
edict_t * |
ent | ) |
|
Definition at line 286 of file g_monster.c.
291 ent->s.origin[2] += 1;
292 VectorCopy(ent->s.origin, end);
295 trace =
gi.trace(ent->s.origin, ent->mins, ent->maxs, end, ent, MASK_MONSTERSOLID);
297 if (trace.fraction == 1 || trace.allsolid)
300 VectorCopy(trace.endpos, ent->s.origin);
Referenced by SP_misc_explobox(), and walkmonster_start_go().
◆ M_FliesOff()
void M_FliesOff |
( |
edict_t * |
self | ) |
|
◆ M_FliesOn()
void M_FliesOn |
( |
edict_t * |
self | ) |
|
Definition at line 111 of file g_monster.c.
113 if (self->waterlevel)
115 self->s.effects |= EF_FLIES;
116 self->s.sound =
gi.soundindex(
"infantry/inflies1.wav");
Referenced by M_FlyCheck().
◆ M_FlyCheck()
void M_FlyCheck |
( |
edict_t * |
self | ) |
|
◆ M_MoveFrame()
void M_MoveFrame |
( |
edict_t * |
self | ) |
|
Definition at line 332 of file g_monster.c.
337 move =
self->monsterinfo.currentmove;
340 if ((self->monsterinfo.nextframe) && (self->monsterinfo.nextframe >= move->
firstframe) && (self->monsterinfo.nextframe <= move->
lastframe)) {
341 self->s.frame =
self->monsterinfo.nextframe;
342 self->monsterinfo.nextframe = 0;
349 move =
self->monsterinfo.currentmove;
352 if (self->svflags & SVF_DEADMONSTER)
Referenced by monster_think().
◆ M_SetEffects()
void M_SetEffects |
( |
edict_t * |
ent | ) |
|
Definition at line 308 of file g_monster.c.
310 ent->s.effects &= ~(EF_COLOR_SHELL | EF_POWERSCREEN);
311 ent->s.renderfx &= ~(RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE);
314 ent->s.effects |= EF_COLOR_SHELL;
315 ent->s.renderfx |= RF_SHELL_RED;
318 if (ent->health <= 0)
323 ent->s.effects |= EF_POWERSCREEN;
325 ent->s.effects |= EF_COLOR_SHELL;
326 ent->s.renderfx |= RF_SHELL_GREEN;
Referenced by monster_think().
◆ M_WorldEffects()
void M_WorldEffects |
( |
edict_t * |
ent | ) |
|
Definition at line 212 of file g_monster.c.
216 if (ent->health > 0) {
218 if (ent->waterlevel < 3) {
220 }
else if (ent->air_finished <
level.
time) {
222 if (ent->pain_debounce_time <
level.
time) {
223 dmg = 2 + 2 * floor(
level.
time - ent->air_finished);
227 ent->pain_debounce_time =
level.
time + 1;
231 if (ent->waterlevel > 0) {
233 }
else if (ent->air_finished <
level.
time) {
235 if (ent->pain_debounce_time <
level.
time) {
236 dmg = 2 + 2 * floor(
level.
time - ent->air_finished);
240 ent->pain_debounce_time =
level.
time + 1;
246 if (ent->waterlevel == 0) {
248 gi.sound(ent, CHAN_BODY,
gi.soundindex(
"player/watr_out.wav"), 1, ATTN_NORM, 0);
254 if ((ent->watertype & CONTENTS_LAVA) && !(ent->flags &
FL_IMMUNE_LAVA)) {
255 if (ent->damage_debounce_time <
level.
time) {
256 ent->damage_debounce_time =
level.
time + 0.2;
260 if ((ent->watertype & CONTENTS_SLIME) && !(ent->flags &
FL_IMMUNE_SLIME)) {
261 if (ent->damage_debounce_time <
level.
time) {
262 ent->damage_debounce_time =
level.
time + 1;
268 if (!(ent->svflags & SVF_DEADMONSTER)) {
269 if (ent->watertype & CONTENTS_LAVA)
271 gi.sound(ent, CHAN_BODY,
gi.soundindex(
"player/lava1.wav"), 1, ATTN_NORM, 0);
273 gi.sound(ent, CHAN_BODY,
gi.soundindex(
"player/lava2.wav"), 1, ATTN_NORM, 0);
274 else if (ent->watertype & CONTENTS_SLIME)
275 gi.sound(ent, CHAN_BODY,
gi.soundindex(
"player/watr_in.wav"), 1, ATTN_NORM, 0);
276 else if (ent->watertype & CONTENTS_WATER)
277 gi.sound(ent, CHAN_BODY,
gi.soundindex(
"player/watr_in.wav"), 1, ATTN_NORM, 0);
281 ent->damage_debounce_time = 0;
Referenced by monster_think().
◆ monster_death_use()
void monster_death_use |
( |
edict_t * |
self | ) |
|
Definition at line 470 of file g_monster.c.
480 if (self->deathtarget)
481 self->target =
self->deathtarget;
Referenced by Killed().
◆ monster_fire_bfg()
void monster_fire_bfg |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
aimdir, |
|
|
int |
damage, |
|
|
int |
speed, |
|
|
int |
kick, |
|
|
float |
damage_radius, |
|
|
int |
flashtype |
|
) |
| |
◆ monster_fire_blaster()
void monster_fire_blaster |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
dir, |
|
|
int |
damage, |
|
|
int |
speed, |
|
|
int |
flashtype, |
|
|
int |
effect |
|
) |
| |
Definition at line 49 of file g_monster.c.
51 fire_blaster(
self, start, dir, damage, speed, effect, qfalse);
55 gi.WriteByte(flashtype);
56 gi.multicast(start, MULTICAST_PVS);
Referenced by floater_fire_blaster(), flyer_fire(), hover_fire_blaster(), MakronHyperblaster(), medic_fire_blaster(), soldier_fire(), and TankBlaster().
◆ monster_fire_bullet()
void monster_fire_bullet |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
dir, |
|
|
int |
damage, |
|
|
int |
kick, |
|
|
int |
hspread, |
|
|
int |
vspread, |
|
|
int |
flashtype |
|
) |
| |
Definition at line 29 of file g_monster.c.
35 gi.WriteByte(flashtype);
36 gi.multicast(start, MULTICAST_PVS);
Referenced by actorMachineGun(), boss2_firebullet_left(), boss2_firebullet_right(), GunnerFire(), InfantryMachineGun(), jorg_firebullet_left(), jorg_firebullet_right(), soldier_fire(), supertankMachineGun(), and TankMachineGun().
◆ monster_fire_grenade()
void monster_fire_grenade |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
aimdir, |
|
|
int |
damage, |
|
|
int |
speed, |
|
|
int |
flashtype |
|
) |
| |
◆ monster_fire_railgun()
void monster_fire_railgun |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
aimdir, |
|
|
int |
damage, |
|
|
int |
kick, |
|
|
int |
flashtype |
|
) |
| |
◆ monster_fire_rocket()
void monster_fire_rocket |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
dir, |
|
|
int |
damage, |
|
|
int |
speed, |
|
|
int |
flashtype |
|
) |
| |
Definition at line 69 of file g_monster.c.
71 fire_rocket(
self, start, dir, damage, speed, damage + 20, damage);
75 gi.WriteByte(flashtype);
76 gi.multicast(start, MULTICAST_PVS);
Referenced by Boss2Rocket(), ChickRocket(), supertankRocket(), and TankRocket().
◆ monster_fire_shotgun()
void monster_fire_shotgun |
( |
edict_t * |
self, |
|
|
vec3_t |
start, |
|
|
vec3_t |
aimdir, |
|
|
int |
damage, |
|
|
int |
kick, |
|
|
int |
hspread, |
|
|
int |
vspread, |
|
|
int |
count, |
|
|
int |
flashtype |
|
) |
| |
◆ monster_start()
qboolean monster_start |
( |
edict_t * |
self | ) |
|
Definition at line 492 of file g_monster.c.
499 if ((self->spawnflags & 4) && !(self->monsterinfo.aiflags &
AI_GOOD_GUY)) {
500 self->spawnflags &= ~4;
501 self->spawnflags |= 1;
509 self->svflags |= SVF_MONSTER;
510 self->s.renderfx |= RF_FRAMELERP;
514 self->max_health =
self->health;
515 self->clipmask = MASK_MONSTERSOLID;
519 self->svflags &= ~SVF_DEADMONSTER;
521 if (!self->monsterinfo.checkattack)
523 VectorCopy(self->s.origin, self->s.old_origin);
528 gi.dprintf(
"%s at %s has bad item: %s\n", self->classname,
vtos(self->s.origin),
st.
item);
532 if (self->monsterinfo.currentmove)
533 self->s.frame =
self->monsterinfo.currentmove->firstframe + (rand() % (
self->monsterinfo.currentmove->lastframe -
self->monsterinfo.currentmove->firstframe + 1));
Referenced by flymonster_start(), swimmonster_start(), and walkmonster_start().
◆ monster_start_go()
void monster_start_go |
( |
edict_t * |
self | ) |
|
Definition at line 538 of file g_monster.c.
542 if (self->health <= 0)
554 while ((target =
G_Find(target,
FOFS(targetname), self->target)) != NULL) {
555 if (strcmp(target->classname,
"point_combat") == 0) {
556 self->combattarget =
self->target;
562 if (notcombat && self->combattarget)
563 gi.dprintf(
"%s at %s has target with mixed types\n", self->classname,
vtos(self->s.origin));
569 if (self->combattarget) {
573 while ((target =
G_Find(target,
FOFS(targetname), self->combattarget)) != NULL) {
574 if (strcmp(target->classname,
"point_combat") != 0) {
575 gi.dprintf(
"%s at (%i %i %i) has a bad combattarget %s : %s at (%i %i %i)\n",
576 self->classname, (
int)self->s.origin[0], (
int)self->s.origin[1], (
int)self->s.origin[2],
577 self->combattarget, target->classname, (
int)target->s.origin[0], (
int)target->s.origin[1],
578 (
int)target->s.origin[2]);
584 self->goalentity =
self->movetarget =
G_PickTarget(self->target);
585 if (!self->movetarget) {
586 gi.dprintf(
"%s can't find target %s at %s\n", self->classname, self->target,
vtos(self->s.origin));
588 self->monsterinfo.pausetime = 100000000;
589 self->monsterinfo.stand(
self);
590 }
else if (strcmp(self->movetarget->classname,
"path_corner") == 0) {
591 VectorSubtract(self->goalentity->s.origin, self->s.origin, v);
592 self->ideal_yaw =
self->s.angles[YAW] =
vectoyaw(v);
593 self->monsterinfo.walk(
self);
596 self->goalentity =
self->movetarget = NULL;
597 self->monsterinfo.pausetime = 100000000;
598 self->monsterinfo.stand(
self);
601 self->monsterinfo.pausetime = 100000000;
602 self->monsterinfo.stand(
self);
Referenced by flymonster_start_go(), monster_triggered_spawn(), swimmonster_start_go(), and walkmonster_start_go().
◆ monster_think()
void monster_think |
( |
edict_t * |
self | ) |
|
Definition at line 382 of file g_monster.c.
385 if (self->linkcount != self->monsterinfo.linkcount) {
386 self->monsterinfo.linkcount =
self->linkcount;
Referenced by monster_start_go().
◆ monster_triggered_spawn()
void monster_triggered_spawn |
( |
edict_t * |
self | ) |
|
Definition at line 422 of file g_monster.c.
424 self->s.origin[2] += 1;
427 self->solid = SOLID_BBOX;
429 self->svflags &= ~SVF_NOCLIENT;
435 if (self->enemy && !(self->spawnflags & 1) && !(self->enemy->flags &
FL_NOTARGET)) {
Referenced by monster_triggered_spawn_use().
◆ monster_triggered_spawn_use()
void monster_triggered_spawn_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ monster_triggered_start()
void monster_triggered_start |
( |
edict_t * |
self | ) |
|
◆ monster_use()
void monster_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ swimmonster_start()
void swimmonster_start |
( |
edict_t * |
self | ) |
|
◆ swimmonster_start_go()
void swimmonster_start_go |
( |
edict_t * |
self | ) |
|
Definition at line 661 of file g_monster.c.
663 if (!self->yaw_speed)
664 self->yaw_speed = 10;
665 self->viewheight = 10;
669 if (self->spawnflags & 2)
Referenced by swimmonster_start().
◆ walkmonster_start()
void walkmonster_start |
( |
edict_t * |
self | ) |
|
Definition at line 630 of file g_monster.c.
Referenced by SP_misc_actor(), SP_misc_insane(), SP_monster_berserk(), SP_monster_brain(), SP_monster_chick(), SP_monster_gladiator(), SP_monster_gunner(), SP_monster_infantry(), SP_monster_jorg(), SP_monster_makron(), SP_monster_medic(), SP_monster_mutant(), SP_monster_parasite(), SP_monster_soldier_x(), SP_monster_supertank(), and SP_monster_tank().
◆ walkmonster_start_go()
void walkmonster_start_go |
( |
edict_t * |
self | ) |
|
Definition at line 610 of file g_monster.c.
612 if (!(self->spawnflags & 2) &&
level.
time < 1) {
615 if (self->groundentity)
617 gi.dprintf(
"%s in solid at %s\n", self->classname,
vtos(self->s.origin));
620 if (!self->yaw_speed)
621 self->yaw_speed = 20;
622 self->viewheight = 25;
626 if (self->spawnflags & 2)
Referenced by walkmonster_start().
gitem_t * FindItemByClassname(char *classname)
qboolean monster_start(edict_t *self)
void(* endfunc)(edict_t *self)
void fire_rail(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick)
void M_SetEffects(edict_t *ent)
qboolean M_walkmove(edict_t *ent, float yaw, float dist)
void monster_triggered_start(edict_t *self)
void fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
void fire_bfg(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
void walkmonster_start_go(edict_t *self)
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
void monster_use(edict_t *self, edict_t *other, edict_t *activator)
void M_CheckGround(edict_t *ent)
float vectoyaw(vec3_t vec)
void fire_grenade(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius)
void monster_start_go(edict_t *self)
void flymonster_start_go(edict_t *self)
qboolean M_CheckAttack(edict_t *self)
void T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir, vec3_t point, vec3_t normal, int damage, int knockback, int dflags, int mod)
void monster_think(edict_t *self)
void(* thinkfunc)(edict_t *self)
#define POWER_ARMOR_SHIELD
#define POWER_ARMOR_SCREEN
void monster_triggered_spawn(edict_t *self)
void M_droptofloor(edict_t *ent)
void G_FreeEdict(edict_t *e)
void M_MoveFrame(edict_t *self)
void M_CatagorizePosition(edict_t *ent)
void M_WorldEffects(edict_t *ent)
void M_FliesOn(edict_t *self)
void monster_triggered_spawn_use(edict_t *self, edict_t *other, edict_t *activator)
void FoundTarget(edict_t *self)
void fire_bullet(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int mod)
void M_FliesOff(edict_t *self)
void G_UseTargets(edict_t *ent, edict_t *activator)
edict_t * Drop_Item(edict_t *ent, gitem_t *item)
void swimmonster_start_go(edict_t *self)
qboolean KillBox(edict_t *ent)
void fire_blaster(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect, qboolean hyper)
void(* aifunc)(edict_t *self, float dist)
void fire_shotgun(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int mod)
edict_t * G_PickTarget(char *targetname)