| 209 | } |
| 210 | |
| 211 | void EventHandler::process(bz_EventData* eventData) { |
| 212 | if (eventData->eventType == bz_eTickEvent) { |
| 213 | for (size_t i = 0; i < bots.size(); i++) { |
| 214 | bots[i]->update(); |
| 215 | } |
| 216 | } |
| 217 | else { |
| 218 | bz_debugMessagef(2, "adding %d simple bot(s), may the gods have mercy on your soul", numBots); |
| 219 | for (int i = 0; i < numBots; i++) { |
| 220 | SimpleBotHandler* bot = new SimpleBotHandler; |
| 221 | bz_addServerSidePlayer(bot); |
| 222 | bots.push_back(bot); |
| 223 | } |
| 224 | |
| 225 | bz_setMaxWaitTime(0.01f, "StupidSampleBot"); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | |
| 230 | // Local Variables: *** |
no test coverage detected