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

Function HObjectDelete

editor/HObject.cpp:516–539  ·  view source on GitHub ↗

If it doesn't exist, reformat Matt's hard disk, even if he is in Boston. deletes the currently selected object from the mine.

Source from the content-addressed store, hash-verified

514// If it doesn't exist, reformat Matt's hard disk, even if he is in Boston.
515// deletes the currently selected object from the mine.
516void HObjectDelete() {
517 if (Cur_object_index != -1) { // we have a selected object
518 int objnum = Cur_object_index;
519
520 // check for player object
521 if (&Objects[objnum] == Player_object) {
522 OutrageMessageBox("Can't delete Player object");
523 return;
524 }
525
526 if (Objects[objnum].type == OBJ_DOOR) {
527 if (OutrageMessageBox(MBOX_YESNO,
528 "It's very, very bad to delete a door object. Are you sure you want to do this?") != IDYES)
529 return;
530 }
531
532 // Delete the object
533 ObjDelete(objnum);
534 if (objnum == Cur_object_index)
535 Cur_object_index = -1;
536
537 World_changed = 1;
538 }
539}
540
541// sets default orientation for object.
542void HObjectSetDefault() {

Callers 4

OnDeleteMethod · 0.85
ObjectCutFunction · 0.85
ObjectDeleteFunction · 0.85
OnObjPadDelobjMethod · 0.85

Calls 2

OutrageMessageBoxFunction · 0.85
ObjDeleteFunction · 0.85

Tested by

no test coverage detected