| 971 | } |
| 972 | |
| 973 | void CObjectDialog::OnObjpadResetCurobjHeight() { |
| 974 | if (Cur_object_index == -1) { |
| 975 | OutrageMessageBox("You must have a current object for this operation."); |
| 976 | return; |
| 977 | } |
| 978 | |
| 979 | object *objp = &Objects[Cur_object_index]; |
| 980 | |
| 981 | // Make sure object is outside |
| 982 | if (!OBJECT_OUTSIDE(objp)) { |
| 983 | OutrageMessageBox("The object must be on the terrain this operation."); |
| 984 | return; |
| 985 | } |
| 986 | |
| 987 | // Make sure object has a ground plane |
| 988 | if (!((objp->render_type == RT_POLYOBJ) && ((GetPolymodelPointer(objp->rtype.pobj_info.model_num))->n_ground))) { |
| 989 | OutrageMessageBox("The object must have a ground plane for this operation."); |
| 990 | return; |
| 991 | } |
| 992 | |
| 993 | ResetGroundObject(objp); |
| 994 | } |
| 995 | |
| 996 | void CObjectDialog::OnObjpadResetAllObjHeights() { |
| 997 | object *objp; |
nothing calls this directly
no test coverage detected