| 3274 | World_changed = 1; |
| 3275 | } |
| 3276 | |
| 3277 | void CMainFrame::OnObjectPlaceCameraAtCurrentFace() { |
| 3278 | vector pos; |
| 3279 | matrix orient; |
| 3280 | int objnum; |
| 3281 | int roomnum; |
| 3282 | |
| 3283 | ComputeCenterPointOnFace(&pos, Curroomp, Curface); |
| 3284 | vm_VectorAngleToMatrix(&orient, &Curroomp->faces[Curface].normal, 0); |
| 3285 | |
| 3286 | if (Curroomp->flags & RF_EXTERNAL) { |
| 3287 | roomnum = GetTerrainRoomFromPos(&pos); |
| 3288 | } else { |
| 3289 | roomnum = ROOMNUM(Curroomp); |
| 3290 | } |
| 3291 | |
| 3292 | objnum = ObjCreate(OBJ_CAMERA, 0, roomnum, &pos, &orient); |
| 3293 | |
| 3294 | if (objnum == -1) { |
| 3295 | Int3(); |
| 3296 | return; |
| 3297 | } |
| 3298 | |
| 3299 | EditorStatus("Camera created as object %d\n", objnum); |
| 3300 | |
| 3301 | World_changed = 1; |
| 3302 | } |
| 3303 | |
| 3304 | void CMainFrame::OnObjectSetViewerFromCamera() { |
nothing calls this directly
no test coverage detected