Exemple #1
0
 protected override void OnWrite()
 {
     ModuleNetworkData.WriteWeaponReferenceToPacket(this.Weapon);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteVec3ToPacket(this.AttachLocalFrame.origin, CompressionBasic.LocalPositionCompressionInfo);
     GameNetworkMessage.WriteRotationMatrixToPacket(this.AttachLocalFrame.rotation);
 }
 protected override void OnWrite()
 {
     ModuleNetworkData.WriteWeaponReferenceToPacket(this.Weapon);
     GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent);
     GameNetworkMessage.WriteIntToPacket((int)this.SlotIndex, CompressionMission.ItemSlotCompressionInfo);
     GameNetworkMessage.WriteVec3ToPacket(this.AttachLocalFrame.origin, CompressionBasic.LocalPositionCompressionInfo);
     GameNetworkMessage.WriteRotationMatrixToPacket(this.AttachLocalFrame.rotation);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket(this.MissileIndex, CompressionMission.MissileCompressionInfo);
     GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent);
     GameNetworkMessage.WriteIntToPacket((int)this.WeaponIndex, CompressionMission.WieldSlotCompressionInfo);
     if (this.WeaponIndex == EquipmentIndex.None)
     {
         ModuleNetworkData.WriteMissileWeaponReferenceToPacket(this.Weapon);
     }
     GameNetworkMessage.WriteVec3ToPacket(this.Position, CompressionBasic.PositionCompressionInfo);
     GameNetworkMessage.WriteVec3ToPacket(this.Direction, CompressionBasic.UnitVectorCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.Speed, CompressionMission.MissileSpeedCompressionInfo);
     GameNetworkMessage.WriteBoolToPacket(this.HasRigidBody);
     if (this.HasRigidBody)
     {
         GameNetworkMessage.WriteRotationMatrixToPacket(this.Orientation);
         GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObjectToIgnore);
     }
     else
     {
         GameNetworkMessage.WriteVec3ToPacket(this.Orientation.f, CompressionBasic.UnitVectorCompressionInfo);
     }
     GameNetworkMessage.WriteBoolToPacket(this.IsPrimaryWeaponShot);
 }