Just deletes the current object Returns true on success
| 103 | // Just deletes the current object |
| 104 | // Returns true on success |
| 105 | bool ObjectDelete() { |
| 106 | mprintf(0, "ObjectDelete()\n"); |
| 107 | if (Cur_object_index != -1) { |
| 108 | int objnum = Cur_object_index; |
| 109 | int num_player_objects = GetNumberPlayerObjs(); |
| 110 | if ((num_player_objects == 1) && Objects[objnum].type == OBJ_PLAYER) { |
| 111 | mprintf(0, "Oops, Can't delete the only player...sorry\n"); |
| 112 | return false; |
| 113 | } |
| 114 | HObjectDelete(); |
| 115 | return true; |
| 116 | } |
| 117 | return false; |
| 118 | } |
| 119 | |
| 120 | // Pastes the object in the Clipboard to the middle of the current segment |
| 121 | // Returns true on success |
no test coverage detected