| 487 | } |
| 488 | |
| 489 | void CPathPadDialog::OnPathMoveObjectButton() { |
| 490 | if (Num_game_paths < 1) { |
| 491 | MessageBox("There are no paths to operate on."); |
| 492 | return; |
| 493 | } |
| 494 | |
| 495 | if (Cur_object_index != -1) // we have a selected object |
| 496 | { |
| 497 | |
| 498 | int p = D3EditState.current_path; |
| 499 | int n = D3EditState.current_node; |
| 500 | |
| 501 | game_path *gp = &GamePaths[p]; |
| 502 | |
| 503 | ObjSetPos(&Objects[Cur_object_index], &gp->pathnodes[n].pos, gp->pathnodes[n].roomnum, NULL, false); |
| 504 | |
| 505 | matrix node_orient; |
| 506 | |
| 507 | vm_VectorToMatrix(&node_orient, &gp->pathnodes[n].fvec, &gp->pathnodes[n].uvec, NULL); |
| 508 | ObjSetOrient(&Objects[Cur_object_index], &node_orient); |
| 509 | |
| 510 | World_changed = 1; |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | void CPathPadDialog::OnPathReorientViewerButton() { |
| 515 | if (Num_game_paths < 1) { |
nothing calls this directly
no test coverage detected