summaryrefslogtreecommitdiffstats
path: root/src/animation/FrameUpdate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation/FrameUpdate.cpp')
-rw-r--r--src/animation/FrameUpdate.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/animation/FrameUpdate.cpp b/src/animation/FrameUpdate.cpp
index 8697e7c6..03e67017 100644
--- a/src/animation/FrameUpdate.cpp
+++ b/src/animation/FrameUpdate.cpp
@@ -6,6 +6,8 @@
#include "AnimBlendAssociation.h"
#include "RpAnimBlend.h"
+//--MIAMI: file done
+
CAnimBlendClumpData *gpAnimBlendClump;
// PS2 names without "NonSkinned"
@@ -17,7 +19,6 @@ void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
void FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
void FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
-
void
FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg)
{
@@ -227,8 +228,6 @@ FrameUpdateCallBackWith3dVelocityExtractionNonSkinned(AnimBlendFrameData *frame,
RwMatrixUpdate(mat);
}
-#ifdef PED_SKIN
-
void
FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
{
@@ -258,11 +257,9 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
(*node)->Update(vec, q, 1.0f-totalBlendAmount);
if((*node)->sequence->HasTranslation())
pos += vec;
-#ifdef FIX_BUGS
if(DotProduct(rot, q) < 0.0f)
rot -= q;
else
-#endif
rot += q;
}
++*node;
@@ -318,11 +315,9 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
for(node = updateData->nodes; *node; node++){
if((*node)->sequence){
bool nodelooped = (*node)->Update(vec, q, 1.0f-totalBlendAmount);
-#ifdef FIX_BUGS
if(DotProduct(rot, q) < 0.0f)
rot -= q;
else
-#endif
rot += q;
if((*node)->sequence->HasTranslation()){
pos += vec;
@@ -440,4 +435,9 @@ FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, vo
}
}
-#endif
+void
+FrameUpdateCallBackOffscreen(AnimBlendFrameData *frame, void *arg)
+{
+ if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION && gpAnimBlendClump->velocity)
+ FrameUpdateCallBackWithVelocityExtractionSkinned(frame, arg);
+}