store sop pseudocrc and region cacheID on PGSQL ( others later)
							parent
							
								
									87646f340b
								
							
						
					
					
						commit
						0958eceadd
					
				|  | @ -355,7 +355,7 @@ namespace OpenSim.Data.PGSQL | |||
|             ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, | ||||
|             ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, ""Vehicle"" = :Vehicle, | ||||
|             ""PhysInertia"" = :PhysInertia, ""standtargetx"" =:standtargetx, ""standtargety"" =:standtargety, ""standtargetz"" =:standtargetz, | ||||
|             ""sitactrange"" =:sitactrange | ||||
|             ""sitactrange"" =:sitactrange, ""pseudocrc"" = :pseudocrc | ||||
| 
 | ||||
|         WHERE ""UUID"" = :UUID ; | ||||
| 
 | ||||
|  | @ -371,7 +371,7 @@ namespace OpenSim.Data.PGSQL | |||
|             ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", | ||||
|             ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", | ||||
|             ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""Vehicle"", ""PhysInertia"", | ||||
|             ""standtargetx"", ""standtargety"", ""standtargetz"", ""sitactrange"" | ||||
|             ""standtargetx"", ""standtargety"", ""standtargetz"", ""sitactrange"", ""pseudocrc"" | ||||
|             ) Select | ||||
|             :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, | ||||
|             :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, | ||||
|  | @ -383,7 +383,7 @@ namespace OpenSim.Data.PGSQL | |||
|             :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, | ||||
|             :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, | ||||
|             :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :Vehicle, :PhysInertia, | ||||
|             :standtargetx, :standtargety, :standtargetz,:sitactrange  | ||||
|             :standtargetx, :standtargety, :standtargetz,:sitactrange, :pseudocrc  | ||||
|             where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); | ||||
|         ";
 | ||||
| 
 | ||||
|  | @ -1436,7 +1436,7 @@ namespace OpenSim.Data.PGSQL | |||
| ,terrain_lower_limit = :terrain_lower_limit ,use_estate_sun = :use_estate_sun ,fixed_sun = :fixed_sun ,sun_position = :sun_position | ||||
| ,covenant = :covenant ,covenant_datetime = :covenant_datetime, sunvectorx = :sunvectorx, sunvectory = :sunvectory, sunvectorz = :sunvectorz, | ||||
| ""Sandbox"" = :Sandbox, loaded_creation_datetime = :loaded_creation_datetime, loaded_creation_id = :loaded_creation_id, ""map_tile_ID"" = :TerrainImageID, | ||||
| ""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID | ||||
| ""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID, ""cacheID"" = :cacheID | ||||
|  WHERE ""regionUUID"" = :regionUUID";
 | ||||
| 
 | ||||
|                 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) | ||||
|  | @ -1551,6 +1551,8 @@ namespace OpenSim.Data.PGSQL | |||
|             newSettings.ParcelImageID = new UUID((Guid)row["parcel_tile_ID"]); | ||||
|             newSettings.TelehubObject = new UUID((Guid)row["TelehubObject"]); | ||||
| 
 | ||||
|             if (!(row["cacheID"] is DBNull)) | ||||
|                 newSettings.CacheID = new UUID((Guid)row["cacheID"]); | ||||
|             return newSettings; | ||||
|         } | ||||
| 
 | ||||
|  | @ -1834,6 +1836,10 @@ namespace OpenSim.Data.PGSQL | |||
|                 pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString()); | ||||
|             prim.PhysicsInertia = pdata; | ||||
| 
 | ||||
|             int pseudocrc = Convert.ToInt32(primRow["pseudocrc"]); | ||||
|             if(pseudocrc != 0) | ||||
|                 prim.PseudoCRC = pseudocrc; | ||||
| 
 | ||||
|             return prim; | ||||
|         } | ||||
| 
 | ||||
|  | @ -2020,6 +2026,8 @@ namespace OpenSim.Data.PGSQL | |||
|             parameters.Add(_Database.CreateParameter("ParcelImageID", settings.ParcelImageID)); | ||||
|             parameters.Add(_Database.CreateParameter("TelehubObject", settings.TelehubObject)); | ||||
| 
 | ||||
|             parameters.Add(_Database.CreateParameter("cacheID", settings.CacheID)); | ||||
| 
 | ||||
|             return parameters.ToArray(); | ||||
|         } | ||||
| 
 | ||||
|  | @ -2279,6 +2287,8 @@ namespace OpenSim.Data.PGSQL | |||
|             parameters.Add(_Database.CreateParameter("Restitution", (double)prim.Restitution)); | ||||
|             parameters.Add(_Database.CreateParameter("RotationAxisLocks", prim.RotationAxisLocks)); | ||||
| 
 | ||||
|             parameters.Add(_Database.CreateParameter("pseudocrc", prim.PseudoCRC)); | ||||
| 
 | ||||
|             return parameters.ToArray(); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1242,3 +1242,11 @@ ADD COLUMN `standtargety` real DEFAULT '0.0', | |||
| ADD COLUMN `standtargetz` real DEFAULT '0.0', | ||||
| ADD COLUMN `sitactrange` real DEFAULT '0.0'; | ||||
| COMMIT; | ||||
| 
 | ||||
| 
 | ||||
| :VERSION 50         #----- Add pseudo CRC and region cache id | ||||
| 
 | ||||
| BEGIN; | ||||
| ALTER TABLE `prims` ADD COLUMN `pseudocrc` integer DEFAULT '0'; | ||||
| ALTER TABLE `regionsettings` ADD COLUMN `cacheID` uuid DEFAULT NULL; | ||||
| COMMIT; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 UbitUmarov
						UbitUmarov