Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int DIVISION_OF_LOAD = 3; //or whatever
- int offset = 0;
- for(int ai = offset; ai < numOfAI; ai+=DIVISON_OF_LOAD){
- aiList[ai].update();
- } //or whatever your update code is
- offset++;
- if(offset > DIVISON_OF_LOAD){
- offset = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement