- Bump to 0.5.13
- Add building support for TaskInventory and nested objects (from XML) - Add support for taking objects into inventory - Add waitForAppearanceSet utility - Add new event for when object is fully resolved (ObjectProperties received) - Fixed InventoryItem CRC method - Fixed quaternion bug - Support for uploading Script, Notecard and Gesture assets - Significantly improved build process
This commit is contained in:
@@ -25,14 +25,10 @@ export class MapBlockReplyMessage implements MessageBase
|
||||
Agents: number;
|
||||
MapImageID: UUID;
|
||||
}[];
|
||||
Size: {
|
||||
SizeX: number;
|
||||
SizeY: number;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return this.calculateVarVarSize(this.Data, 'Name', 1) + ((27) * this.Data.length) + ((4) * this.Size.length) + 22;
|
||||
return this.calculateVarVarSize(this.Data, 'Name', 1) + ((27) * this.Data.length) + 21;
|
||||
}
|
||||
|
||||
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
||||
@@ -52,7 +48,7 @@ export class MapBlockReplyMessage implements MessageBase
|
||||
pos += 16;
|
||||
buf.writeUInt32LE(this.AgentData['Flags'], pos);
|
||||
pos += 4;
|
||||
let count = this.Data.length;
|
||||
const count = this.Data.length;
|
||||
buf.writeUInt8(this.Data.length, pos++);
|
||||
for (let i = 0; i < count; i++)
|
||||
{
|
||||
@@ -71,15 +67,6 @@ export class MapBlockReplyMessage implements MessageBase
|
||||
this.Data[i]['MapImageID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
}
|
||||
count = this.Size.length;
|
||||
buf.writeUInt8(this.Size.length, pos++);
|
||||
for (let i = 0; i < count; i++)
|
||||
{
|
||||
buf.writeUInt16LE(this.Size[i]['SizeX'], pos);
|
||||
pos += 2;
|
||||
buf.writeUInt16LE(this.Size[i]['SizeY'], pos);
|
||||
pos += 2;
|
||||
}
|
||||
return pos - startPos;
|
||||
}
|
||||
|
||||
@@ -103,7 +90,7 @@ export class MapBlockReplyMessage implements MessageBase
|
||||
{
|
||||
return pos - startPos;
|
||||
}
|
||||
let count = buf.readUInt8(pos++);
|
||||
const count = buf.readUInt8(pos++);
|
||||
this.Data = [];
|
||||
for (let i = 0; i < count; i++)
|
||||
{
|
||||
@@ -142,27 +129,6 @@ export class MapBlockReplyMessage implements MessageBase
|
||||
pos += 16;
|
||||
this.Data.push(newObjData);
|
||||
}
|
||||
if (pos >= buf.length)
|
||||
{
|
||||
return pos - startPos;
|
||||
}
|
||||
count = buf.readUInt8(pos++);
|
||||
this.Size = [];
|
||||
for (let i = 0; i < count; i++)
|
||||
{
|
||||
const newObjSize: {
|
||||
SizeX: number,
|
||||
SizeY: number
|
||||
} = {
|
||||
SizeX: 0,
|
||||
SizeY: 0
|
||||
};
|
||||
newObjSize['SizeX'] = buf.readUInt16LE(pos);
|
||||
pos += 2;
|
||||
newObjSize['SizeY'] = buf.readUInt16LE(pos);
|
||||
pos += 2;
|
||||
this.Size.push(newObjSize);
|
||||
}
|
||||
return pos - startPos;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user