Skip to content

Commit

Permalink
v1.1.2: fixed rare edge-case crashes with levitation
Browse files Browse the repository at this point in the history
  • Loading branch information
00-Evan committed Jan 13, 2022
1 parent d1b897c commit 77c5285
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;

import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;

Expand All @@ -50,7 +52,10 @@ public boolean attachTo( Char target ) {
public void detach() {
target.flying = false;
super.detach();
Dungeon.level.occupyCell(target );
//only press tiles if we're current in the game screen
if (ShatteredPixelDungeon.scene() instanceof GameScene) {
Dungeon.level.occupyCell(target );
}
}

@Override
Expand Down

0 comments on commit 77c5285

Please sign in to comment.