From 7cd5eb4c77de9fda4946de7e1c2384d0c2a0253e Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 7 Apr 2013 15:41:33 -1000 Subject: Swing the camera down when the player lands on the ground, based on the velocity the surface is hit with. --- src/localplayer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 9c70c8b2f..6b7b0943c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -329,6 +329,9 @@ void LocalPlayer::move(f32 dtime, ClientEnvironment *env, f32 pos_max_d, if(!touching_ground_was && touching_ground){ MtEvent *e = new SimpleTriggerEvent("PlayerRegainGround"); m_gamedef->event()->put(e); + + // Set camera impact value to be used for view bobbing + camera_impact = getSpeed().Y * -1; } { -- cgit v1.2.3