summaryrefslogtreecommitdiff
path: root/src/game/g_main.c
diff options
context:
space:
mode:
authorMikko Tiusanen <ams@daug.net>2015-02-14 15:19:07 +0200
committerMikko Tiusanen <ams@daug.net>2015-02-14 15:28:01 +0200
commit839cabd68286d2bc56b04c518f184f38369c3853 (patch)
tree1b99bb9992385d0dd0d2772b36eda1c857e6c854 /src/game/g_main.c
parentd5a1c55d37e961e95f8439249b31dca7eec81e2d (diff)
Various gameplay balance changes and minor bug fixes, code organization.
Increased goon pounce delay a little bit. Incognito players as players of level matching their score. Adjusted the hp, build time and bp of various buildings. Alien hives now track movement a bit faster. Added cvars to limit colony and refinery bp max effects. Colonies and refineries can now prevent enemy building within their radius. Reduced flamer and lightning gun damage and slowed down rockets. Increased Adv. mara zap rate and adv. goon barb regen. Increased hummel barbs damage and reduced their repeat rate a little bit.
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r--src/game/g_main.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 1249905..7dc5bc8 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -205,6 +205,10 @@ vmCvar_t g_DretchTurretDamage;
vmCvar_t g_DretchBuildingDamage;
vmCvar_t g_OwnTeamBPFactor;
vmCvar_t g_EnemyTeamBPFactor;
+vmCvar_t g_MinAlienExtraBuildPoints;
+vmCvar_t g_MaxAlienExtraBuildPoints;
+vmCvar_t g_MinHumanExtraBuildPoints;
+vmCvar_t g_MaxHumanExtraBuildPoints;
// copy cvars that can be set in worldspawn so they can be restored later
static char cv_gravity[ MAX_CVAR_VALUE_STRING ];
@@ -376,8 +380,13 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_DretchTurretDamage, "g_DretchTurretDamage", "1", CVAR_ARCHIVE, 0, qfalse },
{ &g_DretchBuildingDamage, "g_DretchBuildingDamage", "0.5", CVAR_ARCHIVE, 0, qfalse },
{ &g_OwnTeamBPFactor, "g_OwnTeamBPFactor", "1.0", CVAR_ARCHIVE, 0, qfalse },
- { &g_EnemyTeamBPFactor, "g_EnemyTeamBPFactor", "0.0", CVAR_ARCHIVE, 0, qfalse }
+ { &g_EnemyTeamBPFactor, "g_EnemyTeamBPFactor", "0.0", CVAR_ARCHIVE, 0, qfalse },
+ { &g_MinAlienExtraBuildPoints, "g_MinAlienExtraBuildPoints", "-800", CVAR_ARCHIVE, 0, qfalse },
+ { &g_MaxAlienExtraBuildPoints, "g_MaxAlienExtraBuildPoints", "800", CVAR_ARCHIVE, 0, qfalse },
+ { &g_MinHumanExtraBuildPoints, "g_MinHumanExtraBuildPoints", "-800", CVAR_ARCHIVE, 0, qfalse },
+ { &g_MaxHumanExtraBuildPoints, "g_MaxHumanExtraBuildPoints", "800", CVAR_ARCHIVE, 0, qfalse }
};
+
static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] );
void G_InitGame( int levelTime, int randomSeed, int restart );
void G_RunFrame( int levelTime );
@@ -1403,6 +1412,16 @@ void G_CalculateBuildPoints( void )
level.alienExtraBuildPoints = g_OwnTeamBPFactor.value * (aVar + aFixed) + g_EnemyTeamBPFactor.value * (hVar + hFixed);
level.humanExtraBuildPoints = g_OwnTeamBPFactor.value * (hVar + hFixed) + g_EnemyTeamBPFactor.value * (aVar + aFixed);
+ if (level.alienExtraBuildPoints < g_MinAlienExtraBuildPoints.value)
+ level.alienExtraBuildPoints = g_MinAlienExtraBuildPoints.value;
+ else if (level.alienExtraBuildPoints > g_MaxAlienExtraBuildPoints.value)
+ level.alienExtraBuildPoints = g_MaxAlienExtraBuildPoints.value;
+
+ if (level.humanExtraBuildPoints < g_MinHumanExtraBuildPoints.value)
+ level.humanExtraBuildPoints = g_MinHumanExtraBuildPoints.value;
+ else if (level.humanExtraBuildPoints > g_MaxHumanExtraBuildPoints.value)
+ level.humanExtraBuildPoints = g_MaxHumanExtraBuildPoints.value;
+
level.humanBuildPoints += level.humanExtraBuildPoints;
level.alienBuildPoints += level.alienExtraBuildPoints;
}
@@ -2643,8 +2662,8 @@ void G_ArmageddonStep( void )
case BA_A_SPAWN:
case BA_H_SPAWN:
case BA_H_ARMOURY:
- case BA_H_REPEATER:
- continue; //dont get killed
+ case BA_H_REPEATER:
+ continue; //dont get killed
case BA_A_TRAPPER:
case BA_H_MGTURRET:
case BA_H_MGTURRET2: