v0.3.0d: fixed some edge case bugs with ballistica
This commit is contained in:
parent
722fc4240a
commit
b25ba94a71
|
@ -103,13 +103,13 @@ public class Ballistica {
|
|||
while (Level.insideMap(cell)) {
|
||||
|
||||
//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));
|
||||
}
|
||||
|
||||
path.add(cell);
|
||||
|
||||
if ((stopTerrain && Level.losBlocking[cell])
|
||||
if ((stopTerrain && cell != sourcePos && Level.losBlocking[cell])
|
||||
|| (cell != sourcePos && stopChars && Actor.findChar( cell ) != null)
|
||||
|| (cell == to && stopTarget)){
|
||||
collide(cell);
|
||||
|
|
Loading…
Reference in New Issue
Block a user