mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed interpolation issue
This commit is contained in:
parent
ca34d8de85
commit
ac7ec18a37
1 changed files with 4 additions and 2 deletions
|
@ -440,7 +440,9 @@ void CG_ModelAnim(centity_t* cent, qboolean bDoShaderTime)
|
|||
float animLength;
|
||||
float t1, t2;
|
||||
|
||||
t = (cg.time - cg.snap->serverTime) / (cg.nextSnap->serverTime - cg.snap->serverTime);
|
||||
t1 = cg.time - cg.snap->serverTime;
|
||||
t2 = cg.nextSnap->serverTime - cg.snap->serverTime;
|
||||
t = t1 / t2;
|
||||
model.actionWeight = (sNext->actionWeight - s1->actionWeight) * t + s1->actionWeight;
|
||||
|
||||
for (i = 0; i < MAX_FRAMEINFOS; i++)
|
||||
|
@ -505,7 +507,7 @@ void CG_ModelAnim(centity_t* cent, qboolean bDoShaderTime)
|
|||
}
|
||||
|
||||
t2 = t1;
|
||||
if (t2 > animLength) {
|
||||
if (t2 < animLength) {
|
||||
t2 = animLength;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue