Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of MiniMult v1.1.0
MiniMult.dll
Decompiled a day agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Toolbot; using HarmonyLib; using KinematicCharacterController; using RoR2; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("MiniMult")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0")] [assembly: AssemblyProduct("MiniMult")] [assembly: AssemblyTitle("MiniMult")] [assembly: AssemblyVersion("1.1.0.0")] namespace MiniMult; [BepInPlugin("com.vibes.MiniMult", "MiniMult", "1.1.0")] public class MiniMultPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static CollectContentPackProvidersDelegate <>9__15_0; internal void <Awake>b__15_0(AddContentPackProviderDelegate add) { add.Invoke((IContentPackProvider)(object)new MiniMultContent()); } } public const string GUID = "com.vibes.MiniMult"; public const string Name = "MiniMult"; public const string Version = "1.1.0"; public const string NameToken = "TOOLBOT_SECONDARY_MINIMULT_NAME"; public const string DescriptionToken = "TOOLBOT_SECONDARY_MINIMULT_DESCRIPTION"; private const string SecondaryFamilyKey = "RoR2/Base/Toolbot/ToolbotBodySecondaryFamily.asset"; internal static ManualLogSource Log; internal static ConfigEntry<float> Lifetime; internal static ConfigEntry<int> MaxActive; internal static ConfigEntry<float> DamagePercent; internal static ConfigEntry<int> HealthBoostStacks; internal static ConfigEntry<bool> CopyItems; internal static ConfigEntry<float> ModelScale; internal static SkillDef MiniMultSkillDef; internal static ItemDef MarkerItem; private void Awake() { //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Lifetime = ((BaseUnityPlugin)this).Config.Bind<float>("Mini MUL-T", "Lifetime", 30f, "Seconds each Mini MUL-T lasts. Its health bar drains over this time (like Squid Polyp turrets)."); MaxActive = ((BaseUnityPlugin)this).Config.Bind<int>("Mini MUL-T", "MaxActive", 3, "Most Mini MUL-Ts you can have at once. Launching another replaces your oldest."); DamagePercent = ((BaseUnityPlugin)this).Config.Bind<float>("Mini MUL-T", "DamagePercent", 65f, "Each Mini MUL-T's damage as a percent of yours (65 = it deals 65% of what you would, items included)."); HealthBoostStacks = ((BaseUnityPlugin)this).Config.Bind<int>("Mini MUL-T", "HealthBoostStacks", 10, "Extra health for each Mini MUL-T, +10% per point (10 = 200% of your health, like Goobo Jr.)."); CopyItems = ((BaseUnityPlugin)this).Config.Bind<bool>("Mini MUL-T", "CopyItems", true, "true = each Mini MUL-T copies all your items. false = it has no items."); ModelScale = ((BaseUnityPlugin)this).Config.Bind<float>("Mini MUL-T", "ModelScale", 0.65f, "Size of a Mini MUL-T's model relative to normal MUL-T (visual only)."); CreateMarkerItem(); CreateSkill(); object obj = <>c.<>9__15_0; if (obj == null) { CollectContentPackProvidersDelegate val = delegate(AddContentPackProviderDelegate add) { add.Invoke((IContentPackProvider)(object)new MiniMultContent()); }; <>c.<>9__15_0 = val; obj = (object)val; } ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj; CharacterBody.onBodyInventoryChangedGlobal += MiniMultVisuals.OnInventoryChanged; CharacterBody.onBodyStartGlobal += MiniMultVisuals.OnInventoryChanged; Harmony val2 = new Harmony("com.vibes.MiniMult"); val2.PatchAll(typeof(LanguagePatches)); val2.PatchAll(typeof(StatPatches)); LanguagePatches.ApplyToLoaded(); Log.LogInfo((object)"Mini MUL-T loaded."); } private static void CreateMarkerItem() { ItemDef val = ScriptableObject.CreateInstance<ItemDef>(); ((Object)val).name = "MiniMultMarker"; val.nameToken = "ITEM_MINIMULTMARKER_NAME"; val.pickupToken = ""; val.descriptionToken = ""; val.loreToken = ""; val.tier = (ItemTier)5; val.hidden = true; val.canRemove = false; ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); val.tags = (ItemTag[])(object)array; MarkerItem = val; } private static void CreateSkill() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) SkillFamily val = Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Toolbot/ToolbotBodySecondaryFamily.asset").WaitForCompletion(); SkillDef val2 = null; if (Object.op_Implicit((Object)(object)val)) { Variant[] variants = val.variants; foreach (Variant val3 in variants) { if (Object.op_Implicit((Object)(object)val3.skillDef) && ((SerializableEntityStateType)(ref val3.skillDef.activationState)).stateType == typeof(AimStunDrone)) { val2 = val3.skillDef; break; } } } if (!Object.op_Implicit((Object)(object)val2)) { Log.LogError((object)"Could not find Blast Canister in MUL-T's secondary skills; Mini MUL-T won't be added."); return; } SkillDef val4 = Object.Instantiate<SkillDef>(val2); ((Object)val4).name = "ToolbotBodyMiniMult"; val4.skillName = "MiniMult"; val4.skillNameToken = "TOOLBOT_SECONDARY_MINIMULT_NAME"; val4.skillDescriptionToken = "TOOLBOT_SECONDARY_MINIMULT_DESCRIPTION"; val4.activationState = new SerializableEntityStateType(typeof(AimMiniMult)); MiniMultSkillDef = val4; int num = val.variants.Length; Array.Resize(ref val.variants, num + 1); Variant[] variants2 = val.variants; Variant val5 = new Variant { skillDef = val4, unlockableName = "", unlockableDef = null }; ((Variant)(ref val5)).viewableNode = new Node(val4.skillNameToken, false, (Node)null); variants2[num] = val5; } internal static void CopyTuning(object target, object template, params Type[] declaringTypes) { for (int i = 0; i < declaringTypes.Length; i++) { FieldInfo[] fields = declaringTypes[i].GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public); foreach (FieldInfo fieldInfo in fields) { fieldInfo.SetValue(target, fieldInfo.GetValue(template)); } } } internal static bool IsMiniMult(CharacterBody body) { if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && Object.op_Implicit((Object)(object)MarkerItem)) { return body.inventory.GetItemCountPermanent(MarkerItem) > 0; } return false; } } internal class MiniMultContent : IContentPackProvider { private readonly ContentPack contentPack = new ContentPack(); public string identifier => "com.vibes.MiniMult"; public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { if (Object.op_Implicit((Object)(object)MiniMultPlugin.MiniMultSkillDef)) { contentPack.skillDefs.Add((SkillDef[])(object)new SkillDef[1] { MiniMultPlugin.MiniMultSkillDef }); } contentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { MiniMultPlugin.MarkerItem }); contentPack.entityStateTypes.Add(new Type[2] { typeof(AimMiniMult), typeof(LaunchMiniMult) }); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } internal static class LanguagePatches { private static void Apply(Language language) { if (language != null) { int num = Mathf.RoundToInt(MiniMultPlugin.DamagePercent.Value); int num2 = 100 + 10 * Mathf.Max(0, MiniMultPlugin.HealthBoostStacks.Value); string text = (MiniMultPlugin.CopyItems.Value ? "with <style=cIsUtility>all your items</style>, " : ""); language.SetStringByToken("TOOLBOT_SECONDARY_MINIMULT_NAME", "Mini MUL-T"); language.SetStringByToken("TOOLBOT_SECONDARY_MINIMULT_DESCRIPTION", "Launch a <style=cIsUtility>smaller copy of yourself</style> that fights on its own " + text + "with <style=cIsDamage>" + num + "% damage</style> and <style=cIsHealing>" + num2 + "% health</style>. Lasts <style=cIsUtility>" + Mathf.RoundToInt(MiniMultPlugin.Lifetime.Value) + "</style> seconds, up to <style=cIsUtility>" + MiniMultPlugin.MaxActive.Value + "</style> at once."); language.SetStringByToken("ITEM_MINIMULTMARKER_NAME", "Mini MUL-T"); } } internal static void ApplyToLoaded() { try { Apply(Language.currentLanguage); } catch { } } [HarmonyPatch(typeof(Language), "LoadStrings")] [HarmonyPostfix] private static void LoadStrings_Postfix(Language __instance) { Apply(__instance); } } internal static class StatPatches { private static readonly Action<CharacterBody, float> SetDamage = (Action<CharacterBody, float>)Delegate.CreateDelegate(typeof(Action<CharacterBody, float>), AccessTools.PropertySetter(typeof(CharacterBody), "damage")); [HarmonyPatch(typeof(CharacterBody), "RecalculateStats")] [HarmonyPostfix] private static void RecalculateStats_Postfix(CharacterBody __instance) { if (MiniMultPlugin.IsMiniMult(__instance)) { float num = Mathf.Max(0f, MiniMultPlugin.DamagePercent.Value) / 100f; SetDamage(__instance, __instance.damage * num); } } } internal static class MiniMultVisuals { internal static void OnInventoryChanged(CharacterBody body) { if (MiniMultPlugin.IsMiniMult(body) && Object.op_Implicit((Object)(object)body.modelLocator)) { float num = Mathf.Clamp(MiniMultPlugin.ModelScale.Value, 0.1f, 2f); if (!Mathf.Approximately(body.modelLocator.desiredModelScale, num)) { body.modelLocator.desiredModelScale = num; } } } } internal static class MiniMultSpawner { private static readonly Dictionary<CharacterMaster, List<CharacterMaster>> active = new Dictionary<CharacterMaster, List<CharacterMaster>>(); internal static void Launch(CharacterBody owner, Vector3 position, Vector3 velocity) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown if (!NetworkServer.active || !Object.op_Implicit((Object)(object)owner) || !Object.op_Implicit((Object)(object)DirectorCore.instance)) { return; } CharacterMaster ownerMaster = owner.master; if (!Object.op_Implicit((Object)(object)ownerMaster)) { return; } MasterCopySpawnCard val = MasterCopySpawnCard.FromMaster(ownerMaster, MiniMultPlugin.CopyItems.Value, false, (Action<CharacterMaster>)null); if (!Object.op_Implicit((Object)(object)val)) { return; } val.GiveItem(MiniMultPlugin.MarkerItem, 1); val.GiveItem(Items.BoostHp, Mathf.Max(0, MiniMultPlugin.HealthBoostStacks.Value)); int lifetime = Mathf.Max(1, Mathf.RoundToInt(MiniMultPlugin.Lifetime.Value)); val.GiveItem(Items.HealthDecay, lifetime); DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)0, position = position }; DirectorSpawnRequest val3 = new DirectorSpawnRequest((SpawnCard)(object)val, val2, new Xoroshiro128Plus((ulong)Random.Range(1, int.MaxValue))) { teamIndexOverride = ownerMaster.teamIndex, ignoreTeamMemberLimit = true, summonerBodyObject = ((Component)owner).gameObject }; val3.onSpawnedServer = (Action<SpawnResult>)Delegate.Combine(val3.onSpawnedServer, (Action<SpawnResult>)delegate(SpawnResult result) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (result.success && Object.op_Implicit((Object)(object)result.spawnedInstance)) { CharacterMaster component = result.spawnedInstance.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component)) { Track(ownerMaster, component); ((Component)component).gameObject.AddComponent<MiniMultExpiry>().lifetime = (float)lifetime + 2f; CharacterBody body = component.GetBody(); if (Object.op_Implicit((Object)(object)body)) { EntityStateMachine val4 = EntityStateMachine.FindByCustomName(((Component)body).gameObject, "Body"); if (Object.op_Implicit((Object)(object)val4)) { val4.SetNextStateToMain(); } MiniMultLaunch miniMultLaunch = ((Component)body).gameObject.AddComponent<MiniMultLaunch>(); miniMultLaunch.position = position; miniMultLaunch.velocity = velocity; } } } }); DirectorCore.instance.TrySpawnObject(val3); Object.Destroy((Object)(object)val); } private static void Track(CharacterMaster ownerMaster, CharacterMaster mini) { if (!active.TryGetValue(ownerMaster, out var value)) { value = new List<CharacterMaster>(); active[ownerMaster] = value; } value.RemoveAll((CharacterMaster m) => !Object.op_Implicit((Object)(object)m) || !Object.op_Implicit((Object)(object)m.GetBody())); value.Add(mini); int num = Mathf.Max(1, MiniMultPlugin.MaxActive.Value); while (value.Count > num) { CharacterMaster val = value[0]; value.RemoveAt(0); if (Object.op_Implicit((Object)(object)val)) { val.TrueKill(); } } List<CharacterMaster> list = null; foreach (KeyValuePair<CharacterMaster, List<CharacterMaster>> item in active) { if (!Object.op_Implicit((Object)(object)item.Key)) { (list ?? (list = new List<CharacterMaster>())).Add(item.Key); } } if (list == null) { return; } foreach (CharacterMaster item2 in list) { active.Remove(item2); } } } internal class MiniMultLaunch : MonoBehaviour { public Vector3 position; public Vector3 velocity; private int framesWaited; private void FixedUpdate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (framesWaited++ >= 1) { CharacterBody component = ((Component)this).GetComponent<CharacterBody>(); CharacterMotor val = (Object.op_Implicit((Object)(object)component) ? component.characterMotor : null); if (Object.op_Implicit((Object)(object)val)) { ((BaseCharacterController)val).Motor.SetPosition(position, true); ((BaseCharacterController)val).Motor.ForceUnground(0.1f); val.velocity = velocity; } Object.Destroy((Object)(object)this); } } } internal class MiniMultExpiry : MonoBehaviour { public float lifetime = 30f; private float age; private void FixedUpdate() { if (!NetworkServer.active) { return; } age += Time.fixedDeltaTime; if (age >= lifetime) { CharacterMaster component = ((Component)this).GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component)) { component.TrueKill(); } Object.Destroy((Object)(object)this); } } } public class AimMiniMult : AimThrowableBase { private static readonly int PrepBombStateHash = Animator.StringToHash("PrepBomb"); private static readonly int PutAwayGunStateHash = Animator.StringToHash("PutAwayGun"); private static readonly int PrepBombParamHash = Animator.StringToHash("PrepBomb.playbackRate"); private LaunchMiniMult launch; public AimMiniMult() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown MiniMultPlugin.CopyTuning(this, (object)new AimStunDrone(), typeof(AimThrowableBaseAimOnly), typeof(AimThrowableBase)); } public override void OnEnter() { ((AimThrowableBaseAimOnly)this).OnEnter(); Util.PlaySound(AimStunDrone.enterSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Additive", PrepBombStateHash, PrepBombParamHash, ((AimThrowableBaseAimOnly)this).minimumDuration); ((EntityState)this).PlayAnimation("Stance, Override", PutAwayGunStateHash); } protected override void FireProjectile() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) if (MiniMultPlugin.IsMiniMult(((EntityState)this).characterBody)) { ((AimThrowableBase)this).FireProjectile(); return; } Ray finalRay = ((AimThrowableBaseAimOnly)this).currentTrajectoryInfo.finalRay; Vector3 origin = ((Ray)(ref finalRay)).origin; Vector3 hitPoint = ((AimThrowableBaseAimOnly)this).currentTrajectoryInfo.hitPoint; float num = Mathf.Max(0.25f, ((AimThrowableBaseAimOnly)this).currentTrajectoryInfo.travelTime); Vector3 val = (hitPoint - origin) / num - 0.5f * Physics.gravity * num; if (float.IsNaN(val.x) || ((Vector3)(ref val)).sqrMagnitude < 1f) { val = ((Ray)(ref finalRay)).direction * Mathf.Max(10f, ((AimThrowableBaseAimOnly)this).currentTrajectoryInfo.speedOverride); } launch = new LaunchMiniMult { launchPosition = origin, launchVelocity = val }; } protected override void ModifyProjectile(ref FireProjectileInfo fireProjectileInfo) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) ((AimThrowableBase)this).ModifyProjectile(ref fireProjectileInfo); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)32); value.damageSource = (DamageSource)2; fireProjectileInfo.damageTypeOverride = value; } public override void OnExit() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) bool destroying = ((EntityState)this).outer.destroying; ((AimThrowableBase)this).OnExit(); if (!destroying) { if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)((launch != null) ? launch : new RecoverAimStunDrone())); } Util.PlaySound(AimStunDrone.exitSoundString, ((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class LaunchMiniMult : RecoverAimStunDrone { public Vector3 launchPosition; public Vector3 launchVelocity; public override void OnEnter() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((RecoverAimStunDrone)this).OnEnter(); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { MiniMultSpawner.Launch(((EntityState)this).characterBody, launchPosition, launchVelocity); } } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(launchPosition); writer.Write(launchVelocity); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); launchPosition = reader.ReadVector3(); launchVelocity = reader.ReadVector3(); } }