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

Method OnJumpToStartPos

editor/ObjectDialog.cpp:1037–1059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037void CObjectDialog::OnJumpToStartPos() {
1038 char str[255];
1039 int found_obj = -1;
1040 int highest = -1;
1041 for (int i = 0; i <= Highest_object_index && found_obj == -1; i++) {
1042 if (Objects[i].type == OBJ_PLAYER) {
1043 if (Objects[i].id > highest)
1044 highest = Objects[i].id;
1045
1046 if (Objects[i].id == m_current_start_pos) {
1047 found_obj = i;
1048 }
1049 }
1050 }
1051
1052 if (found_obj == -1) {
1053 sprintf(str, "There was no player defined for this start position. The highest numbered player is #%d.", highest);
1054 OutrageMessageBox(str);
1055 } else {
1056 MoveViewer(&Objects[found_obj].pos, Objects[found_obj].roomnum, &Objects[found_obj].orient);
1057 TV_changed = 1;
1058 }
1059}
1060
1061void CObjectDialog::OnRedCheck() {
1062 int cur = m_current_start_pos;

Callers

nothing calls this directly

Calls 2

OutrageMessageBoxFunction · 0.85
MoveViewerFunction · 0.85

Tested by

no test coverage detected