Ejemplo n.º 1
0
 internal WeaponDataAsNative(WeaponData weaponData)
 {
     this.WeaponMesh            = (NativeObject)weaponData.WeaponMesh != (NativeObject)null ? weaponData.WeaponMesh.Pointer : UIntPtr.Zero;
     this.HolsterMesh           = (NativeObject)weaponData.HolsterMesh != (NativeObject)null ? weaponData.HolsterMesh.Pointer : UIntPtr.Zero;
     this.Prefab                = weaponData.Prefab;
     this.HolsterMeshWithWeapon = (NativeObject)weaponData.HolsterMeshWithWeapon != (NativeObject)null ? weaponData.HolsterMeshWithWeapon.Pointer : UIntPtr.Zero;
     this.FlyingMesh            = (NativeObject)weaponData.FlyingMesh != (NativeObject)null ? weaponData.FlyingMesh.Pointer : UIntPtr.Zero;
     this.Body                    = (NativeObject)weaponData.Shape != (NativeObject)null ? weaponData.Shape.Pointer : UIntPtr.Zero;
     this.CollisionBody           = (NativeObject)weaponData.CollisionShape != (NativeObject)null ? weaponData.CollisionShape.Pointer : UIntPtr.Zero;
     this.TableauMaterial         = (NativeObject)weaponData.TableauMaterial != (NativeObject)null ? weaponData.TableauMaterial.Pointer : UIntPtr.Zero;
     this.WeaponFrame             = weaponData.WeaponFrame;
     this.PhysicsMaterialIndex    = weaponData.PhysicsMaterialIndex;
     this.WeaponKind              = weaponData.WeaponKind;
     this.ItemHolsterIndices      = weaponData.ItemHolsterIndices;
     this.Difficulty              = weaponData.Difficulty;
     this.BaseWeight              = weaponData.BaseWeight;
     this.Inertia                 = weaponData.Inertia;
     this.ReloadPhase             = weaponData.ReloadPhase;
     this.HasFlagAnimation        = weaponData.HasFlagAnimation;
     this.AmmoOffset              = weaponData.AmmoOffset;
     this.StickingFrame           = weaponData.StickingFrame;
     this.ScaleFactor             = weaponData.ScaleFactor;
     this.CenterOfMass            = weaponData.CenterOfMass;
     this.CenterOfMassXYZ         = weaponData.CenterOfMass3D;
     this.HolsterPositionShift    = weaponData.HolsterPositionShift;
     this.FlyingSoundCode         = weaponData.FlyingSoundCode;
     this.PassbySoundCode         = weaponData.PassbySoundCode;
     this.TrailParticleName       = weaponData.TrailParticleName;
     this.CenterOfMassShift       = weaponData.CenterOfMassShift;
     this.DataValue               = weaponData.DataValue;
     this.CurrentUsageIndex       = weaponData.CurrentUsageIndex;
     this.AirFrictionConstant     = weaponData.AirFrictionConstant;
     this.HasLowerHolsterPriority = weaponData.HasLowerHolsterPriority;
     this.GlossMultiplier         = weaponData.GlossMultiplier;
 }
Ejemplo n.º 2
0
 public static StackArray.StackArray4Int GetItemHolsterIndices(this ItemObject item)
 {
     StackArray.StackArray4Int stackArray4Int = new StackArray.StackArray4Int();
     for (int index = 0; index < item.ItemHolsters.Length; ++index)
     {
         stackArray4Int[index] = item.ItemHolsters[index].Length > 0 ? MBItem.GetItemHolsterIndex(item.ItemHolsters[index]) : -1;
     }
     for (int length = item.ItemHolsters.Length; length < 4; ++length)
     {
         stackArray4Int[length] = -1;
     }
     return(stackArray4Int);
 }