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

Function SetViewer

editor/HView.cpp:317–330  ·  view source on GitHub ↗

Set the specified object to be the viewer

Source from the content-addressed store, hash-verified

315
316// Set the specified object to be the viewer
317void SetViewer(int objnum) {
318 Viewer_object = &Objects[objnum];
319
320 if (Editor_view_mode != VM_ROOM)
321 Editor_viewer_id = Viewer_object->id;
322
323 if ((Editor_view_mode == VM_MINE) && OBJECT_OUTSIDE(Viewer_object))
324 SetViewMode(VM_TERRAIN);
325
326 if ((Editor_view_mode == VM_TERRAIN) && !(OBJECT_OUTSIDE(Viewer_object)))
327 SetViewMode(VM_MINE);
328
329 State_changed = Viewer_moved = 1;
330}
331
332// Creates a new viewer object. Copies position & orientation from the current viewer
333void CreateNewViewer() {

Callers 4

CreateNewViewerFunction · 0.85
SelectNextViewerFunction · 0.85
DeleteViewerFunction · 0.85
SetEditorViewerFunction · 0.85

Calls 1

SetViewModeFunction · 0.85

Tested by

no test coverage detected