MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnPathMoveObjectButton

Method OnPathMoveObjectButton

editor/PathPadDialog.cpp:489–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void 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
514void CPathPadDialog::OnPathReorientViewerButton() {
515 if (Num_game_paths < 1) {

Callers

nothing calls this directly

Calls 3

ObjSetPosFunction · 0.85
ObjSetOrientFunction · 0.85
vm_VectorToMatrixFunction · 0.50

Tested by

no test coverage detected