mirror of
https://github.com/halpz/re3.git
synced 2025-07-06 20:38:54 +00:00
Merge pull request #638 from erorcun/miami
CWanted, anim fix, ped objs renaming, remove III beta features
This commit is contained in:
@ -44,7 +44,7 @@ CAnimBlendHierarchy::CalcTotalTime(void)
|
||||
#endif
|
||||
|
||||
totalLength = Max(totalLength, sequences[i].GetKeyFrame(sequences[i].numFrames-1)->deltaTime);
|
||||
for(j = sequences[i].numFrames-1; j > 0; j--){
|
||||
for(j = sequences[i].numFrames-1; j >= 1; j--){
|
||||
KeyFrame *kf1 = sequences[i].GetKeyFrame(j);
|
||||
KeyFrame *kf2 = sequences[i].GetKeyFrame(j-1);
|
||||
kf1->deltaTime -= kf2->deltaTime;
|
||||
@ -66,7 +66,7 @@ CAnimBlendHierarchy::CalcTotalTimeCompressed(void)
|
||||
#endif
|
||||
|
||||
totalLength = Max(totalLength, sequences[i].GetKeyFrameCompressed(sequences[i].numFrames-1)->deltaTime/60.0f);
|
||||
for(j = sequences[i].numFrames-1; j > 0; j--){
|
||||
for(j = sequences[i].numFrames-1; j >= 1; j--){
|
||||
KeyFrame *kf1 = sequences[i].GetKeyFrameCompressed(j);
|
||||
KeyFrame *kf2 = sequences[i].GetKeyFrameCompressed(j-1);
|
||||
kf1->deltaTime -= kf2->deltaTime;
|
||||
|
@ -97,10 +97,8 @@ CAnimBlendNode::FindKeyFrame(float t)
|
||||
if(sequence->numFrames == 1){
|
||||
remainingTime = 0.0f;
|
||||
}else{
|
||||
frameA++;
|
||||
|
||||
// advance until t is between frameB and frameA
|
||||
while(t > sequence->GetKeyFrame(frameA)->deltaTime){
|
||||
while(t > sequence->GetKeyFrame(++frameA)->deltaTime){
|
||||
t -= sequence->GetKeyFrame(frameA)->deltaTime;
|
||||
if(frameA + 1 >= sequence->numFrames){
|
||||
// reached end of animation
|
||||
|
@ -1004,9 +1004,10 @@ CAnimManager::UncompressAnimation(CAnimBlendHierarchy *hier)
|
||||
}else{
|
||||
CLink<CAnimBlendHierarchy*> *link = ms_animCache.Insert(hier);
|
||||
if(link == nil){
|
||||
ms_animCache.tail.prev->item->RemoveUncompressedData();
|
||||
CAnimBlendHierarchy *lastHier = ms_animCache.tail.prev->item;
|
||||
lastHier->RemoveUncompressedData();
|
||||
ms_animCache.Remove(ms_animCache.tail.prev);
|
||||
ms_animCache.tail.prev->item->linkPtr = nil;
|
||||
lastHier->linkPtr = nil;
|
||||
link = ms_animCache.Insert(hier);
|
||||
}
|
||||
hier->linkPtr = link;
|
||||
|
Reference in New Issue
Block a user