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

Method OnObjpadResetAllObjHeights

editor/ObjectDialog.cpp:996–1017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994}
995
996void CObjectDialog::OnObjpadResetAllObjHeights() {
997 object *objp;
998 int i;
999 int n_moved = 0;
1000
1001 for (i = 0, objp = Objects; i <= Highest_object_index; i++, objp++) {
1002
1003 // Make sure object is outside
1004 if (!OBJECT_OUTSIDE(objp))
1005 continue;
1006
1007 // Make sure object has a ground plane
1008 if (!((objp->render_type == RT_POLYOBJ) && ((GetPolymodelPointer(objp->rtype.pobj_info.model_num))->n_ground)))
1009 continue;
1010
1011 // Do it
1012 ResetGroundObject(objp);
1013 n_moved++;
1014 }
1015
1016 EditorStatus("%d objects adjusted.", n_moved);
1017}
1018
1019void CObjectDialog::OnPrevStartPositon() {
1020 if (m_current_start_pos == 0)

Callers

nothing calls this directly

Calls 3

GetPolymodelPointerFunction · 0.85
ResetGroundObjectFunction · 0.85
EditorStatusFunction · 0.85

Tested by

no test coverage detected