Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
24 void (*spawn)(edict_t *ent);
346 if (!ent->classname) {
347 gi.dprintf(
"ED_CallSpawn: NULL classname\n");
355 if (!strcmp(item->
classname, ent->classname)) {
364 if (!strcmp(s->
name, ent->classname)) {
370 gi.dprintf(
"%s doesn't have a spawn function\n", ent->classname);
383 l = strlen(
string) + 1;
389 for (i = 0 ; i < l ; i++) {
390 if (
string[i] ==
'\\' && i < l - 1) {
392 if (
string[i] ==
'n')
397 *new_p++ =
string[i];
420 for (f = fields ; f->
name ; f++) {
421 if (!Q_stricmp(f->
name, key)) {
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);
432 ((
float *)(b + f->
ofs))[0] = vec[0];
433 ((
float *)(b + f->
ofs))[1] = vec[1];
434 ((
float *)(b + f->
ofs))[2] = vec[2];
437 *(
int *)(b + f->
ofs) = atoi(value);
440 *(
float *)(b + f->
ofs) = atof(value);
444 ((
float *)(b + f->
ofs))[0] = 0;
445 ((
float *)(b + f->
ofs))[1] = v;
446 ((
float *)(b + f->
ofs))[2] = 0;
473 memset(&
st, 0,
sizeof(
st));
482 gi.error(
"%s: EOF without closing brace", __func__);
487 gi.error(
"%s: EOF without closing brace", __func__);
490 gi.error(
"%s: closing brace without data", __func__);
501 gi.dprintf(
"%s: %s is not a field\n", __func__, key);
507 memset(ent, 0,
sizeof(*ent));
523 edict_t *e, *e2, *chain;
540 for (j = i + 1, e2 = e + 1 ; j <
globals.num_edicts ; j++, e2++) {
547 if (!strcmp(e->team, e2->team)) {
549 chain->teamchain = e2;
557 gi.dprintf(
"%i teams with %i entities\n",
c, c2);
568 void SpawnEntities(
const char *mapname,
const char *entities,
const char *spawnpoint)
576 skill_level = floor(
skill->value);
581 if (
skill->value != skill_level)
582 gi.cvar_forceset(
"skill",
va(
"%f", skill_level));
608 gi.error(
"ED_LoadFromFile: found %s when expecting {",
com_token);
617 if (!Q_stricmp(
level.
mapname,
"command") && !Q_stricmp(ent->classname,
"trigger_once") && !Q_stricmp(ent->model,
"*27"))
622 if (
nomonsters->value && (strstr(ent->classname,
"monster") || strstr(ent->classname,
"misc_deadsoldier") || strstr(ent->classname,
"misc_insane"))) {
651 gi.dprintf(
"%i entities inhibited\n", inhibit);
656 while (i <
globals.num_edicts) {
657 if (ent->inuse != 0 || ent->inuse != 1)
658 Com_DPrintf(
"Invalid entity %d\n", i);
683 num <fieldwidth> <stat>
818 "string2 \"SPECTATOR MODE\" "
825 "string \"Chasing\" "
845 ent->solid = SOLID_BSP;
847 ent->s.modelindex = 1;
862 if (ent->message && ent->message[0]) {
863 gi.configstring(CS_NAME, ent->message);
869 gi.configstring(CS_SKY,
st.
sky);
871 gi.configstring(CS_SKY,
"unit1_");
875 gi.configstring(CS_SKYAXIS,
va(
"%f %f %f",
878 gi.configstring(CS_CDTRACK,
va(
"%i", ent->sounds));
880 gi.configstring(CS_MAXCLIENTS,
va(
"%i", (
int)(
maxclients->value)));
892 gi.imageindex(
"i_help");
894 gi.imageindex(
"help");
895 gi.imageindex(
"field_3");
898 gi.cvar_set(
"sv_gravity",
"800");
902 snd_fry =
gi.soundindex(
"player/fry.wav");
906 gi.soundindex(
"player/lava1.wav");
907 gi.soundindex(
"player/lava2.wav");
909 gi.soundindex(
"misc/pc_up.wav");
910 gi.soundindex(
"misc/talk1.wav");
912 gi.soundindex(
"misc/udeath.wav");
915 gi.soundindex(
"items/respawn1.wav");
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");
925 gi.soundindex(
"*gurp2.wav");
926 gi.soundindex(
"*jump1.wav");
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");
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");
953 gi.soundindex(
"player/gasp1.wav");
954 gi.soundindex(
"player/gasp2.wav");
956 gi.soundindex(
"player/watr_in.wav");
957 gi.soundindex(
"player/watr_out.wav");
959 gi.soundindex(
"player/watr_un.wav");
961 gi.soundindex(
"player/u_breath1.wav");
962 gi.soundindex(
"player/u_breath2.wav");
964 gi.soundindex(
"items/pkup.wav");
965 gi.soundindex(
"world/land.wav");
966 gi.soundindex(
"misc/h2ohit1.wav");
968 gi.soundindex(
"items/damage.wav");
969 gi.soundindex(
"items/protect.wav");
970 gi.soundindex(
"items/protect4.wav");
971 gi.soundindex(
"weapons/noammo.wav");
973 gi.soundindex(
"infantry/inflies1.wav");
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");
988 gi.configstring(CS_LIGHTS + 0,
"m");
991 gi.configstring(CS_LIGHTS + 1,
"mmnmmommommnonmmonqnmmo");
994 gi.configstring(CS_LIGHTS + 2,
"abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
997 gi.configstring(CS_LIGHTS + 3,
"mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
1000 gi.configstring(CS_LIGHTS + 4,
"mamamamamama");
1003 gi.configstring(CS_LIGHTS + 5,
"jklmnopqrstuvwxyzyxwvutsrqponmlkj");
1006 gi.configstring(CS_LIGHTS + 6,
"nmonqnmomnmomomno");
1009 gi.configstring(CS_LIGHTS + 7,
"mmmaaaabcdefgmmmmaaaammmaamm");
1012 gi.configstring(CS_LIGHTS + 8,
"mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
1015 gi.configstring(CS_LIGHTS + 9,
"aaaaaaaazzzzzzzz");
1018 gi.configstring(CS_LIGHTS + 10,
"mmamammmmammamamaaamammma");
1021 gi.configstring(CS_LIGHTS + 11,
"abcdefghijklmnopqrrqponmlkjihgfedcba");
1026 gi.configstring(CS_LIGHTS + 63,
"a");
gitem_t * FindItem(char *pickup_name)
void SP_func_plat(edict_t *ent)
void PlayerTrail_Init(void)
static const char single_statusbar[]
void SP_monster_parasite(edict_t *self)
void SP_target_blaster(edict_t *ent)
void SP_trigger_once(edict_t *ent)
void SP_misc_bigviper(edict_t *self)
void SP_func_rotating(edict_t *ent)
void SP_target_explosion(edict_t *ent)
static char * ED_NewString(const char *string)
void SP_monster_infantry(edict_t *self)
void SP_monster_chick(edict_t *self)
void SP_target_earthquake(edict_t *ent)
void SP_misc_eastertank(edict_t *self)
void SP_func_killbox(edict_t *ent)
void SP_trigger_key(edict_t *ent)
static char com_token[4][MAX_TOKEN_CHARS]
void SP_monster_soldier_light(edict_t *self)
void SP_target_crosslevel_target(edict_t *ent)
void SP_func_explosive(edict_t *self)
void SP_func_object(edict_t *self)
void SP_monster_gladiator(edict_t *self)
void SP_monster_boss2(edict_t *self)
void SP_func_train(edict_t *ent)
#define SPAWNFLAG_NOT_EASY
static const spawn_field_t spawn_fields[]
void SP_misc_easterchick(edict_t *self)
void SP_target_speaker(edict_t *ent)
void SP_info_null(edict_t *self)
void SP_misc_blackhole(edict_t *self)
void SpawnItem(edict_t *ent, gitem_t *item)
void SP_target_temp_entity(edict_t *ent)
void SP_trigger_hurt(edict_t *ent)
void SP_monster_commander_body(edict_t *self)
void SP_light_mine2(edict_t *ent)
void SP_turret_base(edict_t *self)
void SP_misc_gib_arm(edict_t *self)
void SP_monster_jorg(edict_t *self)
void SP_target_splash(edict_t *ent)
void SP_misc_banner(edict_t *self)
void SP_turret_driver(edict_t *self)
void SP_monster_flipper(edict_t *self)
void SP_info_player_deathmatch(edict_t *ent)
#define SPAWNFLAG_NOT_MEDIUM
void PrecacheItem(gitem_t *it)
void SP_monster_floater(edict_t *self)
char level_name[MAX_QPATH]
void SP_func_areaportal(edict_t *ent)
void SP_func_button(edict_t *ent)
static const spawn_field_t temp_fields[]
void SP_misc_actor(edict_t *self)
void ED_CallSpawn(edict_t *ent)
void G_FreeEdict(edict_t *e)
void SP_info_player_intermission(edict_t *ent)
void SP_misc_teleporter(edict_t *self)
void SP_target_laser(edict_t *self)
void SP_misc_strogg_ship(edict_t *self)
void SP_light(edict_t *self)
void SP_target_goal(edict_t *ent)
void SP_path_corner(edict_t *self)
void SP_target_spawner(edict_t *ent)
void SP_trigger_push(edict_t *ent)
void SpawnEntities(const char *mapname, const char *entities, const char *spawnpoint)
void SP_light_mine1(edict_t *ent)
void SP_target_character(edict_t *ent)
void SP_item_health(edict_t *self)
void SP_monster_flyer(edict_t *self)
char * va(const char *format,...)
void SP_misc_insane(edict_t *self)
void SP_func_door_rotating(edict_t *ent)
void SP_misc_teleporter_dest(edict_t *self)
void SP_target_secret(edict_t *ent)
void SP_func_conveyor(edict_t *self)
void(APIENTRY *qwglDrawBuffer)(GLenum mode)
void SP_func_door_secret(edict_t *ent)
void SP_misc_gib_leg(edict_t *self)
void SP_monster_soldier_ss(edict_t *self)
void SP_misc_satellite_dish(edict_t *self)
static qboolean ED_ParseField(const spawn_field_t *fields, const char *key, const char *value, byte *b)
void SP_monster_hover(edict_t *self)
void SP_misc_explobox(edict_t *self)
void SP_monster_medic(edict_t *self)
static const spawn_func_t spawn_funcs[]
void SP_worldspawn(edict_t *ent)
void SP_info_player_start(edict_t *ent)
void SP_monster_berserk(edict_t *self)
void SP_misc_gib_head(edict_t *self)
void SP_item_health_large(edict_t *self)
void SP_turret_breach(edict_t *self)
static const char dm_statusbar[]
void SP_target_string(edict_t *ent)
void SP_target_actor(edict_t *ent)
#define SPAWNFLAG_NOT_DEATHMATCH
#define SPAWNFLAG_NOT_HARD
void SP_trigger_monsterjump(edict_t *ent)
void SP_func_water(edict_t *ent)
void SP_monster_tank(edict_t *self)
void SP_func_clock(edict_t *ent)
void ED_ParseEdict(const char **data, edict_t *ent)
void SP_target_crosslevel_trigger(edict_t *ent)
void SP_target_help(edict_t *ent)
void SP_monster_gunner(edict_t *self)
#define SPAWNFLAG_NOT_COOP
void SP_trigger_multiple(edict_t *ent)
void SP_info_notnull(edict_t *self)
void SP_trigger_always(edict_t *ent)
char * COM_Parse(const char **data_p)
void SP_point_combat(edict_t *self)
void SP_item_health_small(edict_t *self)
void SP_trigger_gravity(edict_t *ent)
void SP_info_player_coop(edict_t *ent)
void SaveClientData(void)
void SP_func_door(edict_t *ent)
void SP_trigger_elevator(edict_t *ent)
void SP_monster_brain(edict_t *self)
void SP_misc_viper_bomb(edict_t *self)
void SP_misc_easterchick2(edict_t *self)
void SP_monster_supertank(edict_t *self)
void SP_trigger_counter(edict_t *ent)
void SP_func_wall(edict_t *self)
void SP_viewthing(edict_t *ent)
void SP_func_timer(edict_t *self)
void SP_trigger_relay(edict_t *ent)
void SP_item_health_mega(edict_t *self)
void SP_target_lightramp(edict_t *self)
void SP_monster_boss3_stand(edict_t *self)
void SP_misc_deadsoldier(edict_t *self)
void SP_misc_viper(edict_t *self)
void SP_monster_soldier(edict_t *self)
void(* spawn)(edict_t *ent)
void SP_monster_mutant(edict_t *self)
void SP_target_changelevel(edict_t *ent)