fixed a crash bug when collecting an Orb of Safety via Orb of Space with Orb of Impact active

This commit is contained in:
Zeno Rogue 2020-12-26 17:17:05 +01:00
parent 1f5951dbee
commit 5acdab45d6
1 changed files with 5 additions and 1 deletions

View File

@ -1215,7 +1215,11 @@ EX eItem targetRangedOrb(cell *c, orbAction a) {
// (0) telekinesis
if(c->item && !itemHiddenFromSight(c) && !cwt.at->item && items[itOrbSpace] >= fixpower(spacedrain(c).first) && !cantGetGrimoire(c, !isCheck(a))
&& c->item != itBarrow) {
if(!isCheck(a)) telekinesis(c), apply_impact(c);
if(!isCheck(a)) {
bool saf = c->item == itOrbSafety;
telekinesis(c);
if(!saf) apply_impact(c);
}
return itOrbSpace;
}