Advertisement
bigjfdjew

Untitled

May 2nd, 2017
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. inline int Interp_Interpolate(VarMapping_t *map, float currentTime)
  2. {
  3. int bNoMoreChanges = 1;
  4. if (currentTime < map->m_lastInterpolationTime)
  5. {
  6. for (int i = 0; i < map->m_nInterpolatedEntries; i++)
  7. {
  8. VarMapEntry_t *e = &map->m_Entries[i];
  9.  
  10. e->m_bNeedsToInterpolate = true;
  11. }
  12. }
  13. map->m_lastInterpolationTime = currentTime;
  14.  
  15. for (int i = 0; i < map->m_nInterpolatedEntries; i++)
  16. {
  17. VarMapEntry_t *e = &map->m_Entries[i];
  18.  
  19. if (!e->m_bNeedsToInterpolate)
  20. continue;
  21.  
  22. e->m_bNeedsToInterpolate = false;
  23. }
  24.  
  25. return bNoMoreChanges;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement