summaryrefslogtreecommitdiffstats
path: root/src/animation/FrameUpdate.cpp
diff options
context:
space:
mode:
authorshfil <filip.gawin@zoho.com>2020-05-12 23:42:52 +0200
committerGitHub <noreply@github.com>2020-05-12 23:42:52 +0200
commitbd8a0e73056ae11f113c6859fecc3fbe3376dc0b (patch)
treecf51d6ab8430cd186e02f0e8105004f8e5476728 /src/animation/FrameUpdate.cpp
parentfix shotgun (diff)
parentFix linux warnings (diff)
downloadre3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.tar
re3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.tar.gz
re3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.tar.bz2
re3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.tar.lz
re3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.tar.xz
re3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.tar.zst
re3-bd8a0e73056ae11f113c6859fecc3fbe3376dc0b.zip
Diffstat (limited to 'src/animation/FrameUpdate.cpp')
-rw-r--r--src/animation/FrameUpdate.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/animation/FrameUpdate.cpp b/src/animation/FrameUpdate.cpp
index 8697e7c6..a3a2013a 100644
--- a/src/animation/FrameUpdate.cpp
+++ b/src/animation/FrameUpdate.cpp
@@ -147,11 +147,12 @@ FrameUpdateCallBackWithVelocityExtractionNonSkinned(AnimBlendFrameData *frame, v
mat->pos.x = pos.x - transx;
mat->pos.y = pos.y - transy;
mat->pos.z = pos.z;
- if(mat->pos.z >= -0.8f)
+ if(mat->pos.z >= -0.8f) {
if(mat->pos.z < -0.4f)
mat->pos.z += (2.5f * mat->pos.z + 2.0f) * frame->resetPos.z;
else
mat->pos.z += frame->resetPos.z;
+ }
mat->pos.x += frame->resetPos.x;
mat->pos.y += frame->resetPos.y;
}
@@ -361,11 +362,12 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
xform->t.x = pos.x - transx;
xform->t.y = pos.y - transy;
xform->t.z = pos.z;
- if(xform->t.z >= -0.8f)
+ if(xform->t.z >= -0.8f) {
if(xform->t.z < -0.4f)
xform->t.z += (2.5f * xform->t.z + 2.0f) * frame->resetPos.z;
else
xform->t.z += frame->resetPos.z;
+ }
xform->t.x += frame->resetPos.x;
xform->t.y += frame->resetPos.y;
}