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

Function MoveViewer

editor/editor.cpp:1141–1151  ·  view source on GitHub ↗

Move the viewer object. This should be called whenever the viewer object is moved

Source from the content-addressed store, hash-verified

1139
1140// Move the viewer object. This should be called whenever the viewer object is moved
1141void MoveViewer(vector *pos, int roomnum, matrix *orient) {
1142 bool was_outside = (OBJECT_OUTSIDE(Viewer_object) != 0);
1143
1144 ObjSetPos(Viewer_object, pos, roomnum, orient, false);
1145
1146 if (OBJECT_OUTSIDE(Viewer_object) && !was_outside)
1147 SetViewMode(VM_TERRAIN);
1148
1149 if (!OBJECT_OUTSIDE(Viewer_object) && was_outside)
1150 SetViewMode(VM_MINE);
1151}

Callers 4

SetViewerFromRoomFaceFunction · 0.85
OnJumpToStartPosMethod · 0.85

Calls 2

ObjSetPosFunction · 0.85
SetViewModeFunction · 0.85

Tested by

no test coverage detected