diff --git a/src/g_ai.c b/src/g_ai.c index 4ad1df3..ddeed99 100644 --- a/src/g_ai.c +++ b/src/g_ai.c @@ -1167,7 +1167,7 @@ ai_checkattack(edict_t *self, float dist) qboolean hesDeadJim; qboolean retval; - if (!self || !self->enemy || !self->enemy->inuse) + if (!self) { enemy_vis = false; diff --git a/src/g_main.c b/src/g_main.c index 6c51ddb..dedf549 100644 --- a/src/g_main.c +++ b/src/g_main.c @@ -22,6 +22,7 @@ edict_t *g_edicts; cvar_t *deathmatch; cvar_t *coop; +cvar_t *coop_baseq2; /* treat spawnflags according to baseq2 rules */ cvar_t *dmflags; cvar_t *skill; cvar_t *fraglimit; diff --git a/src/g_spawn.c b/src/g_spawn.c index eb75b3c..2ee32a7 100644 --- a/src/g_spawn.c +++ b/src/g_spawn.c @@ -848,7 +848,7 @@ SpawnEntities(const char *mapname, char *entities, const char *spawnpoint) continue; } } - else if (coop->value) + else if (coop->value && !coop_baseq2->value) { if (ent->spawnflags & SPAWNFLAG_NOT_COOP) { diff --git a/src/header/local.h b/src/header/local.h index 3d6a3b2..984755e 100644 --- a/src/header/local.h +++ b/src/header/local.h @@ -576,6 +576,7 @@ extern edict_t *g_edicts; extern cvar_t *maxentities; extern cvar_t *deathmatch; extern cvar_t *coop; +extern cvar_t *coop_baseq2; /* treat spawnflags according to baseq2 rules */ extern cvar_t *dmflags; extern cvar_t *skill; extern cvar_t *fraglimit; diff --git a/src/savegame/savegame.c b/src/savegame/savegame.c index f8151d9..7ce8d0a 100644 --- a/src/savegame/savegame.c +++ b/src/savegame/savegame.c @@ -213,6 +213,7 @@ InitGame(void) maxspectators = gi.cvar ("maxspectators", "4", CVAR_SERVERINFO); deathmatch = gi.cvar ("deathmatch", "0", CVAR_LATCH); coop = gi.cvar ("coop", "0", CVAR_LATCH); + coop_baseq2 = gi.cvar ("coop_baseq2", "0", CVAR_LATCH); skill = gi.cvar ("skill", "1", CVAR_LATCH); maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH); gamerules = gi.cvar ("gamerules", "0", CVAR_LATCH); //PGM