From b5ec83322eea9964b07d569bbf69c8ed07313633 Mon Sep 17 00:00:00 2001 From: Allanis Date: Thu, 23 May 2013 00:01:57 +0100 Subject: [PATCH] [Add] Rumble the screen a little if you take armour damage. --- TODO | 1 - src/pilot.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index b6e536c..50945ac 100644 --- a/TODO +++ b/TODO @@ -20,7 +20,6 @@ Major: -- Missile smoke. -- Engine glow -> need models. -- More special effects. - -- Have some kind of screen shaking for afterburner and friends. -- Cloaking effects? -- Maybe some fancy displacement effects for some ships. -- More outfits. diff --git a/src/pilot.c b/src/pilot.c index 5904654..f306175 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -254,6 +254,10 @@ void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter, else if(p->armour-damage_armour > 0.) { p->armour -= damage_armour; dam_mod = damage_armour/p->armour_max; + + // Shake us up a bit. + if(p->id == PLAYER_ID) + spfx_shake(dam_mod*100.); } else { // We are officially dead.