| 189 | } |
| 190 | |
| 191 | void SimpleBotHandler::playerSpawned(int player, float pos[3], float rot) { |
| 192 | bz_ServerSidePlayerHandler::playerSpawned(player, pos, rot); |
| 193 | |
| 194 | bz_debugMessage(3, "SimpleBotHandler::process bz_ePlayerSpawnEvent"); |
| 195 | |
| 196 | if (player == playerID) { |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | bz_BasePlayerRecord* playerInfo = bz_getPlayerByIndex(player); |
| 201 | std::string message; |
| 202 | message = bz_format("well, look who dropped in...%s", playerInfo->callsign.c_str()); |
| 203 | bz_sendTextMessage(playerID, BZ_ALLUSERS, message.c_str()); |
| 204 | |
| 205 | // add the point as a waypoint |
| 206 | waypoints.push_back(Waypoint(*this, pos)); |
| 207 | |
| 208 | bz_freePlayerRecord(playerInfo); |
| 209 | } |
| 210 | |
| 211 | void EventHandler::process(bz_EventData* eventData) { |
| 212 | if (eventData->eventType == bz_eTickEvent) { |
nothing calls this directly
no test coverage detected