return TRUE;
}
-void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, entity dmgowner)
+void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner)
{
// TODO maybe call this from non-edgedamage too?
// TODO maybe make the client do the particle effects for the weapons and the impact sounds using this info?
e.dmg_force = vlen(force);
e.velocity = force;
e.oldorigin_x = compressShortVector(e.velocity);
- e.species |= 0; // to be fixed
+ e.species = bloodtype;
+
+ dprint(strcat(ftos(e.species), " ********\n"));
Net_LinkEntity(e, FALSE, 0.2, Damage_DamageInfo_SendEntity);
}
else
force = normalize(force);
if(forceintensity >= 0)
- Damage_DamageInfo(blastorigin, coredamage, edgedamage, rad, forceintensity * force, deathtype, attacker);
+ Damage_DamageInfo(blastorigin, coredamage, edgedamage, rad, forceintensity * force, deathtype, 0, attacker);
else
- Damage_DamageInfo(blastorigin, coredamage, edgedamage, -rad, (-forceintensity) * force, deathtype, attacker);
+ Damage_DamageInfo(blastorigin, coredamage, edgedamage, -rad, (-forceintensity) * force, deathtype, 0, attacker);
}
stat_damagedone = 0;
entity bomblet;
float i;
- Damage_DamageInfo(self.origin, 0, 0, 0, '0 0 0', DEATH_RAPTOR_BOMB_SPLIT, self);
+ Damage_DamageInfo(self.origin, 0, 0, 0, '0 0 0', DEATH_RAPTOR_BOMB_SPLIT, 0, self);
for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
{
continue;
}
+ if(trace_ent.solid == SOLID_BSP || trace_ent.solid == SOLID_SLIDEBOX)
+ Damage_DamageInfo(trace_endpos, bdamage, 0, 0, force, deathtype, trace_ent.species, self);
+
// if it is world we can't hurt it so stop now
if (trace_ent == world || trace_fraction == 1)
break;
f = pow(bound(0, vlen(self.velocity) / vlen(self.oldvelocity), 1), 2); // energy multiplier
q = 1 + self.dmg_edge / self.dmg;
- if(other.solid == SOLID_BSP)
- Damage_DamageInfo(self.origin, self.dmg * f, 0, 0, max(1, self.dmg_force) * normalize(self.velocity) * f, self.projectiledeathtype, self);
+ if(other.solid == SOLID_BSP || other.solid == SOLID_SLIDEBOX)
+ Damage_DamageInfo(self.origin, self.dmg * f, 0, 0, max(1, self.dmg_force) * normalize(self.velocity) * f, self.projectiledeathtype, other.species, self);
if(other && other != self.enemy)
{
{
float f;
f = pow(bound(0, vlen(self.velocity) / vlen(self.oldvelocity), 1), 2); // energy multiplier
- Damage_DamageInfo(self.origin, 0, 0, 0, max(1, self.dmg_force) * normalize(self.velocity) * -f, self.projectiledeathtype, self);
+ Damage_DamageInfo(self.origin, 0, 0, 0, max(1, self.dmg_force) * normalize(self.velocity) * -f, self.projectiledeathtype, 0, self);
}
UpdateCSQCProjectile(self);
end = trace_endpos;
- if ((trace_fraction != 1.0) && (pointcontents (trace_endpos) != CONTENT_SKY))
+ if (pointcontents (trace_endpos) != CONTENT_SKY)
{
if not (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
- Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, self);
+ Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, trace_ent.species, self);
Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force);
}
else
WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v);
- // flash and burn the wall
- if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
- Damage_DamageInfo(trace_endpos, 10000, 0, 0, 800 * w_shotdir, WEP_MINSTANEX, self);
-
if (g_minstagib)
W_DecreaseAmmo(ammo_cells, 1, autocvar_g_balance_minstanex_reload_ammo);
else
//beam and muzzle flash done on client
SendCSQCNexBeamParticle(charge);
- // flash and burn the wall
- if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
- Damage_DamageInfo(trace_endpos, mydmg, 0, 0, myforce * w_shotdir, WEP_NEX, self);
-
W_DecreaseAmmo(ammo_cells, myammo, autocvar_g_balance_nex_reload_ammo);
}
{
//if(other==self.realowner)
// return;
- Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE, self);
+ Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE, other.species, self);
remove (self);
}
te_knightspike(org2);
self.event_damage = SUB_Null;
- Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, self);
+ Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, other.species, self);
if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO)
{