diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 9 | ||||
-rw-r--r-- | src/game/g_buildable.c | 7 | ||||
-rw-r--r-- | src/game/g_main.c | 14 | ||||
-rw-r--r-- | src/game/g_team.c | 14 |
4 files changed, 35 insertions, 9 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index a11451b..e402982 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -2407,7 +2407,8 @@ static const classAttributes_t bg_classList[ ] = PCL_ALIEN_LEVEL2_UPG, //int classnum; "level2upg", //char *classname; "The Advanced Marauder has all the abilities of the basic Marauder " - "with the addition of an area effect electric shock attack.", + "with the addition of a zap attack that chains through other " + "adv. marauders and can explode mines.", ( 1 << S2 )|( 1 << S3 ), //int stages LEVEL2_UPG_HEALTH, //int health; 0.0f, //float fallDamage; @@ -2433,9 +2434,9 @@ static const classAttributes_t bg_classList[ ] = { PCL_ALIEN_LEVEL5, //int classnum; "level5", //char *classname; - "The Hummel can fly by pressing run / walk button" - "or bind a button with /bind BUTTON +speed /" - "set a key in Options/Controls/HummelFly", + "The Hummel is a flying alien with air pounce ability, " + "fast melee attacks and unlimited low damage shooting attack " + "that does not spread poison.", ( 1 << S2 )|( 1 << S3 ), //int stages LEVEL5_UPG_HEALTH, //int health; 0.0f, //float fallDamage; diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 7fb6fba..954a546 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2821,6 +2821,9 @@ void HMedistat_Think( gentity_t *self ) player->client->ps.stats[ STAT_STATE ] |= SS_HEALING_ACTIVE; } } + else if( SPAWN_WITH_MEDKIT && + !BG_InventoryContainsUpgrade( UP_MEDKIT, player->client->ps.stats ) ) + BG_AddUpgradeToInventory( UP_MEDKIT, self->enemy->client->ps.stats ); } } } @@ -2847,7 +2850,9 @@ void HMedistat_Think( gentity_t *self ) if( self->enemy->health >= self->enemy->client->ps.stats[ STAT_MAX_HEALTH ] ) { self->enemy->health = self->enemy->client->ps.stats[ STAT_MAX_HEALTH ]; - if (SPAWN_WITH_MEDKIT) BG_AddUpgradeToInventory( UP_MEDKIT, self->enemy->client->ps.stats ); + if( SPAWN_WITH_MEDKIT && + !BG_InventoryContainsUpgrade( UP_MEDKIT, self->enemy->client->ps.stats ) ) + BG_AddUpgradeToInventory( UP_MEDKIT, self->enemy->client->ps.stats ); } } } diff --git a/src/game/g_main.c b/src/game/g_main.c index 977ab1e..11376ac 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1049,11 +1049,25 @@ void G_SpawnClients( team_t team ) { sq = &level.alienSpawnQueue; numSpawns = level.numAlienSpawns; + if( g_teamForceBalance.integer == 2 && + !level.humanTeamLocked && + !level.alienTeamLocked && + level.numAlienClients-level.numHumanClients > 1 ) + { + return; + } } else if( team == TEAM_HUMANS ) { sq = &level.humanSpawnQueue; numSpawns = level.numHumanSpawns; + if( g_teamForceBalance.integer == 2 && + !level.humanTeamLocked && + !level.alienTeamLocked && + level.numHumanClients-level.numAlienClients > 1 ) + { + return; + } } if( G_GetSpawnQueueLength( sq ) > 0 && numSpawns > 0 ) diff --git a/src/game/g_team.c b/src/game/g_team.c index debe11f..fb3332b 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -279,9 +279,9 @@ void G_ChangeTeam( gentity_t *ent, team_t newTeam ) } - /* +/* Call this method to balance teams - */ +*/ void G_BalanceTeams() { team_t sourceTeam; @@ -540,7 +540,10 @@ void CheckTeamStatus( void ) trap_SendServerCommand( -1, "print \"^5Teams are imbalanced. " "^5Humans have more players.\n\""); level.numTeamImbalanceWarnings++; - G_BalanceTeams(); + if ( !level.humanTeamLocked && + !level.alienTeamLocked && + g_teamForceBalance.integer == 1) + G_BalanceTeams(); } else if( level.numHumanSpawns > 0 && level.numHumanArmouries > 0 && level.numAlienClients - level.numHumanClients >= 2 ) @@ -548,7 +551,10 @@ void CheckTeamStatus( void ) trap_SendServerCommand ( -1, "print \"^5Teams are imbalanced. " "^5Aliens have more players.\n\""); level.numTeamImbalanceWarnings++; - G_BalanceTeams(); + if ( !level.humanTeamLocked && + !level.alienTeamLocked && + g_teamForceBalance.integer == 1) + G_BalanceTeams(); } else { |