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

Method OnObjpadResetCurobjHeight

editor/ObjectDialog.cpp:973–994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973void 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
996void CObjectDialog::OnObjpadResetAllObjHeights() {
997 object *objp;

Callers

nothing calls this directly

Calls 3

OutrageMessageBoxFunction · 0.85
GetPolymodelPointerFunction · 0.85
ResetGroundObjectFunction · 0.85

Tested by

no test coverage detected