Advertisement
fastman92

GTA SA CCarCtrl::ChooseCarModelToLoad

Jan 25th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. signed int __cdecl CCarCtrl::ChooseCarModelToLoad(int group)
  2. {
  3. signed int v1; // ebp@1
  4. signed int result; // eax@2
  5.  
  6. v1 = 0;
  7. while ( 1 )
  8. {
  9. result = CPopulation::m_CarGroups.POPCYCLE_GROUP_WORKERS[23 * group
  10. + (unsigned __int64)((long double)CPopulation::m_nNumCarsInGroup[group]
  11. * (long double)(unsigned __int16)rand()
  12. * 0.000030517578)];
  13. if ( *(&CStreaming::ms_aInfoForModel.uiLoadFlag + 20 * result) != 1 )
  14. break;
  15. ++v1;
  16. if ( v1 >= 16 )
  17. return -1;
  18. }
  19. return result;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement