If it doesn't exist, reformat Matt's hard disk, even if he is in Boston. deletes the currently selected object from the mine.
| 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. |
| 516 | void 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. |
| 542 | void HObjectSetDefault() { |
no test coverage detected