summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_main.c6
-rw-r--r--src/game/g_weapon.c10
3 files changed, 13 insertions, 5 deletions
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 4e6cec1..1b120a8 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -1298,6 +1298,8 @@ extern vmCvar_t g_PlayerRewardFactor;
extern vmCvar_t g_ForceRandomTeams;
extern vmCvar_t g_AutoLevelMinTeamSize;
extern vmCvar_t g_RageQuitScorePenalty;
+extern vmCvar_t g_DretchTurretDamage;
+extern vmCvar_t g_DretchBuildingDamage;
void trap_Print( const char *fmt );
void trap_Error( const char *fmt );
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 481e1d1..39b92a4 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -198,6 +198,8 @@ vmCvar_t g_TimerCommand;
vmCvar_t g_ForceRandomTeams;
vmCvar_t g_AutoLevelMinTeamSize;
vmCvar_t g_RageQuitScorePenalty;
+vmCvar_t g_DretchTurretDamage;
+vmCvar_t g_DretchBuildingDamage;
// copy cvars that can be set in worldspawn so they can be restored later
static char cv_gravity[ MAX_CVAR_VALUE_STRING ];
@@ -365,7 +367,9 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_TimerCommand, "g_TimerCommand", "", CVAR_ARCHIVE, 0, qfalse },
{ &g_ForceRandomTeams, "g_ForceRandomTeams", "0", CVAR_ARCHIVE, 0, qfalse },
{ &g_AutoLevelMinTeamSize, "g_AutoLevelMinTeamSize", "3", CVAR_ARCHIVE, 0, qfalse },
- { &g_RageQuitScorePenalty, "g_RageQuitScorePenalty", "2000", CVAR_ARCHIVE, 0, qfalse }
+ { &g_RageQuitScorePenalty, "g_RageQuitScorePenalty", "2000", CVAR_ARCHIVE, 0, qfalse },
+ { &g_DretchTurretDamage, "g_DretchTurretDamage", "1", CVAR_ARCHIVE, 0, qfalse },
+ { &g_DretchBuildingDamage, "g_DretchBuildingDamage", "0.5", CVAR_ARCHIVE, 0, qfalse }
};
static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] );
void G_InitGame( int levelTime, int randomSeed, int restart );
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 740ab32..bbc4e08 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1022,14 +1022,16 @@ qboolean CheckVenomAttack( gentity_t *ent )
// only allow bites to work against buildings as they are constructing
if( traceEnt->s.eType == ET_BUILDABLE )
{
+ if( traceEnt->buildableTeam == TEAM_ALIENS )
+ return qfalse;
if ( !( traceEnt->s.modelindex == BA_H_MGTURRET || traceEnt->s.modelindex == BA_H_MGTURRET2 || traceEnt->s.modelindex == BA_H_TESLAGEN || !traceEnt->spawned ) )
- return qfalse;
+ damage = (int)(damage * g_DretchBuildingDamage.value);
+ else
+ damage = (int)(damage * g_DretchTurretDamage.value);
- if( traceEnt->buildableTeam == TEAM_ALIENS )
+ if (damage <= 0)
return qfalse;
-
- damage = 3;
}
if( traceEnt->client )