v0.8.2: fixed logic errors in new targeted trap behaviour
This commit is contained in:
parent
07d58369f8
commit
525b934789
|
@ -58,6 +58,7 @@ public class DisintegrationTrap extends Trap {
|
|||
Ballistica bolt = new Ballistica(pos, ch.pos, Ballistica.PROJECTILE);
|
||||
if (bolt.collisionPos == ch.pos && curDist < closestDist){
|
||||
target = ch;
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class GrimTrap extends Trap {
|
|||
Ballistica bolt = new Ballistica(pos, ch.pos, Ballistica.PROJECTILE);
|
||||
if (bolt.collisionPos == ch.pos && curDist < closestDist){
|
||||
target = ch;
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ public class PoisonDartTrap extends Trap {
|
|||
Ballistica bolt = new Ballistica(pos, ch.pos, Ballistica.PROJECTILE);
|
||||
if (canTarget(ch) && bolt.collisionPos == ch.pos && curDist < closestDist){
|
||||
target = ch;
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public class WornDartTrap extends Trap {
|
|||
Ballistica bolt = new Ballistica(pos, ch.pos, Ballistica.PROJECTILE);
|
||||
if (bolt.collisionPos == ch.pos && curDist < closestDist){
|
||||
target = ch;
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user