v0.3.0d: fixed some edge case bugs with ballistica
This commit is contained in:
committed by
Evan Debenham
parent
722fc4240a
commit
b25ba94a71
@@ -103,13 +103,13 @@ public class Ballistica {
|
|||||||
while (Level.insideMap(cell)) {
|
while (Level.insideMap(cell)) {
|
||||||
|
|
||||||
//if we're in a wall, collide with the previous cell along the path.
|
//if we're in a wall, collide with the previous cell along the path.
|
||||||
if (stopTerrain && !Level.passable[cell] && !Level.avoid[cell]) {
|
if (stopTerrain && cell != sourcePos && !Level.passable[cell] && !Level.avoid[cell]) {
|
||||||
collide(path.get(path.size()-1));
|
collide(path.get(path.size() - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
path.add(cell);
|
path.add(cell);
|
||||||
|
|
||||||
if ((stopTerrain && Level.losBlocking[cell])
|
if ((stopTerrain && cell != sourcePos && Level.losBlocking[cell])
|
||||||
|| (cell != sourcePos && stopChars && Actor.findChar( cell ) != null)
|
|| (cell != sourcePos && stopChars && Actor.findChar( cell ) != null)
|
||||||
|| (cell == to && stopTarget)){
|
|| (cell == to && stopTarget)){
|
||||||
collide(cell);
|
collide(cell);
|
||||||
|
|||||||
Reference in New Issue
Block a user