mirror of
https://github.com/opensim/opensim.git
synced 2026-06-13 07:45:35 +08:00
From: dirk husemann <hud@zurich.ibm.com>
these two patches fixe the terrain load exception that occurs when restarting OpenSim on PPC32 by making terrain loading endian clean. it does NOT fix the client crash exception. need to hunt that one down.
This commit is contained in:
@@ -374,12 +374,13 @@ namespace OpenSim.Framework.Data.MySQL
|
||||
int rev = 0;
|
||||
if (row.Read())
|
||||
{
|
||||
byte[] heightmap = (byte[]) row["Heightfield"];
|
||||
MemoryStream str = new MemoryStream((byte[]) row["Heightfield"]);
|
||||
BinaryReader br = new BinaryReader(str);
|
||||
for (int x = 0; x < 256; x++)
|
||||
{
|
||||
for (int y = 0; y < 256; y++)
|
||||
{
|
||||
terret[x, y] = BitConverter.ToDouble(heightmap, ((x*256) + y)*8);
|
||||
terret[x, y] = br.ReadDouble();
|
||||
}
|
||||
}
|
||||
rev = (int) row["Revision"];
|
||||
|
||||
Reference in New Issue
Block a user