Skip to content

Commit

Permalink
Merge pull request #44 from kbatbouta/development
Browse files Browse the repository at this point in the history
Small fix.
  • Loading branch information
kbatbouta authored Feb 9, 2023
2 parents a4f03fa + 2f906e8 commit 1e00bee
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 1e00bee

Please sign in to comment.