From bd7d5a01439034831f72a3d67560db25cf8895f4 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 9 Jul 2022 03:51:46 +0200 Subject: [PATCH] Deduplicate using spells --- Source/items.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 57664107a..ff80ff1b1 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3908,6 +3908,7 @@ void UseItem(int pnum, item_misc_id mid, spell_id spl) } break; case IMISC_SCROLL: + case IMISC_SCROLLT: if (ControlMode == ControlTypes::KeyboardAndMouse && spelldata[spl].sTargeted) { player._pTSpell = spl; if (pnum == MyPlayerId) @@ -3924,21 +3925,6 @@ void UseItem(int pnum, item_misc_id mid, spell_id spl) NetSendCmdLoc(pnum, true, CMD_NOVA, cursPosition); } break; - case IMISC_SCROLLT: - if (ControlMode == ControlTypes::KeyboardAndMouse && spelldata[spl].sTargeted) { - player._pTSpell = spl; - if (pnum == MyPlayerId) - NewCursor(CURSOR_TELEPORT); - } else { - ClrPlrPath(player); - player._pSpell = spl; - player._pSplType = RSPLTYPE_INVALID; - player._pSplFrom = 3; - player.destAction = ACTION_SPELL; - player.destParam1 = cursPosition.x; - player.destParam2 = cursPosition.y; - } - break; case IMISC_BOOK: player._pMemSpells |= GetSpellBitmask(spl); if (player._pSplLvl[spl] < MaxSpellLevel)