void SP_worldspawn (edict_t * ent) { int i; ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = true; // since the world doesn't use G_Spawn() ent->s.modelindex = 1; // world model is always index 1 // reserve some spots for dead player bodies for coop / deathmatch InitBodyQue (); // set configstrings for items SetItemNames (); if (st.nextmap) strcpy (level.nextmap, st.nextmap); // make some data visible to the server if (ent->message && ent->message[0]) { Q_strncpyz(level.level_name, ent->message, sizeof(level.level_name)); gi.configstring (CS_NAME, level.level_name); } else { strcpy(level.level_name, level.mapname); } if (st.sky && st.sky[0]) gi.configstring (CS_SKY, st.sky); else gi.configstring (CS_SKY, "unit1_"); gi.configstring(CS_SKYROTATE, va("%f", st.skyrotate)); gi.configstring(CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2])); gi.configstring(CS_CDTRACK, va("%i", ent->sounds)); gi.configstring(CS_MAXCLIENTS, va("%i", (int)(maxclients->value))); //FIREBLADE if (nohud->value) { gi.configstring (CS_STATUSBAR, ""); } else //FIREBLADE { // status bar program if (!deathmatch->value) { gi.configstring (CS_STATUSBAR, single_statusbar); } else if (ctf->value) { gi.configstring (CS_STATUSBAR, ctf_statusbar); //precaches gi.imageindex ("sbfctf1"); gi.imageindex ("sbfctf2"); gi.imageindex ("i_ctf1"); gi.imageindex ("i_ctf2"); gi.imageindex ("i_ctf1d"); gi.imageindex ("i_ctf2d"); gi.imageindex ("i_ctf1t"); gi.imageindex ("i_ctf2t"); } else if (noscore->value && teamplay->value) { gi.configstring (CS_STATUSBAR, dm_noscore_statusbar); } else { gi.configstring (CS_STATUSBAR, dm_statusbar); } } //--------------- // help icon for statusbar gi.imageindex ("i_help"); level.pic_health = gi.imageindex ("i_health"); gi.imageindex ("help"); gi.imageindex ("field_3"); // zucc - preload sniper stuff gi.imageindex ("scope2x"); gi.imageindex ("scope4x"); gi.imageindex ("scope6x"); //FIREBLADE gi.soundindex ("atl/lights.wav"); gi.soundindex ("atl/camera.wav"); gi.soundindex ("atl/action.wav"); gi.imageindex ("tag1"); gi.imageindex ("tag2"); gi.imageindex ("tag3"); if (teamplay->value) { for(i = TEAM1; i < TEAM_TOP; i++) { if (teams[i].skin_index[0] == 0) { gi.dprintf ("No skin was specified for team %i in config file. Exiting.\n", i); exit (1); } gi.imageindex (teams[i].skin_index); } } // AQ2:TNG - Igor adding precache for sounds gi.soundindex ("tng/no_team_wins.wav"); gi.soundindex ("tng/team1_wins.wav"); gi.soundindex ("tng/team2_wins.wav"); gi.soundindex ("tng/team3_wins.wav"); gi.soundindex ("tng/1_minute.wav"); gi.soundindex ("tng/3_minutes.wav"); gi.soundindex ("tng/1_frag.wav"); gi.soundindex ("tng/2_frags.wav"); gi.soundindex ("tng/3_frags.wav"); gi.soundindex ("tng/impressive.wav"); gi.soundindex ("tng/excellent.wav"); gi.soundindex ("tng/accuracy.wav"); gi.soundindex ("tng/clanwar.wav"); gi.soundindex ("tng/disabled.wav"); gi.soundindex ("tng/enabled.wav"); gi.soundindex ("misc/flashlight.wav"); // Caching Flashlight // AQ2:TNG - end of precache sounds gi.soundindex("boss3/bs3idle1.wav"); gi.soundindex("user/letsrock.wav"); gi.soundindex("makron/laf4.wav"); gi.soundindex("world/xian1.wav"); gi.soundindex("world/elv.wav"); gi.soundindex("misc/secret.wav"); // used for ctf swap sound PrecacheRadioSounds (); //PG BUND - Begin PrecacheUserSounds (); //AQ2:TNG - Slicer Old location support //DescListInit(level.mapname); //AQ2:TNG END TourneyInit (); vInitLevel (); //PG BUND - End if (!st.gravity) gi.cvar_set ("sv_gravity", "800"); else gi.cvar_set ("sv_gravity", st.gravity); snd_fry = gi.soundindex ("player/fry.wav"); // standing in lava / slime PrecacheItem (FindItem ("Blaster")); gi.soundindex ("player/lava1.wav"); gi.soundindex ("player/lava2.wav"); gi.soundindex ("misc/pc_up.wav"); gi.soundindex ("misc/talk1.wav"); gi.soundindex ("misc/udeath.wav"); // gibs gi.soundindex ("items/respawn1.wav"); // sexed sounds gi.soundindex ("*death1.wav"); gi.soundindex ("*death2.wav"); gi.soundindex ("*death3.wav"); gi.soundindex ("*death4.wav"); gi.soundindex ("*fall1.wav"); gi.soundindex ("*fall2.wav"); gi.soundindex ("*gurp1.wav"); // drowning damage gi.soundindex ("*gurp2.wav"); gi.soundindex ("*jump1.wav"); // player jump gi.soundindex ("*pain25_1.wav"); gi.soundindex ("*pain25_2.wav"); gi.soundindex ("*pain50_1.wav"); gi.soundindex ("*pain50_2.wav"); gi.soundindex ("*pain75_1.wav"); gi.soundindex ("*pain75_2.wav"); gi.soundindex ("*pain100_1.wav"); gi.soundindex ("*pain100_2.wav"); //------------------- // precache vwep models gi.modelindex ("#w_mk23.md2"); gi.modelindex ("#w_mp5.md2"); gi.modelindex ("#w_m4.md2"); gi.modelindex ("#w_cannon.md2"); gi.modelindex ("#w_super90.md2"); gi.modelindex ("#w_sniper.md2"); gi.modelindex ("#w_akimbo.md2"); gi.modelindex ("#w_knife.md2"); gi.modelindex ("#a_m61frag.md2"); gi.soundindex ("player/gasp1.wav"); // gasping for air gi.soundindex ("player/gasp2.wav"); // head breaking surface, not gasping gi.soundindex ("player/watr_in.wav"); // feet hitting water gi.soundindex ("player/watr_out.wav"); // feet leaving water gi.soundindex ("player/watr_un.wav"); // head going underwater gi.soundindex ("player/u_breath1.wav"); gi.soundindex ("player/u_breath2.wav"); gi.soundindex ("items/pkup.wav"); // bonus item pickup gi.soundindex ("world/land.wav"); // landing thud gi.soundindex ("misc/h2ohit1.wav"); // landing splash gi.soundindex ("items/damage.wav"); gi.soundindex ("items/protect.wav"); gi.soundindex ("items/protect4.wav"); gi.soundindex ("weapons/noammo.wav"); gi.soundindex ("infantry/inflies1.wav"); sm_meat_index = gi.modelindex ("models/objects/gibs/sm_meat/tris.md2"); gi.modelindex ("models/objects/gibs/arm/tris.md2"); gi.modelindex ("models/objects/gibs/bone/tris.md2"); gi.modelindex ("models/objects/gibs/bone2/tris.md2"); gi.modelindex ("models/objects/gibs/chest/tris.md2"); gi.modelindex ("models/objects/gibs/skull/tris.md2"); gi.modelindex ("models/objects/gibs/head2/tris.md2"); // // Setup light animation tables. 'a' is total darkness, 'z' is doublebright. // /* Darkmatch. Darkmatch has three settings: 0 - normal, no changes to lights 1 - all lights are off. 2 - dusk/dawn mode. 3 - using the day_cycle to change the lights every xx seconds as defined by day_cycle */ if (darkmatch->value == 1) gi.configstring (CS_LIGHTS + 0, "a"); // Pitch Black else if (darkmatch->value == 2) gi.configstring (CS_LIGHTS + 0, "b"); // Dusk else gi.configstring (CS_LIGHTS + 0, "m"); // 0 normal gi.configstring (CS_LIGHTS + 1, "mmnmmommommnonmmonqnmmo"); // 1 FLICKER (first variety) gi.configstring (CS_LIGHTS + 2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); // 2 SLOW STRONG PULSE gi.configstring (CS_LIGHTS + 3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); // 3 CANDLE (first variety) gi.configstring (CS_LIGHTS + 4, "mamamamamama"); // 4 FAST STROBE gi.configstring (CS_LIGHTS + 5, "jklmnopqrstuvwxyzyxwvutsrqponmlkj"); // 5 GENTLE PULSE 1 gi.configstring (CS_LIGHTS + 6, "nmonqnmomnmomomno"); // 6 FLICKER (second variety) gi.configstring (CS_LIGHTS + 7, "mmmaaaabcdefgmmmmaaaammmaamm"); // 7 CANDLE (second variety) gi.configstring (CS_LIGHTS + 8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); // 8 CANDLE (third variety) gi.configstring (CS_LIGHTS + 9, "aaaaaaaazzzzzzzz"); // 9 SLOW STROBE (fourth variety) gi.configstring (CS_LIGHTS + 10, "mmamammmmammamamaaamammma"); // 10 FLUORESCENT FLICKER gi.configstring (CS_LIGHTS + 11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); // 11 SLOW PULSE NOT FADE TO BLACK // styles 32-62 are assigned by the light program for switchable lights gi.configstring (CS_LIGHTS + 63, "a"); // 63 testing //FB 6/2/99 if (took_damage != NULL) gi.TagFree (took_damage); took_damage = (int *)gi.TagMalloc (sizeof (int) * game.maxclients, TAG_GAME); //FB 6/2/99 }
/*QUAKED worldspawn (0 0 0) ? * * Only used for the world. * "sky" environment map name * "skyaxis" vector axis for rotating sky * "skyrotate" speed of rotation in degrees/second * "sounds" music cd track number * "gravity" 800 is default gravity * "message" text to print at user logon */ void SP_worldspawn(edict_t *ent) { ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = true; /* since the world doesn't use G_Spawn() */ ent->s.modelindex = 1; /* world model is always index 1 */ /* --------------- */ /* reserve some spots for dead player bodies for coop / deathmatch */ InitBodyQue(); /* set configstrings for items */ SetItemNames(); if (st.nextmap) { strcpy(level.nextmap, st.nextmap); } /* make some data visible to the server */ if (ent->message && ent->message[0]) { gi.configstring(CS_NAME, ent->message); strncpy(level.level_name, ent->message, sizeof(level.level_name)); } else { strncpy(level.level_name, level.mapname, sizeof(level.level_name)); } if (st.sky && st.sky[0]) { gi.configstring(CS_SKY, st.sky); } else { gi.configstring(CS_SKY, "unit1_"); } gi.configstring(CS_SKYROTATE, va("%f", st.skyrotate)); gi.configstring(CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2])); gi.configstring(CS_CDTRACK, va("%i", ent->sounds)); gi.configstring(CS_MAXCLIENTS, va("%i", (int)(maxclients->value))); /* status bar program */ if (deathmatch->value) { if (ctf->value) { gi.configstring(CS_STATUSBAR, ctf_statusbar); CTFPrecache(); } else { gi.configstring(CS_STATUSBAR, dm_statusbar); } } else { gi.configstring(CS_STATUSBAR, single_statusbar); } /* --------------- */ /* help icon for statusbar */ gi.imageindex("i_help"); level.pic_health = gi.imageindex("i_health"); gi.imageindex("help"); gi.imageindex("field_3"); if (!st.gravity) { gi.cvar_set("sv_gravity", "800"); } else { gi.cvar_set("sv_gravity", st.gravity); } snd_fry = gi.soundindex("player/fry.wav"); /* standing in lava / slime */ PrecacheItem(FindItem("Blaster")); gi.soundindex("player/lava1.wav"); gi.soundindex("player/lava2.wav"); gi.soundindex("misc/pc_up.wav"); gi.soundindex("misc/talk1.wav"); gi.soundindex("misc/udeath.wav"); /* gibs */ gi.soundindex("items/respawn1.wav"); /* sexed sounds */ gi.soundindex("*death1.wav"); gi.soundindex("*death2.wav"); gi.soundindex("*death3.wav"); gi.soundindex("*death4.wav"); gi.soundindex("*fall1.wav"); gi.soundindex("*fall2.wav"); gi.soundindex("*gurp1.wav"); /* drowning damage */ gi.soundindex("*gurp2.wav"); gi.soundindex("*jump1.wav"); /* player jump */ gi.soundindex("*pain25_1.wav"); gi.soundindex("*pain25_2.wav"); gi.soundindex("*pain50_1.wav"); gi.soundindex("*pain50_2.wav"); gi.soundindex("*pain75_1.wav"); gi.soundindex("*pain75_2.wav"); gi.soundindex("*pain100_1.wav"); gi.soundindex("*pain100_2.wav"); /* sexed models */ gi.modelindex("#w_blaster.md2"); gi.modelindex("#w_shotgun.md2"); gi.modelindex("#w_sshotgun.md2"); gi.modelindex("#w_machinegun.md2"); gi.modelindex("#w_chaingun.md2"); gi.modelindex("#a_grenades.md2"); gi.modelindex("#w_glauncher.md2"); gi.modelindex("#w_rlauncher.md2"); gi.modelindex("#w_hyperblaster.md2"); gi.modelindex("#w_railgun.md2"); gi.modelindex("#w_bfg.md2"); gi.modelindex("#w_grapple.md2"); /* ------------------- */ gi.soundindex("player/gasp1.wav"); /* gasping for air */ gi.soundindex("player/gasp2.wav"); /* head breaking surface, not gasping */ gi.soundindex("player/watr_in.wav"); /* feet hitting water */ gi.soundindex("player/watr_out.wav"); /* feet leaving water */ gi.soundindex("player/watr_un.wav"); /* head going underwater */ gi.soundindex("player/u_breath1.wav"); gi.soundindex("player/u_breath2.wav"); gi.soundindex("items/pkup.wav"); /* bonus item pickup */ gi.soundindex("world/land.wav"); /* landing thud */ gi.soundindex("misc/h2ohit1.wav"); /* landing splash */ gi.soundindex("items/damage.wav"); gi.soundindex("items/protect.wav"); gi.soundindex("items/protect4.wav"); gi.soundindex("weapons/noammo.wav"); gi.soundindex("infantry/inflies1.wav"); sm_meat_index = gi.modelindex("models/objects/gibs/sm_meat/tris.md2"); gi.modelindex("models/objects/gibs/arm/tris.md2"); gi.modelindex("models/objects/gibs/bone/tris.md2"); gi.modelindex("models/objects/gibs/bone2/tris.md2"); gi.modelindex("models/objects/gibs/chest/tris.md2"); gi.modelindex("models/objects/gibs/skull/tris.md2"); gi.modelindex("models/objects/gibs/head2/tris.md2"); /* Setup light animation tables. 'a' is total darkness, 'z' is doublebright. */ /* 0 normal */ gi.configstring(CS_LIGHTS + 0, "m"); /* 1 FLICKER (first variety) */ gi.configstring(CS_LIGHTS + 1, "mmnmmommommnonmmonqnmmo"); /* 2 SLOW STRONG PULSE */ gi.configstring(CS_LIGHTS + 2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); /* 3 CANDLE (first variety) */ gi.configstring(CS_LIGHTS + 3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); /* 4 FAST STROBE */ gi.configstring(CS_LIGHTS + 4, "mamamamamama"); /* 5 GENTLE PULSE 1 */ gi.configstring(CS_LIGHTS + 5, "jklmnopqrstuvwxyzyxwvutsrqponmlkj"); /* 6 FLICKER (second variety) */ gi.configstring(CS_LIGHTS + 6, "nmonqnmomnmomomno"); /* 7 CANDLE (second variety) */ gi.configstring(CS_LIGHTS + 7, "mmmaaaabcdefgmmmmaaaammmaamm"); /* 8 CANDLE (third variety) */ gi.configstring(CS_LIGHTS + 8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); /* 9 SLOW STROBE (fourth variety) */ gi.configstring(CS_LIGHTS + 9, "aaaaaaaazzzzzzzz"); /* 10 FLUORESCENT FLICKER */ gi.configstring(CS_LIGHTS + 10, "mmamammmmammamamaaamammma"); /* 11 SLOW PULSE NOT FADE TO BLACK */ gi.configstring(CS_LIGHTS + 11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); /* styles 32-62 are assigned by the light program for switchable lights */ /* 63 testing */ gi.configstring(CS_LIGHTS + 63, "a"); }
/*QUAKED worldspawn (0 0 0) ? Only used for the world. "sky" environment map name "skyaxis" vector axis for rotating sky "skyrotate" speed of rotation in degrees/second "sounds" music cd track number "gravity" 800 is default gravity "message" text to print at user logon */ void SP_worldspawn (edict_t *ent) { ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = true; // since the world doesn't use G_Spawn() ent->s.modelindex = 1; // world model is always index 1 //--------------- // reserve some spots for dead player bodies for coop / deathmatch InitBodyQue (); // set configstrings for items SetItemNames (); if (st.nextmap) strcpy (level.nextmap, st.nextmap); // make some data visible to the server if (ent->message && ent->message[0]) { gi.configstring (CS_NAME, ent->message); strncpy (level.level_name, ent->message, sizeof(level.level_name)); } else strncpy (level.level_name, level.mapname, sizeof(level.level_name)); if (st.sky && st.sky[0]) gi.configstring (CS_SKY, st.sky); else gi.configstring (CS_SKY, "unit1_"); gi.configstring (CS_SKYROTATE, va("%f", st.skyrotate) ); gi.configstring (CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2]) ); // Knightmare- if a named soundtrack is specified, play it instead of from CD if (ent->musictrack && strlen(ent->musictrack)) gi.configstring (CS_CDTRACK, ent->musictrack); else gi.configstring (CS_CDTRACK, va("%i", ent->sounds) ); // end Knightmare gi.configstring (CS_MAXCLIENTS, va("%i", (int)(maxclients->value) ) ); // status bar program if (deathmatch->value) gi.configstring (CS_STATUSBAR, dm_statusbar); else gi.configstring (CS_STATUSBAR, single_statusbar); //--------------- // help icon for statusbar gi.imageindex ("i_help"); level.pic_health = gi.imageindex ("i_health"); gi.imageindex ("help"); gi.imageindex ("field_3"); if (!st.gravity) gi.cvar_set("sv_gravity", "800"); else gi.cvar_set("sv_gravity", st.gravity); snd_fry = gi.soundindex ("player/fry.wav"); // standing in lava / slime PrecacheItem (FindItem ("Blaster")); gi.soundindex ("player/lava1.wav"); gi.soundindex ("player/lava2.wav"); gi.soundindex ("misc/pc_up.wav"); gi.soundindex ("misc/talk1.wav"); gi.soundindex ("misc/udeath.wav"); // gibs gi.soundindex ("items/respawn1.wav"); // sexed sounds gi.soundindex ("*death1.wav"); gi.soundindex ("*death2.wav"); gi.soundindex ("*death3.wav"); gi.soundindex ("*death4.wav"); gi.soundindex ("*fall1.wav"); gi.soundindex ("*fall2.wav"); gi.soundindex ("*gurp1.wav"); // drowning damage gi.soundindex ("*gurp2.wav"); gi.soundindex ("*jump1.wav"); // player jump gi.soundindex ("*pain25_1.wav"); gi.soundindex ("*pain25_2.wav"); gi.soundindex ("*pain50_1.wav"); gi.soundindex ("*pain50_2.wav"); gi.soundindex ("*pain75_1.wav"); gi.soundindex ("*pain75_2.wav"); gi.soundindex ("*pain100_1.wav"); gi.soundindex ("*pain100_2.wav"); // sexed models // THIS ORDER MUST MATCH THE DEFINES IN g_local.h // you can add more, max 15 gi.modelindex ("#w_blaster.md2"); gi.modelindex ("#w_shotgun.md2"); gi.modelindex ("#w_sshotgun.md2"); gi.modelindex ("#w_machinegun.md2"); gi.modelindex ("#w_chaingun.md2"); gi.modelindex ("#a_grenades.md2"); gi.modelindex ("#w_glauncher.md2"); gi.modelindex ("#w_rlauncher.md2"); gi.modelindex ("#w_hyperblaster.md2"); gi.modelindex ("#w_railgun.md2"); gi.modelindex ("#w_bfg.md2"); //------------------- gi.soundindex ("player/gasp1.wav"); // gasping for air gi.soundindex ("player/gasp2.wav"); // head breaking surface, not gasping gi.soundindex ("player/watr_in.wav"); // feet hitting water gi.soundindex ("player/watr_out.wav"); // feet leaving water gi.soundindex ("player/watr_un.wav"); // head going underwater gi.soundindex ("player/u_breath1.wav"); gi.soundindex ("player/u_breath2.wav"); gi.soundindex ("items/pkup.wav"); // bonus item pickup gi.soundindex ("world/land.wav"); // landing thud gi.soundindex ("misc/h2ohit1.wav"); // landing splash gi.soundindex ("items/damage.wav"); gi.soundindex ("items/protect.wav"); gi.soundindex ("items/protect4.wav"); gi.soundindex ("weapons/noammo.wav"); gi.soundindex ("infantry/inflies1.wav"); sm_meat_index = gi.modelindex ("models/objects/gibs/sm_meat/tris.md2"); gi.modelindex ("models/objects/gibs/arm/tris.md2"); gi.modelindex ("models/objects/gibs/bone/tris.md2"); gi.modelindex ("models/objects/gibs/bone2/tris.md2"); gi.modelindex ("models/objects/gibs/chest/tris.md2"); gi.modelindex ("models/objects/gibs/skull/tris.md2"); gi.modelindex ("models/objects/gibs/head2/tris.md2"); // // Setup light animation tables. 'a' is total darkness, 'z' is doublebright. // // 0 normal gi.configstring(CS_LIGHTS+0, "m"); // 1 FLICKER (first variety) gi.configstring(CS_LIGHTS+1, "mmnmmommommnonmmonqnmmo"); // 2 SLOW STRONG PULSE gi.configstring(CS_LIGHTS+2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); // 3 CANDLE (first variety) gi.configstring(CS_LIGHTS+3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); // 4 FAST STROBE gi.configstring(CS_LIGHTS+4, "mamamamamama"); // 5 GENTLE PULSE 1 gi.configstring(CS_LIGHTS+5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj"); // 6 FLICKER (second variety) gi.configstring(CS_LIGHTS+6, "nmonqnmomnmomomno"); // 7 CANDLE (second variety) gi.configstring(CS_LIGHTS+7, "mmmaaaabcdefgmmmmaaaammmaamm"); // 8 CANDLE (third variety) gi.configstring(CS_LIGHTS+8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); // 9 SLOW STROBE (fourth variety) gi.configstring(CS_LIGHTS+9, "aaaaaaaazzzzzzzz"); // 10 FLUORESCENT FLICKER gi.configstring(CS_LIGHTS+10, "mmamammmmammamamaaamammma"); // 11 SLOW PULSE NOT FADE TO BLACK gi.configstring(CS_LIGHTS+11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); // styles 32-62 are assigned by the light program for switchable lights // 63 testing gi.configstring(CS_LIGHTS+63, "a"); }
//void SetChromakey(); void SP_worldspawn (edict_t *ent) { // ACEBOT_ADD static char current_map[55]; // ACEBOT_END ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = true; // since the world doesn't use G_Spawn() ent->s.modelindex = 1; // world model is always index 1 //--------------- // Knightmare- DM pause starts off paused = false; // reserve some spots for dead player bodies for coop / deathmatch InitBodyQue (); // set configstrings for items SetItemNames (); if (st.nextmap) strcpy (level.nextmap, st.nextmap); // make some data visible to the server if (ent->message && ent->message[0]) { gi.configstring (CS_NAME, ent->message); strncpy (level.level_name, ent->message, sizeof(level.level_name)); } else strncpy (level.level_name, level.mapname, sizeof(level.level_name)); if (st.sky && st.sky[0]) gi.configstring (CS_SKY, st.sky); else gi.configstring (CS_SKY, "unit1_"); gi.configstring (CS_SKYROTATE, va("%f", st.skyrotate) ); gi.configstring (CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2]) ); // Knightmare- if a named soundtrack is specified, play it instead of from CD if (ent->musictrack && strlen(ent->musictrack)) gi.configstring (CS_CDTRACK, ent->musictrack); else gi.configstring (CS_CDTRACK, va("%i", ent->sounds) ); gi.configstring (CS_MAXCLIENTS, va("%i", (int)(maxclients->value) ) ); // Knightmare added if (ttctf->value) { gi.cvar_forceset("ctf", "1"); gi.cvar_forceset("deathmatch", "1"); } else if (ctf->value) gi.cvar_forceset("deathmatch", "1"); // status bar program if (deathmatch->value) { //ZOID if (ctf->value) { if (ttctf->value) // Knightmare added gi.configstring (CS_STATUSBAR, ttctf_statusbar); else gi.configstring (CS_STATUSBAR, ctf_statusbar); CTFPrecache(); } else gi.configstring (CS_STATUSBAR, dm_statusbar); } //ZOID else gi.configstring (CS_STATUSBAR, single_statusbar); //--------------- // ACEBOT_ADD // If the map changes on us, init and reload the nodes if (deathmatch->value && strcmp(level.mapname,current_map)) { ACEND_InitNodes(); ACEND_LoadNodes(); //ACESP_LoadBots(); // Knightmare- removed this ACESP_LoadBotInfo(); // Knightmare- load bot info file strcpy(current_map,level.mapname); } // ACEBOT_END // help icon for statusbar gi.imageindex ("i_help"); level.pic_health = gi.imageindex ("i_health"); gi.imageindex ("help"); gi.imageindex ("field_3"); if (!st.gravity) gi.cvar_set("sv_gravity", "800"); else gi.cvar_set("sv_gravity", st.gravity); snd_fry = gi.soundindex ("player/fry.wav"); // standing in lava / slime PrecacheItem (FindItem ("Blaster")); gi.soundindex ("player/lava1.wav"); gi.soundindex ("player/lava2.wav"); gi.soundindex ("misc/pc_up.wav"); gi.soundindex ("misc/talk1.wav"); gi.soundindex ("misc/udeath.wav"); // gibs gi.soundindex ("items/respawn1.wav"); // sexed sounds gi.soundindex ("*death1.wav"); gi.soundindex ("*death2.wav"); gi.soundindex ("*death3.wav"); gi.soundindex ("*death4.wav"); gi.soundindex ("*fall1.wav"); gi.soundindex ("*fall2.wav"); gi.soundindex ("*gurp1.wav"); // drowning damage gi.soundindex ("*gurp2.wav"); gi.soundindex ("*jump1.wav"); // player jump gi.soundindex ("*pain25_1.wav"); gi.soundindex ("*pain25_2.wav"); gi.soundindex ("*pain50_1.wav"); gi.soundindex ("*pain50_2.wav"); gi.soundindex ("*pain75_1.wav"); gi.soundindex ("*pain75_2.wav"); gi.soundindex ("*pain100_1.wav"); gi.soundindex ("*pain100_2.wav"); // sexed models // THIS ORDER MUST MATCH THE DEFINES IN g_local.h // you can add more, max 64 if (use_vwep->value || deathmatch->value) { gi.modelindex ("#w_blaster.md2"); gi.modelindex ("#w_shotgun.md2"); gi.modelindex ("#w_sshotgun.md2"); gi.modelindex ("#w_machinegun.md2"); gi.modelindex ("#w_chaingun.md2"); gi.modelindex ("#a_grenades.md2"); gi.modelindex ("#w_glauncher.md2"); gi.modelindex ("#w_rlauncher.md2"); gi.modelindex ("#w_hyperblaster.md2"); gi.modelindex ("#w_railgun.md2"); gi.modelindex ("#w_bfg.md2"); if (ctf->value) gi.modelindex ("#w_grapple.md2"); } //------------------- gi.soundindex ("player/gasp1.wav"); // gasping for air gi.soundindex ("player/gasp2.wav"); // head breaking surface, not gasping gi.soundindex ("player/watr_in.wav"); // feet hitting water gi.soundindex ("player/watr_out.wav"); // feet leaving water gi.soundindex ("player/watr_un.wav"); // head going underwater gi.soundindex ("player/u_breath1.wav"); gi.soundindex ("player/u_breath2.wav"); gi.soundindex ("items/pkup.wav"); // bonus item pickup gi.soundindex ("world/land.wav"); // landing thud gi.soundindex ("misc/h2ohit1.wav"); // landing splash gi.soundindex ("items/damage.wav"); gi.soundindex ("items/protect.wav"); gi.soundindex ("items/protect4.wav"); gi.soundindex ("weapons/noammo.wav"); gi.soundindex ("infantry/inflies1.wav"); sm_meat_index = gi.modelindex ("models/objects/gibs/sm_meat/tris.md2"); gi.modelindex ("models/objects/gibs/arm/tris.md2"); gi.modelindex ("models/objects/gibs/bone/tris.md2"); gi.modelindex ("models/objects/gibs/bone2/tris.md2"); gi.modelindex ("models/objects/gibs/chest/tris.md2"); gi.modelindex ("models/objects/gibs/skull/tris.md2"); gi.modelindex ("models/objects/gibs/head2/tris.md2"); gi.soundindex ("mud/mud_in2.wav"); gi.soundindex ("mud/mud_out1.wav"); gi.soundindex ("mud/mud_un1.wav"); gi.soundindex ("mud/wade_mud1.wav"); gi.soundindex ("mud/wade_mud2.wav"); Lights(); // Fog clipping - if "fogclip" is non-zero, force gl_clear to a good // value for obscuring HOM with fog... "good" is driver-dependent if(ent->fogclip) { if(gl_driver && !Q_stricmp(gl_driver->string,"3dfxgl")) gi.cvar_forceset("gl_clear", "0"); else gi.cvar_forceset("gl_clear", "1"); } // cvar overrides for effects flags: if(alert_sounds->value) world->effects |= FX_WORLDSPAWN_ALERTSOUNDS; if(corpse_fade->value) world->effects |= FX_WORLDSPAWN_CORPSEFADE; if(jump_kick->value) world->effects |= FX_WORLDSPAWN_JUMPKICK; }
/*QUAKED worldspawn (0 0 0) ? Only used for the world. "sky" environment map name "skyaxis" vector axis for rotating sky "skyrotate" speed of rotation in degrees/second "sounds" music cd track number "gravity" 800 is default gravity "message" text to print at user logon */ void SP_worldspawn(edict_t *ent) { char buffer[MAX_QPATH]; ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = qtrue; // since the world doesn't use G_Spawn() ent->s.modelindex = 1; // world model is always index 1 //--------------- // reserve some spots for dead player bodies for coop / deathmatch InitBodyQue(); // set configstrings for items SetItemNames(); //if (st.nextmap) // strcpy(level.nextmap, st.nextmap); // make some data visible to the server if (ent->message && ent->message[0]) { gi.configstring(CS_NAME, ent->message); } ent->message = NULL; if (st.sky && st.sky[0]) gi.configstring(CS_SKY, st.sky); else gi.configstring(CS_SKY, "unit1_"); gi.configstring(CS_SKYROTATE, va("%f", st.skyrotate)); gi.configstring(CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2])); gi.configstring(CS_CDTRACK, va("%i", ent->sounds)); gi.configstring(CS_MAXCLIENTS, va("%i", (int)(maxclients->value))); // status bar program gi.configstring(CS_STATUSBAR, dm_statusbar); gi.configstring(CS_OBSERVE, "SPECT"); G_HighlightStr(buffer, "SPECTATOR MODE", sizeof(buffer)); gi.configstring(CS_SPECMODE, buffer); G_HighlightStr(buffer, "Press ATTACK to join", sizeof(buffer)); gi.configstring(CS_PREGAME, buffer); //--------------- // help icon for statusbar gi.imageindex("i_help"); level.images.health = gi.imageindex("i_health"); gi.imageindex("help"); gi.imageindex("field_3"); level.images.powershield = gi.imageindex("i_powershield"); level.images.quad = gi.imageindex("p_quad"); level.images.invulnerability = gi.imageindex("p_invulnerability"); level.images.envirosuit = gi.imageindex("p_envirosuit"); level.images.rebreather = gi.imageindex("p_rebreather"); if (!st.gravity) gi.cvar_set("sv_gravity", "800"); else gi.cvar_set("sv_gravity", st.gravity); level.sounds.fry = gi.soundindex("player/fry.wav"); // standing in lava / slime level.sounds.lava_in = gi.soundindex("player/lava_in.wav"); level.sounds.burn[0] = gi.soundindex("player/burn1.wav"); level.sounds.burn[1] = gi.soundindex("player/burn2.wav"); level.sounds.drown = gi.soundindex("player/drown1.wav"); PrecacheItem(INDEX_ITEM(ITEM_BLASTER)); gi.soundindex("player/lava1.wav"); gi.soundindex("player/lava2.wav"); gi.soundindex("misc/pc_up.wav"); gi.soundindex("misc/talk1.wav"); level.sounds.secret = gi.soundindex("misc/secret.wav"); level.sounds.count = gi.soundindex("world/10_0.wav"); level.sounds.udeath = gi.soundindex("misc/udeath.wav"); gi.soundindex("items/respawn1.wav"); // sexed sounds level.sounds.death[0] = gi.soundindex("*death1.wav"); level.sounds.death[1] = gi.soundindex("*death2.wav"); level.sounds.death[2] = gi.soundindex("*death3.wav"); level.sounds.death[3] = gi.soundindex("*death4.wav"); level.sounds.fall[0] = gi.soundindex("*fall1.wav"); level.sounds.fall[1] = gi.soundindex("*fall2.wav"); level.sounds.gurp[0] = gi.soundindex("*gurp1.wav"); // drowning damage level.sounds.gurp[1] = gi.soundindex("*gurp2.wav"); level.sounds.jump = gi.soundindex("*jump1.wav"); // player jump level.sounds.pain[0][0] = gi.soundindex("*pain25_1.wav"); level.sounds.pain[0][1] = gi.soundindex("*pain25_2.wav"); level.sounds.pain[1][0] = gi.soundindex("*pain50_1.wav"); level.sounds.pain[1][1] = gi.soundindex("*pain50_2.wav"); level.sounds.pain[2][0] = gi.soundindex("*pain75_1.wav"); level.sounds.pain[2][1] = gi.soundindex("*pain75_2.wav"); level.sounds.pain[3][0] = gi.soundindex("*pain100_1.wav"); level.sounds.pain[3][1] = gi.soundindex("*pain100_2.wav"); level.sounds.rg_hum = gi.soundindex("weapons/rg_hum.wav"); level.sounds.bfg_hum = gi.soundindex("weapons/bfg_hum.wav"); // sexed models // THIS ORDER MUST MATCH THE DEFINES IN g_local.h // you can add more, max 15 gi.modelindex("#w_blaster.md2"); gi.modelindex("#w_shotgun.md2"); gi.modelindex("#w_sshotgun.md2"); gi.modelindex("#w_machinegun.md2"); gi.modelindex("#w_chaingun.md2"); gi.modelindex("#a_grenades.md2"); gi.modelindex("#w_glauncher.md2"); gi.modelindex("#w_rlauncher.md2"); gi.modelindex("#w_hyperblaster.md2"); gi.modelindex("#w_railgun.md2"); gi.modelindex("#w_bfg.md2"); //------------------- level.sounds.gasp[0] = gi.soundindex("player/gasp1.wav"); // gasping for air level.sounds.gasp[1] = gi.soundindex("player/gasp2.wav"); // head breaking surface, not gasping level.sounds.watr_in = gi.soundindex("player/watr_in.wav"); // feet hitting water level.sounds.watr_out = gi.soundindex("player/watr_out.wav"); // feet leaving water level.sounds.watr_un = gi.soundindex("player/watr_un.wav"); // head going underwater level.sounds.breath[0] = gi.soundindex("player/u_breath1.wav"); level.sounds.breath[1] = gi.soundindex("player/u_breath2.wav"); gi.soundindex("items/pkup.wav"); // bonus item pickup gi.soundindex("world/land.wav"); // landing thud gi.soundindex("misc/h2ohit1.wav"); // landing splash gi.soundindex("items/damage.wav"); gi.soundindex("items/protect.wav"); gi.soundindex("items/protect4.wav"); level.sounds.noammo = gi.soundindex("weapons/noammo.wav"); gi.soundindex("infantry/inflies1.wav"); level.sounds.xian = gi.soundindex("world/xian1.wav"); level.sounds.makron = gi.soundindex("makron/laf4.wav"); // gibs level.models.meat = gi.modelindex("models/objects/gibs/sm_meat/tris.md2"); /*level.models.arm = gi.modelindex("models/objects/gibs/arm/tris.md2"); level.models.bones[0] = gi.modelindex("models/objects/gibs/bone/tris.md2"); level.models.bones[1] = gi.modelindex("models/objects/gibs/bone2/tris.md2"); level.models.chest = gi.modelindex("models/objects/gibs/chest/tris.md2"); level.models.skull = gi.modelindex("models/objects/gibs/skull/tris.md2");*/ level.models.head = gi.modelindex("models/objects/gibs/head2/tris.md2"); // // Setup light animation tables. 'a' is total darkness, 'z' is doublebright. // // 0 normal gi.configstring(CS_LIGHTS + 0, "m"); // 1 FLICKER (first variety) gi.configstring(CS_LIGHTS + 1, "mmnmmommommnonmmonqnmmo"); // 2 SLOW STRONG PULSE gi.configstring(CS_LIGHTS + 2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); // 3 CANDLE (first variety) gi.configstring(CS_LIGHTS + 3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); // 4 FAST STROBE gi.configstring(CS_LIGHTS + 4, "mamamamamama"); // 5 GENTLE PULSE 1 gi.configstring(CS_LIGHTS + 5, "jklmnopqrstuvwxyzyxwvutsrqponmlkj"); // 6 FLICKER (second variety) gi.configstring(CS_LIGHTS + 6, "nmonqnmomnmomomno"); // 7 CANDLE (second variety) gi.configstring(CS_LIGHTS + 7, "mmmaaaabcdefgmmmmaaaammmaamm"); // 8 CANDLE (third variety) gi.configstring(CS_LIGHTS + 8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); // 9 SLOW STROBE (fourth variety) gi.configstring(CS_LIGHTS + 9, "aaaaaaaazzzzzzzz"); // 10 FLUORESCENT FLICKER gi.configstring(CS_LIGHTS + 10, "mmamammmmammamamaaamammma"); // 11 SLOW PULSE NOT FADE TO BLACK gi.configstring(CS_LIGHTS + 11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); // styles 32-62 are assigned by the light program for switchable lights // 63 testing gi.configstring(CS_LIGHTS + 63, "a"); }
/*QUAKED worldspawn (0 0 0) ? Only used for the world. "sky" environment map name "skyaxis" vector axis for rotating sky "skyrotate" speed of rotation in degrees/second "sounds" music cd track number "gravity" 800 is default gravity "message" text to print at user logon */ void SP_worldspawn (edict_t *ent) { ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = true; // since the world doesn't use G_Spawn() ent->s.modelindex = 1; // world model is always index 1 //--------------- // reserve some spots for dead player bodies for coop / deathmatch InitBodyQue (); // set configstrings for items SetItemNames (); if (st.nextmap) strcpy (level.nextmap, st.nextmap); // make some data visible to the server if (ent->message && ent->message[0]) { gi.configstring (CS_NAME, ent->message); strncpy (level.level_name, ent->message, sizeof(level.level_name)); } else strncpy (level.level_name, level.mapname, sizeof(level.level_name)); if (st.sky && st.sky[0]) gi.configstring (CS_SKY, st.sky); else gi.configstring (CS_SKY, "unit1_"); gi.configstring (CS_SKYROTATE, va("%f", st.skyrotate) ); gi.configstring (CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2]) ); gi.configstring (CS_CDTRACK, va("%i", ent->sounds) ); gi.configstring (CS_MAXCLIENTS, va("%i", (int)(maxclients->value) ) ); //FIREBLADE if (nohud->value) { gi.configstring(CS_STATUSBAR, ""); } else //FIREBLADE { // status bar program if (deathmatch->value) //FIREBLADE { if (noscore->value && teamplay->value) { gi.configstring (CS_STATUSBAR, dm_noscore_statusbar); } else { gi.configstring (CS_STATUSBAR, dm_statusbar); } } //FIREBLADE else gi.configstring (CS_STATUSBAR, single_statusbar); } //--------------- // help icon for statusbar gi.imageindex ("i_help"); level.pic_health = gi.imageindex ("i_health"); gi.imageindex ("help"); gi.imageindex ("field_3"); // zucc - preload sniper stuff gi.imageindex ("scope2x"); gi.imageindex ("scope4x"); gi.imageindex ("scope6x"); //FIREBLADE gi.soundindex("atl/lights.wav"); gi.soundindex("atl/camera.wav"); gi.soundindex("atl/action.wav"); gi.imageindex("tag1"); gi.imageindex("tag2"); gi.imageindex("tag3"); if (teamplay->value) { if (team1_skin_index[0] == 0) { gi.dprintf("No skin was specified for team 1 in config file. Exiting.\n"); exit(1); } gi.imageindex(team1_skin_index); if (team2_skin_index[0] == 0) { gi.dprintf("No skin was specified for team 2 in config file. Exiting.\n"); exit(1); } gi.imageindex(team2_skin_index); } PrecacheRadioSounds(); team_round_going = 0; lights_camera_action = 0; holding_on_tie_check = 0; team_round_countdown = 0; //FIREBLADE if (!st.gravity) gi.cvar_set("sv_gravity", "800"); else gi.cvar_set("sv_gravity", st.gravity); snd_fry = gi.soundindex ("player/fry.wav"); // standing in lava / slime PrecacheItem (FindItem ("Blaster")); gi.soundindex ("player/lava1.wav"); gi.soundindex ("player/lava2.wav"); gi.soundindex ("misc/pc_up.wav"); gi.soundindex ("misc/talk1.wav"); gi.soundindex ("misc/udeath.wav"); // gibs gi.soundindex ("items/respawn1.wav"); // sexed sounds gi.soundindex ("*death1.wav"); gi.soundindex ("*death2.wav"); gi.soundindex ("*death3.wav"); gi.soundindex ("*death4.wav"); gi.soundindex ("*fall1.wav"); gi.soundindex ("*fall2.wav"); gi.soundindex ("*gurp1.wav"); // drowning damage gi.soundindex ("*gurp2.wav"); gi.soundindex ("*jump1.wav"); // player jump gi.soundindex ("*pain25_1.wav"); gi.soundindex ("*pain25_2.wav"); gi.soundindex ("*pain50_1.wav"); gi.soundindex ("*pain50_2.wav"); gi.soundindex ("*pain75_1.wav"); gi.soundindex ("*pain75_2.wav"); gi.soundindex ("*pain100_1.wav"); gi.soundindex ("*pain100_2.wav"); //------------------- // precache vwep models gi.modelindex( "#w_mk23.md2"); gi.modelindex( "#w_mp5.md2"); gi.modelindex( "#w_m4.md2"); gi.modelindex( "#w_cannon.md2"); gi.modelindex( "#w_super90.md2"); gi.modelindex( "#w_sniper.md2"); gi.modelindex( "#w_akimbo.md2"); gi.modelindex( "#w_knife.md2"); gi.modelindex( "#a_m61frag.md2"); gi.soundindex ("player/gasp1.wav"); // gasping for air gi.soundindex ("player/gasp2.wav"); // head breaking surface, not gasping gi.soundindex ("player/watr_in.wav"); // feet hitting water gi.soundindex ("player/watr_out.wav"); // feet leaving water gi.soundindex ("player/watr_un.wav"); // head going underwater gi.soundindex ("player/u_breath1.wav"); gi.soundindex ("player/u_breath2.wav"); gi.soundindex ("items/pkup.wav"); // bonus item pickup gi.soundindex ("world/land.wav"); // landing thud gi.soundindex ("misc/h2ohit1.wav"); // landing splash gi.soundindex ("items/damage.wav"); gi.soundindex ("items/protect.wav"); gi.soundindex ("items/protect4.wav"); gi.soundindex ("weapons/noammo.wav"); gi.soundindex ("infantry/inflies1.wav"); sm_meat_index = gi.modelindex ("models/objects/gibs/sm_meat/tris.md2"); gi.modelindex ("models/objects/gibs/arm/tris.md2"); gi.modelindex ("models/objects/gibs/bone/tris.md2"); gi.modelindex ("models/objects/gibs/bone2/tris.md2"); gi.modelindex ("models/objects/gibs/chest/tris.md2"); gi.modelindex ("models/objects/gibs/skull/tris.md2"); gi.modelindex ("models/objects/gibs/head2/tris.md2"); // // Setup light animation tables. 'a' is total darkness, 'z' is doublebright. // // 0 normal gi.configstring(CS_LIGHTS+0, "m"); // 1 FLICKER (first variety) gi.configstring(CS_LIGHTS+1, "mmnmmommommnonmmonqnmmo"); // 2 SLOW STRONG PULSE gi.configstring(CS_LIGHTS+2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); // 3 CANDLE (first variety) gi.configstring(CS_LIGHTS+3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); // 4 FAST STROBE gi.configstring(CS_LIGHTS+4, "mamamamamama"); // 5 GENTLE PULSE 1 gi.configstring(CS_LIGHTS+5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj"); // 6 FLICKER (second variety) gi.configstring(CS_LIGHTS+6, "nmonqnmomnmomomno"); // 7 CANDLE (second variety) gi.configstring(CS_LIGHTS+7, "mmmaaaabcdefgmmmmaaaammmaamm"); // 8 CANDLE (third variety) gi.configstring(CS_LIGHTS+8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); // 9 SLOW STROBE (fourth variety) gi.configstring(CS_LIGHTS+9, "aaaaaaaazzzzzzzz"); // 10 FLUORESCENT FLICKER gi.configstring(CS_LIGHTS+10, "mmamammmmammamamaaamammma"); // 11 SLOW PULSE NOT FADE TO BLACK gi.configstring(CS_LIGHTS+11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); // styles 32-62 are assigned by the light program for switchable lights // 63 testing gi.configstring(CS_LIGHTS+63, "a"); //FB 6/2/99 if (took_damage != NULL) gi.TagFree(took_damage); took_damage = (int *)gi.TagMalloc(sizeof(int) * game.maxclients, TAG_GAME); //FB 6/2/99 }
/*QUAKED worldspawn (0 0 0) ? Only used for the world. "sky" environment map name "skyaxis" vector axis for rotating sky "skyrotate" speed of rotation in degrees/second "sounds" music cd track number "gravity" 800 is default gravity "message" text to print at user logon */ void SP_worldspawn (edict_t *ent) { ent->movetype = MOVETYPE_PUSH; ent->solid = SOLID_BSP; ent->inuse = true; // since the world doesn't use G_Spawn() ent->s.modelindex = 1; // world model is always index 1 //--------------- // reserve some spots for dead player bodies for coop / deathmatch InitBodyQue (); // set configstrings for items SetItemNames (); if (st.nextmap) strcpy (level.nextmap, st.nextmap); // make some data visible to the server if (ent->message && ent->message[0]) { gi.configstring (CS_NAME, ent->message); strncpy (level.level_name, ent->message, sizeof(level.level_name)); } else strncpy (level.level_name, level.mapname, sizeof(level.level_name)); if (st.sky && st.sky[0]) gi.configstring (CS_SKY, st.sky); else gi.configstring (CS_SKY, "unit1_"); gi.configstring (CS_SKYROTATE, va("%f", st.skyrotate) ); gi.configstring (CS_SKYAXIS, va("%f %f %f", st.skyaxis[0], st.skyaxis[1], st.skyaxis[2]) ); gi.configstring (CS_CDTRACK, va("%i", ent->sounds) ); gi.configstring (CS_MAXCLIENTS, va("%i", game.maxclients ) ); // status bar program // wision: we send this as unicast on every player's connect // r1: but we send it globally too to avoid bugging out gtv/etc gi.configstring (CS_STATUSBAR, TDM_CreateSpectatorStatusBar(NULL)); //--------------- // help icon for statusbar gi.imageindex ("i_help"); level.pic_health = gi.imageindex ("i_health"); gi.imageindex ("help"); gi.imageindex ("field_3"); if (!st.gravity) gi.cvar_set("sv_gravity", "800"); else gi.cvar_set("sv_gravity", st.gravity); snd_fry = gi.soundindex ("player/fry.wav"); // standing in lava / slime PrecacheItem (GETITEM (ITEM_WEAPON_BLASTER)); gi.soundindex ("player/lava1.wav"); gi.soundindex ("player/lava2.wav"); gi.soundindex ("misc/pc_up.wav"); gi.soundindex ("misc/talk1.wav"); gi.soundindex ("misc/udeath.wav"); // gibs gi.soundindex ("items/respawn1.wav"); // sexed sounds //ugly hack for tdm / invisible eyes mode, we reserve soundindexes directly /*gi.soundindex ("*death1.wav"); gi.soundindex ("*death2.wav"); gi.soundindex ("*death3.wav"); gi.soundindex ("*death4.wav"); gi.soundindex ("*fall1.wav"); gi.soundindex ("*fall2.wav"); gi.soundindex ("*gurp1.wav"); // drowning damage gi.soundindex ("*gurp2.wav"); gi.soundindex ("*jump1.wav"); // player jump gi.soundindex ("*pain25_1.wav"); gi.soundindex ("*pain25_2.wav"); gi.soundindex ("*pain50_1.wav"); gi.soundindex ("*pain50_2.wav"); gi.soundindex ("*pain75_1.wav"); gi.soundindex ("*pain75_2.wav"); gi.soundindex ("*pain100_1.wav"); gi.soundindex ("*pain100_2.wav");*/ // sexed models // THIS ORDER MUST MATCH THE DEFINES IN g_local.h // you can add more, max 15 gi.modelindex ("#w_blaster.md2"); gi.modelindex ("#w_shotgun.md2"); gi.modelindex ("#w_sshotgun.md2"); gi.modelindex ("#w_machinegun.md2"); gi.modelindex ("#w_chaingun.md2"); gi.modelindex ("#a_grenades.md2"); gi.modelindex ("#w_glauncher.md2"); gi.modelindex ("#w_rlauncher.md2"); gi.modelindex ("#w_hyperblaster.md2"); gi.modelindex ("#w_railgun.md2"); gi.modelindex ("#w_bfg.md2"); //------------------- gi.soundindex ("player/gasp1.wav"); // gasping for air gi.soundindex ("player/gasp2.wav"); // head breaking surface, not gasping gi.soundindex ("player/watr_in.wav"); // feet hitting water gi.soundindex ("player/watr_out.wav"); // feet leaving water gi.soundindex ("player/watr_un.wav"); // head going underwater gi.soundindex ("player/u_breath1.wav"); gi.soundindex ("player/u_breath2.wav"); gi.soundindex ("items/pkup.wav"); // bonus item pickup gi.soundindex ("world/land.wav"); // landing thud gi.soundindex ("misc/h2ohit1.wav"); // landing splash gi.soundindex ("items/damage.wav"); gi.soundindex ("items/protect.wav"); gi.soundindex ("items/protect4.wav"); gi.soundindex ("weapons/noammo.wav"); gi.soundindex ("infantry/inflies1.wav"); sm_meat_index = gi.modelindex ("models/objects/gibs/sm_meat/tris.md2"); gi.modelindex ("models/objects/gibs/arm/tris.md2"); gi.modelindex ("models/objects/gibs/bone/tris.md2"); gi.modelindex ("models/objects/gibs/bone2/tris.md2"); gi.modelindex ("models/objects/gibs/chest/tris.md2"); gi.modelindex ("models/objects/gibs/skull/tris.md2"); gi.modelindex ("models/objects/gibs/head2/tris.md2"); gi.soundindex (g_vote_attention_sound->string); //this is to force precache of the opentdm 'invisible player' model so it //is auto downloaded (hopefully!) //gi.modelindex ("players/opentdm/tris.md2"); //gi.modelindex ("players/opentdm/weapon.md2"); //gi.configstring (CS_PLAYERSKINS+255, "null\\opentdm/null"); // // Setup light animation tables. 'a' is total darkness, 'z' is doublebright. // // 0 normal gi.configstring(CS_LIGHTS+0, "m"); // 1 FLICKER (first variety) gi.configstring(CS_LIGHTS+1, "mmnmmommommnonmmonqnmmo"); // 2 SLOW STRONG PULSE gi.configstring(CS_LIGHTS+2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); // 3 CANDLE (first variety) gi.configstring(CS_LIGHTS+3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); // 4 FAST STROBE gi.configstring(CS_LIGHTS+4, "mamamamamama"); // 5 GENTLE PULSE 1 gi.configstring(CS_LIGHTS+5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj"); // 6 FLICKER (second variety) gi.configstring(CS_LIGHTS+6, "nmonqnmomnmomomno"); // 7 CANDLE (second variety) gi.configstring(CS_LIGHTS+7, "mmmaaaabcdefgmmmmaaaammmaamm"); // 8 CANDLE (third variety) gi.configstring(CS_LIGHTS+8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); // 9 SLOW STROBE (fourth variety) gi.configstring(CS_LIGHTS+9, "aaaaaaaazzzzzzzz"); // 10 FLUORESCENT FLICKER gi.configstring(CS_LIGHTS+10, "mmamammmmammamamaaamammma"); // 11 SLOW PULSE NOT FADE TO BLACK gi.configstring(CS_LIGHTS+11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); // styles 32-62 are assigned by the light program for switchable lights // 63 testing gi.configstring(CS_LIGHTS+63, "a"); }