cseelhoff / RimThreaded

RimThreaded is a RimWorld mod designed to enable RimWorld to utilize multiple threads.
MIT License
116 stars 20 forks source link

[Combat Extended+Medieval Overhaul] Pawns don't move when forced to melee attack other pawns. #745

Open annpyingshek opened 2 years ago

annpyingshek commented 2 years ago

Developer To Do Notes:

Non-Vanilla Bug Report

Describe the bug

Pawns don't path towards another pawn when given the command to melee attack if both Medieval Overhaul and Combat Extended are installed. If only one pawn is given order to, they can actually move to attack but if you order other pawn to attack too, both will stop moving.

Steps to reproduce the behavior (VERY IMPORTANT)

  1. Select a pawn
  2. Force to melee attack another pawn that isn't directly near them. (Preferably several times because error doesn't appear every time in console)

Error Logs ?

Exception in JobDriver tick for pawn Toni driver=JobDriver_AttackMelee (toilIndex=2) driver.job=(AttackMelee (Job_229) A=Thing_WildBoar51513)
System.NullReferenceException: Object reference not set to an instance of an object
  at CombatExtended.HarmonyCE.Harmony_CastPositionFinder+CastPositionFinder_CastPositionPreference_Patch.Postfix (Verse.IntVec3 c, System.Single& __result) [0x000e5] in <5974279be7ac41c4bc34ed94ebf75c02>:0 
  at (wrapper dynamic-method) Verse.AI.CastPositionFinder.Verse.AI.CastPositionFinder.CastPositionPreference_Patch1(Verse.IntVec3)
  at Verse.AI.CastPositionFinder.EvaluateCell (Verse.IntVec3 c) [0x00245] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0 
  at (wrapper dynamic-method) Verse.AI.CastPositionFinder.Verse.AI.CastPositionFinder.TryFindCastPosition_Patch2(Verse.AI.CastPositionRequest,Verse.IntVec3&)
  at DankPyon.Patch_FollowAndMeleeAttack+<>c__DisplayClass1_0.<FollowAndMeleeAttackModified>b__0 () [0x000f6] in <89fffa78f7d3471daf42f1d30799b5a5>:0 
  at Verse.AI.JobDriver.DriverTick () [0x001a1] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.JobUtility:TryStartErrorRecoverJob (Verse.Pawn,string,System.Exception,Verse.AI.JobDriver)
Verse.AI.JobDriver:DriverTick ()
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)

HugsLib log

https://gist.github.com/4c0064aefb625e51e812a96d9305525b

Save file ?

New Arrivals1.zip

Although it shouldn't be necessary since you can simply create a new game and easily reproduce it the moment your pawns spawn.

Mod list (Preferably a RimPy compatible list.) ?

Harmony [https://steamcommunity.com/sharedfiles/filedetails/?id=2009463077] Core [https:// no link (local mod)] HugsLib [https://steamcommunity.com/sharedfiles/filedetails/?id=818773962] LWM's Deep Storage [https://steamcommunity.com/sharedfiles/filedetails/?id=1617282896] Vanilla Expanded Framework [https://steamcommunity.com/sharedfiles/filedetails/?id=2023507013] [SYR] Processor Framework [https://steamcommunity.com/sharedfiles/filedetails/?id=2633514537] Medieval Overhaul [https://steamcommunity.com/sharedfiles/filedetails/?id=2553700067] Combat Extended [https://steamcommunity.com/sharedfiles/filedetails/?id=1631756268] RimThreaded [https://steamcommunity.com/sharedfiles/filedetails/?id=2222907981]