MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / process

Method process

plugins/serverSideBotSample/serverSideBotSample.cpp:211–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void 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: ***

Callers 1

thinkMethod · 0.45

Calls 6

bz_debugMessagefFunction · 0.85
bz_addServerSidePlayerFunction · 0.85
bz_setMaxWaitTimeFunction · 0.85
sizeMethod · 0.45
updateMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected