Packet descriptions
This commit is contained in:
45
lib/classes/packets/ScriptSensorReply.ts
Normal file
45
lib/classes/packets/ScriptSensorReply.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {Vector3} from '../Vector3';
|
||||
import {Quaternion} from '../Quaternion';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class ScriptSensorReplyPacket implements Packet
|
||||
{
|
||||
name = 'ScriptSensorReply';
|
||||
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
||||
id = 4294902008;
|
||||
|
||||
Requester: {
|
||||
SourceID: UUID;
|
||||
};
|
||||
SensedData: {
|
||||
ObjectID: UUID;
|
||||
OwnerID: UUID;
|
||||
GroupID: UUID;
|
||||
Position: Vector3;
|
||||
Velocity: Vector3;
|
||||
Rotation: Quaternion;
|
||||
Name: string;
|
||||
Type: number;
|
||||
Range: number;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((this.calculateVarVarSize(this.SensedData, 'Name', 1) + 92) * this.SensedData.length) + 17;
|
||||
}
|
||||
|
||||
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
||||
{
|
||||
let size = 0;
|
||||
block.forEach((bl: any) =>
|
||||
{
|
||||
size += bl[paramName].length + extraPerVar;
|
||||
});
|
||||
return size;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user