--- quake2/game/g_spawn.c 2018/04/24 17:58:33 1.1.1.1 +++ quake2/game/g_spawn.c 2018/04/24 18:03:30 1.1.1.4 @@ -1,3 +1,22 @@ +/* +Copyright (C) 1997-2001 Id Software, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ #include "g_local.h" @@ -345,7 +364,7 @@ void ED_ParseField (char *key, char *val for (f=fields ; f->name ; f++) { - if (!Q_stricmp(f->name, key)) + if (!(f->flags & FFL_NOSPAWN) && !Q_stricmp(f->name, key)) { // found it if (f->flags & FFL_SPAWNTEMP) b = (byte *)&st; @@ -548,7 +567,7 @@ void SpawnEntities (char *mapname, char entities = ED_ParseEdict (entities, ent); // yet another map hack - if (!stricmp(level.mapname, "command") && !stricmp(ent->classname, "trigger_once") && !stricmp(ent->model, "*27")) + if (!Q_stricmp(level.mapname, "command") && !Q_stricmp(ent->classname, "trigger_once") && !Q_stricmp(ent->model, "*27")) ent->spawnflags &= ~SPAWNFLAG_NOT_HARD; // remove things (except the world) from different skill levels or deathmatch @@ -585,6 +604,16 @@ void SpawnEntities (char *mapname, char gi.dprintf ("%i entities inhibited\n", inhibit); +#ifdef DEBUG + i = 1; + ent = EDICT_NUM(i); + while (i < globals.num_edicts) { + if (ent->inuse != 0 || ent->inuse != 1) + Com_DPrintf("Invalid entity %d\n", i); + i++, ent++; + } +#endif + G_FindTeams (); PlayerTrail_Init (); @@ -734,7 +763,23 @@ char *dm_statusbar = // frags "xr -50 " "yt 2 " -"num 3 14" +"num 3 14 " + +// spectator +"if 17 " + "xv 0 " + "yb -58 " + "string2 \"SPECTATOR MODE\" " +"endif " + +// chase camera +"if 16 " + "xv 0 " + "yb -68 " + "string \"Chasing\" " + "xv 64 " + "stat_string 16 " +"endif " ; @@ -844,6 +889,21 @@ void SP_worldspawn (edict_t *ent) 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