v1.1.2: fixed rare edge-case crashes with levitation
This commit is contained in:
parent
d1b897cc6b
commit
77c5285f2f
|
@ -22,8 +22,10 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
|
|
||||||
|
@ -50,8 +52,11 @@ public class Levitation extends FlavourBuff {
|
||||||
public void detach() {
|
public void detach() {
|
||||||
target.flying = false;
|
target.flying = false;
|
||||||
super.detach();
|
super.detach();
|
||||||
|
//only press tiles if we're current in the game screen
|
||||||
|
if (ShatteredPixelDungeon.scene() instanceof GameScene) {
|
||||||
Dungeon.level.occupyCell(target );
|
Dungeon.level.occupyCell(target );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int icon() {
|
public int icon() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user