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

Method OnTrigDelete

editor/TriggerDialog.cpp:450–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450void CTriggerDialog::OnTrigDelete() {
451 ASSERT(Current_trigger != -1);
452
453 if (OutrageMessageBox(MBOX_YESNO, "Are you sure you want to delete the current trigger?") != IDYES)
454 return;
455
456 trigger *tp = &Triggers[Current_trigger];
457 room *rp = &Rooms[tp->roomnum];
458 int facenum = tp->facenum;
459
460 // Delete the trigger
461 DeleteTrigger(Current_trigger);
462
463 // Delete face if this was a floating trigger
464 if (rp->faces[facenum].flags & FF_FLOATING_TRIG) {
465 DeleteRoomFace(rp, facenum);
466 if (Curface == facenum)
467 Curface = (facenum + 1) % rp->num_faces;
468 }
469
470 if (Current_trigger == Num_triggers)
471 Current_trigger--;
472
473 UpdateDialog();
474
475 World_changed = 1;
476}
477
478void CTriggerDialog::OnTrigAddToCurportal() {
479 ASSERT(Curportal != -1);

Callers

nothing calls this directly

Calls 3

OutrageMessageBoxFunction · 0.85
DeleteTriggerFunction · 0.85
DeleteRoomFaceFunction · 0.85

Tested by

no test coverage detected