Skip to content

Commit

Permalink
Small fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
kbatbouta committed Feb 9, 2023
1 parent 8858f94 commit 2f906e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified 1.4/Assemblies/CombatAI.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/Rule56/Comps/ThingComp_CombatAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ bool Validator_Retreat(IntVec3 cell)
bool Validator_Attack(IntVec3 cell) => prevEnemyDir == Vector2.zero
|| Rand.Chance(Mathf.Abs(1 - Vector2.Dot(prevEnemyDir, sightReader.GetEnemyDirection(cell).normalized)))
|| Rand.Chance(sightReader.GetVisibilityToEnemies(pawnPosition) - sightReader.GetVisibilityToEnemies(cell));
if (TryAttack(new LocalTargetInfo(bestEnemy), verb, bestEnemyVisibleNow, out IntVec3 destCell, Validator_Attack, true, true))
if (TryAttack(new LocalTargetInfo(bestEnemy), verb, bestEnemyVisibleNow, out IntVec3 destCell, Validator_Attack, warmup == null, true))
{
lastInterupted = lastMoved = GenTicks.TicksGame;
prevEnemyDir = sightReader.GetEnemyDirection(destCell).normalized;
Expand Down

0 comments on commit 2f906e8

Please sign in to comment.