From 434c467ac1493aada6744b86598bd5f13dfaab55 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 17 Mar 2025 14:38:23 -0400 Subject: [PATCH] v3.0.2: fixed time freeze breaking recalled thrown runestones --- .../actors/hero/spells/RecallInscription.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java index ad8ba41c9..88dd8b2ba 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; @@ -41,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.utils.Bundle; +import com.watabou.utils.Callback; import com.watabou.utils.Reflection; public class RecallInscription extends ClericSpell { @@ -79,7 +81,14 @@ public class RecallInscription extends ClericSpell { if (item instanceof InventoryStone){ ((InventoryStone) item).directActivate(); } else { - item.doThrow(hero); + //we're already on the render thread, but we want to delay this + //as things like time freeze cancel can stop stone throwing from working + ShatteredPixelDungeon.runOnRenderThread(new Callback() { + @Override + public void call() { + item.doThrow(hero); + } + }); } }