summaryrefslogtreecommitdiff
path: root/src/game/g_weapon.c
diff options
context:
space:
mode:
authorRoman Tetelman <kevlarman@gmail.com>2009-10-03 12:04:01 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:39 +0000
commit33a2c3494a0be2050c8a2e4757764fd55056480c (patch)
tree6a3cc819e3d8a014bc25a01e1c6e18637e323303 /src/game/g_weapon.c
parente86b506d79fc62a1fba206e070aae15929197aaa (diff)
* fix for a lot of weapons not causing buildable bleeding
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r--src/game/g_weapon.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index dac17f7a..68bc8eaa 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -241,7 +241,7 @@ static void BloodSpurt( gentity_t *attacker, gentity_t *victim, trace_t *tr )
{
gentity_t *tent;
- if( !attacker->client || !victim->client )
+ if( !attacker->client )
return;
tent = G_TempEntity( tr->endpos, EV_MISSILE_HIT );
tent->s.otherEntityNum = victim->s.number;
@@ -263,7 +263,7 @@ static void WideBloodSpurt( gentity_t *attacker, gentity_t *victim, trace_t *tr
vec3_t normal, origin;
float mag, radius;
- if( !attacker->client || !victim->client )
+ if( !attacker->client )
return;
if( tr )
@@ -474,13 +474,11 @@ void massDriverFire( gentity_t *ent )
SnapVectorTowards( tr.endpos, muzzle );
// send impact
- if( traceEnt->takedamage && traceEnt->client )
+ if( traceEnt->takedamage &&
+ (traceEnt->s.eType == ET_BUILDABLE ||
+ traceEnt->s.eType == ET_PLAYER ) )
{
- tent = G_TempEntity( tr.endpos, EV_MISSILE_HIT );
- tent->s.otherEntityNum = traceEnt->s.number;
- tent->s.eventParm = DirToByte( tr.plane.normal );
- tent->s.weapon = ent->s.weapon;
- tent->s.generic1 = ent->s.generic1; //weaponMode
+ BloodSpurt( ent, traceEnt, &tr );
}
else
{
@@ -637,7 +635,9 @@ void lasGunFire( gentity_t *ent )
SnapVectorTowards( tr.endpos, muzzle );
// send impact
- if( traceEnt->takedamage && traceEnt->client )
+ if( traceEnt->takedamage &&
+ (traceEnt->s.eType == ET_BUILDABLE ||
+ traceEnt->s.eType == ET_PLAYER ) )
{
BloodSpurt( ent, traceEnt, &tr );
}
@@ -676,7 +676,7 @@ void painSawFire( gentity_t *ent )
tr.endpos[ 2 ] -= 5.0f;
// send blood impact
- if( traceEnt->client )
+ if( traceEnt->s.eType == ET_PLAYER || traceEnt->s.eType == ET_BUILDABLE )
{
BloodSpurt( ent, traceEnt, &tr );
}