Advertisement
lilggamegenuis

division of load

Jul 5th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. const int DIVISION_OF_LOAD = 3; //or whatever
  2. int offset = 0;
  3. for(int ai = offset; ai < numOfAI; ai+=DIVISON_OF_LOAD){
  4.     aiList[ai].update();
  5. } //or whatever your update code is
  6. offset++;
  7. if(offset > DIVISON_OF_LOAD){
  8.     offset = 0;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement