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

Method OnGoto

editor/ObjectListDialog.cpp:380–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380void CObjectListDialog::OnGoto() {
381 int objhandle = GetObjectSelected();
382 object *obj = NULL;
383
384 if (objhandle > -1) {
385 obj = ObjGet(objhandle);
386 }
387
388 if (obj) {
389 if (OBJECT_OUTSIDE(obj) && Editor_view_mode != VM_TERRAIN) {
390 SetViewMode(VM_TERRAIN);
391 } else if (!OBJECT_OUTSIDE(obj) && Editor_view_mode != VM_MINE) {
392 SetViewMode(VM_MINE);
393 }
394 ObjSetPos(Viewer_object, &obj->pos, obj->roomnum, &obj->orient, false);
395 EditorStatus("Viewer moved to object %d", OBJNUM(obj));
396 Viewer_moved = 1;
397 }
398}
399
400void CObjectListDialog::OnDelete() {
401 int objhandle = GetObjectSelected();

Callers

nothing calls this directly

Calls 4

ObjGetFunction · 0.85
SetViewModeFunction · 0.85
ObjSetPosFunction · 0.85
EditorStatusFunction · 0.85

Tested by

no test coverage detected