Advertisement
Guest User

Untitled

a guest
Feb 15th, 2014
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. void TWorld::ProcessShipSpawn() {
  2.     for (size_t i = 0; i < (size_t)Planets.size(); ++i) {
  3.         TPlanet& planet = Planets[i];
  4.         if (!planet.SpawnQueue.empty()) {
  5.             if (planet.SpawnCounter % 4 == 0) {
  6.                 Ships.push_back(planet.SpawnQueue.back());
  7.                 planet.SpawnQueue.pop_back();
  8.                 planet.SpawnCounter = 0;
  9.             }
  10.             ++planet.SpawnCounter;
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement