| 873 | } |
| 874 | |
| 875 | void AIPlayer::followNavPath(NavPath *path) |
| 876 | { |
| 877 | if(!isServerObject()) |
| 878 | return; |
| 879 | |
| 880 | // Get rid of our current path. |
| 881 | clearPath(); |
| 882 | clearCover(); |
| 883 | clearFollow(); |
| 884 | |
| 885 | // Follow new path. |
| 886 | mPathData.path = path; |
| 887 | mPathData.owned = false; |
| 888 | // Start from 0 since we might not already be there. |
| 889 | moveToNode(0); |
| 890 | } |
| 891 | |
| 892 | DefineEngineMethod(AIPlayer, followNavPath, void, (SimObjectId obj),, |
| 893 | "@brief Tell the AIPlayer to follow a path.\n\n" |