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

Method OnObjectPlaceObject

editor/ObjectDialog.cpp:709–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709void CObjectDialog::OnObjectPlaceObject() {
710 int objid = -1;
711
712 if (D3EditState.current_obj_type == OBJ_PLAYER) {
713 objid = GetFreePlayerIndex();
714 if (objid == -1) {
715 mprintf(0, "No more player slots! You already have %d players in this level!\n", MAX_NET_PLAYERS);
716 return;
717 }
718
719 } else
720 objid = GetCurrentIndex();
721
722 ASSERT(objid > -1);
723
724 if (!HObjectPlace(D3EditState.current_obj_type, objid)) {
725 mprintf(0, "Attempt to place object outside mine failed!\n");
726 }
727}
728
729void CObjectDialog::OnSelchangeComboObjType() {
730 // make sure to save the old item start value.

Callers

nothing calls this directly

Calls 2

GetCurrentIndexFunction · 0.85
HObjectPlaceFunction · 0.85

Tested by

no test coverage detected