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

Function SelectNextViewer

editor/HView.cpp:353–374  ·  view source on GitHub ↗

Select next viewer

Source from the content-addressed store, hash-verified

351
352// Select next viewer
353void SelectNextViewer() {
354 int objnum;
355
356 if (Editor_view_mode == VM_ROOM) {
357 EditorStatus("There is only one viewer in Room View");
358 return;
359 }
360
361 ASSERT(Viewer_object != NULL);
362
363 objnum = FindNextViewerObject(Viewer_object->id + 1, -1);
364
365 ASSERT(objnum != -1);
366
367 if (objnum == OBJNUM(Viewer_object)) {
368 EditorStatus("No other viewers.");
369 return;
370 }
371
372 SetViewer(objnum);
373 EditorStatus("Viewer %d selected.", GetViewerNum());
374}
375
376// Deletes the current viewer object
377void DeleteViewer() {

Callers 2

OnViewNextviewerMethod · 0.85
DeleteRoomFromMineFunction · 0.85

Calls 4

EditorStatusFunction · 0.85
FindNextViewerObjectFunction · 0.85
SetViewerFunction · 0.85
GetViewerNumFunction · 0.85

Tested by

no test coverage detected