コード例 #1
0
 public GunFireMessageOther(P2PMessage msg)
 {
     handedness        = msg.ReadByte();
     playerId          = msg.ReadByte();
     firepointPos      = msg.ReadVector3();
     firepointRotation = msg.ReadQuaternion();
     ammoDamage        = msg.ReadFloat();
     projectileMass    = msg.ReadFloat();
     exitVelocity      = msg.ReadFloat();
     muzzleVelocity    = msg.ReadFloat();
 }
コード例 #2
0
        public HandGunChangeMessage(P2PMessage msg, bool forOtherPlayer = false)
        {
            isForOtherPlayer = forOtherPlayer;
            if (isForOtherPlayer)
            {
                playerId = msg.ReadByte();
            }

            destroy = Convert.ToBoolean(msg.ReadByte());
            type    = (GunType)msg.ReadByte();
        }
コード例 #3
0
        public EnemyRigTransformMessage(P2PMessage msg)
        {
            poolChildIdx = msg.ReadByte();
            enemyType    = (EnemyType)msg.ReadByte();
            posMain      = msg.ReadVector3();
            posRoot      = msg.ReadVector3();
            posLHip      = msg.ReadCompressedVector3(posRoot);
            posRHip      = msg.ReadCompressedVector3(posRoot);

            posLKnee  = msg.ReadCompressedVector3(posRoot);
            posRKnee  = msg.ReadCompressedVector3(posRoot);
            posLAnkle = msg.ReadCompressedVector3(posRoot);
            posRAnkle = msg.ReadCompressedVector3(posRoot);

            posSpine1    = msg.ReadCompressedVector3(posRoot);
            posSpine2    = msg.ReadCompressedVector3(posRoot);
            posSpineTop  = msg.ReadCompressedVector3(posRoot);
            posLClavicle = msg.ReadCompressedVector3(posRoot);
            posRClavicle = msg.ReadCompressedVector3(posRoot);
            posNeck      = msg.ReadCompressedVector3(posRoot);
            posLShoulder = msg.ReadCompressedVector3(posRoot);
            posRShoulder = msg.ReadCompressedVector3(posRoot);
            posLElbow    = msg.ReadCompressedVector3(posRoot);
            posRElbow    = msg.ReadCompressedVector3(posRoot);
            posLWrist    = msg.ReadCompressedVector3(posRoot);
            posRWrist    = msg.ReadCompressedVector3(posRoot);

            rotMain      = msg.ReadSmallerCompressedQuaternion();
            rotRoot      = msg.ReadSmallerCompressedQuaternion();
            rotLHip      = msg.ReadSmallerCompressedQuaternion();
            rotRHip      = msg.ReadSmallerCompressedQuaternion();
            rotLKnee     = msg.ReadSmallerCompressedQuaternion();
            rotRKnee     = msg.ReadSmallerCompressedQuaternion();
            rotLAnkle    = msg.ReadSmallerCompressedQuaternion();
            rotRAnkle    = msg.ReadSmallerCompressedQuaternion();
            rotSpine1    = msg.ReadSmallerCompressedQuaternion();
            rotSpine2    = msg.ReadSmallerCompressedQuaternion();
            rotSpineTop  = msg.ReadSmallerCompressedQuaternion();
            rotLClavicle = msg.ReadSmallerCompressedQuaternion();
            rotRClavicle = msg.ReadSmallerCompressedQuaternion();
            rotNeck      = msg.ReadSmallerCompressedQuaternion();
            rotLShoulder = msg.ReadSmallerCompressedQuaternion();
            rotRShoulder = msg.ReadSmallerCompressedQuaternion();
            rotLElbow    = msg.ReadSmallerCompressedQuaternion();
            rotRElbow    = msg.ReadSmallerCompressedQuaternion();
            rotLWrist    = msg.ReadSmallerCompressedQuaternion();
            rotRWrist    = msg.ReadSmallerCompressedQuaternion();
        }
コード例 #4
0
 public ChangeObjectOwnershipMessage(P2PMessage msg)
 {
     objectId    = msg.ReadUShort();
     ownerId     = msg.ReadByte();
     linVelocity = msg.ReadVector3();
     angVelocity = msg.ReadVector3();
 }
コード例 #5
0
        public OtherPlayerPositionMessage(P2PMessage msg)
        {
            playerId = msg.ReadByte();

            headPos   = msg.ReadVector3();
            lHandPos  = msg.ReadVector3();
            rHandPos  = msg.ReadVector3();
            pelvisPos = msg.ReadVector3();
            lFootPos  = msg.ReadVector3();
            rFootPos  = msg.ReadVector3();

            headRot   = msg.ReadCompressedQuaternion();
            lHandRot  = msg.ReadCompressedQuaternion();
            rHandRot  = msg.ReadCompressedQuaternion();
            pelvisRot = msg.ReadCompressedQuaternion();
            lFootRot  = msg.ReadCompressedQuaternion();
            rFootRot  = msg.ReadCompressedQuaternion();
        }
コード例 #6
0
 public ClientJoinMessage(P2PMessage msg)
 {
     playerId      = msg.ReadByte();
     steamId.Value = msg.ReadUlong();
     name          = msg.ReadUnicodeString();
 }
コード例 #7
0
 public OtherPlayerNameMessage(P2PMessage msg)
 {
     playerId = msg.ReadByte();
     name     = msg.ReadUnicodeString();
 }
コード例 #8
0
 public GunFireHit(P2PMessage msg)
 {
     playerId = msg.ReadByte();
 }
コード例 #9
0
 public SetLocalSmallIdMessage(P2PMessage msg)
 {
     smallId = msg.ReadByte();
 }
コード例 #10
0
 public IDRequestMessage(P2PMessage msg)
 {
     namePath     = msg.ReadUnicodeString();
     initialOwner = msg.ReadByte();
 }
コード例 #11
0
 public IDAllocationMessage(P2PMessage msg)
 {
     namePath     = msg.ReadUnicodeString();
     allocatedId  = msg.ReadUShort();
     initialOwner = msg.ReadByte();
 }