Closed Hark0nnen closed 4 years ago
me in ticket-3895:
ok dont think its ME, ME doesn't change vanilla values that could lead to NRE. additionally, the ME code itself suppresses vanilla code (GetComponentPrefabName) from actually calling the method (GetWeaponPrefabName) that crashes.. so not sure what happening there. Its like ME wasnt yet loaded and hasn't patched the game...
well one thing it could be... if ME hardpoint calculator coulnd't be setup, because the mech wasnt initialized the way ME requires it, then during the GetComponentPrefabName it falls back to vanilla and vanilla could of course throw NREs
Should be fixed by d6e528cd8ce77117fb57a7acf8397bc632b377ad
I reverted the fix, loading took too much performance away, mechs should be made vanilla compatible to avoid issues :(
location with no real hardpoints but with blanks causes fatal index out of bounds error. idk if this is vanilla, ME or CU issue
at BattleTech.MechHardpointRules.GetWeaponPrefabName (BattleTech.HardpointDataDef hardpointDataDef, BattleTech.BaseComponentRef componentRef, System.String prefabBase, System.String location, System.Collections.Generic.List&)
at CustomUnits.MechDef_RefreshInventory.GetComponentPrefabName (BattleTech.ChassisDef chassis, BattleTech.BaseComponentRef componentRef, System.String prefabBase, System.String location, System.Collections.Generic.List`1[System.String]& usedPrefabNames) [0x00263] in
<15bd6971ee4a4a0aa9b69150be3e33b3>:0 at (wrapper dynamic-method) BattleTech.MechDef.RefreshInventory_Patch0(object) cause by this: { "location" : "centertorso", "weapons" : [ ], "blanks" : [ "chrPrfWeap_javelin_centertorso_blank_ah1" ], "mountingPoints" : [ ] },1[System.String]& usedPrefabNames) [0x0041a] in <4184af8dbeb44635831353f4d349631c>:0 at (wrapper dynamic-method) BattleTech.MechHardpointRules.GetComponentPrefabName_Patch3(BattleTech.HardpointDataDef,BattleTech.BaseComponentRef,string,string,System.Collections.Generic.List
1