mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
Bug 5067 - Remove references to unused teamtournament gametype. Toggle areaportal on mover ents where due is needed, patch by Ensiform
This commit is contained in:
parent
b8627b8774
commit
cbd3c24542
2 changed files with 14 additions and 5 deletions
|
@ -379,8 +379,12 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define ADJUST_AREAPORTAL() \
|
||||
if(ent->s.eType == ET_MOVER) \
|
||||
{ \
|
||||
trap_LinkEntity(ent); \
|
||||
trap_AdjustAreaPortalState(ent, qtrue); \
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
|
@ -394,7 +398,7 @@ void G_SpawnGEntityFromSpawnVars( void ) {
|
|||
int i;
|
||||
gentity_t *ent;
|
||||
char *s, *value, *gametypeName;
|
||||
static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"};
|
||||
static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester"};
|
||||
|
||||
// get the next free entity
|
||||
ent = G_Spawn();
|
||||
|
@ -407,6 +411,7 @@ void G_SpawnGEntityFromSpawnVars( void ) {
|
|||
if ( g_gametype.integer == GT_SINGLE_PLAYER ) {
|
||||
G_SpawnInt( "notsingle", "0", &i );
|
||||
if ( i ) {
|
||||
ADJUST_AREAPORTAL();
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
|
@ -415,12 +420,14 @@ void G_SpawnGEntityFromSpawnVars( void ) {
|
|||
if ( g_gametype.integer >= GT_TEAM ) {
|
||||
G_SpawnInt( "notteam", "0", &i );
|
||||
if ( i ) {
|
||||
ADJUST_AREAPORTAL();
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
G_SpawnInt( "notfree", "0", &i );
|
||||
if ( i ) {
|
||||
ADJUST_AREAPORTAL();
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
|
@ -429,12 +436,14 @@ void G_SpawnGEntityFromSpawnVars( void ) {
|
|||
#ifdef MISSIONPACK
|
||||
G_SpawnInt( "notta", "0", &i );
|
||||
if ( i ) {
|
||||
ADJUST_AREAPORTAL();
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
#else
|
||||
G_SpawnInt( "notq3a", "0", &i );
|
||||
if ( i ) {
|
||||
ADJUST_AREAPORTAL();
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
|
@ -446,6 +455,7 @@ void G_SpawnGEntityFromSpawnVars( void ) {
|
|||
|
||||
s = strstr( value, gametypeName );
|
||||
if( !s ) {
|
||||
ADJUST_AREAPORTAL();
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -83,8 +83,7 @@ static const char *teamArenaGameTypes[] = {
|
|||
"CTF",
|
||||
"1FCTF",
|
||||
"OVERLOAD",
|
||||
"HARVESTER",
|
||||
"TEAMTOURNAMENT"
|
||||
"HARVESTER"
|
||||
};
|
||||
|
||||
static int const numTeamArenaGameTypes = ARRAY_LEN( teamArenaGameTypes );
|
||||
|
|
Loading…
Reference in a new issue