From 17ff8165d24ff88d2808b76748c96267bcc104e8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 29 Dec 2013 00:36:36 +0100 Subject: [PATCH] Closes #1065: Don't apply fall damage when landing in water --- apps/openmw/mwmechanics/character.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 87a7875f5..2b93225e4 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -802,6 +802,9 @@ void CharacterController::update(float duration) if(sneak || inwater || flying) vec.z = 0.0f; + if (inwater || flying) + cls.getCreatureStats(mPtr).land(); + if(!onground && !flying && !inwater) { // In the air (either getting up —ascending part of jump— or falling). @@ -925,7 +928,7 @@ void CharacterController::update(float duration) } } - if (onground || inwater || flying) + if (onground) cls.getCreatureStats(mPtr).land(); if(movestate != CharState_None)