Go to the documentation of this file.
158 level.found_secrets++;
177 level.total_secrets++;
180 ent->
message =
"You have found a secret area.";
246 self->activator = activator;
255 self->nextthink =
level.time +
self->delay;
272 if (
level.intermissiontime)
291 if (activator && activator->
client)
296 if (strstr(self->map,
"*"))
313 ent->
map =
"fact3$secret1";
403 VectorScale (self->movedir, self->speed, self->movedir);
420 if (self->spawnflags & 2)
422 else if (self->spawnflags & 1)
435 self->noise_index =
gi.
soundindex (
"weapons/laser2.wav");
485 self->nextthink =
level.time +
self->delay;
505 if (self->spawnflags & 0x80000000)
513 VectorMA (self->enemy->absmin, 0.5, self->enemy->size, point);
517 self->spawnflags |= 0x80000000;
522 VectorMA (start, 2048, self->movedir, end);
537 if (self->spawnflags & 0x80000000)
539 self->spawnflags &= ~0x80000000;
562 if (!self->activator)
563 self->activator =
self;
564 self->spawnflags |= 0x80000001;
571 self->spawnflags &= ~1;
578 self->activator = activator;
579 if (self->spawnflags & 1)
592 self->s.modelindex = 1;
595 if (self->spawnflags & 64)
601 if (self->spawnflags & 2)
602 self->s.skinnum = 0xf2f2f0f0;
603 else if (self->spawnflags & 4)
604 self->s.skinnum = 0xd0d1d2d3;
605 else if (self->spawnflags & 8)
606 self->s.skinnum = 0xf3f3f1f1;
607 else if (self->spawnflags & 16)
608 self->s.skinnum = 0xdcdddedf;
609 else if (self->spawnflags & 32)
610 self->s.skinnum = 0xe0e1e2e3;
618 gi.
dprintf (
"%s at %s: %s is a bad target\n", self->classname,
vtos(self->s.origin), self->target);
636 if (self->spawnflags & 1)
646 self->nextthink =
level.time + 1;
660 style[0] =
'a' +
self->movedir[0] + (
level.time -
self->timestamp) /
FRAMETIME * self->movedir[2];
664 if ((
level.time - self->timestamp) <
self->speed)
668 else if (self->spawnflags & 1)
672 temp =
self->movedir[0];
673 self->movedir[0] =
self->movedir[1];
674 self->movedir[1] = temp;
675 self->movedir[2] *= -1;
689 e =
G_Find (e,
FOFS(targetname), self->target);
694 gi.
dprintf(
"%s at %s ", self->classname,
vtos(self->s.origin));
705 gi.
dprintf(
"%s target %s not found at %s\n", self->classname, self->target,
vtos(self->s.origin));
711 self->timestamp =
level.time;
717 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])
719 gi.
dprintf(
"target_lightramp has bad ramp (%s) at %s\n", self->message,
vtos(self->s.origin));
732 gi.
dprintf(
"%s with no target at %s\n", self->classname,
vtos(self->s.origin));
741 self->movedir[0] =
self->message[0] -
'a';
742 self->movedir[1] =
self->message[1] -
'a';
743 self->movedir[2] = (
self->movedir[1] -
self->movedir[0]) / (self->speed /
FRAMETIME);
760 if (self->last_move_time <
level.time)
763 self->last_move_time =
level.time + 0.5;
781 if (
level.time < self->timestamp)
787 self->timestamp =
level.time +
self->count;
789 self->activator = activator;
795 if (!self->targetname)
796 gi.
dprintf(
"untargeted %s at %s\n", self->classname,
vtos(self->s.origin));
void(* dprintf)(char *fmt,...)
void use_target_changelevel(edict_t *self, edict_t *other, edict_t *activator)
#define MOD_TARGET_BLASTER
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
void SP_target_secret(edict_t *ent)
#define VectorSubtract(a, b, c)
void SP_target_temp_entity(edict_t *ent)
void(* WritePosition)(vec3_t pos)
void(* multicast)(vec3_t origin, multicast_t to)
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 SP_target_speaker(edict_t *ent)
void SP_target_crosslevel_target(edict_t *self)
void SP_target_laser(edict_t *self)
void SP_target_blaster(edict_t *self)
#define CONTENTS_DEADMONSTER
void ED_CallSpawn(edict_t *ent)
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
void target_explosion_explode(edict_t *self)
void Use_Target_Speaker(edict_t *ent, edict_t *other, edict_t *activator)
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
struct gclient_s * client
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
void SP_target_lightramp(edict_t *self)
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 SP_target_explosion(edict_t *ent)
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 SP_target_splash(edict_t *self)
void target_earthquake_use(edict_t *self, edict_t *other, edict_t *activator)
void(* configstring)(int num, char *string)
int(* soundindex)(char *name)
void SP_target_earthquake(edict_t *self)
void SP_target_changelevel(edict_t *ent)
void(* positioned_sound)(vec3_t origin, edict_t *ent, int channel, int soundinedex, float volume, float attenuation, float timeofs)
void target_laser_off(edict_t *self)
vec_t VectorNormalize(vec3_t v)
int Q_stricmp(char *s1, char *s2)
void target_laser_use(edict_t *self, edict_t *other, edict_t *activator)
void SP_target_spawner(edict_t *self)
void(* unlinkentity)(edict_t *ent)
void target_laser_start(edict_t *self)
void use_target_secret(edict_t *ent, edict_t *other, edict_t *activator)
void(* use)(edict_t *self, edict_t *other, edict_t *activator)
void(* WriteDir)(vec3_t pos)
void SP_target_goal(edict_t *ent)
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 VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
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)
#define VectorSet(v, x, y, z)
void SP_target_crosslevel_trigger(edict_t *self)
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)
int VectorCompare(vec3_t v1, vec3_t v2)
void use_target_explosion(edict_t *self, edict_t *other, edict_t *activator)
void SP_target_help(edict_t *ent)
void(* linkentity)(edict_t *ent)
void target_earthquake_think(edict_t *self)
void Com_sprintf(char *dest, int size, char *fmt,...)
void T_RadiusDamage(edict_t *inflictor, edict_t *attacker, float damage, edict_t *ignore, float radius, int mod)
void(* bprintf)(int printlevel, char *fmt,...)