projects
/
Questionable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05d6394
)
Fix target switching logic in combat
author
Liza Carvelli
<liza@carvel.li>
Wed, 22 Jan 2025 17:38:24 +0000
(18:38 +0100)
committer
Liza Carvelli
<liza@carvel.li>
Wed, 22 Jan 2025 17:38:24 +0000
(18:38 +0100)
Questionable/Controller/CombatController.cs
patch
|
blob
|
blame
|
history
diff --git
a/Questionable/Controller/CombatController.cs
b/Questionable/Controller/CombatController.cs
index 73fe17dfc9e78421e50d0ec8f2ade2c4ab187eee..ea10fa7ca8b029a7bcd21bfdaabee083b76c17c5 100644
(file)
--- a/
Questionable/Controller/CombatController.cs
+++ b/
Questionable/Controller/CombatController.cs
@@
-157,7
+157,7
@@
internal sealed class CombatController : IDisposable
{
int currentTargetPriority = GetKillPriority(target);
var nextTarget = FindNextTarget();
- int nextTargetPriority =
GetKillPriority(target)
;
+ int nextTargetPriority =
nextTarget != null ? GetKillPriority(nextTarget) : 0
;
if (nextTarget != null && nextTarget.Equals(target))
{
@@
-176,7
+176,7
@@
internal sealed class CombatController : IDisposable
}
else if (nextTarget != null)
{
- if (nextTargetPriority > currentTargetPriority)
+ if (nextTargetPriority > currentTargetPriority
|| currentTargetPriority == 0
)
SetTarget(nextTarget);
}
else