Returns the goal room of the passed in team
| 3330 | |
| 3331 | // Returns the goal room of the passed in team |
| 3332 | int GetGoalRoomForTeam(int teamnum) { |
| 3333 | ASSERT(teamnum >= 0 && teamnum <= 3); |
| 3334 | int flags[] = {RF_GOAL1, RF_GOAL2, RF_GOAL3, RF_GOAL4}; |
| 3335 | |
| 3336 | for (int i = 0; i <= Highest_room_index; i++) { |
| 3337 | if (Rooms[i].used && (Rooms[i].flags & flags[teamnum])) { |
| 3338 | return i; |
| 3339 | } |
| 3340 | } |
| 3341 | |
| 3342 | return -1; // No goal for this team! |
| 3343 | } |
| 3344 | |
| 3345 | // Returns the goal room of the passed in player |
| 3346 | int GetGoalRoomForPlayer(int slot) { |
no outgoing calls
no test coverage detected