turns the given player into AI mode or back to regular control mode
| 3438 | |
| 3439 | // turns the given player into AI mode or back to regular control mode |
| 3440 | void osipf_SetPlayerControlMode(int pnum, bool set_to_ai) { |
| 3441 | ASSERT(pnum >= 0 && pnum < MAX_PLAYERS); |
| 3442 | if (pnum < 0 || pnum >= MAX_PLAYERS) |
| 3443 | return; |
| 3444 | |
| 3445 | if (set_to_ai) { |
| 3446 | if (pnum != Player_num) |
| 3447 | return; // only change it for ourselves |
| 3448 | |
| 3449 | PlayerSetControlToAI(pnum); |
| 3450 | } else { |
| 3451 | ResetPlayerControlType(pnum); |
| 3452 | } |
| 3453 | } |
| 3454 | |
| 3455 | // gets information about a path point |
| 3456 | // pass NULL for parameters not needed. |
no test coverage detected