1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Swing the camera down when the player lands on the ground, based on the velocity the surface is hit with.

This commit is contained in:
MirceaKitsune 2013-04-07 15:41:33 -10:00 committed by kwolekr
parent 17cfb1850d
commit 7cd5eb4c77
4 changed files with 34 additions and 2 deletions

View file

@ -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;
}
{