+
void W_GiveWeapon (entity e, float wep, string name)
{
entity oldself;
void W_BallisticBullet_Touch (void)
{
+ float density;
+
if(self.think == W_BallisticBullet_LeaveSolid_think) // skip this!
return;
PROJECTILE_TOUCH;
W_BallisticBullet_Hit ();
+ density = other.ballistics_density;
+ if(density == 0)
+ density = 1;
+
// go through solid!
- if(!W_BallisticBullet_LeaveSolid(self, self.velocity, self.dmg_radius))
+ if(!W_BallisticBullet_LeaveSolid(self, self.velocity, self.dmg_radius * density))
{
remove(self);
return;
void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
{
- float lag, dt, savetime;
+ float lag, dt, savetime, density;
entity pl, oldself;
entity proj;
W_BallisticBullet_Hit();
}
+ density = other.ballistics_density;
+ if(density == 0)
+ density = 1;
+
// go through solid!
- if(!W_BallisticBullet_LeaveSolid(self, self.velocity, self.dmg_radius))
+ if(!W_BallisticBullet_LeaveSolid(self, self.velocity, self.dmg_radius * density))
break;
W_BallisticBullet_LeaveSolid_think();