Returns the camera position to the player
| 244 | |
| 245 | // Returns the camera position to the player |
| 246 | void TCAMCenterOnPlayer() { |
| 247 | |
| 248 | vm_MakeZero(&AM_view_pos); |
| 249 | vm_MakeIdentity(&AM_view_orient); |
| 250 | |
| 251 | matrix newmat; |
| 252 | angvec heading; |
| 253 | AM_view_pos = Viewer_object->pos - (Viewer_object->orient.fvec * 10); |
| 254 | vm_ExtractAnglesFromMatrix(&heading, &Player_object->orient); |
| 255 | |
| 256 | vm_AnglesToMatrix(&newmat, 0, heading.h, 0); |
| 257 | AM_view_orient = newmat; |
| 258 | |
| 259 | AM_heading = heading.h; |
| 260 | AM_pitch = heading.p; |
| 261 | } |
| 262 | |
| 263 | // This is the function called by TelCom |
| 264 | // return true if TelCom should exit to TelCom Main Menu |
no test coverage detected