mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 11:25:39 +08:00
* Handle parcel telehub location corruption gracefully. DBNull
* mySQL this time.
This commit is contained in:
@@ -1025,13 +1025,22 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
newData.authBuyerID = authedbuyer;
|
||||
newData.snapshotID = snapshotID;
|
||||
|
||||
newData.userLocation =
|
||||
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
||||
Convert.ToSingle(row["UserLocationZ"]));
|
||||
newData.userLookAt =
|
||||
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||
Convert.ToSingle(row["UserLookAtZ"]));
|
||||
try
|
||||
{
|
||||
newData.userLocation =
|
||||
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
||||
Convert.ToSingle(row["UserLocationZ"]));
|
||||
newData.userLookAt =
|
||||
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||
Convert.ToSingle(row["UserLookAtZ"]));
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
newData.userLocation = LLVector3.Zero;
|
||||
newData.userLookAt = LLVector3.Zero;
|
||||
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
|
||||
}
|
||||
|
||||
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||
|
||||
return newData;
|
||||
|
||||
@@ -981,10 +981,11 @@ namespace OpenSim.Data.SQLite
|
||||
newData.userLookAt =
|
||||
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||
Convert.ToSingle(row["UserLookAtZ"]));
|
||||
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
|
||||
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
|
||||
newData.userLocation = LLVector3.Zero;
|
||||
newData.userLookAt = LLVector3.Zero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user