v2.2.0: added a safety check for CharSprite moving
This commit is contained in:
@@ -266,7 +266,7 @@ public abstract class Char extends Actor {
|
||||
|
||||
protected boolean moveSprite( int from, int to ) {
|
||||
|
||||
if (sprite.isVisible() && (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to])) {
|
||||
if (sprite.isVisible() && sprite.parent != null && (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to])) {
|
||||
sprite.move( from, to );
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user