summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-06-22 16:18:38 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-06-22 16:18:38 +0200
commit6aa69fe49ab81eb128471265c0329c24a27a3ae4 (patch)
tree6a4e9b1132026db7751a988df2f935b33ddb28b3 /src/game
parentef1dd29cd38abd1f2c008bdd32ca767620613895 (diff)
Remove poison.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_active.c81
-rw-r--r--src/game/g_buildable.c4
-rw-r--r--src/game/g_cmds.c17
-rw-r--r--src/game/g_combat.c38
-rw-r--r--src/game/g_local.h9
-rw-r--r--src/game/g_main.c8
-rw-r--r--src/game/g_team.c9
-rw-r--r--src/game/tremulous.h8
9 files changed, 3 insertions, 172 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 99bba40..6c0e626 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -257,7 +257,6 @@ typedef enum
#define SS_WALLCLIMBING 0x00000001
#define SS_CREEPSLOWED 0x00000002
#define SS_SPEEDBOOST 0x00000004
-#define SS_POISONED 0x00000020
#define SS_BOOSTED 0x00000080
#define SS_INVI 0x00008000
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 270b179..b15c5a5 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -299,51 +299,6 @@ static qboolean ClientIsOnMedi( gclient_t *cl ) {
return ( g_entities[ ent ].s.modelindex == BA_H_MEDISTAT );
}
-static void ClientContagion( gentity_t *ent, gentity_t *other ) {
- gclient_t *c1 = ent->client, *c2;
- qboolean poisoned1 = c1->ps.stats[ STAT_STATE ] & SS_POISONED, poisoned2;
- int expiryTime;
-
- if( ( c1->pers.teamSelection != TEAM_HUMANS ) ||
- ( c1->poisonImmunityTime >= level.time ) ||
- ClientIsOnMedi(c1) )
- return;
-
- if( other->client && !BG_InventoryContainsUpgrade( UP_BIOKIT, c1->ps.stats ) ) {
- // touching another human
- c2 = other->client;
- poisoned2 = c2->ps.stats[ STAT_STATE ] & SS_POISONED;
-
- if( !( poisoned1 || poisoned2) ||
- ( c2->pers.teamSelection != TEAM_HUMANS ) ||
- ( c2->poisonImmunityTime >= level.time ) ||
- ClientIsOnMedi(c2) )
- return;
- if( random() > g_contagionProb.value )
- return;
-
- if (poisoned1 && !poisoned2) {
- expiryTime = c1->poisonExpiryTime;
- c2->lastPoisonClient = c1->lastPoisonClient;
- } else if (!poisoned1 && poisoned2) {
- expiryTime = c2->poisonExpiryTime;
- c1->lastPoisonClient = c2->lastPoisonClient;
- } else { // both are poisoned
- expiryTime = MAX(c1->poisonExpiryTime, c2->poisonExpiryTime);
- }
- c1->poisonExpiryTime = expiryTime;
- c2->poisonExpiryTime = expiryTime;
- c1->ps.stats[ STAT_STATE ] |= SS_POISONED;
- c2->ps.stats[ STAT_STATE ] |= SS_POISONED;
- } else if( ( other->s.eType == ET_BUILDABLE) &&
- ( other->s.modelindex == BA_A_BOOSTER ) &&
- other->spawned && ( other->health > 0 ) && other->powered ) {
- // touching booster
- c1->ps.stats[ STAT_STATE ] |= SS_POISONED;
- c1->poisonExpiryTime = level.time + g_boosterPoisonTime.integer * 1000;
- c1->lastPoisonClient = &g_entities[ ENTITYNUM_WORLD ];
- }
-}
/*
==============
ClientImpacts
@@ -380,10 +335,6 @@ void ClientImpacts( gentity_t *ent, pmove_t *pm )
if( ent->client && other->client )
ClientShove( ent, other );
- // spread poison
- if( ent->client )
- ClientContagion( ent, other );
-
// touch triggers
if( other->touch )
other->touch( other, ent, &trace );
@@ -476,8 +427,7 @@ qboolean G_NeedsMedkit( gclient_t *client )
{
//not if currently using a medkit or have no need for a medkit now
return !( client->ps.stats[ STAT_STATE ] & SS_HEALING_2X ) &&
- ( client->ps.stats[ STAT_HEALTH ] < client->ps.stats[ STAT_MAX_HEALTH ] ||
- ( client->ps.stats[ STAT_STATE ] & SS_POISONED ) );
+ ( client->ps.stats[ STAT_HEALTH ] < client->ps.stats[ STAT_MAX_HEALTH ] );
}
/*
============
@@ -520,10 +470,6 @@ void G_UseMedkit( gentity_t *ent )
BG_DeactivateUpgrade( UP_MEDKIT, client->ps.stats );
BG_RemoveUpgradeFromInventory( UP_MEDKIT, client->ps.stats );
- // don't poison and/or infect the client anymore
- tclient->ps.stats[ STAT_STATE ] &= ~SS_POISONED;
- tclient->poisonImmunityTime = level.time + MEDKIT_POISON_IMMUNITY_TIME;
-
tclient->ps.stats[ STAT_STATE ] |= SS_HEALING_2X;
tclient->lastMedKitTime = level.time;
tclient->medKitHealthToRestore =
@@ -919,27 +865,6 @@ void ClientTimerActions( gentity_t *ent, int msec )
{
client->time1000 -= 1000;
- //client is poisoned
- if( client->ps.stats[ STAT_STATE ] & SS_POISONED )
- {
- int damage = ALIEN_POISON_DMG;
-
- if( BG_InventoryContainsUpgrade( UP_BIOKIT, client->ps.stats ) )
- damage -= BIOKIT_POISON_PROTECTION;
-
- if( BG_InventoryContainsUpgrade( UP_BATTLESUIT, client->ps.stats ) )
- damage -= BSUIT_POISON_PROTECTION;
-
- if( BG_InventoryContainsUpgrade( UP_HELMET, client->ps.stats ) )
- damage -= HELMET_POISON_PROTECTION;
-
- if( BG_InventoryContainsUpgrade( UP_LIGHTARMOUR, client->ps.stats ) )
- damage -= LIGHTARMOUR_POISON_PROTECTION;
-
- G_Damage( ent, client->lastPoisonClient, client->lastPoisonClient, NULL,
- 0, damage, 0, MOD_POISON );
- }
-
// turn off life support when a team admits defeat
if( client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS &&
level.surrenderTeam == TEAM_ALIENS )
@@ -1650,10 +1575,6 @@ void ClientThink_real( gentity_t *ent )
client->ps.stats[ STAT_STATE ] |= SS_BOOSTEDWARNING;
}
- if( client->ps.stats[ STAT_STATE ] & SS_POISONED &&
- client->poisonExpiryTime < level.time )
- client->ps.stats[ STAT_STATE ] &= ~SS_POISONED;
-
client->ps.gravity = g_gravity.value;
if( BG_InventoryContainsUpgrade( UP_MEDKIT, client->ps.stats ) &&
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 41ff4bc..8de275e 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2558,10 +2558,6 @@ void HMedistat_Think( gentity_t *self )
if( player->flags & FL_NOTARGET )
continue; // notarget cancels even beneficial effects?
-
- //remove poison from everyone, not just the healed player
- if( player->client && player->client->ps.stats[ STAT_STATE ] & SS_POISONED )
- player->client->ps.stats[ STAT_STATE ] &= ~SS_POISONED;
if( self->enemy == player && player->client &&
player->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS &&
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index ab26900..2b7b105 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -449,7 +449,7 @@ void Cmd_Give_f( gentity_t *ent )
{
ADMP( "usage: give [what]\n" );
ADMP( "usage: valid choices are: all, health, funds [amount], stamina, "
- "poison, gas, ammo\n" );
+ "ammo\n" );
return;
}
@@ -488,21 +488,6 @@ void Cmd_Give_f( gentity_t *ent )
if( give_all || Q_stricmp( name, "stamina" ) == 0 )
ent->client->ps.stats[ STAT_STAMINA ] = STAMINA_MAX;
- if( Q_stricmp( name, "poison" ) == 0 )
- {
- if( ent->client->pers.teamSelection == TEAM_HUMANS )
- {
- ent->client->ps.stats[ STAT_STATE ] |= SS_POISONED;
- ent->client->lastPoisonTime = level.time;
- ent->client->lastPoisonClient = ent;
- }
- else
- {
- ent->client->ps.stats[ STAT_STATE ] |= SS_BOOSTED;
- ent->client->boostedTime = level.time;
- }
- }
-
if( give_all || Q_stricmp( name, "ammo" ) == 0 )
{
gclient_t *client = ent->client;
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 52b669b..50eca22 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -1154,10 +1154,6 @@ void G_SpawnDamageIndicator( gentity_t *ent, gentity_t *inflictor,
switch( mod )
{
- case MOD_POISON:
- di->flags |= DIF_INDIRECT | DIF_PERSISTENT;
- break;
-
case MOD_NOCREEP:
di->flags |= DIF_INDIRECT;
break;
@@ -1217,7 +1213,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
int take;
int asave = 0;
int knockback;
- int poisonTime = 0;
// int client_z, min_z;
// Can't deal damage sometimes
if( !targ->takedamage || targ->health <= 0 || level.intermissionQueued )
@@ -1431,39 +1426,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
take = (int)( take * G_CalcDamageModifier( point, targ, attacker,
client->ps.stats[ STAT_CLASS ],
dflags ) + 0.5f );
-
-
- // check possible poisoning
- if( ( attacker->client ) &&
- ( targ->client->poisonImmunityTime < level.time ) &&
- ( targ->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) )
- {
- //if boosted poison every attack
- if( ( attacker->client->ps.stats[ STAT_STATE ] & SS_BOOSTED )
-
- && mod != MOD_POISON
- && mod != MOD_LEVEL2_ZAP
- && mod != MOD_LEVEL5_ZAP
- && mod != MOD_HSPAWN
- && mod != MOD_ASPAWN
- && mod != MOD_LEVEL5_PRICKLES
- && mod != MOD_FLAMER_SPLASH)
- poisonTime = level.time + ALIEN_POISON_TIME;
- // no more zap poisen
- else if( mod != MOD_LEVEL2_ZAP || mod != MOD_LEVEL5_ZAP || mod != MOD_FLAMES )
- {
- poisonTime = level.time + g_basiUpgPoisonTime.integer * 1000;
- }
- if( poisonTime > 0 )
- {
- targ->client->ps.stats[ STAT_STATE ] |= SS_POISONED;
- if( poisonTime > targ->client->poisonExpiryTime ) {
- targ->client->poisonExpiryTime = poisonTime;
- targ->client->lastPoisonClient = attacker;
-
- }
- }
- }
}
if( take < 1 )
diff --git a/src/game/g_local.h b/src/game/g_local.h
index a68fe83..fad91ee 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -473,11 +473,6 @@ struct gclient_s
char *areabits;
- int poisonExpiryTime;
- int lastPoisonTime;
- int poisonImmunityTime;
- gentity_t *lastPoisonClient;
- int lastPoisonCloudedTime;
int grabExpiryTime;
int lastLockTime;
int lastSlowTime;
@@ -1311,10 +1306,6 @@ extern vmCvar_t g_alienAnticampRange;
extern vmCvar_t g_humanAnticampBonusMax;
extern vmCvar_t g_humanAnticampBonus1;
extern vmCvar_t g_humanAnticampRange;
-extern vmCvar_t g_contagionProb;
-extern vmCvar_t g_boosterPoisonTime;
-extern vmCvar_t g_basiPoisonTime;
-extern vmCvar_t g_basiUpgPoisonTime;
extern vmCvar_t g_maxVariableBuildPoints;
extern vmCvar_t g_variableBuildPointsPower;
extern vmCvar_t g_maxFixedBuildPoints;
diff --git a/src/game/g_main.c b/src/game/g_main.c
index cd66933..1efc039 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -135,10 +135,6 @@ vmCvar_t g_alienAnticampRange;
vmCvar_t g_humanAnticampBonusMax;
vmCvar_t g_humanAnticampBonus1;
vmCvar_t g_humanAnticampRange;
-vmCvar_t g_contagionProb;
-vmCvar_t g_boosterPoisonTime;
-vmCvar_t g_basiPoisonTime;
-vmCvar_t g_basiUpgPoisonTime;
vmCvar_t g_maxVariableBuildPoints;
vmCvar_t g_variableBuildPointsPower;
vmCvar_t g_maxFixedBuildPoints;
@@ -315,10 +311,6 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_humanAnticampBonusMax, "g_humanAnticampBonusMax", "1", 0, 0, qfalse },
{ &g_humanAnticampBonus1, "g_humanAnticampBonus1", "0.3", 0, 0, qfalse },
{ &g_humanAnticampRange, "g_humanAnticampRange", "800", 0, 0, qfalse },
- { &g_contagionProb, "g_contagionProb", "0.5", CVAR_ARCHIVE, 0, qfalse },
- { &g_boosterPoisonTime, "g_boosterPoisonTime", "15", CVAR_ARCHIVE, 0, qfalse },
- { &g_basiPoisonTime, "g_basiPoisonTime", "5", CVAR_ARCHIVE, 0, qfalse },
- { &g_basiUpgPoisonTime, "g_basiUpgPoisonTime", "8", CVAR_ARCHIVE, 0, qfalse },
{ &g_maxVariableBuildPoints, "g_maxVariableBuildPoints", "500", CVAR_ARCHIVE, 0, qfalse },
{ &g_variableBuildPointsPower, "g_variableBuildPointsPower", "1.6", CVAR_ARCHIVE, 0, qfalse },
{ &g_maxFixedBuildPoints, "g_maxFixedBuildPoints", "100", CVAR_ARCHIVE, 0, qfalse },
diff --git a/src/game/g_team.c b/src/game/g_team.c
index 81e2e0e..f92936f 100644
--- a/src/game/g_team.c
+++ b/src/game/g_team.c
@@ -200,14 +200,7 @@ void G_LeaveTeamReal( gentity_t *self, qboolean reset_score )
if( !ent->inuse )
continue;
- if( ent->client && ent->client->pers.connected == CON_CONNECTED )
- {
- // cure poison
- if( ent->client->ps.stats[ STAT_STATE ] & SS_POISONED &&
- ent->client->lastPoisonClient == self )
- ent->client->ps.stats[ STAT_STATE ] &= ~SS_POISONED;
- }
- else if( ent->s.eType == ET_MISSILE && ent->r.ownerNum == self->s.number )
+ if( ent->s.eType == ET_MISSILE && ent->r.ownerNum == self->s.number )
G_FreeEntity( ent );
}
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 99ec143..95b6398 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -71,9 +71,6 @@ TREMULOUS EDGE MOD SRC FILE
#define ALIENSENSE_RANGE 1000.0f
#define REGEN_BOOST_RANGE 200.0f
-#define ALIEN_POISON_TIME 10000
-#define ALIEN_POISON_DMG 5
-#define ALIEN_POISON_DIVIDER (1.0f/1.32f) //about 1.0/(time`th root of damage)
#define ALIEN_SPAWN_REPEAT_TIME 11000
#define ALIEN_REGEN_DAMAGE_TIME 2000 //msec since damage that regen starts again
#define ALIEN_REGEN_NOCREEP_MOD (1.0f/3.0f) //regen off creep
@@ -499,11 +496,9 @@ TREMULOUS EDGE MOD SRC FILE
* HUMAN upgrades
*/
#define LIGHTARMOUR_PRICE 50
-#define LIGHTARMOUR_POISON_PROTECTION 1
#define HELMET_PRICE 80
#define HELMET_RANGE 1000.0f
-#define HELMET_POISON_PROTECTION 1
#define SPAWN_WITH_MEDKIT 1
#define MEDKIT_PRICE 50
@@ -521,7 +516,6 @@ TREMULOUS EDGE MOD SRC FILE
#define JETPACK_DISABLE_CHANCE 0.3f
#define BSUIT_PRICE 400
-#define BSUIT_POISON_PROTECTION 3
#define MGCLIP_PRICE 0
@@ -529,12 +523,10 @@ TREMULOUS EDGE MOD SRC FILE
#define GAS_PRICE 0
-#define MEDKIT_POISON_IMMUNITY_TIME 0
#define MEDKIT_STARTUP_TIME 4000
#define MEDKIT_STARTUP_SPEED 5
#define BIOKIT_PRICE 200
-#define BIOKIT_POISON_PROTECTION 1
#define BIOKIT_HEALTH_RATE 2.0 // 5000/BIOKIT_HEALTH_RATE = * msec before regenerate
#define BIOKIT_STAMINA_RATE 2