From 18bb84eafbef6d03b3a4318ccacf3682a65db369 Mon Sep 17 00:00:00 2001 From: Allanis Date: Tue, 26 Feb 2013 23:52:41 +0000 Subject: [PATCH] [Change] Nerfed the knockback effect. --- src/pilot.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pilot.c b/src/pilot.c index 7b7a622..4e178d4 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -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.