MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ExecuteSaveLevelChanges

Method ExecuteSaveLevelChanges

Source/Editors/map_editor.cpp:2949–2966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2947}
2948
2949void MapEditor::ExecuteSaveLevelChanges() {
2950 if (terrain_preview_mode) {
2951 DisplayMessage("Mesh preview will not be saved", "Terrain preview mode is enabled, the previewed terrain will not be saved and the old one will be restored");
2952 if (terrain_preview) {
2953 scenegraph_->UnlinkObject(terrain_preview);
2954 delete terrain_preview;
2955 terrain_preview = NULL;
2956 } else {
2957 TerrainObject* terrain = scenegraph_->terrain_object_;
2958 terrain->SetTerrainColorTexture(real_terrain_info.colormap.c_str());
2959 terrain->SetTerrainWeightTexture(real_terrain_info.weightmap.c_str());
2960 terrain->SetTerrainDetailTextures(real_terrain_info.detail_map_info);
2961 }
2962 ExitTerrainPreviewMode();
2963 }
2964
2965 SaveLevel(LevelLoader::kSaveInPlace);
2966}
2967
2968static void GetCamBasis(Basis* basis) {
2969 Camera* cam = ActiveCameras::Get();

Callers 1

DrawImGuiFunction · 0.80

Calls 6

DisplayMessageFunction · 0.85
UnlinkObjectMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected