--- quake2/game/g_spawn.c 2018/04/24 17:58:33 1.1.1.1 +++ quake2/game/g_spawn.c 2018/04/24 17:59:12 1.1.1.2 @@ -345,7 +345,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 +548,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 +585,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 (); @@ -844,6 +854,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