v0.3.1a: fixed visual bugs caused by vertigo
This commit is contained in:
parent
e0ad8f1938
commit
3305537ec1
|
@ -397,9 +397,14 @@ public abstract class Char extends Actor {
|
|||
public void move( int step ) {
|
||||
|
||||
if (Level.adjacent( step, pos ) && buff( Vertigo.class ) != null) {
|
||||
step = pos + Level.NEIGHBOURS8[Random.Int( 8 )];
|
||||
if (!(Level.passable[step] || Level.avoid[step]) || Actor.findChar( step ) != null)
|
||||
sprite.interruptMotion();
|
||||
int newPos = pos + Level.NEIGHBOURS8[Random.Int( 8 )];
|
||||
if (!(Level.passable[newPos] || Level.avoid[newPos]) || Actor.findChar( newPos ) != null)
|
||||
return;
|
||||
else {
|
||||
sprite.move(pos, newPos);
|
||||
step = newPos;
|
||||
}
|
||||
}
|
||||
|
||||
if (Dungeon.level.map[pos] == Terrain.OPEN_DOOR) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user