protected override void Init(MyObjectBuilder_DefinitionBase builder)
        {
            base.Init(builder);

            var ob = builder as MyObjectBuilder_HandItemDefinition;

            MyDebug.AssertDebug(ob != null);

            Id = builder.Id;

            LeftHand             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.LeftHandOrientation));
            LeftHand.Translation = ob.LeftHandPosition;

            RightHand             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.RightHandOrientation));
            RightHand.Translation = ob.RightHandPosition;

            ItemLocation             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemOrientation));
            ItemLocation.Translation = ob.ItemPosition;

            ItemWalkingLocation             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemWalkingOrientation));
            ItemWalkingLocation.Translation = ob.ItemWalkingPosition;

            BlendTime = ob.BlendTime;

            XAmplitudeOffset = ob.XAmplitudeOffset;
            YAmplitudeOffset = ob.YAmplitudeOffset;
            ZAmplitudeOffset = ob.ZAmplitudeOffset;

            XAmplitudeScale = ob.XAmplitudeScale;
            YAmplitudeScale = ob.YAmplitudeScale;
            ZAmplitudeScale = ob.ZAmplitudeScale;

            RunMultiplier = ob.RunMultiplier;

            ItemLocation3rd             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemOrientation3rd));
            ItemLocation3rd.Translation = ob.ItemPosition3rd;

            ItemWalkingLocation3rd             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemWalkingOrientation3rd));
            ItemWalkingLocation3rd.Translation = ob.ItemWalkingPosition3rd;

            AmplitudeMultiplier3rd = ob.AmplitudeMultiplier3rd;

            SimulateLeftHand  = ob.SimulateLeftHand;
            SimulateRightHand = ob.SimulateRightHand;

            FingersAnimation = MyDefinitionManager.Static.GetAnimationDefinitionCompatibility(ob.FingersAnimation);

            ItemShootLocation                = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemShootOrientation));
            ItemShootLocation.Translation    = ob.ItemShootPosition;
            ItemShootLocation3rd             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemShootOrientation3rd));
            ItemShootLocation3rd.Translation = ob.ItemShootPosition3rd;
            ShootBlend = ob.ShootBlend;

            ItemIronsightLocation             = Matrix.CreateFromQuaternion(Quaternion.Normalize(ob.ItemIronsightOrientation));
            ItemIronsightLocation.Translation = ob.ItemIronsightPosition;

            MuzzlePosition = ob.MuzzlePosition;

            ShootScatter   = ob.ShootScatter;
            ScatterSpeed   = ob.ScatterSpeed;
            PhysicalItemId = ob.PhysicalItemId;

            LightColor          = ob.LightColor;
            LightFalloff        = ob.LightFalloff;
            LightRadius         = ob.LightRadius;
            LightGlareSize      = ob.LightGlareSize;
            LightIntensityLower = ob.LightIntensityLower;
            LightIntensityUpper = ob.LightIntensityUpper;
            ShakeAmountTarget   = ob.ShakeAmountTarget;
            ShakeAmountNoTarget = ob.ShakeAmountNoTarget;

            ToolSounds   = ob.ToolSounds;
            ToolMaterial = MyStringHash.GetOrCompute(ob.ToolMaterial);

            ItemPositioning         = ob.ItemPositioning;
            ItemPositioning3rd      = ob.ItemPositioning3rd;
            ItemPositioningWalk     = ob.ItemPositioningWalk;
            ItemPositioningWalk3rd  = ob.ItemPositioningWalk3rd;
            ItemPositioningShoot    = ob.ItemPositioningShoot;
            ItemPositioningShoot3rd = ob.ItemPositioningShoot3rd;
        }
Beispiel #2
0
 public FuelInfo(MyObjectBuilder_FueledPowerProducerDefinition.FuelInfo fuelInfo)
 {
     this.FuelId = fuelInfo.Id;
     this.Ratio  = fuelInfo.Ratio;
 }