summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_active.c9
-rw-r--r--src/game/g_buildable.c13
-rw-r--r--src/game/g_combat.c1
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_weapon.c1
5 files changed, 14 insertions, 12 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 6d296b5a..fc4b4ea3 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -461,12 +461,12 @@ void ClientTimerActions( gentity_t *ent, int msec )
client->ps.stats[ STAT_STAMINA ] = MAX_STAMINA;
}
- //client is poisoned FIXME: set attacker parameter
+ //client is poisoned
if( client->ps.stats[ STAT_STATE ] & SS_POISONED )
{
int damage = ( level.time - client->lastPoisonTime ) / 1000;
- G_Damage( ent, NULL, NULL, NULL, NULL, damage, 0, MOD_POISON );
+ G_Damage( ent, client->lastPoisonClient, client->lastPoisonClient, NULL, NULL, damage, 0, MOD_POISON );
}
//client is charging up for a pounce
@@ -576,9 +576,10 @@ void ClientTimerActions( gentity_t *ent, int msec )
{
client->time1000 -= 1000;
- //client is poisoned FIXME: set attacker parameter
+ //client is poisoned
if( client->ps.stats[ STAT_STATE ] & SS_POISONCLOUDED )
- G_Damage( ent, NULL, NULL, NULL, NULL, HYDRA_PCLOUD_DMG, 0, MOD_HYDRA_PCLOUD );
+ G_Damage( ent, client->lastPoisonCloudedClient, client->lastPoisonCloudedClient, NULL, NULL,
+ HYDRA_PCLOUD_DMG, 0, MOD_HYDRA_PCLOUD );
//replenish alien health
if( client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 0c103423..50c45950 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1741,22 +1741,19 @@ void HTeslaGen_Think( gentity_t *self )
self->nextthink = level.time + BG_FindNextThinkForBuildable( self->s.modelindex );
- //used for client side muzzle flashes
- self->s.eFlags &= ~EF_FIRING;
-
//if not powered don't do anything and check again for power next think
- if( !( self->powered = findPower( self ) ) )
+ if( !( self->powered = findPower( self ) ) || !( self->dcced = findDCC( self ) ) )
{
+ self->s.eFlags &= ~EF_FIRING;
self->nextthink = level.time + POWER_REFRESH_TIME;
return;
}
- //find DCC
- if( !( self->dcced = findDCC( self ) ) )
- return;
-
if( self->spawned && self->count < level.time )
{
+ //used to mark client side effects
+ self->s.eFlags &= ~EF_FIRING;
+
VectorSet( range, TESLAGEN_RANGE, TESLAGEN_RANGE, TESLAGEN_RANGE );
VectorAdd( self->s.origin, range, maxs );
VectorSubtract( self->s.origin, range, mins );
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 2410821b..3372a7fc 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -986,6 +986,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
{
targ->client->ps.stats[ STAT_STATE ] |= SS_POISONED;
targ->client->lastPoisonTime = level.time;
+ targ->client->lastPoisonClient = attacker;
}
}
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 411bdde1..52ccc09f 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -353,7 +353,9 @@ struct gclient_s
gentity_t *infestBody; //TA: body that is being infested. must be persistant
int lastPoisonTime;
+ gentity_t *lastPoisonClient;
int lastPoisonCloudedTime;
+ gentity_t *lastPoisonCloudedClient;
int lastGrabTime;
int lastLockTime;
int lastSlowTime;
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 4f737bc3..983d040c 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -660,6 +660,7 @@ void poisonCloud( gentity_t *ent )
{
humanPlayer->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED;
humanPlayer->client->lastPoisonCloudedTime = level.time;
+ humanPlayer->client->lastPoisonCloudedClient = ent;
G_AddPredictableEvent( humanPlayer, EV_POISONCLOUD, 0 );
}
}