private void EntityPriorityLevelComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (populatingui) { return; } if (CurrentEntity == null) { return; } Unk_648413703 priorityLevel = (Unk_648413703)EntityPriorityLevelComboBox.SelectedItem; lock (ProjectForm.ProjectSyncRoot) { if (CurrentEntity._CEntityDef.priorityLevel != priorityLevel) { CurrentEntity._CEntityDef.priorityLevel = priorityLevel; if (CurrentMCEntity != null) { CurrentMCEntity._Data.priorityLevel = priorityLevel; } ProjectItemChanged(); } } }
public override void Parse(MetaFile meta, CMloInstanceDef CMloInstanceDef) { this.Meta = meta; this.MetaStructure = CMloInstanceDef; this.ArchetypeName = CMloInstanceDef.archetypeName; this.Flags = CMloInstanceDef.flags; this.Guid = CMloInstanceDef.guid; this.Position = CMloInstanceDef.position; this.Rotation = CMloInstanceDef.rotation; this.ScaleXY = CMloInstanceDef.scaleXY; this.ScaleZ = CMloInstanceDef.scaleZ; this.ParentIndex = CMloInstanceDef.parentIndex; this.LodDist = CMloInstanceDef.lodDist; this.ChildLodDist = CMloInstanceDef.childLodDist; this.LodLevel = CMloInstanceDef.lodLevel; this.NumChildren = CMloInstanceDef.numChildren; this.PriorityLevel = CMloInstanceDef.priorityLevel; this.Extensions = new Array_StructurePointer(); this.AmbientOcclusionMultiplier = CMloInstanceDef.ambientOcclusionMultiplier; this.ArtificialAmbientOcclusion = CMloInstanceDef.artificialAmbientOcclusion; this.TintValue = CMloInstanceDef.tintValue; this.GroupId = CMloInstanceDef.groupId; this.FloorId = CMloInstanceDef.floorId; this.DefaultEntitySets = CMloInstanceDef.defaultEntitySets; this.NumExitPortals = CMloInstanceDef.numExitPortals; this.MLOInstflags = CMloInstanceDef.MLOInstflags; }
public void ParseWithoutExtensions(MetaFile meta, CEntityDef CEntityDef) { this.Meta = meta; this.MetaStructure = CEntityDef; this.ArchetypeName = CEntityDef.archetypeName; this.Flags = CEntityDef.flags; this.Guid = CEntityDef.guid; this.Position = CEntityDef.position; this.Rotation = CEntityDef.rotation; this.ScaleXY = CEntityDef.scaleXY; this.ScaleZ = CEntityDef.scaleZ; this.ParentIndex = CEntityDef.parentIndex; this.LodDist = CEntityDef.lodDist; this.ChildLodDist = CEntityDef.childLodDist; this.LodLevel = CEntityDef.lodLevel; this.NumChildren = CEntityDef.numChildren; this.PriorityLevel = CEntityDef.priorityLevel; this.AmbientOcclusionMultiplier = CEntityDef.ambientOcclusionMultiplier; this.ArtificialAmbientOcclusion = CEntityDef.artificialAmbientOcclusion; this.TintValue = CEntityDef.tintValue; }
public override void Parse(MetaFile meta, CEntityDef CEntityDef) { this.Meta = meta; this.MetaStructure = CEntityDef; this.ArchetypeName = CEntityDef.archetypeName; this.Flags = CEntityDef.flags; this.Guid = CEntityDef.guid; this.Position = CEntityDef.position; this.Rotation = CEntityDef.rotation; this.ScaleXY = CEntityDef.scaleXY; this.ScaleZ = CEntityDef.scaleZ; this.ParentIndex = CEntityDef.parentIndex; this.LodDist = CEntityDef.lodDist; this.ChildLodDist = CEntityDef.childLodDist; this.LodLevel = CEntityDef.lodLevel; this.NumChildren = CEntityDef.numChildren; this.PriorityLevel = CEntityDef.priorityLevel; // Extensions var extptrs = MetaUtils.GetPointerArray(meta, CEntityDef.extensions); if (extptrs != null) { for (int i = 0; i < extptrs.Length; i++) { var extptr = extptrs[i]; var block = meta.GetBlock(extptr.BlockID); switch (block.StructureNameHash) { case MetaName.CExtensionDefLightEffect: { var data = MetaUtils.GetData <CExtensionDefLightEffect>(meta, extptr); var obj = new MCExtensionDefLightEffect(); obj.Parse(meta, data); ExtensionDefLightEffect.Add(obj); break; } case MetaName.CExtensionDefSpawnPointOverride: { var data = MetaUtils.GetData <CExtensionDefSpawnPointOverride>(meta, extptr); var obj = new MCExtensionDefSpawnPointOverride(); obj.Parse(meta, data); ExtensionDefSpawnPointOverride.Add(obj); break; } case MetaName.CExtensionDefDoor: { var data = MetaUtils.GetData <CExtensionDefDoor>(meta, extptr); var obj = new MCExtensionDefDoor(); obj.Parse(meta, data); ExtensionDefDoor.Add(obj); break; } case MetaName.rage__phVerletClothCustomBounds: { var data = MetaUtils.GetData <rage__phVerletClothCustomBounds>(meta, extptr); var obj = new Mrage__phVerletClothCustomBounds(); obj.Parse(meta, data); rage__phVerletClothCustomBounds.Add(obj); break; } default: break; } } } this.AmbientOcclusionMultiplier = CEntityDef.ambientOcclusionMultiplier; this.ArtificialAmbientOcclusion = CEntityDef.artificialAmbientOcclusion; this.TintValue = CEntityDef.tintValue; }