aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorJeff Ames2008-06-25 14:30:28 +0000
committerJeff Ames2008-06-25 14:30:28 +0000
commita2b1a1787d620f70c10221545414b41ffdfe27da (patch)
treefe356d669c4dffab062192a6676acb3cf4c6641c /OpenSim/Region/Physics/OdePlugin
parentMantis#1584. Thank you kindly, Lulurun for a patch that: (diff)
downloadopensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.zip
opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.gz
opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.bz2
opensim-SC-a2b1a1787d620f70c10221545414b41ffdfe27da.tar.xz
Minor formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs33
1 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index edb6375..876629e 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1773,22 +1773,23 @@ namespace OpenSim.Region.Physics.OdePlugin
1773 } 1773 }
1774 } 1774 }
1775 1775
1776 1776 // Finished with all sim stepping. If requested, dump world state to file for debugging.
1777 // Finished with all sim stepping. If requested, dump world state to file for debugging. 1777 // TODO: This call to the export function is already inside lock (OdeLock) - but is an extra lock needed?
1778 // TODO: This call to the export function is already inside lock(OdeLock) - but is an extra lock needed? 1778 // TODO: This overwrites all dump files in-place. Should this be a growing logfile, or separate snapshots?
1779 // TODO: This overwrites all dump files in-place. Should this be a growing logfile, or separate snapshots? 1779 if (physics_logging && (physics_logging_interval>0) && (framecount % physics_logging_interval == 0))
1780 if(physics_logging && (physics_logging_interval>0) && (framecount % physics_logging_interval == 0) ) { 1780 {
1781 string fname = "state-" + world.ToString() + ".DIF"; // give each physics world a separate filename 1781 string fname = "state-" + world.ToString() + ".DIF"; // give each physics world a separate filename
1782 string prefix = "world" + world.ToString(); // prefix for variable names in exported .DIF file 1782 string prefix = "world" + world.ToString(); // prefix for variable names in exported .DIF file
1783 1783
1784 if(physics_logging_append_existing_logfile) { 1784 if (physics_logging_append_existing_logfile)
1785 string header = "-------------- START OF PHYSICS FRAME " + framecount.ToString() + " --------------"; 1785 {
1786 TextWriter fwriter = File.AppendText(fname); 1786 string header = "-------------- START OF PHYSICS FRAME " + framecount.ToString() + " --------------";
1787 fwriter.WriteLine(header); 1787 TextWriter fwriter = File.AppendText(fname);
1788 fwriter.Close(); 1788 fwriter.WriteLine(header);
1789 } 1789 fwriter.Close();
1790 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); 1790 }
1791 } 1791 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix);
1792 }
1792 } 1793 }
1793 1794
1794 return fps; 1795 return fps;