// ------------------------------------------------------------------------------------------------------ // Place current object at center of current segment. int ObjectPlaceObject(void) { int old_cur_object_index; int rval; if (Cur_object_type == OBJ_PLAYER) { int num_players = compute_num_players(); Assert(num_players <= MAX_MULTI_PLAYERS); if (num_players > MAX_PLAYERS) editor_status("You just placed a cooperative player object"); if (num_players == MAX_MULTI_PLAYERS) { editor_status_fmt("Can't place player object. Already %i players.", MAX_MULTI_PLAYERS); return -1; } } //update_due_to_new_segment(); const auto cur_object_loc = compute_segment_center(Cursegp); old_cur_object_index = Cur_object_index; rval = place_object(Cursegp, cur_object_loc, Cur_object_type, Cur_object_id); if (old_cur_object_index != Cur_object_index) vobjptr(Cur_object_index)->rtype.pobj_info.tmap_override = -1; return rval; }
// ------------------------------------------------------------------------------------------------------ // Place current object at center of current segment. int ObjectPlaceObject(void) { int old_cur_object_index; int rval; vms_vector cur_object_loc; #ifdef SHAREWARE if (ObjType[Cur_robot_type] == OL_PLAYER) { int num_players = compute_num_players(); Assert(num_players <= MAX_PLAYERS); if (num_players == MAX_PLAYERS) { editor_status("Can't place player object. Already %i players.", MAX_PLAYERS); return -1; } } #endif #ifndef SHAREWARE if (ObjType[Cur_robot_type] == OL_PLAYER) { int num_players = compute_num_players(); Assert(num_players <= MAX_MULTI_PLAYERS); if (num_players > MAX_PLAYERS) editor_status("You just placed a cooperative player object"); if (num_players == MAX_MULTI_PLAYERS) { editor_status("Can't place player object. Already %i players.", MAX_MULTI_PLAYERS); return -1; } } #endif //update_due_to_new_segment(); compute_segment_center(&cur_object_loc, Cursegp); old_cur_object_index = Cur_object_index; rval = place_object(Cursegp, &cur_object_loc, Cur_robot_type); if (old_cur_object_index != Cur_object_index) Objects[Cur_object_index].rtype.pobj_info.tmap_override = -1; return rval; }