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

Method OnRoomDeleteFace

editor/editorView.cpp:1015–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015void CEditorView::OnRoomDeleteFace() {
1016 if (Curroomp->faces[Curface].portal_num != -1) {
1017 OutrageMessageBox("You cannot delete a face that is part of a portal.");
1018 return;
1019 }
1020
1021 if (Curroomp->num_faces == 1) {
1022 OutrageMessageBox("You cannot delete the only face in a room.");
1023 return;
1024 }
1025
1026 if (OutrageMessageBox(MBOX_YESNO, "Are you sure you want to delete Face %d from Room %d?", Curface,
1027 ROOMNUM(Curroomp)) != IDYES)
1028 return;
1029
1030 DeleteRoomFace(Curroomp, Curface);
1031
1032 EditorStatus("Face %d deleted from room %d.", ROOMNUM(Curroomp), Curface);
1033
1034 if (Curface == Curroomp->num_faces)
1035 Curface--;
1036
1037 if (Markedface == Curroomp->num_faces)
1038 Markedface--;
1039
1040 World_changed = 1;
1041}
1042
1043void CEditorView::OnRoomSnapPlacedRoom() {
1044 ASSERT((Placed_room != -1) || (Placed_group != NULL));

Callers

nothing calls this directly

Calls 3

OutrageMessageBoxFunction · 0.85
DeleteRoomFaceFunction · 0.85
EditorStatusFunction · 0.85

Tested by

no test coverage detected