| 699 | return forceVector[id]; |
| 700 | } |
| 701 | int Server::getPlayerID(Player player) |
| 702 | { |
| 703 | if ( !player ) |
| 704 | return -1; |
| 705 | if (playerLookup.find(player) == playerLookup.end()) |
| 706 | { |
| 707 | playerLookup[player] = (int)(playerVector.size()); |
| 708 | playerVector.push_back(player); |
| 709 | } |
| 710 | return playerLookup[player]; |
| 711 | } |
| 712 | Player Server::getPlayer(int id) const |
| 713 | { |
| 714 | if (playerVector.size() <= static_cast<unsigned>(id)) |
no test coverage detected