mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Remove time based terrain storage in SQLite so revision number can be used
to denote terrain format revision. Add terrain DB format revision codes to ISimulationDataStore.cs. Setup so legacy compatible terrain storage and fetch is possible while allowing future format extensions.
This commit is contained in:
@@ -575,6 +575,7 @@ namespace OpenSim.Data.MySQL
|
||||
public void StoreTerrain(double[,] ter, UUID regionID)
|
||||
{
|
||||
m_log.Info("[REGION DB]: Storing terrain");
|
||||
int revision = (int)DBTerrainRevision.Legacy256;
|
||||
|
||||
lock (m_dbLock)
|
||||
{
|
||||
@@ -589,10 +590,10 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
ExecuteNonQuery(cmd);
|
||||
|
||||
cmd.CommandText = "insert into terrain (RegionUUID, " +
|
||||
"Revision, Heightfield) values (?RegionUUID, " +
|
||||
"1, ?Heightfield)";
|
||||
cmd.CommandText = "insert into terrain (RegionUUID, Revision, Heightfield)"
|
||||
+ "values (?RegionUUID, ?Revision, ?Heightfield)";
|
||||
|
||||
cmd.Parameters.AddWithValue("Revision", revision);
|
||||
cmd.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter));
|
||||
|
||||
ExecuteNonQuery(cmd);
|
||||
|
||||
Reference in New Issue
Block a user