Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
|
void | Use_Target_Tent (edict_t *ent, edict_t *other, edict_t *activator) |
|
void | SP_target_temp_entity (edict_t *ent) |
|
void | Use_Target_Speaker (edict_t *ent, edict_t *other, edict_t *activator) |
|
void | SP_target_speaker (edict_t *ent) |
|
void | Use_Target_Help (edict_t *ent, edict_t *other, edict_t *activator) |
|
void | SP_target_help (edict_t *ent) |
|
void | use_target_secret (edict_t *ent, edict_t *other, edict_t *activator) |
|
void | SP_target_secret (edict_t *ent) |
|
void | use_target_goal (edict_t *ent, edict_t *other, edict_t *activator) |
|
void | SP_target_goal (edict_t *ent) |
|
void | target_explosion_explode (edict_t *self) |
|
void | use_target_explosion (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_explosion (edict_t *ent) |
|
void | use_target_changelevel (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_changelevel (edict_t *ent) |
|
void | use_target_splash (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_splash (edict_t *self) |
|
void | ED_CallSpawn (edict_t *ent) |
|
void | use_target_spawner (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_spawner (edict_t *self) |
|
void | use_target_blaster (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_blaster (edict_t *self) |
|
void | trigger_crosslevel_trigger_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_crosslevel_trigger (edict_t *self) |
|
void | target_crosslevel_target_think (edict_t *self) |
|
void | SP_target_crosslevel_target (edict_t *self) |
|
void | target_laser_think (edict_t *self) |
|
void | target_laser_on (edict_t *self) |
|
void | target_laser_off (edict_t *self) |
|
void | target_laser_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | target_laser_start (edict_t *self) |
|
void | SP_target_laser (edict_t *self) |
|
void | target_lightramp_think (edict_t *self) |
|
void | target_lightramp_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_lightramp (edict_t *self) |
|
void | target_earthquake_think (edict_t *self) |
|
void | target_earthquake_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_target_earthquake (edict_t *self) |
|
◆ ED_CallSpawn()
void ED_CallSpawn |
( |
edict_t * |
ent | ) |
|
Definition at line 340 of file g_spawn.c.
346 if (!ent->classname) {
347 gi.dprintf(
"ED_CallSpawn: NULL classname\n");
355 if (!strcmp(item->
classname, ent->classname)) {
364 if (!strcmp(s->
name, ent->classname)) {
370 gi.dprintf(
"%s doesn't have a spawn function\n", ent->classname);
Referenced by use_target_spawner().
◆ SP_target_blaster()
void SP_target_blaster |
( |
edict_t * |
self | ) |
|
Definition at line 422 of file g_target.c.
426 self->noise_index =
gi.soundindex(
"weapons/laser2.wav");
433 self->svflags = SVF_NOCLIENT;
◆ SP_target_changelevel()
void SP_target_changelevel |
( |
edict_t * |
ent | ) |
|
Definition at line 293 of file g_target.c.
296 gi.dprintf(
"target_changelevel with no map at %s\n",
vtos(ent->s.origin));
302 if ((Q_stricmp(
level.
mapname,
"fact1") == 0) && (Q_stricmp(ent->map,
"fact3") == 0))
303 ent->map =
"fact3$secret1";
306 ent->svflags = SVF_NOCLIENT;
◆ SP_target_crosslevel_target()
void SP_target_crosslevel_target |
( |
edict_t * |
self | ) |
|
Definition at line 468 of file g_target.c.
472 self->svflags = SVF_NOCLIENT;
475 self->nextthink =
level.
time +
self->delay;
◆ SP_target_crosslevel_trigger()
void SP_target_crosslevel_trigger |
( |
edict_t * |
self | ) |
|
Definition at line 448 of file g_target.c.
450 self->svflags = SVF_NOCLIENT;
◆ SP_target_earthquake()
void SP_target_earthquake |
( |
edict_t * |
self | ) |
|
Definition at line 761 of file g_target.c.
763 if (!self->targetname)
764 gi.dprintf(
"untargeted %s at %s\n", self->classname,
vtos(self->s.origin));
772 self->svflags |= SVF_NOCLIENT;
776 self->noise_index =
gi.soundindex(
"world/quake.wav");
◆ SP_target_explosion()
void SP_target_explosion |
( |
edict_t * |
ent | ) |
|
Definition at line 252 of file g_target.c.
255 ent->svflags = SVF_NOCLIENT;
◆ SP_target_goal()
void SP_target_goal |
( |
edict_t * |
ent | ) |
|
Definition at line 197 of file g_target.c.
208 ent->noise_index =
gi.soundindex(
st.
noise);
209 ent->svflags = SVF_NOCLIENT;
◆ SP_target_help()
void SP_target_help |
( |
edict_t * |
ent | ) |
|
Definition at line 127 of file g_target.c.
136 gi.dprintf(
"%s with no message at %s\n", ent->classname,
vtos(ent->s.origin));
◆ SP_target_laser()
void SP_target_laser |
( |
edict_t * |
self | ) |
|
◆ SP_target_lightramp()
void SP_target_lightramp |
( |
edict_t * |
self | ) |
|
Definition at line 688 of file g_target.c.
690 if (!self->message || strlen(self->message) != 2 || self->message[0] <
'a' || self->message[0] >
'z' || self->message[1] <
'a' || self->message[1] >
'z' || self->message[0] == self->message[1]) {
691 gi.dprintf(
"target_lightramp has bad ramp (%s) at %s\n", self->message,
vtos(self->s.origin));
702 gi.dprintf(
"%s with no target at %s\n", self->classname,
vtos(self->s.origin));
707 self->svflags |= SVF_NOCLIENT;
711 self->movedir[0] =
self->message[0] -
'a';
712 self->movedir[1] =
self->message[1] -
'a';
713 self->movedir[2] = (
self->movedir[1] -
self->movedir[0]) / (self->speed /
FRAMETIME);
◆ SP_target_secret()
void SP_target_secret |
( |
edict_t * |
ent | ) |
|
Definition at line 159 of file g_target.c.
170 ent->noise_index =
gi.soundindex(
st.
noise);
171 ent->svflags = SVF_NOCLIENT;
174 if (!Q_stricmp(
level.
mapname,
"mine3") && ent->s.origin[0] == 280 && ent->s.origin[1] == -2048 && ent->s.origin[2] == -624)
175 ent->message =
"You have found a secret area.";
◆ SP_target_spawner()
void SP_target_spawner |
( |
edict_t * |
self | ) |
|
Definition at line 386 of file g_target.c.
389 self->svflags = SVF_NOCLIENT;
392 VectorScale(self->movedir, self->speed, self->movedir);
◆ SP_target_speaker()
void SP_target_speaker |
( |
edict_t * |
ent | ) |
|
Definition at line 78 of file g_target.c.
80 char buffer[MAX_QPATH];
83 gi.dprintf(
"target_speaker with no noise set at %s\n",
vtos(ent->s.origin));
89 strncpy(buffer,
st.
noise,
sizeof(buffer));
90 ent->noise_index =
gi.soundindex(buffer);
95 if (!ent->attenuation)
96 ent->attenuation = 1.0;
97 else if (ent->attenuation == -1)
101 if (ent->spawnflags & 1)
102 ent->s.sound = ent->noise_index;
◆ SP_target_splash()
void SP_target_splash |
( |
edict_t * |
self | ) |
|
Definition at line 342 of file g_target.c.
350 self->svflags = SVF_NOCLIENT;
◆ SP_target_temp_entity()
void SP_target_temp_entity |
( |
edict_t * |
ent | ) |
|
◆ target_crosslevel_target_think()
void target_crosslevel_target_think |
( |
edict_t * |
self | ) |
|
◆ target_earthquake_think()
void target_earthquake_think |
( |
edict_t * |
self | ) |
|
Definition at line 725 of file g_target.c.
731 gi.positioned_sound(self->s.origin,
self, CHAN_AUTO, self->noise_index, 1.0, ATTN_NONE, 0);
740 if (!e->groundentity)
743 e->groundentity = NULL;
744 e->velocity[0] +=
crandom() * 150;
745 e->velocity[1] +=
crandom() * 150;
746 e->velocity[2] =
self->speed * (100.0 / e->mass);
Referenced by SP_target_earthquake().
◆ target_earthquake_use()
void target_earthquake_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ target_explosion_explode()
void target_explosion_explode |
( |
edict_t * |
self | ) |
|
◆ target_laser_off()
void target_laser_off |
( |
edict_t * |
self | ) |
|
◆ target_laser_on()
void target_laser_on |
( |
edict_t * |
self | ) |
|
◆ target_laser_start()
void target_laser_start |
( |
edict_t * |
self | ) |
|
Definition at line 571 of file g_target.c.
576 self->solid = SOLID_NOT;
577 self->s.renderfx |= RF_BEAM | RF_TRANSLUCENT;
578 self->s.modelindex = 1;
581 if (self->spawnflags & 64)
587 if (self->spawnflags & 2)
588 self->s.skinnum = 0xf2f2f0f0;
589 else if (self->spawnflags & 4)
590 self->s.skinnum = 0xd0d1d2d3;
591 else if (self->spawnflags & 8)
592 self->s.skinnum = 0xf3f3f1f1;
593 else if (self->spawnflags & 16)
594 self->s.skinnum = 0xdcdddedf;
595 else if (self->spawnflags & 32)
596 self->s.skinnum = 0xe0e1e2e3;
600 ent =
G_Find(NULL,
FOFS(targetname), self->target);
602 gi.dprintf(
"%s at %s: %s is a bad target\n", self->classname,
vtos(self->s.origin), self->target);
614 VectorSet(self->mins, -8, -8, -8);
615 VectorSet(self->maxs, 8, 8, 8);
618 if (self->spawnflags & 1)
Referenced by SP_target_laser().
◆ target_laser_think()
void target_laser_think |
( |
edict_t * |
self | ) |
|
Definition at line 485 of file g_target.c.
495 if (self->spawnflags & 0x80000000)
501 VectorCopy(self->movedir, last_movedir);
502 VectorMA(self->enemy->absmin, 0.5, self->enemy->size, point);
503 VectorSubtract(point, self->s.origin, self->movedir);
505 if (!VectorCompare(self->movedir, last_movedir))
506 self->spawnflags |= 0x80000000;
510 VectorCopy(self->s.origin, start);
511 VectorMA(start, 2048, self->movedir, end);
513 tr =
gi.trace(start, NULL, NULL, end, ignore, CONTENTS_SOLID | CONTENTS_MONSTER | CONTENTS_DEADMONSTER);
523 if (!(tr.ent->svflags & SVF_MONSTER) && (!tr.ent->client)) {
524 if (self->spawnflags & 0x80000000) {
525 self->spawnflags &= ~0x80000000;
527 gi.WriteByte(TE_LASER_SPARKS);
529 gi.WritePosition(tr.endpos);
530 gi.WriteDir(tr.plane.normal);
531 gi.WriteByte(self->s.skinnum);
532 gi.multicast(tr.endpos, MULTICAST_PVS);
538 VectorCopy(tr.endpos, start);
541 VectorCopy(tr.endpos, self->s.old_origin);
Referenced by target_laser_on(), and target_laser_start().
◆ target_laser_use()
void target_laser_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ target_lightramp_think()
void target_lightramp_think |
( |
edict_t * |
self | ) |
|
Definition at line 638 of file g_target.c.
642 style[0] =
'a' +
self->movedir[0] + (
level.
time -
self->timestamp) /
FRAMETIME * self->movedir[2];
644 gi.configstring(CS_LIGHTS + self->enemy->style, style);
646 if ((
level.
time - self->timestamp) <
self->speed) {
648 }
else if (self->spawnflags & 1) {
651 temp =
self->movedir[0];
652 self->movedir[0] =
self->movedir[1];
653 self->movedir[1] = temp;
654 self->movedir[2] *= -1;
Referenced by SP_target_lightramp(), and target_lightramp_use().
◆ target_lightramp_use()
void target_lightramp_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 658 of file g_target.c.
666 e =
G_Find(e,
FOFS(targetname), self->target);
669 if (strcmp(e->classname,
"light") != 0) {
670 gi.dprintf(
"%s at %s ", self->classname,
vtos(self->s.origin));
671 gi.dprintf(
"target %s (%s at %s) is not a light\n", self->target, e->classname,
vtos(e->s.origin));
678 gi.dprintf(
"%s target %s not found at %s\n", self->classname, self->target,
vtos(self->s.origin));
Referenced by SP_target_lightramp().
◆ trigger_crosslevel_trigger_use()
void trigger_crosslevel_trigger_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ use_target_blaster()
void use_target_blaster |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 405 of file g_target.c.
410 if (self->spawnflags & 2)
412 else if (self->spawnflags & 1)
413 effect = EF_HYPERBLASTER;
419 gi.sound(
self, CHAN_VOICE, self->noise_index, 1, ATTN_NORM, 0);
Referenced by SP_target_blaster().
◆ use_target_changelevel()
void use_target_changelevel |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 264 of file g_target.c.
282 if (activator && activator->client)
283 gi.bprintf(PRINT_HIGH,
"%s exited the level.\n", activator->client->pers.netname);
287 if (strstr(self->map,
"*"))
Referenced by SP_target_changelevel().
◆ use_target_explosion()
void use_target_explosion |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ use_target_goal()
void use_target_goal |
( |
edict_t * |
ent, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 184 of file g_target.c.
186 gi.sound(ent, CHAN_VOICE, ent->noise_index, 1, ATTN_NORM, 0);
191 gi.configstring(CS_CDTRACK,
"0");
Referenced by SP_target_goal().
◆ Use_Target_Help()
void Use_Target_Help |
( |
edict_t * |
ent, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ use_target_secret()
void use_target_secret |
( |
edict_t * |
ent, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
◆ use_target_spawner()
void use_target_spawner |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 370 of file g_target.c.
375 ent->classname =
self->target;
376 VectorCopy(self->s.origin, ent->s.origin);
377 VectorCopy(self->s.angles, ent->s.angles);
379 gi.unlinkentity(ent);
383 VectorCopy(self->movedir, ent->velocity);
Referenced by SP_target_spawner().
◆ Use_Target_Speaker()
void Use_Target_Speaker |
( |
edict_t * |
ent, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 56 of file g_target.c.
60 if (ent->spawnflags & 3) {
65 ent->s.sound = ent->noise_index;
68 if (ent->spawnflags & 4)
69 chan = CHAN_VOICE | CHAN_RELIABLE;
74 gi.positioned_sound(ent->s.origin, ent, chan, ent->noise_index, ent->volume, ent->attenuation, 0);
Referenced by SP_target_speaker().
◆ use_target_splash()
void use_target_splash |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 328 of file g_target.c.
331 gi.WriteByte(TE_SPLASH);
332 gi.WriteByte(self->count);
333 gi.WritePosition(self->s.origin);
334 gi.WriteDir(self->movedir);
335 gi.WriteByte(self->sounds);
336 gi.multicast(self->s.origin, MULTICAST_PVS);
Referenced by SP_target_splash().
◆ Use_Target_Tent()
void Use_Target_Tent |
( |
edict_t * |
ent, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
void use_target_changelevel(edict_t *self, edict_t *other, edict_t *activator)
#define MOD_TARGET_BLASTER
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
void use_target_goal(edict_t *ent, edict_t *other, edict_t *activator)
void target_laser_on(edict_t *self)
void use_target_blaster(edict_t *self, edict_t *other, edict_t *activator)
void ED_CallSpawn(edict_t *ent)
void target_explosion_explode(edict_t *self)
void SpawnItem(edict_t *ent, gitem_t *item)
void Use_Target_Speaker(edict_t *ent, edict_t *other, edict_t *activator)
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
void target_lightramp_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)
void BeginIntermission(edict_t *targ)
void Use_Target_Tent(edict_t *ent, edict_t *other, edict_t *activator)
#define SFL_CROSS_TRIGGER_MASK
void G_FreeEdict(edict_t *e)
void use_target_spawner(edict_t *self, edict_t *other, edict_t *activator)
void target_earthquake_use(edict_t *self, edict_t *other, edict_t *activator)
void target_laser_off(edict_t *self)
static const spawn_func_t spawn_funcs[]
void target_laser_use(edict_t *self, edict_t *other, edict_t *activator)
void target_laser_start(edict_t *self)
void use_target_secret(edict_t *ent, edict_t *other, edict_t *activator)
void target_laser_think(edict_t *self)
void G_UseTargets(edict_t *ent, edict_t *activator)
void target_lightramp_think(edict_t *self)
void trigger_crosslevel_trigger_use(edict_t *self, edict_t *other, edict_t *activator)
void target_crosslevel_target_think(edict_t *self)
void G_SetMovedir(vec3_t angles, vec3_t movedir)
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 use_target_splash(edict_t *self, edict_t *other, edict_t *activator)
void Use_Target_Help(edict_t *ent, edict_t *other, edict_t *activator)
void use_target_explosion(edict_t *self, edict_t *other, edict_t *activator)
void target_earthquake_think(edict_t *self)
vec_t VectorNormalize(vec3_t v)
void(* spawn)(edict_t *ent)
void T_RadiusDamage(edict_t *inflictor, edict_t *attacker, float damage, edict_t *ignore, float radius, int mod)