Go to the source code of this file.
|
void | AnglesNormalize (vec3_t vec) |
|
float | SnapToEights (float x) |
|
void | turret_blocked (edict_t *self, edict_t *other) |
|
void | turret_breach_fire (edict_t *self) |
|
void | turret_breach_think (edict_t *self) |
|
void | turret_breach_finish_init (edict_t *self) |
|
void | SP_turret_breach (edict_t *self) |
|
void | SP_turret_base (edict_t *self) |
|
void | infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage) |
|
void | infantry_stand (edict_t *self) |
|
void | monster_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | turret_driver_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) |
|
qboolean | FindTarget (edict_t *self) |
|
void | turret_driver_think (edict_t *self) |
|
void | turret_driver_link (edict_t *self) |
|
void | SP_turret_driver (edict_t *self) |
|
◆ AnglesNormalize()
◆ FindTarget()
◆ infantry_die()
◆ infantry_stand()
◆ monster_use()
◆ SnapToEights()
float SnapToEights |
( |
float |
x | ) |
|
◆ SP_turret_base()
◆ SP_turret_breach()
Definition at line 220 of file g_turret.c.
243 self->ideal_yaw =
self->s.angles[
YAW];
244 self->move_angles[
YAW] =
self->ideal_yaw;
◆ SP_turret_driver()
Definition at line 387 of file g_turret.c.
397 self->s.modelindex =
gi.
modelindex(
"models/monsters/infantry/tris.md2");
402 self->gib_health = 0;
404 self->viewheight = 24;
411 level.total_monsters++;
◆ turret_blocked()
◆ turret_breach_finish_init()
◆ turret_breach_fire()
◆ turret_breach_think()
Definition at line 96 of file g_turret.c.
107 self->move_angles[
PITCH] -= 360;
129 if (fabs(dmin) < fabs(dmax))
130 self->move_angles[
YAW] =
self->pos1[
YAW];
132 self->move_angles[
YAW] =
self->pos2[
YAW];
138 else if (delta[0] > 180)
142 else if (delta[1] > 180)
172 self->owner->avelocity[0] =
self->avelocity[0];
173 self->owner->avelocity[1] =
self->avelocity[1];
176 angle =
self->s.angles[1] +
self->owner->move_origin[1];
177 angle *= (
M_PI*2 / 360);
180 target[2] =
self->owner->s.origin[2];
183 self->owner->velocity[0] = dir[0] * 1.0 /
FRAMETIME;
184 self->owner->velocity[1] = dir[1] * 1.0 /
FRAMETIME;
187 angle =
self->s.angles[
PITCH] * (
M_PI*2 / 360);
190 diff = target_z -
self->owner->s.origin[2];
191 self->owner->velocity[2] = diff * 1.0 /
FRAMETIME;
196 self->spawnflags &= ~65536;
Referenced by turret_breach_finish_init().
◆ turret_driver_die()
◆ turret_driver_link()
Definition at line 354 of file g_turret.c.
363 self->target_ent->owner =
self;
364 self->target_ent->teammaster->owner =
self;
367 vec[0] =
self->target_ent->s.origin[0] -
self->s.origin[0];
368 vec[1] =
self->target_ent->s.origin[1] -
self->s.origin[1];
375 self->move_origin[1] = vec[1];
377 self->move_origin[2] =
self->s.origin[2] -
self->target_ent->s.origin[2];
Referenced by SP_turret_driver().
◆ turret_driver_think()
Definition at line 300 of file g_turret.c.
315 self->monsterinfo.trail_time =
level.time;
324 self->monsterinfo.trail_time =
level.time;
337 target[2] +=
self->enemy->viewheight;
349 self->monsterinfo.attack_finished =
level.time + reaction_time + 1.0;
351 self->target_ent->spawnflags |= 65536;
Referenced by turret_driver_link().
void(* dprintf)(char *fmt,...)
void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage)
#define MASK_MONSTERSOLID
void turret_breach_finish_init(edict_t *self)
CONST PIXELFORMATDESCRIPTOR int
#define VectorSubtract(a, b, c)
gitem_t * FindItemByClassname(char *classname)
void turret_breach_think(edict_t *self)
void turret_driver_link(edict_t *self)
mmove_t infantry_move_stand
void fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
void AnglesNormalize(vec3_t vec)
struct gclient_s * client
void turret_driver_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
float vectoyaw(vec3_t vec)
void monster_use(edict_t *self, edict_t *other, edict_t *activator)
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)
qboolean infront(edict_t *self, edict_t *other)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void(* sight)(edict_t *self, edict_t *other)
void vectoangles(vec3_t vec, vec3_t angles)
void G_FreeEdict(edict_t *e)
int(* soundindex)(char *name)
vec_t VectorLength(vec3_t v)
int(* modelindex)(char *name)
void(* positioned_sound)(vec3_t origin, edict_t *ent, int channel, int soundinedex, float volume, float attenuation, float timeofs)
void(* think)(edict_t *self)
void FoundTarget(edict_t *self)
qboolean(* AreasConnected)(int area1, int area2)
void turret_blocked(edict_t *self, edict_t *other)
void(* setmodel)(edict_t *ent, char *name)
monsterinfo_t monsterinfo
qboolean visible(edict_t *self, edict_t *other)
qboolean FindTarget(edict_t *self)
void turret_driver_think(edict_t *self)
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
int range(edict_t *self, edict_t *other)
#define VectorSet(v, x, y, z)
void M_ChangeYaw(edict_t *ent)
edict_t * G_PickTarget(char *targetname)
void(* linkentity)(edict_t *ent)
qboolean(* inPHS)(vec3_t p1, vec3_t p2)
float SnapToEights(float x)
void infantry_stand(edict_t *self)
void turret_breach_fire(edict_t *self)