示例#1
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket(this.MissileIndex, CompressionMission.MissileCompressionInfo);
     GameNetworkMessage.WriteIntToPacket((int)this.CollisionReaction, CompressionMission.MissileCollisionReactionCompressionInfo);
     GameNetworkMessage.WriteAgentReferenceToPacket(this.AttackerAgent);
     if (this.CollisionReaction == Mission.MissileCollisionReaction.Stick || this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
     {
         int num = this.AttachedAgent != null ? 1 : 0;
         GameNetworkMessage.WriteBoolToPacket(num != 0);
         if (num != 0)
         {
             GameNetworkMessage.WriteAgentReferenceToPacket(this.AttachedAgent);
             GameNetworkMessage.WriteBoolToPacket(this.AttachedToShield);
             if (!this.AttachedToShield)
             {
                 GameNetworkMessage.WriteIntToPacket((int)this.AttachedBoneIndex, CompressionMission.BoneIndexCompressionInfo);
             }
         }
         else
         {
             GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.AttachedMissionObject);
         }
     }
     if (this.CollisionReaction != Mission.MissileCollisionReaction.BecomeInvisible && this.CollisionReaction != Mission.MissileCollisionReaction.PassThrough)
     {
         int num = this.AttachedAgent != null ? 1 : (this.AttachedMissionObject != null ? 1 : 0);
         GameNetworkMessage.WriteBoolToPacket(num != 0);
         if (num != 0)
         {
             GameNetworkMessage.WriteNonUniformTransformToPacket(this.AttachLocalFrame, CompressionBasic.BigRangeLowResLocalPositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo);
         }
         else
         {
             GameNetworkMessage.WriteNonUniformTransformToPacket(this.AttachLocalFrame, CompressionBasic.PositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo);
         }
     }
     if (this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
     {
         GameNetworkMessage.WriteVec3ToPacket(this.BounceBackVelocity, CompressionMission.SpawnedItemVelocityCompressionInfo);
         GameNetworkMessage.WriteVec3ToPacket(this.BounceBackAngularVelocity, CompressionMission.SpawnedItemAngularVelocityCompressionInfo);
     }
     if (this.CollisionReaction != Mission.MissileCollisionReaction.Stick && this.CollisionReaction != Mission.MissileCollisionReaction.BounceBack)
     {
         return;
     }
     GameNetworkMessage.WriteIntToPacket(this.ForcedSpawnIndex, CompressionBasic.MissionObjectIDCompressionInfo);
 }
示例#2
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectIdToPacket(this.ObjectId);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.Parent);
     GameNetworkMessage.WriteNonUniformTransformToPacket(this.Frame, CompressionBasic.PositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo);
 }