[Change] Nerfed the knockback effect.

This commit is contained in:
Allanis 2013-02-26 23:52:41 +00:00
parent be7a2b7791
commit 18bb84eafb

View File

@ -210,10 +210,12 @@ void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
if(shooter == PLAYER_ID) combat_rating += MAX(1, p->ship->mass/50);
}
}
// Knock back effect is dependent on both damage and mass of the weapon.
// should probably turn it into a partial conservative collision..
vect_cadd(&p->solid->vel,
w->vel.x * (dam_mod/4. + w->mass/p->solid->mass/4.),
w->vel.y * (dam_mod/4. + w->mass/p->solid->mass/4.));
w->vel.x * (dam_mod/6. + w->mass/p->solid->mass/6.),
w->vel.y * (dam_mod/6. + w->mass/p->solid->mass/6.));
}
// Set the pilot's ammo based on their secondary weapon.