aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
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;