| 1429 | } |
| 1430 | |
| 1431 | void xAnimPlaySetState(xAnimSingle* single, xAnimState* state, F32 startTime) |
| 1432 | { |
| 1433 | EffectSingleStop(single); |
| 1434 | if (single->Blend) |
| 1435 | { |
| 1436 | EffectSingleStop(single->Blend); |
| 1437 | single->Blend->State = NULL; |
| 1438 | } |
| 1439 | |
| 1440 | single->State = state; |
| 1441 | if (state == NULL) |
| 1442 | { |
| 1443 | return; |
| 1444 | } |
| 1445 | |
| 1446 | single->Time = |
| 1447 | (state->Flags & 0x100 && startTime == 0.0f) ? state->Data->Duration * xurand() : startTime; |
| 1448 | single->CurrentSpeed = state->Speed; |
| 1449 | single->BilinearLerp[0] = 0.0f; |
| 1450 | single->BilinearLerp[1] = 0.0f; |
| 1451 | single->Effect = NULL; |
| 1452 | memset(single->ActiveList, 0, single->ActiveCount * sizeof(xAnimActiveEffect)); |
| 1453 | single->LastTime = -1.0f; |
| 1454 | single->Sync = NULL; |
| 1455 | |
| 1456 | if (single->Tran != NULL && single->Tran->Flags & 0x2) |
| 1457 | { |
| 1458 | xMemPoolFree(&sxAnimTempTranPool, single->Tran); |
| 1459 | } |
| 1460 | |
| 1461 | single->Tran = NULL; |
| 1462 | single->BlendFactor = 0.0f; |
| 1463 | } |
| 1464 | |
| 1465 | static void SingleUpdate(xAnimSingle* single, F32 timeDelta) |
| 1466 | { |
no test coverage detected