Quake II RTX doxygen  1.0 dev
g_spawn.c File Reference
#include "g_local.h"

Go to the source code of this file.

Classes

struct  spawn_func_t
 
struct  spawn_field_t
 

Functions

void SP_item_health (edict_t *self)
 
void SP_item_health_small (edict_t *self)
 
void SP_item_health_large (edict_t *self)
 
void SP_item_health_mega (edict_t *self)
 
void SP_info_player_start (edict_t *ent)
 
void SP_info_player_deathmatch (edict_t *ent)
 
void SP_info_player_coop (edict_t *ent)
 
void SP_info_player_intermission (edict_t *ent)
 
void SP_func_plat (edict_t *ent)
 
void SP_func_rotating (edict_t *ent)
 
void SP_func_button (edict_t *ent)
 
void SP_func_door (edict_t *ent)
 
void SP_func_door_secret (edict_t *ent)
 
void SP_func_door_rotating (edict_t *ent)
 
void SP_func_water (edict_t *ent)
 
void SP_func_train (edict_t *ent)
 
void SP_func_conveyor (edict_t *self)
 
void SP_func_wall (edict_t *self)
 
void SP_func_object (edict_t *self)
 
void SP_func_explosive (edict_t *self)
 
void SP_func_timer (edict_t *self)
 
void SP_func_areaportal (edict_t *ent)
 
void SP_func_clock (edict_t *ent)
 
void SP_func_killbox (edict_t *ent)
 
void SP_trigger_always (edict_t *ent)
 
void SP_trigger_once (edict_t *ent)
 
void SP_trigger_multiple (edict_t *ent)
 
void SP_trigger_relay (edict_t *ent)
 
void SP_trigger_push (edict_t *ent)
 
void SP_trigger_hurt (edict_t *ent)
 
void SP_trigger_key (edict_t *ent)
 
void SP_trigger_counter (edict_t *ent)
 
void SP_trigger_elevator (edict_t *ent)
 
void SP_trigger_gravity (edict_t *ent)
 
void SP_trigger_monsterjump (edict_t *ent)
 
void SP_target_temp_entity (edict_t *ent)
 
void SP_target_speaker (edict_t *ent)
 
void SP_target_explosion (edict_t *ent)
 
void SP_target_changelevel (edict_t *ent)
 
void SP_target_secret (edict_t *ent)
 
void SP_target_goal (edict_t *ent)
 
void SP_target_splash (edict_t *ent)
 
void SP_target_spawner (edict_t *ent)
 
void SP_target_blaster (edict_t *ent)
 
void SP_target_crosslevel_trigger (edict_t *ent)
 
void SP_target_crosslevel_target (edict_t *ent)
 
void SP_target_laser (edict_t *self)
 
void SP_target_help (edict_t *ent)
 
void SP_target_actor (edict_t *ent)
 
void SP_target_lightramp (edict_t *self)
 
void SP_target_earthquake (edict_t *ent)
 
void SP_target_character (edict_t *ent)
 
void SP_target_string (edict_t *ent)
 
void SP_worldspawn (edict_t *ent)
 
void SP_viewthing (edict_t *ent)
 
void SP_light (edict_t *self)
 
void SP_light_mine1 (edict_t *ent)
 
void SP_light_mine2 (edict_t *ent)
 
void SP_info_null (edict_t *self)
 
void SP_info_notnull (edict_t *self)
 
void SP_path_corner (edict_t *self)
 
void SP_point_combat (edict_t *self)
 
void SP_misc_explobox (edict_t *self)
 
void SP_misc_banner (edict_t *self)
 
void SP_misc_satellite_dish (edict_t *self)
 
void SP_misc_actor (edict_t *self)
 
void SP_misc_gib_arm (edict_t *self)
 
void SP_misc_gib_leg (edict_t *self)
 
void SP_misc_gib_head (edict_t *self)
 
void SP_misc_insane (edict_t *self)
 
void SP_misc_deadsoldier (edict_t *self)
 
void SP_misc_viper (edict_t *self)
 
void SP_misc_viper_bomb (edict_t *self)
 
void SP_misc_bigviper (edict_t *self)
 
void SP_misc_strogg_ship (edict_t *self)
 
void SP_misc_teleporter (edict_t *self)
 
void SP_misc_teleporter_dest (edict_t *self)
 
void SP_misc_blackhole (edict_t *self)
 
void SP_misc_eastertank (edict_t *self)
 
void SP_misc_easterchick (edict_t *self)
 
void SP_misc_easterchick2 (edict_t *self)
 
void SP_monster_berserk (edict_t *self)
 
void SP_monster_gladiator (edict_t *self)
 
void SP_monster_gunner (edict_t *self)
 
void SP_monster_infantry (edict_t *self)
 
void SP_monster_soldier_light (edict_t *self)
 
void SP_monster_soldier (edict_t *self)
 
void SP_monster_soldier_ss (edict_t *self)
 
void SP_monster_tank (edict_t *self)
 
void SP_monster_medic (edict_t *self)
 
void SP_monster_flipper (edict_t *self)
 
void SP_monster_chick (edict_t *self)
 
void SP_monster_parasite (edict_t *self)
 
void SP_monster_flyer (edict_t *self)
 
void SP_monster_brain (edict_t *self)
 
void SP_monster_floater (edict_t *self)
 
void SP_monster_hover (edict_t *self)
 
void SP_monster_mutant (edict_t *self)
 
void SP_monster_supertank (edict_t *self)
 
void SP_monster_boss2 (edict_t *self)
 
void SP_monster_jorg (edict_t *self)
 
void SP_monster_boss3_stand (edict_t *self)
 
void SP_monster_commander_body (edict_t *self)
 
void SP_turret_breach (edict_t *self)
 
void SP_turret_base (edict_t *self)
 
void SP_turret_driver (edict_t *self)
 
void ED_CallSpawn (edict_t *ent)
 
static char * ED_NewString (const char *string)
 
static qboolean ED_ParseField (const spawn_field_t *fields, const char *key, const char *value, byte *b)
 
void ED_ParseEdict (const char **data, edict_t *ent)
 
void G_FindTeams (void)
 
void SpawnEntities (const char *mapname, const char *entities, const char *spawnpoint)
 

Variables

static const spawn_func_t spawn_funcs []
 
static const spawn_field_t spawn_fields []
 
static const spawn_field_t temp_fields []
 
static const char single_statusbar []
 
static const char dm_statusbar []
 

Function Documentation

◆ ED_CallSpawn()

void ED_CallSpawn ( edict_t *  ent)

Definition at line 340 of file g_spawn.c.

341 {
342  const spawn_func_t *s;
343  gitem_t *item;
344  int i;
345 
346  if (!ent->classname) {
347  gi.dprintf("ED_CallSpawn: NULL classname\n");
348  return;
349  }
350 
351  // check item spawn functions
352  for (i = 0, item = itemlist ; i < game.num_items ; i++, item++) {
353  if (!item->classname)
354  continue;
355  if (!strcmp(item->classname, ent->classname)) {
356  // found it
357  SpawnItem(ent, item);
358  return;
359  }
360  }
361 
362  // check normal spawn functions
363  for (s = spawn_funcs ; s->name ; s++) {
364  if (!strcmp(s->name, ent->classname)) {
365  // found it
366  s->spawn(ent);
367  return;
368  }
369  }
370  gi.dprintf("%s doesn't have a spawn function\n", ent->classname);
371 }

Referenced by medic_cable_attack(), SpawnEntities(), and use_target_spawner().

◆ ED_NewString()

static char* ED_NewString ( const char *  string)
static

Definition at line 378 of file g_spawn.c.

379 {
380  char *newb, *new_p;
381  int i, l;
382 
383  l = strlen(string) + 1;
384 
385  newb = gi.TagMalloc(l, TAG_LEVEL);
386 
387  new_p = newb;
388 
389  for (i = 0 ; i < l ; i++) {
390  if (string[i] == '\\' && i < l - 1) {
391  i++;
392  if (string[i] == 'n')
393  *new_p++ = '\n';
394  else
395  *new_p++ = '\\';
396  } else
397  *new_p++ = string[i];
398  }
399 
400  return newb;
401 }

Referenced by ED_ParseField().

◆ ED_ParseEdict()

void ED_ParseEdict ( const char **  data,
edict_t *  ent 
)

Definition at line 467 of file g_spawn.c.

468 {
469  qboolean init;
470  char *key, *value;
471 
472  init = qfalse;
473  memset(&st, 0, sizeof(st));
474 
475 // go through all the dictionary pairs
476  while (1) {
477  // parse key
478  key = COM_Parse(data);
479  if (key[0] == '}')
480  break;
481  if (!*data)
482  gi.error("%s: EOF without closing brace", __func__);
483 
484  // parse value
485  value = COM_Parse(data);
486  if (!*data)
487  gi.error("%s: EOF without closing brace", __func__);
488 
489  if (value[0] == '}')
490  gi.error("%s: closing brace without data", __func__);
491 
492  init = qtrue;
493 
494  // keynames with a leading underscore are used for utility comments,
495  // and are immediately discarded by quake
496  if (key[0] == '_')
497  continue;
498 
499  if (!ED_ParseField(spawn_fields, key, value, (byte *)ent)) {
500  if (!ED_ParseField(temp_fields, key, value, (byte *)&st)) {
501  gi.dprintf("%s: %s is not a field\n", __func__, key);
502  }
503  }
504  }
505 
506  if (!init)
507  memset(ent, 0, sizeof(*ent));
508 }

Referenced by SpawnEntities().

◆ ED_ParseField()

static qboolean ED_ParseField ( const spawn_field_t fields,
const char *  key,
const char *  value,
byte *  b 
)
static

Definition at line 414 of file g_spawn.c.

415 {
416  const spawn_field_t *f;
417  float v;
418  vec3_t vec;
419 
420  for (f = fields ; f->name ; f++) {
421  if (!Q_stricmp(f->name, key)) {
422  // found it
423  switch (f->type) {
424  case F_LSTRING:
425  *(char **)(b + f->ofs) = ED_NewString(value);
426  break;
427  case F_VECTOR:
428  if (sscanf(value, "%f %f %f", &vec[0], &vec[1], &vec[2]) != 3) {
429  gi.dprintf("%s: couldn't parse '%s'\n", __func__, key);
430  VectorClear(vec);
431  }
432  ((float *)(b + f->ofs))[0] = vec[0];
433  ((float *)(b + f->ofs))[1] = vec[1];
434  ((float *)(b + f->ofs))[2] = vec[2];
435  break;
436  case F_INT:
437  *(int *)(b + f->ofs) = atoi(value);
438  break;
439  case F_FLOAT:
440  *(float *)(b + f->ofs) = atof(value);
441  break;
442  case F_ANGLEHACK:
443  v = atof(value);
444  ((float *)(b + f->ofs))[0] = 0;
445  ((float *)(b + f->ofs))[1] = v;
446  ((float *)(b + f->ofs))[2] = 0;
447  break;
448  case F_IGNORE:
449  break;
450  default:
451  break;
452  }
453  return qtrue;
454  }
455  }
456  return qfalse;
457 }

Referenced by ED_ParseEdict().

◆ G_FindTeams()

void G_FindTeams ( void  )

Definition at line 521 of file g_spawn.c.

522 {
523  edict_t *e, *e2, *chain;
524  int i, j;
525  int c, c2;
526 
527  c = 0;
528  c2 = 0;
529  for (i = 1, e = g_edicts + i ; i < globals.num_edicts ; i++, e++) {
530  if (!e->inuse)
531  continue;
532  if (!e->team)
533  continue;
534  if (e->flags & FL_TEAMSLAVE)
535  continue;
536  chain = e;
537  e->teammaster = e;
538  c++;
539  c2++;
540  for (j = i + 1, e2 = e + 1 ; j < globals.num_edicts ; j++, e2++) {
541  if (!e2->inuse)
542  continue;
543  if (!e2->team)
544  continue;
545  if (e2->flags & FL_TEAMSLAVE)
546  continue;
547  if (!strcmp(e->team, e2->team)) {
548  c2++;
549  chain->teamchain = e2;
550  e2->teammaster = e;
551  chain = e2;
552  e2->flags |= FL_TEAMSLAVE;
553  }
554  }
555  }
556 
557  gi.dprintf("%i teams with %i entities\n", c, c2);
558 }

Referenced by SpawnEntities().

◆ SP_func_areaportal()

void SP_func_areaportal ( edict_t *  ent)

Definition at line 42 of file g_misc.c.

43 {
44  ent->use = Use_Areaportal;
45  ent->count = 0; // always start closed;
46 }

◆ SP_func_button()

void SP_func_button ( edict_t *  ent)

Definition at line 726 of file g_func.c.

727 {
728  vec3_t abs_movedir;
729  float dist;
730 
731  G_SetMovedir(ent->s.angles, ent->movedir);
732  ent->movetype = MOVETYPE_STOP;
733  ent->solid = SOLID_BSP;
734  gi.setmodel(ent, ent->model);
735 
736  if (ent->sounds != 1)
737  ent->moveinfo.sound_start = gi.soundindex("switches/butn2.wav");
738 
739  if (!ent->speed)
740  ent->speed = 40;
741  if (!ent->accel)
742  ent->accel = ent->speed;
743  if (!ent->decel)
744  ent->decel = ent->speed;
745 
746  if (!ent->wait)
747  ent->wait = 3;
748  if (!st.lip)
749  st.lip = 4;
750 
751  VectorCopy(ent->s.origin, ent->pos1);
752  abs_movedir[0] = fabs(ent->movedir[0]);
753  abs_movedir[1] = fabs(ent->movedir[1]);
754  abs_movedir[2] = fabs(ent->movedir[2]);
755  dist = abs_movedir[0] * ent->size[0] + abs_movedir[1] * ent->size[1] + abs_movedir[2] * ent->size[2] - st.lip;
756  VectorMA(ent->pos1, dist, ent->movedir, ent->pos2);
757 
758  ent->use = button_use;
759  ent->s.effects |= EF_ANIM01;
760 
761  if (ent->health) {
762  ent->max_health = ent->health;
763  ent->die = button_killed;
764  ent->takedamage = DAMAGE_YES;
765  } else if (! ent->targetname)
766  ent->touch = button_touch;
767 
768  ent->moveinfo.state = STATE_BOTTOM;
769 
770  ent->moveinfo.speed = ent->speed;
771  ent->moveinfo.accel = ent->accel;
772  ent->moveinfo.decel = ent->decel;
773  ent->moveinfo.wait = ent->wait;
774  VectorCopy(ent->pos1, ent->moveinfo.start_origin);
775  VectorCopy(ent->s.angles, ent->moveinfo.start_angles);
776  VectorCopy(ent->pos2, ent->moveinfo.end_origin);
777  VectorCopy(ent->s.angles, ent->moveinfo.end_angles);
778 
779  gi.linkentity(ent);
780 }

◆ SP_func_clock()

void SP_func_clock ( edict_t *  ent)

Definition at line 1670 of file g_misc.c.

1671 {
1672  if (!self->target) {
1673  gi.dprintf("%s with no target at %s\n", self->classname, vtos(self->s.origin));
1674  G_FreeEdict(self);
1675  return;
1676  }
1677 
1678  if ((self->spawnflags & 2) && (!self->count)) {
1679  gi.dprintf("%s with no count at %s\n", self->classname, vtos(self->s.origin));
1680  G_FreeEdict(self);
1681  return;
1682  }
1683 
1684  if ((self->spawnflags & 1) && (!self->count))
1685  self->count = 60 * 60;;
1686 
1687  func_clock_reset(self);
1688 
1689  self->message = gi.TagMalloc(CLOCK_MESSAGE_SIZE, TAG_LEVEL);
1690 
1691  self->think = func_clock_think;
1692 
1693  if (self->spawnflags & 4)
1694  self->use = func_clock_use;
1695  else
1696  self->nextthink = level.time + 1;
1697 }

◆ SP_func_conveyor()

void SP_func_conveyor ( edict_t *  self)

Definition at line 1734 of file g_func.c.

1735 {
1736  if (!self->speed)
1737  self->speed = 100;
1738 
1739  if (!(self->spawnflags & 1)) {
1740  self->count = self->speed;
1741  self->speed = 0;
1742  }
1743 
1744  self->use = func_conveyor_use;
1745 
1746  gi.setmodel(self, self->model);
1747  self->solid = SOLID_BSP;
1748  gi.linkentity(self);
1749 }

◆ SP_func_door()

void SP_func_door ( edict_t *  ent)

Definition at line 1078 of file g_func.c.

1079 {
1080  vec3_t abs_movedir;
1081 
1082  if (ent->sounds != 1) {
1083  ent->moveinfo.sound_start = gi.soundindex("doors/dr1_strt.wav");
1084  ent->moveinfo.sound_middle = gi.soundindex("doors/dr1_mid.wav");
1085  ent->moveinfo.sound_end = gi.soundindex("doors/dr1_end.wav");
1086  }
1087 
1088  G_SetMovedir(ent->s.angles, ent->movedir);
1089  ent->movetype = MOVETYPE_PUSH;
1090  ent->solid = SOLID_BSP;
1091  gi.setmodel(ent, ent->model);
1092 
1093  ent->blocked = door_blocked;
1094  ent->use = door_use;
1095 
1096  if (!ent->speed)
1097  ent->speed = 100;
1098  if (deathmatch->value)
1099  ent->speed *= 2;
1100 
1101  if (!ent->accel)
1102  ent->accel = ent->speed;
1103  if (!ent->decel)
1104  ent->decel = ent->speed;
1105 
1106  if (!ent->wait)
1107  ent->wait = 3;
1108  if (!st.lip)
1109  st.lip = 8;
1110  if (!ent->dmg)
1111  ent->dmg = 2;
1112 
1113  // calculate second position
1114  VectorCopy(ent->s.origin, ent->pos1);
1115  abs_movedir[0] = fabs(ent->movedir[0]);
1116  abs_movedir[1] = fabs(ent->movedir[1]);
1117  abs_movedir[2] = fabs(ent->movedir[2]);
1118  ent->moveinfo.distance = abs_movedir[0] * ent->size[0] + abs_movedir[1] * ent->size[1] + abs_movedir[2] * ent->size[2] - st.lip;
1119  VectorMA(ent->pos1, ent->moveinfo.distance, ent->movedir, ent->pos2);
1120 
1121  // if it starts open, switch the positions
1122  if (ent->spawnflags & DOOR_START_OPEN) {
1123  VectorCopy(ent->pos2, ent->s.origin);
1124  VectorCopy(ent->pos1, ent->pos2);
1125  VectorCopy(ent->s.origin, ent->pos1);
1126  }
1127 
1128  ent->moveinfo.state = STATE_BOTTOM;
1129 
1130  if (ent->health) {
1131  ent->takedamage = DAMAGE_YES;
1132  ent->die = door_killed;
1133  ent->max_health = ent->health;
1134  } else if (ent->targetname && ent->message) {
1135  gi.soundindex("misc/talk.wav");
1136  ent->touch = door_touch;
1137  }
1138 
1139  ent->moveinfo.speed = ent->speed;
1140  ent->moveinfo.accel = ent->accel;
1141  ent->moveinfo.decel = ent->decel;
1142  ent->moveinfo.wait = ent->wait;
1143  VectorCopy(ent->pos1, ent->moveinfo.start_origin);
1144  VectorCopy(ent->s.angles, ent->moveinfo.start_angles);
1145  VectorCopy(ent->pos2, ent->moveinfo.end_origin);
1146  VectorCopy(ent->s.angles, ent->moveinfo.end_angles);
1147 
1148  if (ent->spawnflags & 16)
1149  ent->s.effects |= EF_ANIM_ALL;
1150  if (ent->spawnflags & 64)
1151  ent->s.effects |= EF_ANIM_ALLFAST;
1152 
1153  // to simplify logic elsewhere, make non-teamed doors into a team of one
1154  if (!ent->team)
1155  ent->teammaster = ent;
1156 
1157  gi.linkentity(ent);
1158 
1159  ent->nextthink = level.time + FRAMETIME;
1160  if (ent->health || ent->targetname)
1161  ent->think = Think_CalcMoveSpeed;
1162  else
1163  ent->think = Think_SpawnDoorTrigger;
1164 }

◆ SP_func_door_rotating()

void SP_func_door_rotating ( edict_t *  ent)

Definition at line 1196 of file g_func.c.

1197 {
1198  VectorClear(ent->s.angles);
1199 
1200  // set the axis of rotation
1201  VectorClear(ent->movedir);
1202  if (ent->spawnflags & DOOR_X_AXIS)
1203  ent->movedir[2] = 1.0;
1204  else if (ent->spawnflags & DOOR_Y_AXIS)
1205  ent->movedir[0] = 1.0;
1206  else // Z_AXIS
1207  ent->movedir[1] = 1.0;
1208 
1209  // check for reverse rotation
1210  if (ent->spawnflags & DOOR_REVERSE)
1211  VectorNegate(ent->movedir, ent->movedir);
1212 
1213  if (!st.distance) {
1214  gi.dprintf("%s at %s with no distance set\n", ent->classname, vtos(ent->s.origin));
1215  st.distance = 90;
1216  }
1217 
1218  VectorCopy(ent->s.angles, ent->pos1);
1219  VectorMA(ent->s.angles, st.distance, ent->movedir, ent->pos2);
1220  ent->moveinfo.distance = st.distance;
1221 
1222  ent->movetype = MOVETYPE_PUSH;
1223  ent->solid = SOLID_BSP;
1224  gi.setmodel(ent, ent->model);
1225 
1226  ent->blocked = door_blocked;
1227  ent->use = door_use;
1228 
1229  if (!ent->speed)
1230  ent->speed = 100;
1231  if (!ent->accel)
1232  ent->accel = ent->speed;
1233  if (!ent->decel)
1234  ent->decel = ent->speed;
1235 
1236  if (!ent->wait)
1237  ent->wait = 3;
1238  if (!ent->dmg)
1239  ent->dmg = 2;
1240 
1241  if (ent->sounds != 1) {
1242  ent->moveinfo.sound_start = gi.soundindex("doors/dr1_strt.wav");
1243  ent->moveinfo.sound_middle = gi.soundindex("doors/dr1_mid.wav");
1244  ent->moveinfo.sound_end = gi.soundindex("doors/dr1_end.wav");
1245  }
1246 
1247  // if it starts open, switch the positions
1248  if (ent->spawnflags & DOOR_START_OPEN) {
1249  VectorCopy(ent->pos2, ent->s.angles);
1250  VectorCopy(ent->pos1, ent->pos2);
1251  VectorCopy(ent->s.angles, ent->pos1);
1252  VectorNegate(ent->movedir, ent->movedir);
1253  }
1254 
1255  if (ent->health) {
1256  ent->takedamage = DAMAGE_YES;
1257  ent->die = door_killed;
1258  ent->max_health = ent->health;
1259  }
1260 
1261  if (ent->targetname && ent->message) {
1262  gi.soundindex("misc/talk.wav");
1263  ent->touch = door_touch;
1264  }
1265 
1266  ent->moveinfo.state = STATE_BOTTOM;
1267  ent->moveinfo.speed = ent->speed;
1268  ent->moveinfo.accel = ent->accel;
1269  ent->moveinfo.decel = ent->decel;
1270  ent->moveinfo.wait = ent->wait;
1271  VectorCopy(ent->s.origin, ent->moveinfo.start_origin);
1272  VectorCopy(ent->pos1, ent->moveinfo.start_angles);
1273  VectorCopy(ent->s.origin, ent->moveinfo.end_origin);
1274  VectorCopy(ent->pos2, ent->moveinfo.end_angles);
1275 
1276  if (ent->spawnflags & 16)
1277  ent->s.effects |= EF_ANIM_ALL;
1278 
1279  // to simplify logic elsewhere, make non-teamed doors into a team of one
1280  if (!ent->team)
1281  ent->teammaster = ent;
1282 
1283  gi.linkentity(ent);
1284 
1285  ent->nextthink = level.time + FRAMETIME;
1286  if (ent->health || ent->targetname)
1287  ent->think = Think_CalcMoveSpeed;
1288  else
1289  ent->think = Think_SpawnDoorTrigger;
1290 }

◆ SP_func_door_secret()

void SP_func_door_secret ( edict_t *  ent)

Definition at line 1855 of file g_func.c.

1856 {
1857  vec3_t forward, right, up;
1858  float side;
1859  float width;
1860  float length;
1861 
1862  ent->moveinfo.sound_start = gi.soundindex("doors/dr1_strt.wav");
1863  ent->moveinfo.sound_middle = gi.soundindex("doors/dr1_mid.wav");
1864  ent->moveinfo.sound_end = gi.soundindex("doors/dr1_end.wav");
1865 
1866  ent->movetype = MOVETYPE_PUSH;
1867  ent->solid = SOLID_BSP;
1868  gi.setmodel(ent, ent->model);
1869 
1870  ent->blocked = door_secret_blocked;
1871  ent->use = door_secret_use;
1872 
1873  if (!(ent->targetname) || (ent->spawnflags & SECRET_ALWAYS_SHOOT)) {
1874  ent->health = 0;
1875  ent->takedamage = DAMAGE_YES;
1876  ent->die = door_secret_die;
1877  }
1878 
1879  if (!ent->dmg)
1880  ent->dmg = 2;
1881 
1882  if (!ent->wait)
1883  ent->wait = 5;
1884 
1885  ent->moveinfo.accel =
1886  ent->moveinfo.decel =
1887  ent->moveinfo.speed = 50;
1888 
1889  // calculate positions
1890  AngleVectors(ent->s.angles, forward, right, up);
1891  VectorClear(ent->s.angles);
1892  side = 1.0 - (ent->spawnflags & SECRET_1ST_LEFT);
1893  if (ent->spawnflags & SECRET_1ST_DOWN)
1894  width = fabs(DotProduct(up, ent->size));
1895  else
1896  width = fabs(DotProduct(right, ent->size));
1897  length = fabs(DotProduct(forward, ent->size));
1898  if (ent->spawnflags & SECRET_1ST_DOWN)
1899  VectorMA(ent->s.origin, -1 * width, up, ent->pos1);
1900  else
1901  VectorMA(ent->s.origin, side * width, right, ent->pos1);
1902  VectorMA(ent->pos1, length, forward, ent->pos2);
1903 
1904  if (ent->health) {
1905  ent->takedamage = DAMAGE_YES;
1906  ent->die = door_killed;
1907  ent->max_health = ent->health;
1908  } else if (ent->targetname && ent->message) {
1909  gi.soundindex("misc/talk.wav");
1910  ent->touch = door_touch;
1911  }
1912 
1913  ent->classname = "func_door";
1914 
1915  gi.linkentity(ent);
1916 }

◆ SP_func_explosive()

void SP_func_explosive ( edict_t *  self)

Definition at line 771 of file g_misc.c.

772 {
773  if (deathmatch->value) {
774  // auto-remove for deathmatch
775  G_FreeEdict(self);
776  return;
777  }
778 
779  self->movetype = MOVETYPE_PUSH;
780 
781  gi.modelindex("models/objects/debris1/tris.md2");
782  gi.modelindex("models/objects/debris2/tris.md2");
783 
784  gi.setmodel(self, self->model);
785 
786  if (self->spawnflags & 1) {
787  self->svflags |= SVF_NOCLIENT;
788  self->solid = SOLID_NOT;
789  self->use = func_explosive_spawn;
790  } else {
791  self->solid = SOLID_BSP;
792  if (self->targetname)
793  self->use = func_explosive_use;
794  }
795 
796  if (self->spawnflags & 2)
797  self->s.effects |= EF_ANIM_ALL;
798  if (self->spawnflags & 4)
799  self->s.effects |= EF_ANIM_ALLFAST;
800 
801  if (self->use != func_explosive_use) {
802  if (!self->health)
803  self->health = 100;
804  self->die = func_explosive_explode;
805  self->takedamage = DAMAGE_YES;
806  }
807 
808  gi.linkentity(self);
809 }

◆ SP_func_killbox()

void SP_func_killbox ( edict_t *  ent)

Definition at line 1927 of file g_func.c.

1928 {
1929  gi.setmodel(ent, ent->model);
1930  ent->use = use_killbox;
1931  ent->svflags = SVF_NOCLIENT;
1932 }

◆ SP_func_object()

void SP_func_object ( edict_t *  self)

Definition at line 646 of file g_misc.c.

647 {
648  gi.setmodel(self, self->model);
649 
650  self->mins[0] += 1;
651  self->mins[1] += 1;
652  self->mins[2] += 1;
653  self->maxs[0] -= 1;
654  self->maxs[1] -= 1;
655  self->maxs[2] -= 1;
656 
657  if (!self->dmg)
658  self->dmg = 100;
659 
660  if (self->spawnflags == 0) {
661  self->solid = SOLID_BSP;
662  self->movetype = MOVETYPE_PUSH;
663  self->think = func_object_release;
664  self->nextthink = level.time + 2 * FRAMETIME;
665  } else {
666  self->solid = SOLID_NOT;
667  self->movetype = MOVETYPE_PUSH;
668  self->use = func_object_use;
669  self->svflags |= SVF_NOCLIENT;
670  }
671 
672  if (self->spawnflags & 2)
673  self->s.effects |= EF_ANIM_ALL;
674  if (self->spawnflags & 4)
675  self->s.effects |= EF_ANIM_ALLFAST;
676 
677  self->clipmask = MASK_MONSTERSOLID;
678 
679  gi.linkentity(self);
680 }

◆ SP_func_plat()

void SP_func_plat ( edict_t *  ent)

Definition at line 483 of file g_func.c.

484 {
485  VectorClear(ent->s.angles);
486  ent->solid = SOLID_BSP;
487  ent->movetype = MOVETYPE_PUSH;
488 
489  gi.setmodel(ent, ent->model);
490 
491  ent->blocked = plat_blocked;
492 
493  if (!ent->speed)
494  ent->speed = 20;
495  else
496  ent->speed *= 0.1;
497 
498  if (!ent->accel)
499  ent->accel = 5;
500  else
501  ent->accel *= 0.1;
502 
503  if (!ent->decel)
504  ent->decel = 5;
505  else
506  ent->decel *= 0.1;
507 
508  if (!ent->dmg)
509  ent->dmg = 2;
510 
511  if (!st.lip)
512  st.lip = 8;
513 
514  // pos1 is the top position, pos2 is the bottom
515  VectorCopy(ent->s.origin, ent->pos1);
516  VectorCopy(ent->s.origin, ent->pos2);
517  if (st.height)
518  ent->pos2[2] -= st.height;
519  else
520  ent->pos2[2] -= (ent->maxs[2] - ent->mins[2]) - st.lip;
521 
522  ent->use = Use_Plat;
523 
524  plat_spawn_inside_trigger(ent); // the "start moving" trigger
525 
526  if (ent->targetname) {
527  ent->moveinfo.state = STATE_UP;
528  } else {
529  VectorCopy(ent->pos2, ent->s.origin);
530  gi.linkentity(ent);
531  ent->moveinfo.state = STATE_BOTTOM;
532  }
533 
534  ent->moveinfo.speed = ent->speed;
535  ent->moveinfo.accel = ent->accel;
536  ent->moveinfo.decel = ent->decel;
537  ent->moveinfo.wait = ent->wait;
538  VectorCopy(ent->pos1, ent->moveinfo.start_origin);
539  VectorCopy(ent->s.angles, ent->moveinfo.start_angles);
540  VectorCopy(ent->pos2, ent->moveinfo.end_origin);
541  VectorCopy(ent->s.angles, ent->moveinfo.end_angles);
542 
543  ent->moveinfo.sound_start = gi.soundindex("plats/pt1_strt.wav");
544  ent->moveinfo.sound_middle = gi.soundindex("plats/pt1_mid.wav");
545  ent->moveinfo.sound_end = gi.soundindex("plats/pt1_end.wav");
546 }

◆ SP_func_rotating()

void SP_func_rotating ( edict_t *  ent)

Definition at line 587 of file g_func.c.

588 {
589  ent->solid = SOLID_BSP;
590  if (ent->spawnflags & 32)
591  ent->movetype = MOVETYPE_STOP;
592  else
593  ent->movetype = MOVETYPE_PUSH;
594 
595  // set the axis of rotation
596  VectorClear(ent->movedir);
597  if (ent->spawnflags & 4)
598  ent->movedir[2] = 1.0;
599  else if (ent->spawnflags & 8)
600  ent->movedir[0] = 1.0;
601  else // Z_AXIS
602  ent->movedir[1] = 1.0;
603 
604  // check for reverse rotation
605  if (ent->spawnflags & 2)
606  VectorNegate(ent->movedir, ent->movedir);
607 
608  if (!ent->speed)
609  ent->speed = 100;
610  if (!ent->dmg)
611  ent->dmg = 2;
612 
613 // ent->moveinfo.sound_middle = "doors/hydro1.wav";
614 
615  ent->use = rotating_use;
616  if (ent->dmg)
617  ent->blocked = rotating_blocked;
618 
619  if (ent->spawnflags & 1)
620  ent->use(ent, NULL, NULL);
621 
622  if (ent->spawnflags & 64)
623  ent->s.effects |= EF_ANIM_ALL;
624  if (ent->spawnflags & 128)
625  ent->s.effects |= EF_ANIM_ALLFAST;
626 
627  gi.setmodel(ent, ent->model);
628  gi.linkentity(ent);
629 }

◆ SP_func_timer()

void SP_func_timer ( edict_t *  self)

Definition at line 1692 of file g_func.c.

1693 {
1694  if (!self->wait)
1695  self->wait = 1.0;
1696 
1697  self->use = func_timer_use;
1698  self->think = func_timer_think;
1699 
1700  if (self->random >= self->wait) {
1701  self->random = self->wait - FRAMETIME;
1702  gi.dprintf("func_timer at %s has random >= wait\n", vtos(self->s.origin));
1703  }
1704 
1705  if (self->spawnflags & 1) {
1706  self->nextthink = level.time + 1.0 + st.pausetime + self->delay + self->wait + crandom() * self->random;
1707  self->activator = self;
1708  }
1709 
1710  self->svflags = SVF_NOCLIENT;
1711 }

◆ SP_func_train()

void SP_func_train ( edict_t *  ent)

Definition at line 1562 of file g_func.c.

1563 {
1564  self->movetype = MOVETYPE_PUSH;
1565 
1566  VectorClear(self->s.angles);
1567  self->blocked = train_blocked;
1568  if (self->spawnflags & TRAIN_BLOCK_STOPS)
1569  self->dmg = 0;
1570  else {
1571  if (!self->dmg)
1572  self->dmg = 100;
1573  }
1574  self->solid = SOLID_BSP;
1575  gi.setmodel(self, self->model);
1576 
1577  if (st.noise)
1578  self->moveinfo.sound_middle = gi.soundindex(st.noise);
1579 
1580  if (!self->speed)
1581  self->speed = 100;
1582 
1583  self->moveinfo.speed = self->speed;
1584  self->moveinfo.accel = self->moveinfo.decel = self->moveinfo.speed;
1585 
1586  self->use = train_use;
1587 
1588  gi.linkentity(self);
1589 
1590  if (self->target) {
1591  // start trains on the second frame, to make sure their targets have had
1592  // a chance to spawn
1593  self->nextthink = level.time + FRAMETIME;
1594  self->think = func_train_find;
1595  } else {
1596  gi.dprintf("func_train without a target at %s\n", vtos(self->absmin));
1597  }
1598 }

◆ SP_func_wall()

void SP_func_wall ( edict_t *  self)

Definition at line 573 of file g_misc.c.

574 {
575  self->movetype = MOVETYPE_PUSH;
576  gi.setmodel(self, self->model);
577 
578  if (self->spawnflags & 8)
579  self->s.effects |= EF_ANIM_ALL;
580  if (self->spawnflags & 16)
581  self->s.effects |= EF_ANIM_ALLFAST;
582 
583  // just a wall
584  if ((self->spawnflags & 7) == 0) {
585  self->solid = SOLID_BSP;
586  gi.linkentity(self);
587  return;
588  }
589 
590  // it must be TRIGGER_SPAWN
591  if (!(self->spawnflags & 1)) {
592 // gi.dprintf("func_wall missing TRIGGER_SPAWN\n");
593  self->spawnflags |= 1;
594  }
595 
596  // yell if the spawnflags are odd
597  if (self->spawnflags & 4) {
598  if (!(self->spawnflags & 2)) {
599  gi.dprintf("func_wall START_ON without TOGGLE\n");
600  self->spawnflags |= 2;
601  }
602  }
603 
604  self->use = func_wall_use;
605  if (self->spawnflags & 4) {
606  self->solid = SOLID_BSP;
607  } else {
608  self->solid = SOLID_NOT;
609  self->svflags |= SVF_NOCLIENT;
610  }
611  gi.linkentity(self);
612 }

◆ SP_func_water()

void SP_func_water ( edict_t *  ent)

Definition at line 1308 of file g_func.c.

1309 {
1310  vec3_t abs_movedir;
1311 
1312  G_SetMovedir(self->s.angles, self->movedir);
1313  self->movetype = MOVETYPE_PUSH;
1314  self->solid = SOLID_BSP;
1315  gi.setmodel(self, self->model);
1316 
1317  switch (self->sounds) {
1318  default:
1319  break;
1320 
1321  case 1: // water
1322  self->moveinfo.sound_start = gi.soundindex("world/mov_watr.wav");
1323  self->moveinfo.sound_end = gi.soundindex("world/stp_watr.wav");
1324  break;
1325 
1326  case 2: // lava
1327  self->moveinfo.sound_start = gi.soundindex("world/mov_watr.wav");
1328  self->moveinfo.sound_end = gi.soundindex("world/stp_watr.wav");
1329  break;
1330  }
1331 
1332  // calculate second position
1333  VectorCopy(self->s.origin, self->pos1);
1334  abs_movedir[0] = fabs(self->movedir[0]);
1335  abs_movedir[1] = fabs(self->movedir[1]);
1336  abs_movedir[2] = fabs(self->movedir[2]);
1337  self->moveinfo.distance = abs_movedir[0] * self->size[0] + abs_movedir[1] * self->size[1] + abs_movedir[2] * self->size[2] - st.lip;
1338  VectorMA(self->pos1, self->moveinfo.distance, self->movedir, self->pos2);
1339 
1340  // if it starts open, switch the positions
1341  if (self->spawnflags & DOOR_START_OPEN) {
1342  VectorCopy(self->pos2, self->s.origin);
1343  VectorCopy(self->pos1, self->pos2);
1344  VectorCopy(self->s.origin, self->pos1);
1345  }
1346 
1347  VectorCopy(self->pos1, self->moveinfo.start_origin);
1348  VectorCopy(self->s.angles, self->moveinfo.start_angles);
1349  VectorCopy(self->pos2, self->moveinfo.end_origin);
1350  VectorCopy(self->s.angles, self->moveinfo.end_angles);
1351 
1352  self->moveinfo.state = STATE_BOTTOM;
1353 
1354  if (!self->speed)
1355  self->speed = 25;
1356  self->moveinfo.accel = self->moveinfo.decel = self->moveinfo.speed = self->speed;
1357 
1358  if (!self->wait)
1359  self->wait = -1;
1360  self->moveinfo.wait = self->wait;
1361 
1362  self->use = door_use;
1363 
1364  if (self->wait == -1)
1365  self->spawnflags |= DOOR_TOGGLE;
1366 
1367  self->classname = "func_door";
1368 
1369  gi.linkentity(self);
1370 }

◆ SP_info_notnull()

void SP_info_notnull ( edict_t *  self)

Definition at line 497 of file g_misc.c.

498 {
499  VectorCopy(self->s.origin, self->absmin);
500  VectorCopy(self->s.origin, self->absmax);
501 }

◆ SP_info_null()

void SP_info_null ( edict_t *  self)

Definition at line 488 of file g_misc.c.

489 {
490  G_FreeEdict(self);
491 }

◆ SP_info_player_coop()

void SP_info_player_coop ( edict_t *  ent)

Definition at line 130 of file p_client.c.

131 {
132  if (!coop->value) {
133  G_FreeEdict(self);
134  return;
135  }
136 
137  if ((Q_stricmp(level.mapname, "jail2") == 0) ||
138  (Q_stricmp(level.mapname, "jail4") == 0) ||
139  (Q_stricmp(level.mapname, "mine1") == 0) ||
140  (Q_stricmp(level.mapname, "mine2") == 0) ||
141  (Q_stricmp(level.mapname, "mine3") == 0) ||
142  (Q_stricmp(level.mapname, "mine4") == 0) ||
143  (Q_stricmp(level.mapname, "lab") == 0) ||
144  (Q_stricmp(level.mapname, "boss1") == 0) ||
145  (Q_stricmp(level.mapname, "fact3") == 0) ||
146  (Q_stricmp(level.mapname, "biggun") == 0) ||
147  (Q_stricmp(level.mapname, "space") == 0) ||
148  (Q_stricmp(level.mapname, "command") == 0) ||
149  (Q_stricmp(level.mapname, "power2") == 0) ||
150  (Q_stricmp(level.mapname, "strike") == 0)) {
151  // invoke one of our gross, ugly, disgusting hacks
152  self->think = SP_FixCoopSpots;
153  self->nextthink = level.time + FRAMETIME;
154  }
155 }

◆ SP_info_player_deathmatch()

void SP_info_player_deathmatch ( edict_t *  ent)

Definition at line 117 of file p_client.c.

118 {
119  if (!deathmatch->value) {
120  G_FreeEdict(self);
121  return;
122  }
124 }

◆ SP_info_player_intermission()

void SP_info_player_intermission ( edict_t *  ent)

◆ SP_info_player_start()

void SP_info_player_start ( edict_t *  ent)

Definition at line 103 of file p_client.c.

104 {
105  if (!coop->value)
106  return;
107  if (Q_stricmp(level.mapname, "security") == 0) {
108  // invoke one of our gross, ugly, disgusting hacks
109  self->think = SP_CreateCoopSpots;
110  self->nextthink = level.time + FRAMETIME;
111  }
112 }

◆ SP_item_health()

void SP_item_health ( edict_t *  self)

Definition at line 2071 of file g_items.c.

2072 {
2073  if (deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH)) {
2074  G_FreeEdict(self);
2075  return;
2076  }
2077 
2078  self->model = "models/items/healing/medium/tris.md2";
2079  self->count = 10;
2080  SpawnItem(self, FindItem("Health"));
2081  gi.soundindex("items/n_health.wav");
2082 }

◆ SP_item_health_large()

void SP_item_health_large ( edict_t *  self)

Definition at line 2102 of file g_items.c.

2103 {
2104  if (deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH)) {
2105  G_FreeEdict(self);
2106  return;
2107  }
2108 
2109  self->model = "models/items/healing/large/tris.md2";
2110  self->count = 25;
2111  SpawnItem(self, FindItem("Health"));
2112  gi.soundindex("items/l_health.wav");
2113 }

◆ SP_item_health_mega()

void SP_item_health_mega ( edict_t *  self)

Definition at line 2117 of file g_items.c.

2118 {
2119  if (deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH)) {
2120  G_FreeEdict(self);
2121  return;
2122  }
2123 
2124  self->model = "models/items/mega_h/tris.md2";
2125  self->count = 100;
2126  SpawnItem(self, FindItem("Health"));
2127  gi.soundindex("items/m_health.wav");
2128  self->style = HEALTH_IGNORE_MAX | HEALTH_TIMED;
2129 }

◆ SP_item_health_small()

void SP_item_health_small ( edict_t *  self)

Definition at line 2086 of file g_items.c.

2087 {
2088  if (deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH)) {
2089  G_FreeEdict(self);
2090  return;
2091  }
2092 
2093  self->model = "models/items/healing/stimpack/tris.md2";
2094  self->count = 2;
2095  SpawnItem(self, FindItem("Health"));
2096  self->style = HEALTH_IGNORE_MAX;
2097  gi.soundindex("items/s_health.wav");
2098 }

◆ SP_light()

void SP_light ( edict_t *  self)

Definition at line 525 of file g_misc.c.

526 {
527  // no targeted lights in deathmatch, because they cause global messages
528  if (!self->targetname || deathmatch->value) {
529  G_FreeEdict(self);
530  return;
531  }
532 
533  if (self->style >= 32) {
534  self->use = light_use;
535  if (self->spawnflags & START_OFF)
536  gi.configstring(CS_LIGHTS + self->style, "a");
537  else
538  gi.configstring(CS_LIGHTS + self->style, "m");
539  }
540 }

◆ SP_light_mine1()

void SP_light_mine1 ( edict_t *  ent)

Definition at line 1411 of file g_misc.c.

1412 {
1413  ent->movetype = MOVETYPE_NONE;
1414  ent->solid = SOLID_BBOX;
1415  ent->s.modelindex = gi.modelindex("models/objects/minelite/light1/tris.md2");
1416  gi.linkentity(ent);
1417 }

◆ SP_light_mine2()

void SP_light_mine2 ( edict_t *  ent)

Definition at line 1422 of file g_misc.c.

1423 {
1424  ent->movetype = MOVETYPE_NONE;
1425  ent->solid = SOLID_BBOX;
1426  ent->s.modelindex = gi.modelindex("models/objects/minelite/light2/tris.md2");
1427  gi.linkentity(ent);
1428 }

◆ SP_misc_actor()

void SP_misc_actor ( edict_t *  self)

Definition at line 399 of file m_actor.c.

400 {
401  if (deathmatch->value) {
402  G_FreeEdict(self);
403  return;
404  }
405 
406  if (!self->targetname) {
407  gi.dprintf("untargeted %s at %s\n", self->classname, vtos(self->s.origin));
408  G_FreeEdict(self);
409  return;
410  }
411 
412  if (!self->target) {
413  gi.dprintf("%s with no target at %s\n", self->classname, vtos(self->s.origin));
414  G_FreeEdict(self);
415  return;
416  }
417 
418  self->movetype = MOVETYPE_STEP;
419  self->solid = SOLID_BBOX;
420  self->s.modelindex = gi.modelindex("players/male/tris.md2");
421  VectorSet(self->mins, -16, -16, -24);
422  VectorSet(self->maxs, 16, 16, 32);
423 
424  if (!self->health)
425  self->health = 100;
426  self->mass = 200;
427 
428  self->pain = actor_pain;
429  self->die = actor_die;
430 
431  self->monsterinfo.stand = actor_stand;
432  self->monsterinfo.walk = actor_walk;
433  self->monsterinfo.run = actor_run;
434  self->monsterinfo.attack = actor_attack;
435  self->monsterinfo.melee = NULL;
436  self->monsterinfo.sight = NULL;
437 
438  self->monsterinfo.aiflags |= AI_GOOD_GUY;
439 
440  gi.linkentity(self);
441 
442  self->monsterinfo.currentmove = &actor_move_stand;
443  self->monsterinfo.scale = MODEL_SCALE;
444 
445  walkmonster_start(self);
446 
447  // actors always start in a dormant state, they *must* be used to get going
448  self->use = actor_use;
449 }

◆ SP_misc_banner()

void SP_misc_banner ( edict_t *  self)

Definition at line 1142 of file g_misc.c.

1143 {
1144  ent->movetype = MOVETYPE_NONE;
1145  ent->solid = SOLID_NOT;
1146  ent->s.modelindex = gi.modelindex("models/objects/banner/tris.md2");
1147  ent->s.frame = rand() % 16;
1148  gi.linkentity(ent);
1149 
1150  ent->think = misc_banner_think;
1151  ent->nextthink = level.time + FRAMETIME;
1152 }

◆ SP_misc_bigviper()

void SP_misc_bigviper ( edict_t *  self)

Definition at line 1255 of file g_misc.c.

1256 {
1257  ent->movetype = MOVETYPE_NONE;
1258  ent->solid = SOLID_BBOX;
1259  VectorSet(ent->mins, -176, -120, -24);
1260  VectorSet(ent->maxs, 176, 120, 72);
1261  ent->s.modelindex = gi.modelindex("models/ships/bigviper/tris.md2");
1262  gi.linkentity(ent);
1263 }

◆ SP_misc_blackhole()

void SP_misc_blackhole ( edict_t *  self)

Definition at line 986 of file g_misc.c.

987 {
988  ent->movetype = MOVETYPE_NONE;
989  ent->solid = SOLID_NOT;
990  VectorSet(ent->mins, -64, -64, 0);
991  VectorSet(ent->maxs, 64, 64, 8);
992  ent->s.modelindex = gi.modelindex("models/objects/black/tris.md2");
993  ent->s.renderfx = RF_TRANSLUCENT;
994  ent->use = misc_blackhole_use;
995  ent->think = misc_blackhole_think;
996  ent->nextthink = level.time + 2 * FRAMETIME;
997  gi.linkentity(ent);
998 }

◆ SP_misc_deadsoldier()

void SP_misc_deadsoldier ( edict_t *  self)

Definition at line 1170 of file g_misc.c.

1171 {
1172  if (deathmatch->value) {
1173  // auto-remove for deathmatch
1174  G_FreeEdict(ent);
1175  return;
1176  }
1177 
1178  ent->movetype = MOVETYPE_NONE;
1179  ent->solid = SOLID_BBOX;
1180  ent->s.modelindex = gi.modelindex("models/deadbods/dude/tris.md2");
1181 
1182  // Defaults to frame 0
1183  if (ent->spawnflags & 2)
1184  ent->s.frame = 1;
1185  else if (ent->spawnflags & 4)
1186  ent->s.frame = 2;
1187  else if (ent->spawnflags & 8)
1188  ent->s.frame = 3;
1189  else if (ent->spawnflags & 16)
1190  ent->s.frame = 4;
1191  else if (ent->spawnflags & 32)
1192  ent->s.frame = 5;
1193  else
1194  ent->s.frame = 0;
1195 
1196  VectorSet(ent->mins, -16, -16, 0);
1197  VectorSet(ent->maxs, 16, 16, 16);
1198  ent->deadflag = DEAD_DEAD;
1199  ent->takedamage = DAMAGE_YES;
1200  ent->svflags |= SVF_MONSTER | SVF_DEADMONSTER;
1201  ent->die = misc_deadsoldier_die;
1202  ent->monsterinfo.aiflags |= AI_GOOD_GUY;
1203 
1204  gi.linkentity(ent);
1205 }

◆ SP_misc_easterchick()

void SP_misc_easterchick ( edict_t *  self)

Definition at line 1040 of file g_misc.c.

1041 {
1042  ent->movetype = MOVETYPE_NONE;
1043  ent->solid = SOLID_BBOX;
1044  VectorSet(ent->mins, -32, -32, 0);
1045  VectorSet(ent->maxs, 32, 32, 32);
1046  ent->s.modelindex = gi.modelindex("models/monsters/bitch/tris.md2");
1047  ent->s.frame = 208;
1048  ent->think = misc_easterchick_think;
1049  ent->nextthink = level.time + 2 * FRAMETIME;
1050  gi.linkentity(ent);
1051 }

◆ SP_misc_easterchick2()

void SP_misc_easterchick2 ( edict_t *  self)

Definition at line 1067 of file g_misc.c.

1068 {
1069  ent->movetype = MOVETYPE_NONE;
1070  ent->solid = SOLID_BBOX;
1071  VectorSet(ent->mins, -32, -32, 0);
1072  VectorSet(ent->maxs, 32, 32, 32);
1073  ent->s.modelindex = gi.modelindex("models/monsters/bitch/tris.md2");
1074  ent->s.frame = 248;
1075  ent->think = misc_easterchick2_think;
1076  ent->nextthink = level.time + 2 * FRAMETIME;
1077  gi.linkentity(ent);
1078 }

◆ SP_misc_eastertank()

void SP_misc_eastertank ( edict_t *  self)

Definition at line 1013 of file g_misc.c.

1014 {
1015  ent->movetype = MOVETYPE_NONE;
1016  ent->solid = SOLID_BBOX;
1017  VectorSet(ent->mins, -32, -32, -16);
1018  VectorSet(ent->maxs, 32, 32, 32);
1019  ent->s.modelindex = gi.modelindex("models/monsters/tank/tris.md2");
1020  ent->s.frame = 254;
1021  ent->think = misc_eastertank_think;
1022  ent->nextthink = level.time + 2 * FRAMETIME;
1023  gi.linkentity(ent);
1024 }

◆ SP_misc_explobox()

void SP_misc_explobox ( edict_t *  self)

Definition at line 918 of file g_misc.c.

919 {
920  if (deathmatch->value) {
921  // auto-remove for deathmatch
922  G_FreeEdict(self);
923  return;
924  }
925 
926  gi.modelindex("models/objects/debris1/tris.md2");
927  gi.modelindex("models/objects/debris2/tris.md2");
928  gi.modelindex("models/objects/debris3/tris.md2");
929 
930  self->solid = SOLID_BBOX;
931  self->movetype = MOVETYPE_STEP;
932 
933  self->model = "models/objects/barrels/tris.md2";
934  self->s.modelindex = gi.modelindex(self->model);
935  VectorSet(self->mins, -16, -16, 0);
936  VectorSet(self->maxs, 16, 16, 40);
937 
938  if (!self->mass)
939  self->mass = 400;
940  if (!self->health)
941  self->health = 10;
942  if (!self->dmg)
943  self->dmg = 150;
944 
945  self->die = barrel_delay;
946  self->takedamage = DAMAGE_YES;
947  self->monsterinfo.aiflags = AI_NOSTEP;
948 
949  self->touch = barrel_touch;
950 
951  self->think = M_droptofloor;
952  self->nextthink = level.time + 2 * FRAMETIME;
953 
954  gi.linkentity(self);
955 }

◆ SP_misc_gib_arm()

void SP_misc_gib_arm ( edict_t *  self)

Definition at line 1434 of file g_misc.c.

1435 {
1436  gi.setmodel(ent, "models/objects/gibs/arm/tris.md2");
1437  ent->solid = SOLID_NOT;
1438  ent->s.effects |= EF_GIB;
1439  ent->takedamage = DAMAGE_YES;
1440  ent->die = gib_die;
1441  ent->movetype = MOVETYPE_TOSS;
1442  ent->svflags |= SVF_MONSTER;
1443  ent->deadflag = DEAD_DEAD;
1444  ent->avelocity[0] = random() * 200;
1445  ent->avelocity[1] = random() * 200;
1446  ent->avelocity[2] = random() * 200;
1447  ent->think = G_FreeEdict;
1448  ent->nextthink = level.time + 30;
1449  gi.linkentity(ent);
1450 }

◆ SP_misc_gib_head()

void SP_misc_gib_head ( edict_t *  self)

Definition at line 1476 of file g_misc.c.

1477 {
1478  gi.setmodel(ent, "models/objects/gibs/head/tris.md2");
1479  ent->solid = SOLID_NOT;
1480  ent->s.effects |= EF_GIB;
1481  ent->takedamage = DAMAGE_YES;
1482  ent->die = gib_die;
1483  ent->movetype = MOVETYPE_TOSS;
1484  ent->svflags |= SVF_MONSTER;
1485  ent->deadflag = DEAD_DEAD;
1486  ent->avelocity[0] = random() * 200;
1487  ent->avelocity[1] = random() * 200;
1488  ent->avelocity[2] = random() * 200;
1489  ent->think = G_FreeEdict;
1490  ent->nextthink = level.time + 30;
1491  gi.linkentity(ent);
1492 }

◆ SP_misc_gib_leg()

void SP_misc_gib_leg ( edict_t *  self)

Definition at line 1455 of file g_misc.c.

1456 {
1457  gi.setmodel(ent, "models/objects/gibs/leg/tris.md2");
1458  ent->solid = SOLID_NOT;
1459  ent->s.effects |= EF_GIB;
1460  ent->takedamage = DAMAGE_YES;
1461  ent->die = gib_die;
1462  ent->movetype = MOVETYPE_TOSS;
1463  ent->svflags |= SVF_MONSTER;
1464  ent->deadflag = DEAD_DEAD;
1465  ent->avelocity[0] = random() * 200;
1466  ent->avelocity[1] = random() * 200;
1467  ent->avelocity[2] = random() * 200;
1468  ent->think = G_FreeEdict;
1469  ent->nextthink = level.time + 30;
1470  gi.linkentity(ent);
1471 }

◆ SP_misc_insane()

void SP_misc_insane ( edict_t *  self)

Definition at line 589 of file m_insane.c.

590 {
591 // static int skin = 0; //@@
592 
593  if (deathmatch->value) {
594  G_FreeEdict(self);
595  return;
596  }
597 
598  sound_fist = gi.soundindex("insane/insane11.wav");
599  sound_shake = gi.soundindex("insane/insane5.wav");
600  sound_moan = gi.soundindex("insane/insane7.wav");
601  sound_scream[0] = gi.soundindex("insane/insane1.wav");
602  sound_scream[1] = gi.soundindex("insane/insane2.wav");
603  sound_scream[2] = gi.soundindex("insane/insane3.wav");
604  sound_scream[3] = gi.soundindex("insane/insane4.wav");
605  sound_scream[4] = gi.soundindex("insane/insane6.wav");
606  sound_scream[5] = gi.soundindex("insane/insane8.wav");
607  sound_scream[6] = gi.soundindex("insane/insane9.wav");
608  sound_scream[7] = gi.soundindex("insane/insane10.wav");
609 
610  self->movetype = MOVETYPE_STEP;
611  self->solid = SOLID_BBOX;
612  self->s.modelindex = gi.modelindex("models/monsters/insane/tris.md2");
613 
614  VectorSet(self->mins, -16, -16, -24);
615  VectorSet(self->maxs, 16, 16, 32);
616 
617  self->health = 100;
618  self->gib_health = -50;
619  self->mass = 300;
620 
621  self->pain = insane_pain;
622  self->die = insane_die;
623 
624  self->monsterinfo.stand = insane_stand;
625  self->monsterinfo.walk = insane_walk;
626  self->monsterinfo.run = insane_run;
627  self->monsterinfo.dodge = NULL;
628  self->monsterinfo.attack = NULL;
629  self->monsterinfo.melee = NULL;
630  self->monsterinfo.sight = NULL;
631  self->monsterinfo.aiflags |= AI_GOOD_GUY;
632 
633 //@@
634 // self->s.skinnum = skin;
635 // skin++;
636 // if (skin > 12)
637 // skin = 0;
638 
639  gi.linkentity(self);
640 
641  if (self->spawnflags & 16) // Stand Ground
642  self->monsterinfo.aiflags |= AI_STAND_GROUND;
643 
644  self->monsterinfo.currentmove = &insane_move_stand_normal;
645 
646  self->monsterinfo.scale = MODEL_SCALE;
647 
648  if (self->spawnflags & 8) { // Crucified ?
649  VectorSet(self->mins, -16, 0, 0);
650  VectorSet(self->maxs, 16, 8, 32);
651  self->flags |= FL_NO_KNOCKBACK;
652  flymonster_start(self);
653  } else {
654  walkmonster_start(self);
655  self->s.skinnum = rand() % 3;
656  }
657 }

◆ SP_misc_satellite_dish()

void SP_misc_satellite_dish ( edict_t *  self)

Definition at line 1397 of file g_misc.c.

1398 {
1399  ent->movetype = MOVETYPE_NONE;
1400  ent->solid = SOLID_BBOX;
1401  VectorSet(ent->mins, -64, -64, 0);
1402  VectorSet(ent->maxs, 64, 64, 128);
1403  ent->s.modelindex = gi.modelindex("models/objects/satellite/tris.md2");
1404  ent->use = misc_satellite_dish_use;
1405  gi.linkentity(ent);
1406 }

◆ SP_misc_strogg_ship()

void SP_misc_strogg_ship ( edict_t *  self)

Definition at line 1354 of file g_misc.c.

1355 {
1356  if (!ent->target) {
1357  gi.dprintf("%s without a target at %s\n", ent->classname, vtos(ent->absmin));
1358  G_FreeEdict(ent);
1359  return;
1360  }
1361 
1362  if (!ent->speed)
1363  ent->speed = 300;
1364 
1365  ent->movetype = MOVETYPE_PUSH;
1366  ent->solid = SOLID_NOT;
1367  ent->s.modelindex = gi.modelindex("models/ships/strogg1/tris.md2");
1368  VectorSet(ent->mins, -16, -16, 0);
1369  VectorSet(ent->maxs, 16, 16, 32);
1370 
1371  ent->think = func_train_find;
1372  ent->nextthink = level.time + FRAMETIME;
1373  ent->use = misc_strogg_ship_use;
1374  ent->svflags |= SVF_NOCLIENT;
1375  ent->moveinfo.accel = ent->moveinfo.decel = ent->moveinfo.speed = ent->speed;
1376 
1377  gi.linkentity(ent);
1378 }

◆ SP_misc_teleporter()

void SP_misc_teleporter ( edict_t *  self)

Definition at line 1748 of file g_misc.c.

1749 {
1750  edict_t *trig;
1751 
1752  if (!ent->target) {
1753  gi.dprintf("teleporter without a target.\n");
1754  G_FreeEdict(ent);
1755  return;
1756  }
1757 
1758  gi.setmodel(ent, "models/objects/dmspot/tris.md2");
1759  ent->s.skinnum = 1;
1760  ent->s.effects = EF_TELEPORTER;
1761  ent->s.sound = gi.soundindex("world/amb10.wav");
1762  ent->solid = SOLID_BBOX;
1763 
1764  VectorSet(ent->mins, -32, -32, -24);
1765  VectorSet(ent->maxs, 32, 32, -16);
1766  gi.linkentity(ent);
1767 
1768  trig = G_Spawn();
1769  trig->touch = teleporter_touch;
1770  trig->solid = SOLID_TRIGGER;
1771  trig->target = ent->target;
1772  trig->owner = ent;
1773  VectorCopy(ent->s.origin, trig->s.origin);
1774  VectorSet(trig->mins, -8, -8, 8);
1775  VectorSet(trig->maxs, 8, 8, 24);
1776  gi.linkentity(trig);
1777 
1778 }

◆ SP_misc_teleporter_dest()

void SP_misc_teleporter_dest ( edict_t *  self)

Definition at line 1783 of file g_misc.c.

1784 {
1785  gi.setmodel(ent, "models/objects/dmspot/tris.md2");
1786  ent->s.skinnum = 0;
1787  ent->solid = SOLID_BBOX;
1788 // ent->s.effects |= EF_FLIES;
1789  VectorSet(ent->mins, -32, -32, -24);
1790  VectorSet(ent->maxs, 32, 32, -16);
1791  gi.linkentity(ent);
1792 }

◆ SP_misc_viper()

void SP_misc_viper ( edict_t *  self)

Definition at line 1225 of file g_misc.c.

1226 {
1227  if (!ent->target) {
1228  gi.dprintf("misc_viper without a target at %s\n", vtos(ent->absmin));
1229  G_FreeEdict(ent);
1230  return;
1231  }
1232 
1233  if (!ent->speed)
1234  ent->speed = 300;
1235 
1236  ent->movetype = MOVETYPE_PUSH;
1237  ent->solid = SOLID_NOT;
1238  ent->s.modelindex = gi.modelindex("models/ships/viper/tris.md2");
1239  VectorSet(ent->mins, -16, -16, 0);
1240  VectorSet(ent->maxs, 16, 16, 32);
1241 
1242  ent->think = func_train_find;
1243  ent->nextthink = level.time + FRAMETIME;
1244  ent->use = misc_viper_use;
1245  ent->svflags |= SVF_NOCLIENT;
1246  ent->moveinfo.accel = ent->moveinfo.decel = ent->moveinfo.speed = ent->speed;
1247 
1248  gi.linkentity(ent);
1249 }

◆ SP_misc_viper_bomb()

void SP_misc_viper_bomb ( edict_t *  self)

Definition at line 1317 of file g_misc.c.

1318 {
1319  self->movetype = MOVETYPE_NONE;
1320  self->solid = SOLID_NOT;
1321  VectorSet(self->mins, -8, -8, -8);
1322  VectorSet(self->maxs, 8, 8, 8);
1323 
1324  self->s.modelindex = gi.modelindex("models/objects/bomb/tris.md2");
1325 
1326  if (!self->dmg)
1327  self->dmg = 1000;
1328 
1329  self->use = misc_viper_bomb_use;
1330  self->svflags |= SVF_NOCLIENT;
1331 
1332  gi.linkentity(self);
1333 }

◆ SP_monster_berserk()

void SP_monster_berserk ( edict_t *  self)

Definition at line 399 of file m_berserk.c.

400 {
401  if (deathmatch->value) {
402  G_FreeEdict(self);
403  return;
404  }
405 
406  // pre-caches
407  sound_pain = gi.soundindex("berserk/berpain2.wav");
408  sound_die = gi.soundindex("berserk/berdeth2.wav");
409  sound_idle = gi.soundindex("berserk/beridle1.wav");
410  sound_punch = gi.soundindex("berserk/attack.wav");
411  sound_search = gi.soundindex("berserk/bersrch1.wav");
412  sound_sight = gi.soundindex("berserk/sight.wav");
413 
414  self->s.modelindex = gi.modelindex("models/monsters/berserk/tris.md2");
415  VectorSet(self->mins, -16, -16, -24);
416  VectorSet(self->maxs, 16, 16, 32);
417  self->movetype = MOVETYPE_STEP;
418  self->solid = SOLID_BBOX;
419 
420  self->health = 240;
421  self->gib_health = -60;
422  self->mass = 250;
423 
424  self->pain = berserk_pain;
425  self->die = berserk_die;
426 
427  self->monsterinfo.stand = berserk_stand;
428  self->monsterinfo.walk = berserk_walk;
429  self->monsterinfo.run = berserk_run;
430  self->monsterinfo.dodge = NULL;
431  self->monsterinfo.attack = NULL;
432  self->monsterinfo.melee = berserk_melee;
433  self->monsterinfo.sight = berserk_sight;
434  self->monsterinfo.search = berserk_search;
435 
436  self->monsterinfo.currentmove = &berserk_move_stand;
437  self->monsterinfo.scale = MODEL_SCALE;
438 
439  gi.linkentity(self);
440 
441  walkmonster_start(self);
442 }

◆ SP_monster_boss2()

void SP_monster_boss2 ( edict_t *  self)

Definition at line 599 of file m_boss2.c.

600 {
601  if (deathmatch->value) {
602  G_FreeEdict(self);
603  return;
604  }
605 
606  sound_pain1 = gi.soundindex("bosshovr/bhvpain1.wav");
607  sound_pain2 = gi.soundindex("bosshovr/bhvpain2.wav");
608  sound_pain3 = gi.soundindex("bosshovr/bhvpain3.wav");
609  sound_death = gi.soundindex("bosshovr/bhvdeth1.wav");
610  sound_search1 = gi.soundindex("bosshovr/bhvunqv1.wav");
611 
612  self->s.sound = gi.soundindex("bosshovr/bhvengn1.wav");
613 
614  self->movetype = MOVETYPE_STEP;
615  self->solid = SOLID_BBOX;
616  self->s.modelindex = gi.modelindex("models/monsters/boss2/tris.md2");
617  VectorSet(self->mins, -56, -56, 0);
618  VectorSet(self->maxs, 56, 56, 80);
619 
620  self->health = 2000;
621  self->gib_health = -200;
622  self->mass = 1000;
623 
624  self->flags |= FL_IMMUNE_LASER;
625 
626  self->pain = boss2_pain;
627  self->die = boss2_die;
628 
629  self->monsterinfo.stand = boss2_stand;
630  self->monsterinfo.walk = boss2_walk;
631  self->monsterinfo.run = boss2_run;
632  self->monsterinfo.attack = boss2_attack;
633  self->monsterinfo.search = boss2_search;
634  self->monsterinfo.checkattack = Boss2_CheckAttack;
635  gi.linkentity(self);
636 
637  self->monsterinfo.currentmove = &boss2_move_stand;
638  self->monsterinfo.scale = MODEL_SCALE;
639 
640  flymonster_start(self);
641 }

◆ SP_monster_boss3_stand()

void SP_monster_boss3_stand ( edict_t *  self)

Definition at line 51 of file m_boss3.c.

52 {
53  if (deathmatch->value) {
54  G_FreeEdict(self);
55  return;
56  }
57 
58  self->movetype = MOVETYPE_STEP;
59  self->solid = SOLID_BBOX;
60  self->model = "models/monsters/boss3/rider/tris.md2";
61  self->s.modelindex = gi.modelindex(self->model);
62  self->s.frame = FRAME_stand201;
63 
64  gi.soundindex("misc/bigtele.wav");
65 
66  VectorSet(self->mins, -32, -32, 0);
67  VectorSet(self->maxs, 32, 32, 90);
68 
69  self->use = Use_Boss3;
70  self->think = Think_Boss3Stand;
71  self->nextthink = level.time + FRAMETIME;
72  gi.linkentity(self);
73 }

◆ SP_monster_brain()

void SP_monster_brain ( edict_t *  self)

Definition at line 594 of file m_brain.c.

594  {
595  if (deathmatch->value) {
596  G_FreeEdict(self);
597  return;
598  }
599 
600  sound_chest_open = gi.soundindex("brain/brnatck1.wav");
601  sound_tentacles_extend = gi.soundindex("brain/brnatck2.wav");
602  sound_tentacles_retract = gi.soundindex("brain/brnatck3.wav");
603  sound_death = gi.soundindex("brain/brndeth1.wav");
604  sound_idle1 = gi.soundindex("brain/brnidle1.wav");
605  sound_idle2 = gi.soundindex("brain/brnidle2.wav");
606  sound_idle3 = gi.soundindex("brain/brnlens1.wav");
607  sound_pain1 = gi.soundindex("brain/brnpain1.wav");
608  sound_pain2 = gi.soundindex("brain/brnpain2.wav");
609  sound_sight = gi.soundindex("brain/brnsght1.wav");
610  sound_search = gi.soundindex("brain/brnsrch1.wav");
611  sound_melee1 = gi.soundindex("brain/melee1.wav");
612  sound_melee2 = gi.soundindex("brain/melee2.wav");
613  sound_melee3 = gi.soundindex("brain/melee3.wav");
614 
615  self->movetype = MOVETYPE_STEP;
616  self->solid = SOLID_BBOX;
617  self->s.modelindex = gi.modelindex("models/monsters/brain/tris.md2");
618  VectorSet(self->mins, -16, -16, -24);
619  VectorSet(self->maxs, 16, 16, 32);
620 
621  self->health = 300;
622  self->gib_health = -150;
623  self->mass = 400;
624 
625  self->pain = brain_pain;
626  self->die = brain_die;
627 
628  self->monsterinfo.stand = brain_stand;
629  self->monsterinfo.walk = brain_walk;
630  self->monsterinfo.run = brain_run;
631  self->monsterinfo.dodge = brain_dodge;
632 // self->monsterinfo.attack = brain_attack;
633  self->monsterinfo.melee = brain_melee;
634  self->monsterinfo.sight = brain_sight;
635  self->monsterinfo.search = brain_search;
636  self->monsterinfo.idle = brain_idle;
637 
638  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
639  self->monsterinfo.power_armor_power = 100;
640 
641  gi.linkentity(self);
642 
643  self->monsterinfo.currentmove = &brain_move_stand;
644  self->monsterinfo.scale = MODEL_SCALE;
645 
646  walkmonster_start(self);
647 }

◆ SP_monster_chick()

void SP_monster_chick ( edict_t *  self)

Definition at line 594 of file m_chick.c.

595 {
596  if (deathmatch->value) {
597  G_FreeEdict(self);
598  return;
599  }
600 
601  sound_missile_prelaunch = gi.soundindex("chick/chkatck1.wav");
602  sound_missile_launch = gi.soundindex("chick/chkatck2.wav");
603  sound_melee_swing = gi.soundindex("chick/chkatck3.wav");
604  sound_melee_hit = gi.soundindex("chick/chkatck4.wav");
605  sound_missile_reload = gi.soundindex("chick/chkatck5.wav");
606  sound_death1 = gi.soundindex("chick/chkdeth1.wav");
607  sound_death2 = gi.soundindex("chick/chkdeth2.wav");
608  sound_fall_down = gi.soundindex("chick/chkfall1.wav");
609  sound_idle1 = gi.soundindex("chick/chkidle1.wav");
610  sound_idle2 = gi.soundindex("chick/chkidle2.wav");
611  sound_pain1 = gi.soundindex("chick/chkpain1.wav");
612  sound_pain2 = gi.soundindex("chick/chkpain2.wav");
613  sound_pain3 = gi.soundindex("chick/chkpain3.wav");
614  sound_sight = gi.soundindex("chick/chksght1.wav");
615  sound_search = gi.soundindex("chick/chksrch1.wav");
616 
617  self->movetype = MOVETYPE_STEP;
618  self->solid = SOLID_BBOX;
619  self->s.modelindex = gi.modelindex("models/monsters/bitch/tris.md2");
620  VectorSet(self->mins, -16, -16, 0);
621  VectorSet(self->maxs, 16, 16, 56);
622 
623  self->health = 175;
624  self->gib_health = -70;
625  self->mass = 200;
626 
627  self->pain = chick_pain;
628  self->die = chick_die;
629 
630  self->monsterinfo.stand = chick_stand;
631  self->monsterinfo.walk = chick_walk;
632  self->monsterinfo.run = chick_run;
633  self->monsterinfo.dodge = chick_dodge;
634  self->monsterinfo.attack = chick_attack;
635  self->monsterinfo.melee = chick_melee;
636  self->monsterinfo.sight = chick_sight;
637 
638  gi.linkentity(self);
639 
640  self->monsterinfo.currentmove = &chick_move_stand;
641  self->monsterinfo.scale = MODEL_SCALE;
642 
643  walkmonster_start(self);
644 }

◆ SP_monster_commander_body()

void SP_monster_commander_body ( edict_t *  self)

Definition at line 1110 of file g_misc.c.

1111 {
1112  self->movetype = MOVETYPE_NONE;
1113  self->solid = SOLID_BBOX;
1114  self->model = "models/monsters/commandr/tris.md2";
1115  self->s.modelindex = gi.modelindex(self->model);
1116  VectorSet(self->mins, -32, -32, 0);
1117  VectorSet(self->maxs, 32, 32, 48);
1118  self->use = commander_body_use;
1119  self->takedamage = DAMAGE_YES;
1120  self->flags = FL_GODMODE;
1121  self->s.renderfx |= RF_FRAMELERP;
1122  gi.linkentity(self);
1123 
1124  gi.soundindex("tank/thud.wav");
1125  gi.soundindex("tank/pain.wav");
1126 
1127  self->think = commander_body_drop;
1128  self->nextthink = level.time + 5 * FRAMETIME;
1129 }

◆ SP_monster_flipper()

void SP_monster_flipper ( edict_t *  self)

Definition at line 346 of file m_flipper.c.

347 {
348  if (deathmatch->value) {
349  G_FreeEdict(self);
350  return;
351  }
352 
353  sound_pain1 = gi.soundindex("flipper/flppain1.wav");
354  sound_pain2 = gi.soundindex("flipper/flppain2.wav");
355  sound_death = gi.soundindex("flipper/flpdeth1.wav");
356  sound_chomp = gi.soundindex("flipper/flpatck1.wav");
357  sound_attack = gi.soundindex("flipper/flpatck2.wav");
358  sound_idle = gi.soundindex("flipper/flpidle1.wav");
359  sound_search = gi.soundindex("flipper/flpsrch1.wav");
360  sound_sight = gi.soundindex("flipper/flpsght1.wav");
361 
362  self->movetype = MOVETYPE_STEP;
363  self->solid = SOLID_BBOX;
364  self->s.modelindex = gi.modelindex("models/monsters/flipper/tris.md2");
365  VectorSet(self->mins, -16, -16, 0);
366  VectorSet(self->maxs, 16, 16, 32);
367 
368  self->health = 50;
369  self->gib_health = -30;
370  self->mass = 100;
371 
372  self->pain = flipper_pain;
373  self->die = flipper_die;
374 
375  self->monsterinfo.stand = flipper_stand;
376  self->monsterinfo.walk = flipper_walk;
377  self->monsterinfo.run = flipper_start_run;
378  self->monsterinfo.melee = flipper_melee;
379  self->monsterinfo.sight = flipper_sight;
380 
381  gi.linkentity(self);
382 
383  self->monsterinfo.currentmove = &flipper_move_stand;
384  self->monsterinfo.scale = MODEL_SCALE;
385 
386  swimmonster_start(self);
387 }

◆ SP_monster_floater()

void SP_monster_floater ( edict_t *  self)

Definition at line 594 of file m_float.c.

595 {
596  if (deathmatch->value) {
597  G_FreeEdict(self);
598  return;
599  }
600 
601  sound_attack2 = gi.soundindex("floater/fltatck2.wav");
602  sound_attack3 = gi.soundindex("floater/fltatck3.wav");
603  sound_death1 = gi.soundindex("floater/fltdeth1.wav");
604  sound_idle = gi.soundindex("floater/fltidle1.wav");
605  sound_pain1 = gi.soundindex("floater/fltpain1.wav");
606  sound_pain2 = gi.soundindex("floater/fltpain2.wav");
607  sound_sight = gi.soundindex("floater/fltsght1.wav");
608 
609  gi.soundindex("floater/fltatck1.wav");
610 
611  self->s.sound = gi.soundindex("floater/fltsrch1.wav");
612 
613  self->movetype = MOVETYPE_STEP;
614  self->solid = SOLID_BBOX;
615  self->s.modelindex = gi.modelindex("models/monsters/float/tris.md2");
616  VectorSet(self->mins, -24, -24, -24);
617  VectorSet(self->maxs, 24, 24, 32);
618 
619  self->health = 200;
620  self->gib_health = -80;
621  self->mass = 300;
622 
623  self->pain = floater_pain;
624  self->die = floater_die;
625 
626  self->monsterinfo.stand = floater_stand;
627  self->monsterinfo.walk = floater_walk;
628  self->monsterinfo.run = floater_run;
629 // self->monsterinfo.dodge = floater_dodge;
630  self->monsterinfo.attack = floater_attack;
631  self->monsterinfo.melee = floater_melee;
632  self->monsterinfo.sight = floater_sight;
633  self->monsterinfo.idle = floater_idle;
634 
635  gi.linkentity(self);
636 
637  if (random() <= 0.5)
638  self->monsterinfo.currentmove = &floater_move_stand1;
639  else
640  self->monsterinfo.currentmove = &floater_move_stand2;
641 
642  self->monsterinfo.scale = MODEL_SCALE;
643 
644  flymonster_start(self);
645 }

◆ SP_monster_flyer()

void SP_monster_flyer ( edict_t *  self)

Definition at line 549 of file m_flyer.c.

550 {
551  if (deathmatch->value) {
552  G_FreeEdict(self);
553  return;
554  }
555 
556  // fix a map bug in jail5.bsp
557  if (!Q_stricmp(level.mapname, "jail5") && (self->s.origin[2] == -104)) {
558  self->targetname = self->target;
559  self->target = NULL;
560  }
561 
562  sound_sight = gi.soundindex("flyer/flysght1.wav");
563  sound_idle = gi.soundindex("flyer/flysrch1.wav");
564  sound_pain1 = gi.soundindex("flyer/flypain1.wav");
565  sound_pain2 = gi.soundindex("flyer/flypain2.wav");
566  sound_slash = gi.soundindex("flyer/flyatck2.wav");
567  sound_sproing = gi.soundindex("flyer/flyatck1.wav");
568  sound_die = gi.soundindex("flyer/flydeth1.wav");
569 
570  gi.soundindex("flyer/flyatck3.wav");
571 
572  self->s.modelindex = gi.modelindex("models/monsters/flyer/tris.md2");
573  VectorSet(self->mins, -16, -16, -24);
574  VectorSet(self->maxs, 16, 16, 32);
575  self->movetype = MOVETYPE_STEP;
576  self->solid = SOLID_BBOX;
577 
578  self->s.sound = gi.soundindex("flyer/flyidle1.wav");
579 
580  self->health = 50;
581  self->mass = 50;
582 
583  self->pain = flyer_pain;
584  self->die = flyer_die;
585 
586  self->monsterinfo.stand = flyer_stand;
587  self->monsterinfo.walk = flyer_walk;
588  self->monsterinfo.run = flyer_run;
589  self->monsterinfo.attack = flyer_attack;
590  self->monsterinfo.melee = flyer_melee;
591  self->monsterinfo.sight = flyer_sight;
592  self->monsterinfo.idle = flyer_idle;
593 
594  gi.linkentity(self);
595 
596  self->monsterinfo.currentmove = &flyer_move_stand;
597  self->monsterinfo.scale = MODEL_SCALE;
598 
599  flymonster_start(self);
600 }

◆ SP_monster_gladiator()

void SP_monster_gladiator ( edict_t *  self)

Definition at line 327 of file m_gladiator.c.

328 {
329  if (deathmatch->value) {
330  G_FreeEdict(self);
331  return;
332  }
333 
334 
335  sound_pain1 = gi.soundindex("gladiator/pain.wav");
336  sound_pain2 = gi.soundindex("gladiator/gldpain2.wav");
337  sound_die = gi.soundindex("gladiator/glddeth2.wav");
338  sound_gun = gi.soundindex("gladiator/railgun.wav");
339  sound_cleaver_swing = gi.soundindex("gladiator/melee1.wav");
340  sound_cleaver_hit = gi.soundindex("gladiator/melee2.wav");
341  sound_cleaver_miss = gi.soundindex("gladiator/melee3.wav");
342  sound_idle = gi.soundindex("gladiator/gldidle1.wav");
343  sound_search = gi.soundindex("gladiator/gldsrch1.wav");
344  sound_sight = gi.soundindex("gladiator/sight.wav");
345 
346  self->movetype = MOVETYPE_STEP;
347  self->solid = SOLID_BBOX;
348  self->s.modelindex = gi.modelindex("models/monsters/gladiatr/tris.md2");
349  VectorSet(self->mins, -32, -32, -24);
350  VectorSet(self->maxs, 32, 32, 64);
351 
352  self->health = 400;
353  self->gib_health = -175;
354  self->mass = 400;
355 
356  self->pain = gladiator_pain;
357  self->die = gladiator_die;
358 
359  self->monsterinfo.stand = gladiator_stand;
360  self->monsterinfo.walk = gladiator_walk;
361  self->monsterinfo.run = gladiator_run;
362  self->monsterinfo.dodge = NULL;
363  self->monsterinfo.attack = gladiator_attack;
364  self->monsterinfo.melee = gladiator_melee;
365  self->monsterinfo.sight = gladiator_sight;
366  self->monsterinfo.idle = gladiator_idle;
367  self->monsterinfo.search = gladiator_search;
368 
369  gi.linkentity(self);
370  self->monsterinfo.currentmove = &gladiator_move_stand;
371  self->monsterinfo.scale = MODEL_SCALE;
372 
373  walkmonster_start(self);
374 }

◆ SP_monster_gunner()

void SP_monster_gunner ( edict_t *  self)

Definition at line 559 of file m_gunner.c.

560 {
561  if (deathmatch->value) {
562  G_FreeEdict(self);
563  return;
564  }
565 
566  sound_death = gi.soundindex("gunner/death1.wav");
567  sound_pain = gi.soundindex("gunner/gunpain2.wav");
568  sound_pain2 = gi.soundindex("gunner/gunpain1.wav");
569  sound_idle = gi.soundindex("gunner/gunidle1.wav");
570  sound_open = gi.soundindex("gunner/gunatck1.wav");
571  sound_search = gi.soundindex("gunner/gunsrch1.wav");
572  sound_sight = gi.soundindex("gunner/sight1.wav");
573 
574  gi.soundindex("gunner/gunatck2.wav");
575  gi.soundindex("gunner/gunatck3.wav");
576 
577  self->movetype = MOVETYPE_STEP;
578  self->solid = SOLID_BBOX;
579  self->s.modelindex = gi.modelindex("models/monsters/gunner/tris.md2");
580  VectorSet(self->mins, -16, -16, -24);
581  VectorSet(self->maxs, 16, 16, 32);
582 
583  self->health = 175;
584  self->gib_health = -70;
585  self->mass = 200;
586 
587  self->pain = gunner_pain;
588  self->die = gunner_die;
589 
590  self->monsterinfo.stand = gunner_stand;
591  self->monsterinfo.walk = gunner_walk;
592  self->monsterinfo.run = gunner_run;
593  self->monsterinfo.dodge = gunner_dodge;
594  self->monsterinfo.attack = gunner_attack;
595  self->monsterinfo.melee = NULL;
596  self->monsterinfo.sight = gunner_sight;
597  self->monsterinfo.search = gunner_search;
598 
599  gi.linkentity(self);
600 
601  self->monsterinfo.currentmove = &gunner_move_stand;
602  self->monsterinfo.scale = MODEL_SCALE;
603 
604  walkmonster_start(self);
605 }

◆ SP_monster_hover()

void SP_monster_hover ( edict_t *  self)

Definition at line 546 of file m_hover.c.

547 {
548  if (deathmatch->value) {
549  G_FreeEdict(self);
550  return;
551  }
552 
553  sound_pain1 = gi.soundindex("hover/hovpain1.wav");
554  sound_pain2 = gi.soundindex("hover/hovpain2.wav");
555  sound_death1 = gi.soundindex("hover/hovdeth1.wav");
556  sound_death2 = gi.soundindex("hover/hovdeth2.wav");
557  sound_sight = gi.soundindex("hover/hovsght1.wav");
558  sound_search1 = gi.soundindex("hover/hovsrch1.wav");
559  sound_search2 = gi.soundindex("hover/hovsrch2.wav");
560 
561  gi.soundindex("hover/hovatck1.wav");
562 
563  self->s.sound = gi.soundindex("hover/hovidle1.wav");
564 
565  self->movetype = MOVETYPE_STEP;
566  self->solid = SOLID_BBOX;
567  self->s.modelindex = gi.modelindex("models/monsters/hover/tris.md2");
568  VectorSet(self->mins, -24, -24, -24);
569  VectorSet(self->maxs, 24, 24, 32);
570 
571  self->health = 240;
572  self->gib_health = -100;
573  self->mass = 150;
574 
575  self->pain = hover_pain;
576  self->die = hover_die;
577 
578  self->monsterinfo.stand = hover_stand;
579  self->monsterinfo.walk = hover_walk;
580  self->monsterinfo.run = hover_run;
581 // self->monsterinfo.dodge = hover_dodge;
582  self->monsterinfo.attack = hover_start_attack;
583  self->monsterinfo.sight = hover_sight;
584  self->monsterinfo.search = hover_search;
585 
586  gi.linkentity(self);
587 
588  self->monsterinfo.currentmove = &hover_move_stand;
589  self->monsterinfo.scale = MODEL_SCALE;
590 
591  flymonster_start(self);
592 }

◆ SP_monster_infantry()

void SP_monster_infantry ( edict_t *  self)

Definition at line 526 of file m_infantry.c.

527 {
528  if (deathmatch->value) {
529  G_FreeEdict(self);
530  return;
531  }
532 
533  sound_pain1 = gi.soundindex("infantry/infpain1.wav");
534  sound_pain2 = gi.soundindex("infantry/infpain2.wav");
535  sound_die1 = gi.soundindex("infantry/infdeth1.wav");
536  sound_die2 = gi.soundindex("infantry/infdeth2.wav");
537 
538  sound_gunshot = gi.soundindex("infantry/infatck1.wav");
539  sound_weapon_cock = gi.soundindex("infantry/infatck3.wav");
540  sound_punch_swing = gi.soundindex("infantry/infatck2.wav");
541  sound_punch_hit = gi.soundindex("infantry/melee2.wav");
542 
543  sound_sight = gi.soundindex("infantry/infsght1.wav");
544  sound_search = gi.soundindex("infantry/infsrch1.wav");
545  sound_idle = gi.soundindex("infantry/infidle1.wav");
546 
547 
548  self->movetype = MOVETYPE_STEP;
549  self->solid = SOLID_BBOX;
550  self->s.modelindex = gi.modelindex("models/monsters/infantry/tris.md2");
551  VectorSet(self->mins, -16, -16, -24);
552  VectorSet(self->maxs, 16, 16, 32);
553 
554  self->health = 100;
555  self->gib_health = -40;
556  self->mass = 200;
557 
558  self->pain = infantry_pain;
559  self->die = infantry_die;
560 
561  self->monsterinfo.stand = infantry_stand;
562  self->monsterinfo.walk = infantry_walk;
563  self->monsterinfo.run = infantry_run;
564  self->monsterinfo.dodge = infantry_dodge;
565  self->monsterinfo.attack = infantry_attack;
566  self->monsterinfo.melee = NULL;
567  self->monsterinfo.sight = infantry_sight;
568  self->monsterinfo.idle = infantry_fidget;
569 
570  gi.linkentity(self);
571 
572  self->monsterinfo.currentmove = &infantry_move_stand;
573  self->monsterinfo.scale = MODEL_SCALE;
574 
575  walkmonster_start(self);
576 }

◆ SP_monster_jorg()

void SP_monster_jorg ( edict_t *  self)

Definition at line 649 of file m_boss31.c.

650 {
651  if (deathmatch->value) {
652  G_FreeEdict(self);
653  return;
654  }
655 
656  sound_pain1 = gi.soundindex("boss3/bs3pain1.wav");
657  sound_pain2 = gi.soundindex("boss3/bs3pain2.wav");
658  sound_pain3 = gi.soundindex("boss3/bs3pain3.wav");
659  sound_death = gi.soundindex("boss3/bs3deth1.wav");
660  sound_attack1 = gi.soundindex("boss3/bs3atck1.wav");
661  sound_attack2 = gi.soundindex("boss3/bs3atck2.wav");
662  sound_search1 = gi.soundindex("boss3/bs3srch1.wav");
663  sound_search2 = gi.soundindex("boss3/bs3srch2.wav");
664  sound_search3 = gi.soundindex("boss3/bs3srch3.wav");
665  sound_idle = gi.soundindex("boss3/bs3idle1.wav");
666  sound_step_left = gi.soundindex("boss3/step1.wav");
667  sound_step_right = gi.soundindex("boss3/step2.wav");
668  sound_firegun = gi.soundindex("boss3/xfire.wav");
669  sound_death_hit = gi.soundindex("boss3/d_hit.wav");
670 
671  MakronPrecache();
672 
673  self->movetype = MOVETYPE_STEP;
674  self->solid = SOLID_BBOX;
675  self->s.modelindex = gi.modelindex("models/monsters/boss3/rider/tris.md2");
676  self->s.modelindex2 = gi.modelindex("models/monsters/boss3/jorg/tris.md2");
677  VectorSet(self->mins, -80, -80, 0);
678  VectorSet(self->maxs, 80, 80, 140);
679 
680  self->health = 3000;
681  self->gib_health = -2000;
682  self->mass = 1000;
683 
684  self->pain = jorg_pain;
685  self->die = jorg_die;
686  self->monsterinfo.stand = jorg_stand;
687  self->monsterinfo.walk = jorg_walk;
688  self->monsterinfo.run = jorg_run;
689  self->monsterinfo.dodge = NULL;
690  self->monsterinfo.attack = jorg_attack;
691  self->monsterinfo.search = jorg_search;
692  self->monsterinfo.melee = NULL;
693  self->monsterinfo.sight = NULL;
694  self->monsterinfo.checkattack = Jorg_CheckAttack;
695  gi.linkentity(self);
696 
697  self->monsterinfo.currentmove = &jorg_move_stand;
698  self->monsterinfo.scale = MODEL_SCALE;
699 
700  walkmonster_start(self);
701 }

◆ SP_monster_medic()

void SP_monster_medic ( edict_t *  self)

Definition at line 686 of file m_medic.c.

687 {
688  if (deathmatch->value) {
689  G_FreeEdict(self);
690  return;
691  }
692 
693  sound_idle1 = gi.soundindex("medic/idle.wav");
694  sound_pain1 = gi.soundindex("medic/medpain1.wav");
695  sound_pain2 = gi.soundindex("medic/medpain2.wav");
696  sound_die = gi.soundindex("medic/meddeth1.wav");
697  sound_sight = gi.soundindex("medic/medsght1.wav");
698  sound_search = gi.soundindex("medic/medsrch1.wav");
699  sound_hook_launch = gi.soundindex("medic/medatck2.wav");
700  sound_hook_hit = gi.soundindex("medic/medatck3.wav");
701  sound_hook_heal = gi.soundindex("medic/medatck4.wav");
702  sound_hook_retract = gi.soundindex("medic/medatck5.wav");
703 
704  gi.soundindex("medic/medatck1.wav");
705 
706  self->movetype = MOVETYPE_STEP;
707  self->solid = SOLID_BBOX;
708  self->s.modelindex = gi.modelindex("models/monsters/medic/tris.md2");
709  VectorSet(self->mins, -24, -24, -24);
710  VectorSet(self->maxs, 24, 24, 32);
711 
712  self->health = 300;
713  self->gib_health = -130;
714  self->mass = 400;
715 
716  self->pain = medic_pain;
717  self->die = medic_die;
718 
719  self->monsterinfo.stand = medic_stand;
720  self->monsterinfo.walk = medic_walk;
721  self->monsterinfo.run = medic_run;
722  self->monsterinfo.dodge = medic_dodge;
723  self->monsterinfo.attack = medic_attack;
724  self->monsterinfo.melee = NULL;
725  self->monsterinfo.sight = medic_sight;
726  self->monsterinfo.idle = medic_idle;
727  self->monsterinfo.search = medic_search;
728  self->monsterinfo.checkattack = medic_checkattack;
729 
730  gi.linkentity(self);
731 
732  self->monsterinfo.currentmove = &medic_move_stand;
733  self->monsterinfo.scale = MODEL_SCALE;
734 
735  walkmonster_start(self);
736 }

◆ SP_monster_mutant()

void SP_monster_mutant ( edict_t *  self)

Definition at line 582 of file m_mutant.c.

583 {
584  if (deathmatch->value) {
585  G_FreeEdict(self);
586  return;
587  }
588 
589  sound_swing = gi.soundindex("mutant/mutatck1.wav");
590  sound_hit = gi.soundindex("mutant/mutatck2.wav");
591  sound_hit2 = gi.soundindex("mutant/mutatck3.wav");
592  sound_death = gi.soundindex("mutant/mutdeth1.wav");
593  sound_idle = gi.soundindex("mutant/mutidle1.wav");
594  sound_pain1 = gi.soundindex("mutant/mutpain1.wav");
595  sound_pain2 = gi.soundindex("mutant/mutpain2.wav");
596  sound_sight = gi.soundindex("mutant/mutsght1.wav");
597  sound_search = gi.soundindex("mutant/mutsrch1.wav");
598  sound_step1 = gi.soundindex("mutant/step1.wav");
599  sound_step2 = gi.soundindex("mutant/step2.wav");
600  sound_step3 = gi.soundindex("mutant/step3.wav");
601  sound_thud = gi.soundindex("mutant/thud1.wav");
602 
603  self->movetype = MOVETYPE_STEP;
604  self->solid = SOLID_BBOX;
605  self->s.modelindex = gi.modelindex("models/monsters/mutant/tris.md2");
606  VectorSet(self->mins, -32, -32, -24);
607  VectorSet(self->maxs, 32, 32, 48);
608 
609  self->health = 300;
610  self->gib_health = -120;
611  self->mass = 300;
612 
613  self->pain = mutant_pain;
614  self->die = mutant_die;
615 
616  self->monsterinfo.stand = mutant_stand;
617  self->monsterinfo.walk = mutant_walk;
618  self->monsterinfo.run = mutant_run;
619  self->monsterinfo.dodge = NULL;
620  self->monsterinfo.attack = mutant_jump;
621  self->monsterinfo.melee = mutant_melee;
622  self->monsterinfo.sight = mutant_sight;
623  self->monsterinfo.search = mutant_search;
624  self->monsterinfo.idle = mutant_idle;
625  self->monsterinfo.checkattack = mutant_checkattack;
626 
627  gi.linkentity(self);
628 
629  self->monsterinfo.currentmove = &mutant_move_stand;
630 
631  self->monsterinfo.scale = MODEL_SCALE;
632  walkmonster_start(self);
633 }

◆ SP_monster_parasite()

void SP_monster_parasite ( edict_t *  self)

Definition at line 484 of file m_parasite.c.

485 {
486  if (deathmatch->value) {
487  G_FreeEdict(self);
488  return;
489  }
490 
491  sound_pain1 = gi.soundindex("parasite/parpain1.wav");
492  sound_pain2 = gi.soundindex("parasite/parpain2.wav");
493  sound_die = gi.soundindex("parasite/pardeth1.wav");
494  sound_launch = gi.soundindex("parasite/paratck1.wav");
495  sound_impact = gi.soundindex("parasite/paratck2.wav");
496  sound_suck = gi.soundindex("parasite/paratck3.wav");
497  sound_reelin = gi.soundindex("parasite/paratck4.wav");
498  sound_sight = gi.soundindex("parasite/parsght1.wav");
499  sound_tap = gi.soundindex("parasite/paridle1.wav");
500  sound_scratch = gi.soundindex("parasite/paridle2.wav");
501  sound_search = gi.soundindex("parasite/parsrch1.wav");
502 
503  self->s.modelindex = gi.modelindex("models/monsters/parasite/tris.md2");
504  VectorSet(self->mins, -16, -16, -24);
505  VectorSet(self->maxs, 16, 16, 24);
506  self->movetype = MOVETYPE_STEP;
507  self->solid = SOLID_BBOX;
508 
509  self->health = 175;
510  self->gib_health = -50;
511  self->mass = 250;
512 
513  self->pain = parasite_pain;
514  self->die = parasite_die;
515 
516  self->monsterinfo.stand = parasite_stand;
517  self->monsterinfo.walk = parasite_start_walk;
518  self->monsterinfo.run = parasite_start_run;
519  self->monsterinfo.attack = parasite_attack;
520  self->monsterinfo.sight = parasite_sight;
521  self->monsterinfo.idle = parasite_idle;
522 
523  gi.linkentity(self);
524 
525  self->monsterinfo.currentmove = &parasite_move_stand;
526  self->monsterinfo.scale = MODEL_SCALE;
527 
528  walkmonster_start(self);
529 }

◆ SP_monster_soldier()

void SP_monster_soldier ( edict_t *  self)

Definition at line 1211 of file m_soldier.c.

1212 {
1213  if (deathmatch->value) {
1214  G_FreeEdict(self);
1215  return;
1216  }
1217 
1218  SP_monster_soldier_x(self);
1219 
1220  sound_pain = gi.soundindex("soldier/solpain1.wav");
1221  sound_death = gi.soundindex("soldier/soldeth1.wav");
1222  gi.soundindex("soldier/solatck1.wav");
1223 
1224  self->s.skinnum = 2;
1225  self->health = 30;
1226  self->gib_health = -30;
1227 }

◆ SP_monster_soldier_light()

void SP_monster_soldier_light ( edict_t *  self)

Definition at line 1189 of file m_soldier.c.

1190 {
1191  if (deathmatch->value) {
1192  G_FreeEdict(self);
1193  return;
1194  }
1195 
1196  SP_monster_soldier_x(self);
1197 
1198  sound_pain_light = gi.soundindex("soldier/solpain2.wav");
1199  sound_death_light = gi.soundindex("soldier/soldeth2.wav");
1200  gi.modelindex("models/objects/laser/tris.md2");
1201  gi.soundindex("misc/lasfly.wav");
1202  gi.soundindex("soldier/solatck2.wav");
1203 
1204  self->s.skinnum = 0;
1205  self->health = 20;
1206  self->gib_health = -30;
1207 }

◆ SP_monster_soldier_ss()

void SP_monster_soldier_ss ( edict_t *  self)

Definition at line 1231 of file m_soldier.c.

1232 {
1233  if (deathmatch->value) {
1234  G_FreeEdict(self);
1235  return;
1236  }
1237 
1238  SP_monster_soldier_x(self);
1239 
1240  sound_pain_ss = gi.soundindex("soldier/solpain3.wav");
1241  sound_death_ss = gi.soundindex("soldier/soldeth3.wav");
1242  gi.soundindex("soldier/solatck3.wav");
1243 
1244  self->s.skinnum = 4;
1245  self->health = 40;
1246  self->gib_health = -30;
1247 }

◆ SP_monster_supertank()

void SP_monster_supertank ( edict_t *  self)

Definition at line 646 of file m_supertank.c.

647 {
648  if (deathmatch->value) {
649  G_FreeEdict(self);
650  return;
651  }
652 
653  sound_pain1 = gi.soundindex("bosstank/btkpain1.wav");
654  sound_pain2 = gi.soundindex("bosstank/btkpain2.wav");
655  sound_pain3 = gi.soundindex("bosstank/btkpain3.wav");
656  sound_death = gi.soundindex("bosstank/btkdeth1.wav");
657  sound_search1 = gi.soundindex("bosstank/btkunqv1.wav");
658  sound_search2 = gi.soundindex("bosstank/btkunqv2.wav");
659 
660 // self->s.sound = gi.soundindex ("bosstank/btkengn1.wav");
661  tread_sound = gi.soundindex("bosstank/btkengn1.wav");
662 
663  self->movetype = MOVETYPE_STEP;
664  self->solid = SOLID_BBOX;
665  self->s.modelindex = gi.modelindex("models/monsters/boss1/tris.md2");
666  VectorSet(self->mins, -64, -64, 0);
667  VectorSet(self->maxs, 64, 64, 112);
668 
669  self->health = 1500;
670  self->gib_health = -500;
671  self->mass = 800;
672 
673  self->pain = supertank_pain;
674  self->die = supertank_die;
675  self->monsterinfo.stand = supertank_stand;
676  self->monsterinfo.walk = supertank_walk;
677  self->monsterinfo.run = supertank_run;
678  self->monsterinfo.dodge = NULL;
679  self->monsterinfo.attack = supertank_attack;
680  self->monsterinfo.search = supertank_search;
681  self->monsterinfo.melee = NULL;
682  self->monsterinfo.sight = NULL;
683 
684  gi.linkentity(self);
685 
686  self->monsterinfo.currentmove = &supertank_move_stand;
687  self->monsterinfo.scale = MODEL_SCALE;
688 
689  walkmonster_start(self);
690 }

◆ SP_monster_tank()

void SP_monster_tank ( edict_t *  self)

Definition at line 752 of file m_tank.c.

753 {
754  if (deathmatch->value) {
755  G_FreeEdict(self);
756  return;
757  }
758 
759  self->s.modelindex = gi.modelindex("models/monsters/tank/tris.md2");
760  VectorSet(self->mins, -32, -32, -16);
761  VectorSet(self->maxs, 32, 32, 72);
762  self->movetype = MOVETYPE_STEP;
763  self->solid = SOLID_BBOX;
764 
765  sound_pain = gi.soundindex("tank/tnkpain2.wav");
766  sound_thud = gi.soundindex("tank/tnkdeth2.wav");
767  sound_idle = gi.soundindex("tank/tnkidle1.wav");
768  sound_die = gi.soundindex("tank/death.wav");
769  sound_step = gi.soundindex("tank/step.wav");
770  sound_windup = gi.soundindex("tank/tnkatck4.wav");
771  sound_strike = gi.soundindex("tank/tnkatck5.wav");
772  sound_sight = gi.soundindex("tank/sight1.wav");
773 
774  gi.soundindex("tank/tnkatck1.wav");
775  gi.soundindex("tank/tnkatk2a.wav");
776  gi.soundindex("tank/tnkatk2b.wav");
777  gi.soundindex("tank/tnkatk2c.wav");
778  gi.soundindex("tank/tnkatk2d.wav");
779  gi.soundindex("tank/tnkatk2e.wav");
780  gi.soundindex("tank/tnkatck3.wav");
781 
782  if (strcmp(self->classname, "monster_tank_commander") == 0) {
783  self->health = 1000;
784  self->gib_health = -225;
785  } else {
786  self->health = 750;
787  self->gib_health = -200;
788  }
789 
790  self->mass = 500;
791 
792  self->pain = tank_pain;
793  self->die = tank_die;
794  self->monsterinfo.stand = tank_stand;
795  self->monsterinfo.walk = tank_walk;
796  self->monsterinfo.run = tank_run;
797  self->monsterinfo.dodge = NULL;
798  self->monsterinfo.attack = tank_attack;
799  self->monsterinfo.melee = NULL;
800  self->monsterinfo.sight = tank_sight;
801  self->monsterinfo.idle = tank_idle;
802 
803  gi.linkentity(self);
804 
805  self->monsterinfo.currentmove = &tank_move_stand;
806  self->monsterinfo.scale = MODEL_SCALE;
807 
808  walkmonster_start(self);
809 
810  if (strcmp(self->classname, "monster_tank_commander") == 0)
811  self->s.skinnum = 2;
812 }

◆ SP_path_corner()

void SP_path_corner ( edict_t *  self)

Definition at line 376 of file g_misc.c.

377 {
378  if (!self->targetname) {
379  gi.dprintf("path_corner with no targetname at %s\n", vtos(self->s.origin));
380  G_FreeEdict(self);
381  return;
382  }
383 
384  self->solid = SOLID_TRIGGER;
385  self->touch = path_corner_touch;
386  VectorSet(self->mins, -8, -8, -8);
387  VectorSet(self->maxs, 8, 8, 8);
388  self->svflags |= SVF_NOCLIENT;
389  gi.linkentity(self);
390 }

◆ SP_point_combat()

void SP_point_combat ( edict_t *  self)

Definition at line 444 of file g_misc.c.

445 {
446  if (deathmatch->value) {
447  G_FreeEdict(self);
448  return;
449  }
450  self->solid = SOLID_TRIGGER;
451  self->touch = point_combat_touch;
452  VectorSet(self->mins, -8, -8, -16);
453  VectorSet(self->maxs, 8, 8, 16);
454  self->svflags = SVF_NOCLIENT;
455  gi.linkentity(self);
456 }

◆ SP_target_actor()

void SP_target_actor ( edict_t *  ent)

Definition at line 541 of file m_actor.c.

542 {
543  if (!self->targetname)
544  gi.dprintf("%s with no targetname at %s\n", self->classname, vtos(self->s.origin));
545 
546  self->solid = SOLID_TRIGGER;
547  self->touch = target_actor_touch;
548  VectorSet(self->mins, -8, -8, -8);
549  VectorSet(self->maxs, 8, 8, 8);
550  self->svflags = SVF_NOCLIENT;
551 
552  if (self->spawnflags & 1) {
553  if (!self->speed)
554  self->speed = 200;
555  if (!st.height)
556  st.height = 200;
557  if (self->s.angles[YAW] == 0)
558  self->s.angles[YAW] = 360;
559  G_SetMovedir(self->s.angles, self->movedir);
560  self->movedir[2] = st.height;
561  }
562 
563  gi.linkentity(self);
564 }

◆ SP_target_blaster()

void SP_target_blaster ( edict_t *  ent)

Definition at line 422 of file g_target.c.

423 {
424  self->use = use_target_blaster;
425  G_SetMovedir(self->s.angles, self->movedir);
426  self->noise_index = gi.soundindex("weapons/laser2.wav");
427 
428  if (!self->dmg)
429  self->dmg = 15;
430  if (!self->speed)
431  self->speed = 1000;
432 
433  self->svflags = SVF_NOCLIENT;
434 }

◆ SP_target_changelevel()

void SP_target_changelevel ( edict_t *  ent)

Definition at line 293 of file g_target.c.

294 {
295  if (!ent->map) {
296  gi.dprintf("target_changelevel with no map at %s\n", vtos(ent->s.origin));
297  G_FreeEdict(ent);
298  return;
299  }
300 
301  // ugly hack because *SOMEBODY* screwed up their map
302  if ((Q_stricmp(level.mapname, "fact1") == 0) && (Q_stricmp(ent->map, "fact3") == 0))
303  ent->map = "fact3$secret1";
304 
305  ent->use = use_target_changelevel;
306  ent->svflags = SVF_NOCLIENT;
307 }

◆ SP_target_character()

void SP_target_character ( edict_t *  ent)

Definition at line 1501 of file g_misc.c.

1502 {
1503  self->movetype = MOVETYPE_PUSH;
1504  gi.setmodel(self, self->model);
1505  self->solid = SOLID_BSP;
1506  self->s.frame = 12;
1507  gi.linkentity(self);
1508  return;
1509 }

◆ SP_target_crosslevel_target()

void SP_target_crosslevel_target ( edict_t *  ent)

Definition at line 468 of file g_target.c.

469 {
470  if (! self->delay)
471  self->delay = 1;
472  self->svflags = SVF_NOCLIENT;
473 
474  self->think = target_crosslevel_target_think;
475  self->nextthink = level.time + self->delay;
476 }

◆ SP_target_crosslevel_trigger()

void SP_target_crosslevel_trigger ( edict_t *  ent)

Definition at line 448 of file g_target.c.

449 {
450  self->svflags = SVF_NOCLIENT;
451  self->use = trigger_crosslevel_trigger_use;
452 }

◆ SP_target_earthquake()

void SP_target_earthquake ( edict_t *  ent)

Definition at line 761 of file g_target.c.

762 {
763  if (!self->targetname)
764  gi.dprintf("untargeted %s at %s\n", self->classname, vtos(self->s.origin));
765 
766  if (!self->count)
767  self->count = 5;
768 
769  if (!self->speed)
770  self->speed = 200;
771 
772  self->svflags |= SVF_NOCLIENT;
773  self->think = target_earthquake_think;
774  self->use = target_earthquake_use;
775 
776  self->noise_index = gi.soundindex("world/quake.wav");
777 }

◆ SP_target_explosion()

void SP_target_explosion ( edict_t *  ent)

Definition at line 252 of file g_target.c.

253 {
254  ent->use = use_target_explosion;
255  ent->svflags = SVF_NOCLIENT;
256 }

◆ SP_target_goal()

void SP_target_goal ( edict_t *  ent)

Definition at line 197 of file g_target.c.

198 {
199  if (deathmatch->value) {
200  // auto-remove for deathmatch
201  G_FreeEdict(ent);
202  return;
203  }
204 
205  ent->use = use_target_goal;
206  if (!st.noise)
207  st.noise = "misc/secret.wav";
208  ent->noise_index = gi.soundindex(st.noise);
209  ent->svflags = SVF_NOCLIENT;
210  level.total_goals++;
211 }

◆ SP_target_help()

void SP_target_help ( edict_t *  ent)

Definition at line 127 of file g_target.c.

128 {
129  if (deathmatch->value) {
130  // auto-remove for deathmatch
131  G_FreeEdict(ent);
132  return;
133  }
134 
135  if (!ent->message) {
136  gi.dprintf("%s with no message at %s\n", ent->classname, vtos(ent->s.origin));
137  G_FreeEdict(ent);
138  return;
139  }
140  ent->use = Use_Target_Help;
141 }

◆ SP_target_laser()

void SP_target_laser ( edict_t *  self)

Definition at line 624 of file g_target.c.

625 {
626  // let everything else get spawned before we start firing
627  self->think = target_laser_start;
628  self->nextthink = level.time + 1;
629 }

◆ SP_target_lightramp()

void SP_target_lightramp ( edict_t *  self)

Definition at line 688 of file g_target.c.

689 {
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));
692  G_FreeEdict(self);
693  return;
694  }
695 
696  if (deathmatch->value) {
697  G_FreeEdict(self);
698  return;
699  }
700 
701  if (!self->target) {
702  gi.dprintf("%s with no target at %s\n", self->classname, vtos(self->s.origin));
703  G_FreeEdict(self);
704  return;
705  }
706 
707  self->svflags |= SVF_NOCLIENT;
708  self->use = target_lightramp_use;
709  self->think = target_lightramp_think;
710 
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);
714 }

◆ SP_target_secret()

void SP_target_secret ( edict_t *  ent)

Definition at line 159 of file g_target.c.

160 {
161  if (deathmatch->value) {
162  // auto-remove for deathmatch
163  G_FreeEdict(ent);
164  return;
165  }
166 
167  ent->use = use_target_secret;
168  if (!st.noise)
169  st.noise = "misc/secret.wav";
170  ent->noise_index = gi.soundindex(st.noise);
171  ent->svflags = SVF_NOCLIENT;
173  // map bug hack
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.";
176 }

◆ SP_target_spawner()

void SP_target_spawner ( edict_t *  ent)

Definition at line 386 of file g_target.c.

387 {
388  self->use = use_target_spawner;
389  self->svflags = SVF_NOCLIENT;
390  if (self->speed) {
391  G_SetMovedir(self->s.angles, self->movedir);
392  VectorScale(self->movedir, self->speed, self->movedir);
393  }
394 }

◆ SP_target_speaker()

void SP_target_speaker ( edict_t *  ent)

Definition at line 78 of file g_target.c.

79 {
80  char buffer[MAX_QPATH];
81 
82  if (!st.noise) {
83  gi.dprintf("target_speaker with no noise set at %s\n", vtos(ent->s.origin));
84  return;
85  }
86  if (!strstr(st.noise, ".wav"))
87  Q_snprintf(buffer, sizeof(buffer), "%s.wav", st.noise);
88  else
89  strncpy(buffer, st.noise, sizeof(buffer));
90  ent->noise_index = gi.soundindex(buffer);
91 
92  if (!ent->volume)
93  ent->volume = 1.0;
94 
95  if (!ent->attenuation)
96  ent->attenuation = 1.0;
97  else if (ent->attenuation == -1) // use -1 so 0 defaults to 1
98  ent->attenuation = 0;
99 
100  // check for prestarted looping sound
101  if (ent->spawnflags & 1)
102  ent->s.sound = ent->noise_index;
103 
104  ent->use = Use_Target_Speaker;
105 
106  // must link the entity so we get areas and clusters so
107  // the server can determine who to send updates to
108  gi.linkentity(ent);
109 }

◆ SP_target_splash()

void SP_target_splash ( edict_t *  ent)

Definition at line 342 of file g_target.c.

343 {
344  self->use = use_target_splash;
345  G_SetMovedir(self->s.angles, self->movedir);
346 
347  if (!self->count)
348  self->count = 32;
349 
350  self->svflags = SVF_NOCLIENT;
351 }

◆ SP_target_string()

void SP_target_string ( edict_t *  ent)

Definition at line 1543 of file g_misc.c.

1544 {
1545  if (!self->message)
1546  self->message = "";
1547  self->use = target_string_use;
1548 }

◆ SP_target_temp_entity()

void SP_target_temp_entity ( edict_t *  ent)

Definition at line 32 of file g_target.c.

33 {
34  ent->use = Use_Target_Tent;
35 }

◆ SP_trigger_always()

void SP_trigger_always ( edict_t *  ent)

Definition at line 344 of file g_trigger.c.

345 {
346  // we must have some delay to make sure our use targets are present
347  if (ent->delay < 0.2)
348  ent->delay = 0.2;
349  G_UseTargets(ent, ent);
350 }

◆ SP_trigger_counter()

void SP_trigger_counter ( edict_t *  ent)

Definition at line 323 of file g_trigger.c.

324 {
325  self->wait = -1;
326  if (!self->count)
327  self->count = 2;
328 
329  self->use = trigger_counter_use;
330 }

◆ SP_trigger_elevator()

void SP_trigger_elevator ( edict_t *  ent)

Definition at line 1648 of file g_func.c.

1649 {
1650  self->think = trigger_elevator_init;
1651  self->nextthink = level.time + FRAMETIME;
1652 }

◆ SP_trigger_gravity()

void SP_trigger_gravity ( edict_t *  ent)

Definition at line 502 of file g_trigger.c.

503 {
504  if (st.gravity == 0) {
505  gi.dprintf("trigger_gravity without gravity set at %s\n", vtos(self->s.origin));
506  G_FreeEdict(self);
507  return;
508  }
509 
510  InitTrigger(self);
511  self->gravity = atoi(st.gravity);
512  self->touch = trigger_gravity_touch;
513 }

◆ SP_trigger_hurt()

void SP_trigger_hurt ( edict_t *  ent)

Definition at line 461 of file g_trigger.c.

462 {
463  InitTrigger(self);
464 
465  self->noise_index = gi.soundindex("world/electro.wav");
466  self->touch = hurt_touch;
467 
468  if (!self->dmg)
469  self->dmg = 5;
470 
471  if (self->spawnflags & 1)
472  self->solid = SOLID_NOT;
473  else
474  self->solid = SOLID_TRIGGER;
475 
476  if (self->spawnflags & 2)
477  self->use = hurt_use;
478 
479  gi.linkentity(self);
480 }

◆ SP_trigger_key()

void SP_trigger_key ( edict_t *  ent)

Definition at line 259 of file g_trigger.c.

260 {
261  if (!st.item) {
262  gi.dprintf("no key item for trigger_key at %s\n", vtos(self->s.origin));
263  return;
264  }
265  self->item = FindItemByClassname(st.item);
266 
267  if (!self->item) {
268  gi.dprintf("item %s not found for trigger_key at %s\n", st.item, vtos(self->s.origin));
269  return;
270  }
271 
272  if (!self->target) {
273  gi.dprintf("%s at %s has no target\n", self->classname, vtos(self->s.origin));
274  return;
275  }
276 
277  gi.soundindex("misc/keytry.wav");
278  gi.soundindex("misc/keyuse.wav");
279 
280  self->use = trigger_key_use;
281 }

◆ SP_trigger_monsterjump()

void SP_trigger_monsterjump ( edict_t *  ent)

Definition at line 550 of file g_trigger.c.

551 {
552  if (!self->speed)
553  self->speed = 200;
554  if (!st.height)
555  st.height = 200;
556  if (self->s.angles[YAW] == 0)
557  self->s.angles[YAW] = 360;
558  InitTrigger(self);
559  self->touch = trigger_monsterjump_touch;
560  self->movedir[2] = st.height;
561 }

◆ SP_trigger_multiple()

void SP_trigger_multiple ( edict_t *  ent)

Definition at line 109 of file g_trigger.c.

110 {
111  if (ent->sounds == 1)
112  ent->noise_index = gi.soundindex("misc/secret.wav");
113  else if (ent->sounds == 2)
114  ent->noise_index = gi.soundindex("misc/talk.wav");
115  else if (ent->sounds == 3)
116  ent->noise_index = gi.soundindex("misc/trigger1.wav");
117 
118  if (!ent->wait)
119  ent->wait = 0.2;
120  ent->touch = Touch_Multi;
121  ent->movetype = MOVETYPE_NONE;
122  ent->svflags |= SVF_NOCLIENT;
123 
124 
125  if (ent->spawnflags & 4) {
126  ent->solid = SOLID_NOT;
127  ent->use = trigger_enable;
128  } else {
129  ent->solid = SOLID_TRIGGER;
130  ent->use = Use_Multi;
131  }
132 
133  if (!VectorCompare(ent->s.angles, vec3_origin))
134  G_SetMovedir(ent->s.angles, ent->movedir);
135 
136  gi.setmodel(ent, ent->model);
137  gi.linkentity(ent);
138 }

Referenced by SP_trigger_once().

◆ SP_trigger_once()

void SP_trigger_once ( edict_t *  ent)

Definition at line 156 of file g_trigger.c.

157 {
158  // make old maps work because I messed up on flag assignments here
159  // triggered was on bit 1 when it should have been on bit 4
160  if (ent->spawnflags & 1) {
161  vec3_t v;
162 
163  VectorMA(ent->mins, 0.5, ent->size, v);
164  ent->spawnflags &= ~1;
165  ent->spawnflags |= 4;
166  gi.dprintf("fixed TRIGGERED flag on %s at %s\n", ent->classname, vtos(v));
167  }
168 
169  ent->wait = -1;
170  SP_trigger_multiple(ent);
171 }

◆ SP_trigger_push()

void SP_trigger_push ( edict_t *  ent)

Definition at line 390 of file g_trigger.c.

391 {
392  InitTrigger(self);
393  windsound = gi.soundindex("misc/windfly.wav");
394  self->touch = trigger_push_touch;
395  if (!self->speed)
396  self->speed = 1000;
397  gi.linkentity(self);
398 }

◆ SP_trigger_relay()

void SP_trigger_relay ( edict_t *  ent)

Definition at line 181 of file g_trigger.c.

182 {
183  self->use = trigger_relay_use;
184 }

◆ SP_turret_base()

void SP_turret_base ( edict_t *  self)

Definition at line 250 of file g_turret.c.

251 {
252  self->solid = SOLID_BSP;
253  self->movetype = MOVETYPE_PUSH;
254  gi.setmodel(self, self->model);
255  self->blocked = turret_blocked;
256  gi.linkentity(self);
257 }

◆ SP_turret_breach()

void SP_turret_breach ( edict_t *  self)

Definition at line 211 of file g_turret.c.

212 {
213  self->solid = SOLID_BSP;
214  self->movetype = MOVETYPE_PUSH;
215  gi.setmodel(self, self->model);
216 
217  if (!self->speed)
218  self->speed = 50;
219  if (!self->dmg)
220  self->dmg = 10;
221 
222  if (!st.minpitch)
223  st.minpitch = -30;
224  if (!st.maxpitch)
225  st.maxpitch = 30;
226  if (!st.maxyaw)
227  st.maxyaw = 360;
228 
229  self->pos1[PITCH] = -1 * st.minpitch;
230  self->pos1[YAW] = st.minyaw;
231  self->pos2[PITCH] = -1 * st.maxpitch;
232  self->pos2[YAW] = st.maxyaw;
233 
234  self->ideal_yaw = self->s.angles[YAW];
235  self->move_angles[YAW] = self->ideal_yaw;
236 
237  self->blocked = turret_blocked;
238 
239  self->think = turret_breach_finish_init;
240  self->nextthink = level.time + FRAMETIME;
241  gi.linkentity(self);
242 }

◆ SP_turret_driver()

void SP_turret_driver ( edict_t *  self)

Definition at line 371 of file g_turret.c.

372 {
373  if (deathmatch->value) {
374  G_FreeEdict(self);
375  return;
376  }
377 
378  self->movetype = MOVETYPE_PUSH;
379  self->solid = SOLID_BBOX;
380  self->s.modelindex = gi.modelindex("models/monsters/infantry/tris.md2");
381  VectorSet(self->mins, -16, -16, -24);
382  VectorSet(self->maxs, 16, 16, 32);
383 
384  self->health = 100;
385  self->gib_health = 0;
386  self->mass = 200;
387  self->viewheight = 24;
388 
389  self->die = turret_driver_die;
390  self->monsterinfo.stand = infantry_stand;
391 
392  self->flags |= FL_NO_KNOCKBACK;
393 
395 
396  self->svflags |= SVF_MONSTER;
397  self->s.renderfx |= RF_FRAMELERP;
398  self->takedamage = DAMAGE_AIM;
399  self->use = monster_use;
400  self->clipmask = MASK_MONSTERSOLID;
401  VectorCopy(self->s.origin, self->s.old_origin);
402  self->monsterinfo.aiflags |= AI_STAND_GROUND | AI_DUCKED;
403 
404  if (st.item) {
405  self->item = FindItemByClassname(st.item);
406  if (!self->item)
407  gi.dprintf("%s at %s has bad item: %s\n", self->classname, vtos(self->s.origin), st.item);
408  }
409 
410  self->think = turret_driver_link;
411  self->nextthink = level.time + FRAMETIME;
412 
413  gi.linkentity(self);
414 }

◆ SP_viewthing()

void SP_viewthing ( edict_t *  ent)

Definition at line 468 of file g_misc.c.

469 {
470  gi.dprintf("viewthing spawned\n");
471 
472  ent->movetype = MOVETYPE_NONE;
473  ent->solid = SOLID_BBOX;
474  ent->s.renderfx = RF_FRAMELERP;
475  VectorSet(ent->mins, -16, -16, -24);
476  VectorSet(ent->maxs, 16, 16, 32);
477  ent->s.modelindex = gi.modelindex("models/objects/banner/tris.md2");
478  gi.linkentity(ent);
479  ent->nextthink = level.time + 0.5;
480  ent->think = TH_viewthing;
481  return;
482 }

◆ SP_worldspawn()

void SP_worldspawn ( edict_t *  ent)

Definition at line 842 of file g_spawn.c.

843 {
844  ent->movetype = MOVETYPE_PUSH;
845  ent->solid = SOLID_BSP;
846  ent->inuse = qtrue; // since the world doesn't use G_Spawn()
847  ent->s.modelindex = 1; // world model is always index 1
848 
849  //---------------
850 
851  // reserve some spots for dead player bodies for coop / deathmatch
852  InitBodyQue();
853 
854  // set configstrings for items
855  SetItemNames();
856 
857  if (st.nextmap)
858  strcpy(level.nextmap, st.nextmap);
859 
860  // make some data visible to the server
861 
862  if (ent->message && ent->message[0]) {
863  gi.configstring(CS_NAME, ent->message);
864  strncpy(level.level_name, ent->message, sizeof(level.level_name));
865  } else
866  strncpy(level.level_name, level.mapname, sizeof(level.level_name));
867 
868  if (st.sky && st.sky[0])
869  gi.configstring(CS_SKY, st.sky);
870  else
871  gi.configstring(CS_SKY, "unit1_");
872 
873  gi.configstring(CS_SKYROTATE, va("%f", st.skyrotate));
874 
875  gi.configstring(CS_SKYAXIS, va("%f %f %f",
876  st.skyaxis[0], st.skyaxis[1], st.skyaxis[2]));
877 
878  gi.configstring(CS_CDTRACK, va("%i", ent->sounds));
879 
880  gi.configstring(CS_MAXCLIENTS, va("%i", (int)(maxclients->value)));
881 
882  // status bar program
883  if (deathmatch->value)
884  gi.configstring(CS_STATUSBAR, dm_statusbar);
885  else
886  gi.configstring(CS_STATUSBAR, single_statusbar);
887 
888  //---------------
889 
890 
891  // help icon for statusbar
892  gi.imageindex("i_help");
893  level.pic_health = gi.imageindex("i_health");
894  gi.imageindex("help");
895  gi.imageindex("field_3");
896 
897  if (!st.gravity)
898  gi.cvar_set("sv_gravity", "800");
899  else
900  gi.cvar_set("sv_gravity", st.gravity);
901 
902  snd_fry = gi.soundindex("player/fry.wav"); // standing in lava / slime
903 
904  PrecacheItem(FindItem("Blaster"));
905 
906  gi.soundindex("player/lava1.wav");
907  gi.soundindex("player/lava2.wav");
908 
909  gi.soundindex("misc/pc_up.wav");
910  gi.soundindex("misc/talk1.wav");
911 
912  gi.soundindex("misc/udeath.wav");
913 
914  // gibs
915  gi.soundindex("items/respawn1.wav");
916 
917  // sexed sounds
918  gi.soundindex("*death1.wav");
919  gi.soundindex("*death2.wav");
920  gi.soundindex("*death3.wav");
921  gi.soundindex("*death4.wav");
922  gi.soundindex("*fall1.wav");
923  gi.soundindex("*fall2.wav");
924  gi.soundindex("*gurp1.wav"); // drowning damage
925  gi.soundindex("*gurp2.wav");
926  gi.soundindex("*jump1.wav"); // player jump
927  gi.soundindex("*pain25_1.wav");
928  gi.soundindex("*pain25_2.wav");
929  gi.soundindex("*pain50_1.wav");
930  gi.soundindex("*pain50_2.wav");
931  gi.soundindex("*pain75_1.wav");
932  gi.soundindex("*pain75_2.wav");
933  gi.soundindex("*pain100_1.wav");
934  gi.soundindex("*pain100_2.wav");
935 
936  // sexed models
937  // THIS ORDER MUST MATCH THE DEFINES IN g_local.h
938  // you can add more, max 15
939  gi.modelindex("#w_blaster.md2");
940  gi.modelindex("#w_shotgun.md2");
941  gi.modelindex("#w_sshotgun.md2");
942  gi.modelindex("#w_machinegun.md2");
943  gi.modelindex("#w_chaingun.md2");
944  gi.modelindex("#a_grenades.md2");
945  gi.modelindex("#w_glauncher.md2");
946  gi.modelindex("#w_rlauncher.md2");
947  gi.modelindex("#w_hyperblaster.md2");
948  gi.modelindex("#w_railgun.md2");
949  gi.modelindex("#w_bfg.md2");
950 
951  //-------------------
952 
953  gi.soundindex("player/gasp1.wav"); // gasping for air
954  gi.soundindex("player/gasp2.wav"); // head breaking surface, not gasping
955 
956  gi.soundindex("player/watr_in.wav"); // feet hitting water
957  gi.soundindex("player/watr_out.wav"); // feet leaving water
958 
959  gi.soundindex("player/watr_un.wav"); // head going underwater
960 
961  gi.soundindex("player/u_breath1.wav");
962  gi.soundindex("player/u_breath2.wav");
963 
964  gi.soundindex("items/pkup.wav"); // bonus item pickup
965  gi.soundindex("world/land.wav"); // landing thud
966  gi.soundindex("misc/h2ohit1.wav"); // landing splash
967 
968  gi.soundindex("items/damage.wav");
969  gi.soundindex("items/protect.wav");
970  gi.soundindex("items/protect4.wav");
971  gi.soundindex("weapons/noammo.wav");
972 
973  gi.soundindex("infantry/inflies1.wav");
974 
975  sm_meat_index = gi.modelindex("models/objects/gibs/sm_meat/tris.md2");
976  gi.modelindex("models/objects/gibs/arm/tris.md2");
977  gi.modelindex("models/objects/gibs/bone/tris.md2");
978  gi.modelindex("models/objects/gibs/bone2/tris.md2");
979  gi.modelindex("models/objects/gibs/chest/tris.md2");
980  gi.modelindex("models/objects/gibs/skull/tris.md2");
981  gi.modelindex("models/objects/gibs/head2/tris.md2");
982 
983 //
984 // Setup light animation tables. 'a' is total darkness, 'z' is doublebright.
985 //
986 
987  // 0 normal
988  gi.configstring(CS_LIGHTS + 0, "m");
989 
990  // 1 FLICKER (first variety)
991  gi.configstring(CS_LIGHTS + 1, "mmnmmommommnonmmonqnmmo");
992 
993  // 2 SLOW STRONG PULSE
994  gi.configstring(CS_LIGHTS + 2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
995 
996  // 3 CANDLE (first variety)
997  gi.configstring(CS_LIGHTS + 3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
998 
999  // 4 FAST STROBE
1000  gi.configstring(CS_LIGHTS + 4, "mamamamamama");
1001 
1002  // 5 GENTLE PULSE 1
1003  gi.configstring(CS_LIGHTS + 5, "jklmnopqrstuvwxyzyxwvutsrqponmlkj");
1004 
1005  // 6 FLICKER (second variety)
1006  gi.configstring(CS_LIGHTS + 6, "nmonqnmomnmomomno");
1007 
1008  // 7 CANDLE (second variety)
1009  gi.configstring(CS_LIGHTS + 7, "mmmaaaabcdefgmmmmaaaammmaamm");
1010 
1011  // 8 CANDLE (third variety)
1012  gi.configstring(CS_LIGHTS + 8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
1013 
1014  // 9 SLOW STROBE (fourth variety)
1015  gi.configstring(CS_LIGHTS + 9, "aaaaaaaazzzzzzzz");
1016 
1017  // 10 FLUORESCENT FLICKER
1018  gi.configstring(CS_LIGHTS + 10, "mmamammmmammamamaaamammma");
1019 
1020  // 11 SLOW PULSE NOT FADE TO BLACK
1021  gi.configstring(CS_LIGHTS + 11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
1022 
1023  // styles 32-62 are assigned by the light program for switchable lights
1024 
1025  // 63 testing
1026  gi.configstring(CS_LIGHTS + 63, "a");
1027 }

◆ SpawnEntities()

void SpawnEntities ( const char *  mapname,
const char *  entities,
const char *  spawnpoint 
)

Definition at line 568 of file g_spawn.c.

569 {
570  edict_t *ent;
571  int inhibit;
572  char *com_token;
573  int i;
574  float skill_level;
575 
576  skill_level = floor(skill->value);
577  if (skill_level < 0)
578  skill_level = 0;
579  if (skill_level > 3)
580  skill_level = 3;
581  if (skill->value != skill_level)
582  gi.cvar_forceset("skill", va("%f", skill_level));
583 
584  SaveClientData();
585 
586  gi.FreeTags(TAG_LEVEL);
587 
588  memset(&level, 0, sizeof(level));
589  memset(g_edicts, 0, game.maxentities * sizeof(g_edicts[0]));
590 
591  strncpy(level.mapname, mapname, sizeof(level.mapname) - 1);
592  strncpy(game.spawnpoint, spawnpoint, sizeof(game.spawnpoint) - 1);
593 
594  // set client fields on player ents
595  for (i = 0 ; i < game.maxclients ; i++)
596  g_edicts[i + 1].client = game.clients + i;
597 
598  ent = NULL;
599  inhibit = 0;
600 
601 // parse ents
602  while (1) {
603  // parse the opening brace
604  com_token = COM_Parse(&entities);
605  if (!entities)
606  break;
607  if (com_token[0] != '{')
608  gi.error("ED_LoadFromFile: found %s when expecting {", com_token);
609 
610  if (!ent)
611  ent = g_edicts;
612  else
613  ent = G_Spawn();
614  ED_ParseEdict(&entities, ent);
615 
616  // yet another map hack
617  if (!Q_stricmp(level.mapname, "command") && !Q_stricmp(ent->classname, "trigger_once") && !Q_stricmp(ent->model, "*27"))
618  ent->spawnflags &= ~SPAWNFLAG_NOT_HARD;
619 
620  // remove things (except the world) from different skill levels or deathmatch
621  if (ent != g_edicts) {
622  if (nomonsters->value && (strstr(ent->classname, "monster") || strstr(ent->classname, "misc_deadsoldier") || strstr(ent->classname, "misc_insane"))) {
623  G_FreeEdict(ent);
624  inhibit++;
625  continue;
626  }
627  if (deathmatch->value) {
628  if (ent->spawnflags & SPAWNFLAG_NOT_DEATHMATCH) {
629  G_FreeEdict(ent);
630  inhibit++;
631  continue;
632  }
633  } else {
634  if ( /* ((coop->value) && (ent->spawnflags & SPAWNFLAG_NOT_COOP)) || */
635  ((skill->value == 0) && (ent->spawnflags & SPAWNFLAG_NOT_EASY)) ||
636  ((skill->value == 1) && (ent->spawnflags & SPAWNFLAG_NOT_MEDIUM)) ||
637  (((skill->value == 2) || (skill->value == 3)) && (ent->spawnflags & SPAWNFLAG_NOT_HARD))
638  ) {
639  G_FreeEdict(ent);
640  inhibit++;
641  continue;
642  }
643  }
644 
646  }
647 
648  ED_CallSpawn(ent);
649  }
650 
651  gi.dprintf("%i entities inhibited\n", inhibit);
652 
653 #ifdef DEBUG
654  i = 1;
655  ent = EDICT_NUM(i);
656  while (i < globals.num_edicts) {
657  if (ent->inuse != 0 || ent->inuse != 1)
658  Com_DPrintf("Invalid entity %d\n", i);
659  i++, ent++;
660  }
661 #endif
662 
663  G_FindTeams();
664 
666 }

Referenced by GetGameAPI().

Variable Documentation

◆ dm_statusbar

const char dm_statusbar[]
static

Definition at line 752 of file g_spawn.c.

Referenced by SP_worldspawn().

◆ single_statusbar

const char single_statusbar[]
static

Definition at line 694 of file g_spawn.c.

Referenced by SP_worldspawn().

◆ spawn_fields

const spawn_field_t spawn_fields[]
static

Definition at line 273 of file g_spawn.c.

Referenced by ED_ParseEdict().

◆ spawn_funcs

const spawn_func_t spawn_funcs[]
static

Definition at line 150 of file g_spawn.c.

Referenced by ED_CallSpawn().

◆ temp_fields

const spawn_field_t temp_fields[]
static
Initial value:
= {
{"lip", STOFS(lip), F_INT},
{"distance", STOFS(distance), F_INT},
{"height", STOFS(height), F_INT},
{"noise", STOFS(noise), F_LSTRING},
{"pausetime", STOFS(pausetime), F_FLOAT},
{"item", STOFS(item), F_LSTRING},
{"gravity", STOFS(gravity), F_LSTRING},
{"sky", STOFS(sky), F_LSTRING},
{"skyrotate", STOFS(skyrotate), F_FLOAT},
{"skyaxis", STOFS(skyaxis), F_VECTOR},
{"minyaw", STOFS(minyaw), F_FLOAT},
{"maxyaw", STOFS(maxyaw), F_FLOAT},
{"minpitch", STOFS(minpitch), F_FLOAT},
{"maxpitch", STOFS(maxpitch), F_FLOAT},
{"nextmap", STOFS(nextmap), F_LSTRING},
{NULL}
}

Definition at line 311 of file g_spawn.c.

Referenced by ED_ParseEdict().

FindItem
gitem_t * FindItem(char *pickup_name)
Definition: g_items.c:98
sound_pain2
static int sound_pain2
Definition: m_gunner.c:31
gi
game_import_t gi
Definition: g_main.c:23
supertank_move_stand
mmove_t supertank_move_stand
Definition: m_supertank.c:128
gladiator_die
void gladiator_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_gladiator.c:297
misc_strogg_ship_use
void misc_strogg_ship_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1347
train_use
void train_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:1544
flyer_sight
void flyer_sight(edict_t *self, edict_t *other)
Definition: m_flyer.c:50
level_locals_t::pic_health
int pic_health
Definition: g_local.h:321
trigger_counter_use
void trigger_counter_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_trigger.c:300
gladiator_melee
void gladiator_melee(edict_t *self)
Definition: m_gladiator.c:156
sound_search1
static int sound_search1
Definition: m_supertank.c:35
misc_deadsoldier_die
void misc_deadsoldier_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_misc.c:1157
sound_sight
static int sound_sight
Definition: m_berserk.c:34
gunner_sight
void gunner_sight(edict_t *self, edict_t *other)
Definition: m_gunner.c:44
chick_sight
void chick_sight(edict_t *self, edict_t *other)
Definition: m_chick.c:587
use_target_changelevel
void use_target_changelevel(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:264
sound_sight
static int sound_sight
Definition: m_flipper.c:37
func_train_find
void func_train_find(edict_t *self)
Definition: g_func.c:1515
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
flipper_melee
void flipper_melee(edict_t *self)
Definition: m_flipper.c:208
hover_die
void hover_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_hover.c:515
PlayerTrail_Init
void PlayerTrail_Init(void)
Definition: p_trail.c:47
insane_walk
void insane_walk(edict_t *self)
Definition: m_insane.c:425
medic_attack
void medic_attack(edict_t *self)
Definition: m_medic.c:665
single_statusbar
static const char single_statusbar[]
Definition: g_spawn.c:694
sound_gunshot
static int sound_gunshot
Definition: m_infantry.c:37
sound_chomp
static int sound_chomp
Definition: m_flipper.c:30
button_use
void button_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:700
tank_die
void tank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_tank.c:714
misc_viper_bomb_use
void misc_viper_bomb_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1297
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
sound_melee2
static int sound_melee2
Definition: m_brain.c:42
DOOR_Y_AXIS
#define DOOR_Y_AXIS
Definition: g_func.c:67
mutant_sight
void mutant_sight(edict_t *self, edict_t *other)
Definition: m_mutant.c:60
sound_melee1
static int sound_melee1
Definition: m_brain.c:41
trigger_relay_use
void trigger_relay_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_trigger.c:176
barrel_delay
void barrel_delay(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_misc.c:910
sound_die
static int sound_die
Definition: m_medic.c:35
turret_breach_finish_init
void turret_breach_finish_init(edict_t *self)
Definition: g_turret.c:195
tank_idle
void tank_idle(edict_t *self)
Definition: m_tank.c:68
insane_pain
void insane_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_insane.c:456
sound_scream
static int sound_scream[8]
Definition: m_insane.c:33
G_Spawn
edict_t * G_Spawn(void)
Definition: g_utils.c:391
func_timer_think
void func_timer_think(edict_t *self)
Definition: g_func.c:1669
ED_NewString
static char * ED_NewString(const char *string)
Definition: g_spawn.c:378
func_object_use
void func_object_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:637
sound_missile_reload
static int sound_missile_reload
Definition: m_chick.c:41
medic_checkattack
qboolean medic_checkattack(edict_t *self)
Definition: m_medic.c:673
sound_pain1
static int sound_pain1
Definition: m_float.c:34
func_conveyor_use
void func_conveyor_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:1720
sound_reelin
static int sound_reelin
Definition: m_parasite.c:36
hover_sight
void hover_sight(edict_t *self, edict_t *other)
Definition: m_hover.c:41
tank_stand
void tank_stand(edict_t *self)
Definition: m_tank.c:112
height
static int height
Definition: physical_sky.c:39
F_IGNORE
@ F_IGNORE
Definition: g_local.h:581
parasite_idle
void parasite_idle(edict_t *self)
Definition: m_parasite.c:132
mutant_run
void mutant_run(edict_t *self)
Definition: m_mutant.c:235
AI_GOOD_GUY
#define AI_GOOD_GUY
Definition: g_local.h:134
FindItemByClassname
gitem_t * FindItemByClassname(char *classname)
Definition: g_items.c:76
flipper_move_stand
mmove_t flipper_move_stand
Definition: m_flipper.c:46
actor_pain
void actor_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_actor.c:216
maxclients
cvar_t * maxclients
Definition: g_main.c:42
barrel_touch
void barrel_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_misc.c:817
Q_snprintf
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
Definition: shared.c:846
infantry_die
void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_infantry.c:365
sound_die
static int sound_die
Definition: m_flyer.c:39
sound_sight
static int sound_sight
Definition: m_gunner.c:36
sound_death1
static int sound_death1
Definition: m_float.c:32
sound_hook_heal
static int sound_hook_heal
Definition: m_medic.c:40
flyer_stand
void flyer_stand(edict_t *self)
Definition: m_flyer.c:227
sound_pain1
static int sound_pain1
Definition: m_infantry.c:32
jorg_attack
void jorg_attack(edict_t *self)
Definition: m_boss31.c:516
button_killed
void button_killed(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_func.c:718
flipper_stand
void flipper_stand(edict_t *self)
Definition: m_flipper.c:48
mutant_pain
void mutant_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_mutant.c:475
sound_step1
static int sound_step1
Definition: m_mutant.c:39
com_token
static char com_token[4][MAX_TOKEN_CHARS]
Definition: shared.c:444
Use_Plat
void Use_Plat(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_func.c:400
hurt_use
void hurt_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_trigger.c:421
use_target_goal
void use_target_goal(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_target.c:184
TH_viewthing
void TH_viewthing(edict_t *ent)
Definition: g_misc.c:462
misc_viper_use
void misc_viper_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1218
sound_pain2
static int sound_pain2
Definition: m_parasite.c:31
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
floater_move_stand2
mmove_t floater_move_stand2
Definition: m_float.c:191
sound_idle1
static int sound_idle1
Definition: m_chick.c:45
sound_death
static int sound_death
Definition: m_soldier.c:37
door_secret_die
void door_secret_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_func.c:1849
InitBodyQue
void InitBodyQue(void)
Definition: p_client.c:887
spawn_temp_t::gravity
char * gravity
Definition: g_local.h:355
snd_fry
int snd_fry
Definition: g_main.c:28
sound_search
static int sound_search
Definition: m_medic.c:37
jorg_move_stand
mmove_t jorg_move_stand
Definition: m_boss31.c:134
medic_sight
void medic_sight(edict_t *self, edict_t *other)
Definition: m_medic.c:109
spawn_field_t::ofs
size_t ofs
Definition: g_spawn.c:29
turret_driver_link
void turret_driver_link(edict_t *self)
Definition: g_turret.c:338
F_VECTOR
@ F_VECTOR
Definition: g_local.h:574
sound_death_hit
static int sound_death_hit
Definition: m_boss31.c:45
st
spawn_temp_t st
Definition: g_main.c:25
sound_search
static int sound_search
Definition: m_mutant.c:38
actor_run
void actor_run(edict_t *self)
Definition: m_actor.c:130
infantry_move_stand
mmove_t infantry_move_stand
Definition: m_infantry.c:70
floater_stand
void floater_stand(edict_t *self)
Definition: m_float.c:193
sound_death1
static int sound_death1
Definition: m_hover.c:34
SP_monster_soldier_x
void SP_monster_soldier_x(edict_t *self)
Definition: m_soldier.c:1151
path_corner_touch
void path_corner_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_misc.c:325
func_clock_think
void func_clock_think(edict_t *self)
Definition: g_misc.c:1600
use_target_blaster
void use_target_blaster(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:405
sound_fist
static int sound_fist
Definition: m_insane.c:30
actor_walk
void actor_walk(edict_t *self)
Definition: m_actor.c:108
SP_misc_teleporter_dest
void SP_misc_teleporter_dest(edict_t *ent)
Definition: g_misc.c:1783
sound_pain
static int sound_pain
Definition: m_tank.c:35
MOVETYPE_STOP
@ MOVETYPE_STOP
Definition: g_local.h:189
plat_blocked
void plat_blocked(edict_t *self, edict_t *other)
Definition: g_func.c:380
chick_stand
void chick_stand(edict_t *self)
Definition: m_chick.c:139
SPAWNFLAG_NOT_EASY
#define SPAWNFLAG_NOT_EASY
Definition: g_local.h:52
spawn_fields
static const spawn_field_t spawn_fields[]
Definition: g_spawn.c:273
sound_pain_ss
static int sound_pain_ss
Definition: m_soldier.c:35
sound_thud
static int sound_thud
Definition: m_mutant.c:42
mutant_jump
void mutant_jump(edict_t *self)
Definition: m_mutant.c:374
sound_gun
static int sound_gun
Definition: m_gladiator.c:33
sound_attack3
static int sound_attack3
Definition: m_float.c:31
spawn_temp_t::maxyaw
float maxyaw
Definition: g_local.h:358
boss2_pain
void boss2_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_boss2.c:454
sound_idle
static int sound_idle
Definition: m_flipper.c:35
FRAME_stand201
#define FRAME_stand201
Definition: m_actor.h:190
sound_death
static int sound_death
Definition: m_gunner.c:32
sound_sight
static int sound_sight
Definition: m_mutant.c:37
misc_banner_think
void misc_banner_think(edict_t *ent)
Definition: g_misc.c:1136
target_string_use
void target_string_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1515
floater_walk
void floater_walk(edict_t *self)
Definition: m_float.c:496
sound_hook_hit
static int sound_hook_hit
Definition: m_medic.c:39
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
sound_pain3
static int sound_pain3
Definition: m_chick.c:49
sound_die2
static int sound_die2
Definition: m_infantry.c:35
sound_pain2
static int sound_pain2
Definition: m_boss31.c:33
sound_launch
static int sound_launch
Definition: m_parasite.c:33
SpawnItem
void SpawnItem(edict_t *ent, gitem_t *item)
Definition: g_items.c:1003
Use_Target_Speaker
void Use_Target_Speaker(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_target.c:56
sound_missile_prelaunch
static int sound_missile_prelaunch
Definition: m_chick.c:37
SP_FixCoopSpots
void SP_FixCoopSpots(edict_t *self)
Definition: p_client.c:38
sound_idle
static int sound_idle
Definition: m_gladiator.c:37
MOVETYPE_PUSH
@ MOVETYPE_PUSH
Definition: g_local.h:188
sound_pain1
static int sound_pain1
Definition: m_hover.c:32
sound_sproing
static int sound_sproing
Definition: m_flyer.c:38
func_train_find
void func_train_find(edict_t *self)
Definition: g_func.c:1515
spawn_field_t
Definition: g_spawn.c:27
flipper_walk
void flipper_walk(edict_t *self)
Definition: m_flipper.c:134
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
spawn_func_t::name
char * name
Definition: g_spawn.c:23
sound_firegun
static int sound_firegun
Definition: m_boss31.c:42
train_blocked
void train_blocked(edict_t *self, edict_t *other)
Definition: g_func.c:1389
sound_punch_swing
static int sound_punch_swing
Definition: m_infantry.c:39
sound_pain2
static int sound_pain2
Definition: m_infantry.c:33
rotating_use
void rotating_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:573
sound_death_ss
static int sound_death_ss
Definition: m_soldier.c:38
gunner_pain
void gunner_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_gunner.c:273
medic_run
void medic_run(edict_t *self)
Definition: m_medic.c:249
hover_move_stand
mmove_t hover_move_stand
Definition: m_hover.c:95
sound_shake
static int sound_shake
Definition: m_insane.c:31
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
brain_die
void brain_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_brain.c:561
sound_impact
static int sound_impact
Definition: m_parasite.c:34
floater_idle
void floater_idle(edict_t *self)
Definition: m_float.c:44
sound_pain3
static int sound_pain3
Definition: m_boss31.c:34
actor_attack
void actor_attack(edict_t *self)
Definition: m_actor.c:366
M_droptofloor
void M_droptofloor(edict_t *ent)
Definition: g_monster.c:286
turret_driver_die
void turret_driver_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_turret.c:269
FL_NO_KNOCKBACK
#define FL_NO_KNOCKBACK
Definition: g_local.h:70
sound_pain2
static int sound_pain2
Definition: m_gladiator.c:31
TAG_LEVEL
#define TAG_LEVEL
Definition: g_local.h:79
hover_stand
void hover_stand(edict_t *self)
Definition: m_hover.c:439
target_lightramp_use
void target_lightramp_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:658
gladiator_sight
void gladiator_sight(edict_t *self, edict_t *other)
Definition: m_gladiator.c:47
commander_body_use
void commander_body_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1097
parasite_sight
void parasite_sight(edict_t *self, edict_t *other)
Definition: m_parasite.c:63
infantry_walk
void infantry_walk(edict_t *self)
Definition: m_infantry.c:153
DOOR_X_AXIS
#define DOOR_X_AXIS
Definition: g_func.c:66
door_use
void door_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:902
misc_easterchick2_think
void misc_easterchick2_think(edict_t *self)
Definition: g_misc.c:1057
jorg_pain
void jorg_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_boss31.c:399
insane_die
void insane_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_insane.c:553
SPAWNFLAG_NOT_MEDIUM
#define SPAWNFLAG_NOT_MEDIUM
Definition: g_local.h:53
sound_sight
static int sound_sight
Definition: m_tank.c:39
sound_death
static int sound_death
Definition: m_boss2.c:36
game_locals_t::spawnpoint
char spawnpoint[512]
Definition: g_local.h:277
mutant_search
void mutant_search(edict_t *self)
Definition: m_mutant.c:65
sound_idle
static int sound_idle
Definition: m_boss31.c:35
sound_chest_open
static int sound_chest_open
Definition: m_brain.c:30
monster_use
void monster_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_monster.c:402
sound_pain3
static int sound_pain3
Definition: m_supertank.c:33
g_edicts
edict_t * g_edicts
Definition: g_main.c:31
jorg_walk
void jorg_walk(edict_t *self)
Definition: m_boss31.c:222
sound_weapon_cock
static int sound_weapon_cock
Definition: m_infantry.c:38
flyer_move_stand
mmove_t flyer_move_stand
Definition: m_flyer.c:113
sound_search
static int sound_search
Definition: m_chick.c:51
sound_attack
static int sound_attack
Definition: m_flipper.c:31
itemlist
gitem_t itemlist[]
Definition: g_items.c:1063
PrecacheItem
void PrecacheItem(gitem_t *it)
Definition: g_items.c:937
sound_step2
static int sound_step2
Definition: m_mutant.c:40
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
flipper_start_run
void flipper_start_run(edict_t *self)
Definition: m_flipper.c:148
sound_pain1
static int sound_pain1
Definition: m_flyer.c:35
trigger_enable
void trigger_enable(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_trigger.c:102
commander_body_drop
void commander_body_drop(edict_t *self)
Definition: g_misc.c:1104
sound_idle
static int sound_idle
Definition: m_tank.c:36
flyer_pain
void flyer_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_flyer.c:512
level_locals_t::level_name
char level_name[MAX_QPATH]
Definition: g_local.h:301
TRAIN_BLOCK_STOPS
#define TRAIN_BLOCK_STOPS
Definition: g_func.c:1375
button_touch
void button_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_func.c:706
berserk_move_stand
mmove_t berserk_move_stand
Definition: m_berserk.c:56
spawn_field_t::type
fieldtype_t type
Definition: g_spawn.c:30
gunner_search
void gunner_search(edict_t *self)
Definition: m_gunner.c:49
F_FLOAT
@ F_FLOAT
Definition: g_local.h:570
brain_sight
void brain_sight(edict_t *self, edict_t *other)
Definition: m_brain.c:46
brain_walk
void brain_walk(edict_t *self)
Definition: m_brain.c:231
sound_windup
static int sound_windup
Definition: m_tank.c:40
spawn_field_t::name
char * name
Definition: g_spawn.c:28
teleporter_touch
void teleporter_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_misc.c:1701
func_wall_use
void func_wall_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:557
supertank_walk
void supertank_walk(edict_t *self)
Definition: m_supertank.c:190
Use_Target_Tent
void Use_Target_Tent(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_target.c:24
SetItemNames
void SetItemNames(void)
Definition: g_items.c:2146
sound_pain2
static int sound_pain2
Definition: m_medic.c:34
light_use
void light_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:514
sound_idle
static int sound_idle
Definition: m_mutant.c:34
sound_idle
static int sound_idle
Definition: m_float.c:33
berserk_stand
void berserk_stand(edict_t *self)
Definition: m_berserk.c:58
sound_pain2
static int sound_pain2
Definition: m_boss2.c:34
POWER_ARMOR_SCREEN
#define POWER_ARMOR_SCREEN
Definition: g_local.h:157
brain_stand
void brain_stand(edict_t *self)
Definition: m_brain.c:101
SECRET_1ST_LEFT
#define SECRET_1ST_LEFT
Definition: g_func.c:1766
sound_idle
static int sound_idle
Definition: m_infantry.c:43
vec3_origin
vec3_t vec3_origin
Definition: shared.c:21
gunner_move_stand
mmove_t gunner_move_stand
Definition: m_gunner.c:163
temp_fields
static const spawn_field_t temp_fields[]
Definition: g_spawn.c:311
STATE_UP
#define STATE_UP
Definition: g_func.c:58
boss2_stand
void boss2_stand(edict_t *self)
Definition: m_boss2.c:401
width
static int width
Definition: physical_sky.c:38
level_locals_t::total_secrets
int total_secrets
Definition: g_local.h:323
gladiator_pain
void gladiator_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_gladiator.c:231
ED_CallSpawn
void ED_CallSpawn(edict_t *ent)
Definition: g_spawn.c:340
sound_death1
static int sound_death1
Definition: m_chick.c:42
flipper_sight
void flipper_sight(edict_t *self, edict_t *other)
Definition: m_flipper.c:313
sound_sight
static int sound_sight
Definition: m_brain.c:39
spawn_temp_t::height
int height
Definition: g_local.h:351
medic_walk
void medic_walk(edict_t *self)
Definition: m_medic.c:232
Jorg_CheckAttack
qboolean Jorg_CheckAttack(edict_t *self)
Definition: m_boss31.c:567
DOOR_TOGGLE
#define DOOR_TOGGLE
Definition: g_func.c:65
sound_cleaver_swing
static int sound_cleaver_swing
Definition: m_gladiator.c:34
level_locals_t::total_goals
int total_goals
Definition: g_local.h:326
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
Touch_Multi
void Touch_Multi(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_trigger.c:68
supertank_stand
void supertank_stand(edict_t *self)
Definition: m_supertank.c:130
sound_thud
static int sound_thud
Definition: m_tank.c:34
mutant_melee
void mutant_melee(edict_t *self)
Definition: m_mutant.c:290
sound_search3
static int sound_search3
Definition: m_boss31.c:39
sound_search
static int sound_search
Definition: m_brain.c:40
MOVETYPE_NONE
@ MOVETYPE_NONE
Definition: g_local.h:186
floater_attack
void floater_attack(edict_t *self)
Definition: m_float.c:537
CLOCK_MESSAGE_SIZE
#define CLOCK_MESSAGE_SIZE
Definition: g_local.h:692
infantry_dodge
void infantry_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_infantry.c:438
gladiator_search
void gladiator_search(edict_t *self)
Definition: m_gladiator.c:52
sound_sight
static int sound_sight
Definition: m_gladiator.c:39
medic_pain
void medic_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_medic.c:303
sound_missile_launch
static int sound_missile_launch
Definition: m_chick.c:38
actor_move_stand
mmove_t actor_move_stand
Definition: m_actor.c:81
sound_idle2
static int sound_idle2
Definition: m_chick.c:46
sound_idle
static int sound_idle
Definition: m_flyer.c:34
sound_death_light
static int sound_death_light
Definition: m_soldier.c:36
floater_run
void floater_run(edict_t *self)
Definition: m_float.c:488
berserk_melee
void berserk_melee(edict_t *self)
Definition: m_berserk.c:240
sound_idle1
static int sound_idle1
Definition: m_medic.c:32
sound_search
static int sound_search
Definition: m_gladiator.c:38
game_locals_t::num_items
int num_items
Definition: g_local.h:287
use_target_spawner
void use_target_spawner(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:370
Use_Boss3
void Use_Boss3(edict_t *ent, edict_t *other, edict_t *activator)
Definition: m_boss3.c:29
point_combat_touch
void point_combat_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_misc.c:398
sound_step3
static int sound_step3
Definition: m_mutant.c:41
use_killbox
void use_killbox(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:1922
target_earthquake_use
void target_earthquake_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:753
sound_sight
static int sound_sight
Definition: m_flyer.c:33
infantry_attack
void infantry_attack(edict_t *self)
Definition: m_infantry.c:515
rotating_blocked
void rotating_blocked(edict_t *self, edict_t *other)
Definition: g_func.c:562
func_object_release
void func_object_release(edict_t *self)
Definition: g_misc.c:631
HEALTH_TIMED
#define HEALTH_TIMED
Definition: g_items.c:49
forward
static vec3_t forward
Definition: p_view.c:27
spawn_temp_t::nextmap
char * nextmap
Definition: g_local.h:347
chick_pain
void chick_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_chick.c:252
crandom
#define crandom()
Definition: g_local.h:505
spawn_temp_t::lip
int lip
Definition: g_local.h:349
FL_GODMODE
#define FL_GODMODE
Definition: g_local.h:63
sound_open
static int sound_open
Definition: m_gunner.c:34
brain_idle
void brain_idle(edict_t *self)
Definition: m_brain.c:147
medic_move_stand
mmove_t medic_move_stand
Definition: m_medic.c:208
sound_pain1
static int sound_pain1
Definition: m_flipper.c:32
boss2_walk
void boss2_walk(edict_t *self)
Definition: m_boss2.c:414
sound_fall_down
static int sound_fall_down
Definition: m_chick.c:44
mutant_idle
void mutant_idle(edict_t *self)
Definition: m_mutant.c:173
gladiator_attack
void gladiator_attack(edict_t *self)
Definition: m_gladiator.c:191
sound_search
static int sound_search
Definition: m_flipper.c:36
swimmonster_start
void swimmonster_start(edict_t *self)
Definition: g_monster.c:673
va
char * va(const char *format,...)
Definition: shared.c:429
sound_pain2
static int sound_pain2
Definition: m_chick.c:48
sound_attack1
static int sound_attack1
Definition: m_boss31.c:40
sound_swing
static int sound_swing
Definition: m_mutant.c:30
actor_die
void actor_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_actor.c:316
sound_pain1
static int sound_pain1
Definition: m_supertank.c:31
sound_step
static int sound_step
Definition: m_tank.c:38
sound_die
static int sound_die
Definition: m_berserk.c:31
game_locals_t::clients
gclient_t * clients
Definition: g_local.h:273
sound_sight
static int sound_sight
Definition: m_float.c:36
sound_die
static int sound_die
Definition: m_parasite.c:32
misc_eastertank_think
void misc_eastertank_think(edict_t *self)
Definition: g_misc.c:1003
sound_punch
static int sound_punch
Definition: m_berserk.c:33
supertank_run
void supertank_run(edict_t *self)
Definition: m_supertank.c:195
berserk_walk
void berserk_walk(edict_t *self)
Definition: m_berserk.c:115
Use_Areaportal
void Use_Areaportal(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_misc.c:29
gladiator_idle
void gladiator_idle(edict_t *self)
Definition: m_gladiator.c:42
parasite_attack
void parasite_attack(edict_t *self)
Definition: m_parasite.c:413
sound_hit2
static int sound_hit2
Definition: m_mutant.c:32
parasite_move_stand
mmove_t parasite_move_stand
Definition: m_parasite.c:157
sound_search2
static int sound_search2
Definition: m_supertank.c:36
vtos
char * vtos(vec3_t v)
Definition: g_utils.c:275
jorg_run
void jorg_run(edict_t *self)
Definition: m_boss31.c:227
sound_scratch
static int sound_scratch
Definition: m_parasite.c:39
game
game_locals_t game
Definition: g_main.c:21
spawn_func_t
Definition: g_spawn.c:22
skyaxis
static vec3_t skyaxis
Definition: sky.c:22
func_clock_use
void func_clock_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1660
random
#define random()
Definition: g_local.h:504
sound_step_right
static int sound_step_right
Definition: m_boss31.c:44
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: shared.c:23
sound_pain1
static int sound_pain1
Definition: m_parasite.c:30
chick_walk
void chick_walk(edict_t *self)
Definition: m_chick.c:189
sound_sight
static int sound_sight
Definition: m_parasite.c:37
level_locals_t::nextmap
char nextmap[MAX_QPATH]
Definition: g_local.h:303
floater_pain
void floater_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_float.c:552
globals
game_export_t globals
Definition: g_main.c:24
flyer_melee
void flyer_melee(edict_t *self)
Definition: m_flyer.c:494
tank_walk
void tank_walk(edict_t *self)
Definition: m_tank.c:161
medic_idle
void medic_idle(edict_t *self)
Definition: m_medic.c:76
sound_pain2
static int sound_pain2
Definition: m_brain.c:38
berserk_search
void berserk_search(edict_t *self)
Definition: m_berserk.c:42
sound_search1
static int sound_search1
Definition: m_hover.c:37
sound_hook_launch
static int sound_hook_launch
Definition: m_medic.c:38
parasite_stand
void parasite_stand(edict_t *self)
Definition: m_parasite.c:159
sound_attack2
static int sound_attack2
Definition: m_boss31.c:41
func_clock_reset
static void func_clock_reset(edict_t *self)
Definition: g_misc.c:1564
gladiator_move_stand
mmove_t gladiator_move_stand
Definition: m_gladiator.c:71
sound_death
static int sound_death
Definition: m_supertank.c:34
hover_run
void hover_run(edict_t *self)
Definition: m_hover.c:444
sound_tap
static int sound_tap
Definition: m_parasite.c:38
door_secret_blocked
void door_secret_blocked(edict_t *self, edict_t *other)
Definition: g_func.c:1831
parasite_start_walk
void parasite_start_walk(edict_t *self)
Definition: m_parasite.c:236
flyer_walk
void flyer_walk(edict_t *self)
Definition: m_flyer.c:222
turret_blocked
void turret_blocked(edict_t *self, edict_t *other)
Definition: g_turret.c:46
sm_meat_index
int sm_meat_index
Definition: g_main.c:27
hover_pain
void hover_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_hover.c:468
tread_sound
static int tread_sound
Definition: m_supertank.c:38
misc_blackhole_use
void misc_blackhole_use(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_misc.c:965
actor_use
void actor_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: m_actor.c:376
flipper_pain
void flipper_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_flipper.c:213
sound_search
static int sound_search
Definition: m_infantry.c:42
boss2_run
void boss2_run(edict_t *self)
Definition: m_boss2.c:406
misc_blackhole_think
void misc_blackhole_think(edict_t *self)
Definition: g_misc.c:976
Think_SpawnDoorTrigger
void Think_SpawnDoorTrigger(edict_t *ent)
Definition: g_func.c:985
mutant_walk
void mutant_walk(edict_t *self)
Definition: m_mutant.c:215
sound_die
static int sound_die
Definition: m_tank.c:37
sound_sight
static int sound_sight
Definition: m_medic.c:36
DOOR_REVERSE
#define DOOR_REVERSE
Definition: g_func.c:62
door_blocked
void door_blocked(edict_t *self, edict_t *other)
Definition: g_func.c:1022
floater_sight
void floater_sight(edict_t *self, edict_t *other)
Definition: m_float.c:39
ED_ParseField
static qboolean ED_ParseField(const spawn_field_t *fields, const char *key, const char *value, byte *b)
Definition: g_spawn.c:414
flipper_die
void flipper_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_flipper.c:318
sound_hit
static int sound_hit
Definition: m_mutant.c:31
infantry_pain
void infantry_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_infantry.c:207
chick_die
void chick_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_chick.c:337
chick_attack
void chick_attack(edict_t *self)
Definition: m_chick.c:582
door_killed
void door_killed(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_func.c:1054
gunner_attack
void gunner_attack(edict_t *self)
Definition: m_gunner.c:529
brain_pain
void brain_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_brain.c:524
skill
cvar_t * skill
Definition: g_main.c:36
spawn_funcs
static const spawn_func_t spawn_funcs[]
Definition: g_spawn.c:150
trigger_gravity_touch
void trigger_gravity_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_trigger.c:497
sound_search
static int sound_search
Definition: m_gunner.c:35
sound_tentacles_retract
static int sound_tentacles_retract
Definition: m_brain.c:32
tank_run
void tank_run(edict_t *self)
Definition: m_tank.c:210
sound_death2
static int sound_death2
Definition: m_chick.c:43
DOOR_START_OPEN
#define DOOR_START_OPEN
Definition: g_func.c:61
STATE_BOTTOM
#define STATE_BOTTOM
Definition: g_func.c:57
door_secret_use
void door_secret_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:1777
SP_CreateCoopSpots
void SP_CreateCoopSpots(edict_t *self)
Definition: p_client.c:66
sound_search2
static int sound_search2
Definition: m_hover.c:38
Use_Multi
void Use_Multi(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_trigger.c:62
spawn_temp_t::minpitch
float minpitch
Definition: g_local.h:359
level_locals_t::time
float time
Definition: g_local.h:299
SECRET_ALWAYS_SHOOT
#define SECRET_ALWAYS_SHOOT
Definition: g_func.c:1765
target_laser_start
void target_laser_start(edict_t *self)
Definition: g_target.c:571
gunner_walk
void gunner_walk(edict_t *self)
Definition: m_gunner.c:188
flyer_idle
void flyer_idle(edict_t *self)
Definition: m_flyer.c:55
sound_melee3
static int sound_melee3
Definition: m_brain.c:43
hover_walk
void hover_walk(edict_t *self)
Definition: m_hover.c:452
func_explosive_use
void func_explosive_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:757
gunner_dodge
void gunner_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_gunner.c:395
sound_melee_hit
static int sound_melee_hit
Definition: m_chick.c:40
dm_statusbar
static const char dm_statusbar[]
Definition: g_spawn.c:752
sound_pain2
static int sound_pain2
Definition: m_supertank.c:32
coop
cvar_t * coop
Definition: g_main.c:34
brain_melee
void brain_melee(edict_t *self)
Definition: m_brain.c:487
use_target_secret
void use_target_secret(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_target.c:149
MakronPrecache
void MakronPrecache(void)
Definition: m_boss32.c:762
c
statCounters_t c
Definition: main.c:30
func_explosive_spawn
void func_explosive_spawn(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:762
sound_death
static int sound_death
Definition: m_boss31.c:36
sound_search
static int sound_search
Definition: m_berserk.c:35
sound_strike
static int sound_strike
Definition: m_tank.c:41
medic_search
void medic_search(edict_t *self)
Definition: m_medic.c:91
HEALTH_IGNORE_MAX
#define HEALTH_IGNORE_MAX
Definition: g_items.c:48
SPAWNFLAG_NOT_DEATHMATCH
#define SPAWNFLAG_NOT_DEATHMATCH
Definition: g_local.h:55
SPAWNFLAG_NOT_HARD
#define SPAWNFLAG_NOT_HARD
Definition: g_local.h:54
windsound
static int windsound
Definition: g_trigger.c:363
sound_idle
static int sound_idle
Definition: m_gunner.c:33
chick_melee
void chick_melee(edict_t *self)
Definition: m_chick.c:576
hurt_touch
void hurt_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_trigger.c:434
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:89
gib_die
void gib_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_misc.c:125
FL_IMMUNE_LASER
#define FL_IMMUNE_LASER
Definition: g_local.h:61
up
static vec3_t up
Definition: p_view.c:27
sound_die1
static int sound_die1
Definition: m_infantry.c:34
spawn_temp_t::item
char * item
Definition: g_local.h:354
Think_CalcMoveSpeed
void Think_CalcMoveSpeed(edict_t *self)
Definition: g_func.c:947
sound_sight
static int sound_sight
Definition: m_chick.c:50
jorg_search
void jorg_search(edict_t *self)
Definition: m_boss31.c:51
insane_stand
void insane_stand(edict_t *self)
Definition: m_insane.c:523
supertank_attack
void supertank_attack(edict_t *self)
Definition: m_supertank.c:528
right
static vec3_t right
Definition: p_view.c:27
jorg_stand
void jorg_stand(edict_t *self)
Definition: m_boss31.c:158
G_UseTargets
void G_UseTargets(edict_t *ent, edict_t *activator)
Definition: g_utils.c:166
target_lightramp_think
void target_lightramp_think(edict_t *self)
Definition: g_target.c:638
ED_ParseEdict
void ED_ParseEdict(const char **data, edict_t *ent)
Definition: g_spawn.c:467
sound_search1
static int sound_search1
Definition: m_boss31.c:37
chick_move_stand
mmove_t chick_move_stand
Definition: m_chick.c:137
flyer_die
void flyer_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_flyer.c:540
spawn_temp_t::minyaw
float minyaw
Definition: g_local.h:357
FL_TEAMSLAVE
#define FL_TEAMSLAVE
Definition: g_local.h:69
trigger_crosslevel_trigger_use
void trigger_crosslevel_trigger_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:442
sound_pain2
static int sound_pain2
Definition: m_flipper.c:33
level
level_locals_t level
Definition: g_main.c:22
sound_death
static int sound_death
Definition: m_flipper.c:34
SP_trigger_multiple
void SP_trigger_multiple(edict_t *ent)
Definition: g_trigger.c:109
medic_dodge
void medic_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_medic.c:474
mutant_stand
void mutant_stand(edict_t *self)
Definition: m_mutant.c:140
trigger_key_use
void trigger_key_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_trigger.c:199
SECRET_1ST_DOWN
#define SECRET_1ST_DOWN
Definition: g_func.c:1767
tank_pain
void tank_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_tank.c:272
sound_pain1
static int sound_pain1
Definition: m_boss31.c:32
SPAWNFLAG_NOT_COOP
#define SPAWNFLAG_NOT_COOP
Definition: g_local.h:56
level_locals_t::total_monsters
int total_monsters
Definition: g_local.h:329
tank_attack
void tank_attack(edict_t *self)
Definition: m_tank.c:625
flyer_attack
void flyer_attack(edict_t *self)
Definition: m_flyer.c:470
Boss2_CheckAttack
qboolean Boss2_CheckAttack(edict_t *self)
Definition: m_boss2.c:518
sound_search1
static int sound_search1
Definition: m_boss2.c:37
sound_melee_swing
static int sound_melee_swing
Definition: m_chick.c:39
spawn_temp_t::distance
int distance
Definition: g_local.h:350
sound_pain2
static int sound_pain2
Definition: m_hover.c:33
target_crosslevel_target_think
void target_crosslevel_target_think(edict_t *self)
Definition: g_target.c:460
door_touch
void door_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_func.c:1065
sound_tentacles_extend
static int sound_tentacles_extend
Definition: m_brain.c:31
hover_start_attack
void hover_start_attack(edict_t *self)
Definition: m_hover.c:457
G_SetMovedir
void G_SetMovedir(vec3_t angles, vec3_t movedir)
Definition: g_utils.c:296
boss2_attack
void boss2_attack(edict_t *self)
Definition: m_boss2.c:419
sound_hook_retract
static int sound_hook_retract
Definition: m_medic.c:41
gladiator_walk
void gladiator_walk(edict_t *self)
Definition: m_gladiator.c:99
sound_pain1
static int sound_pain1
Definition: m_chick.c:47
tank_sight
void tank_sight(edict_t *self, edict_t *other)
Definition: m_tank.c:47
infantry_stand
void infantry_stand(edict_t *self)
Definition: m_infantry.c:72
misc_easterchick_think
void misc_easterchick_think(edict_t *self)
Definition: g_misc.c:1030
medic_stand
void medic_stand(edict_t *self)
Definition: m_medic.c:210
skyrotate
static float skyrotate
Definition: sky.c:21
infantry_run
void infantry_run(edict_t *self)
Definition: m_infantry.c:170
sound_idle
static int sound_idle
Definition: m_berserk.c:32
chick_dodge
void chick_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_chick.c:409
sound_idle3
static int sound_idle3
Definition: m_brain.c:36
sound_pain1
static int sound_pain1
Definition: m_medic.c:33
COM_Parse
char * COM_Parse(const char **data_p)
Definition: shared.c:455
sound_death
static int sound_death
Definition: m_brain.c:33
parasite_die
void parasite_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_parasite.c:450
insane_move_stand_normal
mmove_t insane_move_stand_normal
Definition: m_insane.c:74
func_explosive_explode
void func_explosive_explode(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_misc.c:696
sound_pain2
static int sound_pain2
Definition: m_float.c:35
sound_pain2
static int sound_pain2
Definition: m_mutant.c:36
spawn_temp_t::skyaxis
vec3_t skyaxis
Definition: g_local.h:346
func_timer_use
void func_timer_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_func.c:1675
spawn_temp_t::sky
char * sky
Definition: g_local.h:344
sound_cleaver_hit
static int sound_cleaver_hit
Definition: m_gladiator.c:35
boss2_move_stand
mmove_t boss2_move_stand
Definition: m_boss2.c:175
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
sound_slash
static int sound_slash
Definition: m_flyer.c:37
STOFS
#define STOFS(x)
Definition: g_local.h:499
sound_step_left
static int sound_step_left
Definition: m_boss31.c:43
use_target_splash
void use_target_splash(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:328
EDICT_NUM
#define EDICT_NUM(n)
Definition: server.h:173
gunner_run
void gunner_run(edict_t *self)
Definition: m_gunner.c:206
G_FindTeams
void G_FindTeams(void)
Definition: g_spawn.c:521
InitTrigger
void InitTrigger(edict_t *self)
Definition: g_trigger.c:21
gladiator_stand
void gladiator_stand(edict_t *self)
Definition: m_gladiator.c:73
sound_search2
static int sound_search2
Definition: m_boss31.c:38
berserk_sight
void berserk_sight(edict_t *self, edict_t *other)
Definition: m_berserk.c:37
dmflags
cvar_t * dmflags
Definition: g_main.c:35
insane_run
void insane_run(edict_t *self)
Definition: m_insane.c:440
mutant_checkattack
qboolean mutant_checkattack(edict_t *self)
Definition: m_mutant.c:417
F_LSTRING
@ F_LSTRING
Definition: g_local.h:571
infantry_sight
void infantry_sight(edict_t *self, edict_t *other)
Definition: m_infantry.c:281
SaveClientData
void SaveClientData(void)
Definition: p_client.c:635
gunner_stand
void gunner_stand(edict_t *self)
Definition: m_gunner.c:165
Use_Target_Help
void Use_Target_Help(edict_t *ent, edict_t *other, edict_t *activator)
Definition: g_target.c:114
nomonsters
cvar_t * nomonsters
Definition: g_main.c:47
floater_melee
void floater_melee(edict_t *self)
Definition: m_float.c:543
medic_die
void medic_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_medic.c:395
game_locals_t::maxentities
int maxentities
Definition: g_local.h:281
plat_spawn_inside_trigger
void plat_spawn_inside_trigger(edict_t *ent)
Definition: g_func.c:423
sound_cleaver_miss
static int sound_cleaver_miss
Definition: m_gladiator.c:36
sound_pain1
static int sound_pain1
Definition: m_mutant.c:35
brain_run
void brain_run(edict_t *self)
Definition: m_brain.c:515
berserk_pain
void berserk_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_berserk.c:304
level_locals_t::mapname
char mapname[MAX_QPATH]
Definition: g_local.h:302
boss2_search
void boss2_search(edict_t *self)
Definition: m_boss2.c:39
sound_search
static int sound_search
Definition: m_parasite.c:40
boss2_die
void boss2_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_boss2.c:486
use_target_explosion
void use_target_explosion(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_target.c:239
sound_suck
static int sound_suck
Definition: m_parasite.c:35
sound_die
static int sound_die
Definition: m_gladiator.c:32
sound_pain1
static int sound_pain1
Definition: m_gladiator.c:30
Think_Boss3Stand
void Think_Boss3Stand(edict_t *ent)
Definition: m_boss3.c:38
sound_idle2
static int sound_idle2
Definition: m_brain.c:35
spawn_temp_t::noise
char * noise
Definition: g_local.h:352
sound_pain2
static int sound_pain2
Definition: m_flyer.c:36
trigger_push_touch
void trigger_push_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_trigger.c:365
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:137
actor_stand
void actor_stand(edict_t *self)
Definition: m_actor.c:83
sound_sight
static int sound_sight
Definition: m_hover.c:36
gunner_die
void gunner_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_gunner.c:324
hover_search
void hover_search(edict_t *self)
Definition: m_hover.c:46
floater_die
void floater_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_float.c:586
sound_pain3
static int sound_pain3
Definition: m_boss2.c:35
spawn_temp_t::skyrotate
float skyrotate
Definition: g_local.h:345
sound_idle1
static int sound_idle1
Definition: m_brain.c:34
brain_move_stand
mmove_t brain_move_stand
Definition: m_brain.c:99
flyer_run
void flyer_run(edict_t *self)
Definition: m_flyer.c:214
gladiator_run
void gladiator_run(edict_t *self)
Definition: m_gladiator.c:115
sound_sight
static int sound_sight
Definition: m_infantry.c:41
spawn_temp_t::pausetime
float pausetime
Definition: g_local.h:353
mutant_die
void mutant_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_mutant.c:546
target_earthquake_think
void target_earthquake_think(edict_t *self)
Definition: g_target.c:725
chick_run
void chick_run(edict_t *self)
Definition: m_chick.c:194
sound_death
static int sound_death
Definition: m_mutant.c:33
F_INT
@ F_INT
Definition: g_local.h:569
sound_pain_light
static int sound_pain_light
Definition: m_soldier.c:33
misc_satellite_dish_use
void misc_satellite_dish_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: g_misc.c:1390
spawn_temp_t::maxpitch
float maxpitch
Definition: g_local.h:360
supertank_search
void supertank_search(edict_t *self)
Definition: m_supertank.c:47
sound_death2
static int sound_death2
Definition: m_hover.c:35
START_OFF
#define START_OFF
Definition: g_misc.c:512
parasite_start_run
void parasite_start_run(edict_t *self)
Definition: m_parasite.c:192
F_ANGLEHACK
@ F_ANGLEHACK
Definition: g_local.h:575
berserk_die
void berserk_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_berserk.c:368
brain_dodge
void brain_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_brain.c:345
trigger_monsterjump_touch
void trigger_monsterjump_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_trigger.c:530
brain_search
void brain_search(edict_t *self)
Definition: m_brain.c:51
floater_move_stand1
mmove_t floater_move_stand1
Definition: m_float.c:135
infantry_stand
void infantry_stand(edict_t *self)
Definition: m_infantry.c:72
supertank_pain
void supertank_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_supertank.c:435
target_actor_touch
void target_actor_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: m_actor.c:467
supertank_die
void supertank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_supertank.c:631
sound_attack2
static int sound_attack2
Definition: m_float.c:30
sound_moan
static int sound_moan
Definition: m_insane.c:32
sound_pain
static int sound_pain
Definition: m_berserk.c:30
trigger_elevator_init
void trigger_elevator_init(edict_t *self)
Definition: g_func.c:1627
mutant_move_stand
mmove_t mutant_move_stand
Definition: m_mutant.c:138
sound_punch_hit
static int sound_punch_hit
Definition: m_infantry.c:40
sound_pain
static int sound_pain
Definition: m_gunner.c:30
sound_pain1
static int sound_pain1
Definition: m_brain.c:37
sound_pain
static int sound_pain
Definition: m_soldier.c:34
parasite_pain
void parasite_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_parasite.c:262
tank_move_stand
mmove_t tank_move_stand
Definition: m_tank.c:110
sound_pain1
static int sound_pain1
Definition: m_boss2.c:33
spawn_func_t::spawn
void(* spawn)(edict_t *ent)
Definition: g_spawn.c:24
infantry_fidget
void infantry_fidget(edict_t *self)
Definition: m_infantry.c:131
berserk_run
void berserk_run(edict_t *self)
Definition: m_berserk.c:155
flymonster_start
void flymonster_start(edict_t *self)
Definition: g_monster.c:653
gitem_s::classname
char * classname
Definition: g_local.h:233
gitem_s
Definition: g_local.h:232
AI_NOSTEP
#define AI_NOSTEP
Definition: g_local.h:136
jorg_die
void jorg_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_boss31.c:557
game_locals_t::maxclients
int maxclients
Definition: g_local.h:280