diff --git a/engine/code/game/g_items.c b/engine/code/game/g_items.c index fb4e8767..a5187d23 100644 --- a/engine/code/game/g_items.c +++ b/engine/code/game/g_items.c @@ -814,13 +814,15 @@ void G_CheckTeamItems( void ) { // Q3Rally Code Start if ( g_gametype.integer == GT_DOMINATION ) { - gitem_t *item; - - // check for at least one sigil - item = BG_FindItem( "Flag" ); - if ( !item || !itemRegistered[item - bg_itemlist] ) - G_Printf( S_COLOR_YELLOW "WARNING: No team_DOMINATION_sigil in map" ); - } + gentity_t *ent; + + // check for at least one sigil + ent = NULL; + ent = G_Find( ent, FOFS(classname), "team_DOMINATION_sigil" ); + if( !ent ) { + G_Printf( S_COLOR_YELLOW "WARNING: No team_DOMINATION_sigil in map\n" ); + } + } // Q3Rally Code END #ifdef MISSIONPACK if( g_gametype.integer == GT_1FCTF ) { diff --git a/engine/code/game/g_spawn.c b/engine/code/game/g_spawn.c index 645414a5..0944f7f2 100644 --- a/engine/code/game/g_spawn.c +++ b/engine/code/game/g_spawn.c @@ -780,7 +780,7 @@ void SP_worldspawn( void ) { G_ValidateSigils ============================ */ -void G_ValidateSigils() +void G_ValidateSigils( void ) { gentity_t *it_ent; diff --git a/engine/code/game/g_team.c b/engine/code/game/g_team.c index 7d5913fb..08737d55 100644 --- a/engine/code/game/g_team.c +++ b/engine/code/game/g_team.c @@ -74,9 +74,11 @@ void Team_InitGame( void ) { case GT_DOMINATION: Init_Sigils(); - teamgame.sigil[0].status = teamgame.sigil[1].status = teamgame.sigil[2].status = -1; // Invalid to force update + teamgame.sigil[0].status = -1; // Invalid to force update Team_SetSigilStatus( 0, SIGIL_ISWHITE ); + teamgame.sigil[1].status = -1; // Invalid to force update Team_SetSigilStatus( 1, SIGIL_ISWHITE ); + teamgame.sigil[2].status = -1; // Invalid to force update Team_SetSigilStatus( 2, SIGIL_ISWHITE ); break; @@ -255,12 +257,12 @@ void Init_Sigils( void ) { if (!point->inuse) continue; - if (!strcmp(point->classname, "team_Domination_sigil")) { + if (!Q_stricmp(point->classname, "team_domination_sigil")) { teamgame.sigil[sigilNum].entity = point; sigilNum++; } - if ( sigilNum == 2 ) + if ( sigilNum == 3 ) return; } } @@ -273,9 +275,11 @@ void Team_SetSigilStatus( int sigilNum, sigilStatus_t status ) { qboolean modified = qfalse; // update only the sigil modified - if( teamgame.sigil[sigilNum].status != status ); - teamgame.sigil[sigilNum].status = status; - modified = qtrue; + if( teamgame.sigil[sigilNum].status != status ) + { + teamgame.sigil[sigilNum].status = status; + modified = qtrue; + } if( modified ) { @@ -308,7 +312,10 @@ void ValidateSigilsInMap( gentity_t *ent ) qboolean foundItem = qfalse, foundPreferredItem = qfalse; gitem_t *item; - // if 3rd sigil exists, this function doesn´t need to run + if (!teamgame.sigil[0].entity || !teamgame.sigil[1].entity) + return; + + // if 3rd sigil exists, this function doesn't need to run if (teamgame.sigil[2].entity) return;