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

Method OnMvtnButton

editor/PathPadDialog.cpp:919–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919void CPathPadDialog::OnMvtnButton() {
920 vector pos;
921 int roomnum;
922
923 bn_list *bnlist = BNode_GetBNListPtr(BNode_current_room);
924 if (!bnlist)
925 return;
926
927 pos = bnlist->nodes[BNode_current_id].pos;
928
929 if (BNode_current_room >= 0 && BNode_current_room <= Highest_room_index) {
930 roomnum = BNode_current_room;
931 } else {
932 roomnum = GetTerrainRoomFromPos(&pos);
933 }
934
935 BNode_current_id,
936
937 ObjSetPos(Viewer_object, &pos, roomnum, NULL, false);
938 World_changed = 1;
939}
940
941void CPathPadDialog::OnAerButton() {
942 bn_list *bnlist = BNode_GetBNListPtr(BNode_current_room);

Callers

nothing calls this directly

Calls 3

BNode_GetBNListPtrFunction · 0.85
GetTerrainRoomFromPosFunction · 0.85
ObjSetPosFunction · 0.85

Tested by

no test coverage detected