Advertisement
dmitrysenkovich

Untitled

Aug 26th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.10 KB | None | 0 0
  1. Index: AppEnv.cs
  2. ===================================================================
  3. --- AppEnv.cs   (revision 6363)
  4. +++ AppEnv.cs   (working copy)
  5. @@ -235,6 +235,24 @@
  6.              set { vars["VECTORDATA5_OUTPUT_LNKD"].Value = value; }
  7.          }
  8.  
  9. +        public string surfaceL0OutputDir = string.Empty;
  10. +
  11. +        public string SurfaceL0OutputDir
  12. +        {
  13. +            get
  14. +            {
  15. +                if (customTerrainName != null)
  16. +                {
  17. +                    if (terrainConfig.VectorData5)
  18. +                        return (surfaceL0OutputDir + @"export-lsa4-with-vector-data-5\");
  19. +                    else
  20. +                        return (surfaceL0OutputDir + @"export-surface\");
  21. +                }
  22. +
  23. +                return null;
  24. +            }
  25. +        }
  26. +
  27.          public string RrrSceneOutput
  28.          {
  29.              get { return vars["RRR_SCENE_OUTPUT"].StringValue; }
  30. Index: Operations/ExportNavigationMesh.cs
  31. ===================================================================
  32. --- Operations/ExportNavigationMesh.cs  (revision 6363)
  33. +++ Operations/ExportNavigationMesh.cs  (working copy)
  34. @@ -14,5 +14,20 @@
  35.              : base("Navigation Mesh")
  36.          {
  37.          }
  38. +
  39. +        public override bool RunImp(Task task, AppEnv appEnv, bool withChildren)
  40. +        {
  41. +
  42. +            Command command = new Command();
  43. +            command.Type = Command.CommandType.EDTU4;
  44. +            command.EdtuCommand = "build-navigation-mesh";
  45. +            string surfaceL0filename = appEnv.SurfaceL0OutputDir + "surface-L0.ofsh";
  46. +            string navMeshfilename = appEnv.terrainConfig.TerrainCfgDir.AbsoluteByRelativeTcons() + "navigationMesh.navmesh";
  47. +            command.Args = surfaceL0filename + " " + navMeshfilename;
  48. +            command.ErrorsFile = appEnv.SurfaceL0OutputDir + @"export-vector-data_errors.ofsh";
  49. +            task.AddCommand(command);
  50. +
  51. +            return true;
  52. +        }
  53.      }
  54.  }
  55. Index: Operations/TerrainConfig.cs
  56. ===================================================================
  57. --- Operations/TerrainConfig.cs (revision 6363)
  58. +++ Operations/TerrainConfig.cs (working copy)
  59. @@ -305,6 +305,7 @@
  60.              AddNewFileVariableIfNotFound(appEnv.vars, "RRR_OUTPUT");
  61.              AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT");
  62.              AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT_LNKD");
  63. +            AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_L0_OUTPUT");
  64.              AddNewFileVariableIfNotFound(appEnv.vars, "RRR_SCENE_OUTPUT");
  65.              AddNewFileVariableIfNotFound(appEnv.vars, "RRR_DETAILS_OUTPUT");
  66.              AddNewFileVariableIfNotFound(appEnv.vars, "RRR_POWERLINES_OUTPUT");
  67. @@ -403,6 +404,8 @@
  68.              appEnv.ReferenceExternals = terrainCfgDir + @"SurfaceDetails\" + appEnv.TerrainName + ".external.ofsh";
  69.              appEnv.TreePreviewArchive = terrainCfgDir + @"SurfaceDetails\Trees.preview.zip";
  70.  
  71. +            appEnv.surfaceL0OutputDir = appEnv.TConsPath + @"\Temp\" + appEnv.TerrainName + @"\";
  72. +
  73.              System.IO.DirectoryInfo dirInfo = null;
  74.              try
  75.              {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement