diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_missile.c | 3 | ||||
-rw-r--r-- | src/game/g_weapon.c | 20 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 2eeada6a..83a1ce88 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -208,7 +208,8 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) // is it cheaper in bandwidth to just remove this ent and create a new // one, rather than changing the missile into the explosion? - if( other->takedamage && other->client ) + if( other->takedamage && + ( other->s.eType == ET_PLAYER || other->s.eType == ET_BUILDABLE ) ) { G_AddEvent( ent, EV_MISSILE_HIT, DirToByte( trace->plane.normal ) ); ent->s.otherEntityNum = other->s.number; 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 ); } |