Implement MediaUrl persistence for MySQL and MsSQL
Not sure how I forgot this. This may resolve problems with media textures not persisting over restart for these databases.prebuild-update
parent
99c0f4c9c7
commit
2a0254f2da
|
@ -327,7 +327,7 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID)
|
||||||
ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice,
|
ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice,
|
||||||
SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem,
|
SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem,
|
||||||
ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches,
|
ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches,
|
||||||
LinkNumber = @LinkNumber
|
LinkNumber = @LinkNumber, MediaURL = @MediaURL
|
||||||
WHERE UUID = @UUID
|
WHERE UUID = @UUID
|
||||||
END
|
END
|
||||||
ELSE
|
ELSE
|
||||||
|
@ -342,7 +342,7 @@ ELSE
|
||||||
PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX,
|
PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX,
|
||||||
OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ,
|
OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ,
|
||||||
ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA,
|
ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA,
|
||||||
ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber
|
ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL
|
||||||
) VALUES (
|
) VALUES (
|
||||||
@UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask,
|
@UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask,
|
||||||
@EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX,
|
@EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX,
|
||||||
|
@ -352,7 +352,7 @@ ELSE
|
||||||
@PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX,
|
@PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX,
|
||||||
@OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ,
|
@OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ,
|
||||||
@ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA,
|
@ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA,
|
||||||
@ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber
|
@ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL
|
||||||
)
|
)
|
||||||
END";
|
END";
|
||||||
|
|
||||||
|
@ -1127,6 +1127,9 @@ VALUES
|
||||||
if (Convert.ToInt16(primRow["PassTouches"]) != 0)
|
if (Convert.ToInt16(primRow["PassTouches"]) != 0)
|
||||||
prim.PassTouches = true;
|
prim.PassTouches = true;
|
||||||
prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
|
prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
|
||||||
|
|
||||||
|
if (!(primRow["MediaURL"] is System.DBNull))
|
||||||
|
prim.MediaUrl = (string)primRow["MediaURL"];
|
||||||
|
|
||||||
return prim;
|
return prim;
|
||||||
}
|
}
|
||||||
|
@ -1512,7 +1515,10 @@ VALUES
|
||||||
parameters.Add(_Database.CreateParameter("PassTouches", 1));
|
parameters.Add(_Database.CreateParameter("PassTouches", 1));
|
||||||
else
|
else
|
||||||
parameters.Add(_Database.CreateParameter("PassTouches", 0));
|
parameters.Add(_Database.CreateParameter("PassTouches", 0));
|
||||||
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
|
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
|
||||||
|
|
||||||
|
if (prim.MediaUrl != null)
|
||||||
|
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
|
||||||
|
|
||||||
return parameters.ToArray();
|
return parameters.ToArray();
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace OpenSim.Data.MySQL
|
||||||
"ParticleSystem, ClickAction, Material, " +
|
"ParticleSystem, ClickAction, Material, " +
|
||||||
"CollisionSound, CollisionSoundVolume, " +
|
"CollisionSound, CollisionSoundVolume, " +
|
||||||
"PassTouches, " +
|
"PassTouches, " +
|
||||||
"LinkNumber) values (" + "?UUID, " +
|
"LinkNumber, MediaURL) values (" + "?UUID, " +
|
||||||
"?CreationDate, ?Name, ?Text, " +
|
"?CreationDate, ?Name, ?Text, " +
|
||||||
"?Description, ?SitName, ?TouchName, " +
|
"?Description, ?SitName, ?TouchName, " +
|
||||||
"?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
|
"?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
|
||||||
|
@ -205,7 +205,7 @@ namespace OpenSim.Data.MySQL
|
||||||
"?SaleType, ?ColorR, ?ColorG, " +
|
"?SaleType, ?ColorR, ?ColorG, " +
|
||||||
"?ColorB, ?ColorA, ?ParticleSystem, " +
|
"?ColorB, ?ColorA, ?ParticleSystem, " +
|
||||||
"?ClickAction, ?Material, ?CollisionSound, " +
|
"?ClickAction, ?Material, ?CollisionSound, " +
|
||||||
"?CollisionSoundVolume, ?PassTouches, ?LinkNumber)";
|
"?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL)";
|
||||||
|
|
||||||
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
|
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
|
||||||
|
|
||||||
|
@ -1184,6 +1184,9 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
prim.PassTouches = ((sbyte)row["PassTouches"] != 0);
|
prim.PassTouches = ((sbyte)row["PassTouches"] != 0);
|
||||||
prim.LinkNum = (int)row["LinkNumber"];
|
prim.LinkNum = (int)row["LinkNumber"];
|
||||||
|
|
||||||
|
if (!(row["MediaURL"] is System.DBNull))
|
||||||
|
prim.MediaUrl = (string)row["MediaURL"];
|
||||||
|
|
||||||
return prim;
|
return prim;
|
||||||
}
|
}
|
||||||
|
@ -1521,6 +1524,9 @@ namespace OpenSim.Data.MySQL
|
||||||
cmd.Parameters.AddWithValue("PassTouches", 0);
|
cmd.Parameters.AddWithValue("PassTouches", 0);
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
|
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
|
||||||
|
|
||||||
|
if (prim.MediaUrl != null)
|
||||||
|
cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue