summaryrefslogtreecommitdiff
path: root/src/game/g_weapon.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel@redman.xyz>2017-04-13 11:30:00 +0000
committer/dev/humancontroller <devhc@example.com>2017-04-15 12:06:43 +0200
commit5ad9e26c3be1f2ebc6cdb340b685aef30ae16db7 (patch)
tree5ee97c52196122bd8356ad8e09403332e7712fcd /src/game/g_weapon.c
parent45973dc48641365b31475733bce7af9c3b8603a6 (diff)
import the cQVM game module
replacing the existing one
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r--src/game/g_weapon.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index a9e04e6..4da6205 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -701,7 +701,8 @@ void teslaFire( gentity_t *ent )
if( !traceEnt->client )
return;
- if( traceEnt->client && traceEnt->client->ps.stats[ STAT_PTEAM ] != PTE_ALIENS )
+ if( traceEnt->client && traceEnt->client->ps.stats[ STAT_PTEAM ] != PTE_ALIENS &&
+ !traceEnt->client->pers.bleeder )
return;
//so the client side knows
@@ -709,8 +710,13 @@ void teslaFire( gentity_t *ent )
if( traceEnt->takedamage )
{
+ int dmg = TESLAGEN_DMG;
+
+ if( g_modStage3Strength.integer > 0 )
+ dmg = dmg * g_modStage3Strength.integer / 100;
+
G_Damage( traceEnt, ent, ent, forward, tr.endpos,
- TESLAGEN_DMG, 0, MOD_TESLAGEN );
+ dmg, 0, MOD_TESLAGEN );
}
// snap the endpos to integers to save net bandwidth, but nudged towards the line
@@ -781,6 +787,7 @@ void cancelBuildFire( gentity_t *ent )
traceEnt->health += HBUILD_HEALRATE;
ent->client->pers.statscounters.repairspoisons++;
+ ent->client->pers.karma += 1;
level.humanStatsCounters.repairspoisons++;
if( traceEnt->health > bHealth )
@@ -814,7 +821,7 @@ void buildFire( gentity_t *ent, dynMenu_t menu )
if( G_BuildIfValid( ent, ent->client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) )
{
- if( g_cheats.integer )
+ if( g_cheats.integer || g_instantBuild.integer )
{
ent->client->ps.stats[ STAT_MISC ] = 0;
}
@@ -1184,6 +1191,8 @@ static void G_CreateNewZap( gentity_t *creator, gentity_t *target )
zap->used = qtrue;
zap->timeToLive = LEVEL2_AREAZAP_TIME;
+ if( g_modAlienRate.integer > 0 )
+ zap->timeToLive = zap->timeToLive * g_modAlienRate.integer / 100;
zap->damageUsed = 0;
zap->creator = creator;
@@ -1277,6 +1286,8 @@ void G_UpdateZaps( int msec )
{
G_Damage( target, source, zap->creator, forward, target->s.origin,
damage, DAMAGE_NO_KNOCKBACK | DAMAGE_NO_LOCDAMAGE, MOD_LEVEL2_ZAP );
+ if( g_modAlienRate.integer > 0 )
+ damage = damage * 100 / g_modAlienRate.integer;
zap->damageUsed += damage;
}
}