From 7368778cb205cd773fc6c82224c564456ab9b3fe Mon Sep 17 00:00:00 2001 From: Andi <65138215+galaxyhaxz@users.noreply.github.com> Date: Sat, 6 Mar 2021 03:57:29 -0600 Subject: [PATCH] Remove items dropping before entering level (#1010) --- Source/diablo.cpp | 4 +++- Source/inv.cpp | 6 ++---- Source/msg.cpp | 4 ---- Source/towners.cpp | 2 +- Source/trigs.cpp | 4 ---- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 475b3cfb3..1b0280452 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1699,7 +1699,9 @@ void LoadGameLevel(BOOL firstflag, int lvldir) glSeedTbl[currlevel] = setseed; music_stop(); - NewCursor(CURSOR_HAND); + if (pcurs > CURSOR_HAND && pcurs < CURSOR_FIRSTITEM) { + NewCursor(CURSOR_HAND); + } SetRndSeed(glSeedTbl[currlevel]); IncProgress(); MakeLightTable(); diff --git a/Source/inv.cpp b/Source/inv.cpp index ca2de3ce7..5567a4097 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -1929,10 +1929,8 @@ void AutoGetItem(int pnum, int ii) dropGoldValue = 0; } - if (ii != MAXITEMS) { - if (dItem[item[ii]._ix][item[ii]._iy] == 0) - return; - } + if (dItem[item[ii]._ix][item[ii]._iy] == 0) + return; item[ii]._iCreateInfo &= ~CF_PREGEN; plr[pnum].HoldItem = item[ii]; /// BUGFIX: overwrites cursor item, allowing for belt dupe bug diff --git a/Source/msg.cpp b/Source/msg.cpp index 1a640bb23..4d6942558 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -1934,10 +1934,6 @@ static DWORD On_WARP(TCmd *pCmd, int pnum) msg_send_packet(pnum, p, sizeof(*p)); else { StartWarpLvl(pnum, p->wParam1); - if (pnum == myplr && pcurs >= CURSOR_FIRSTITEM) { - item[MAXITEMS] = plr[myplr].HoldItem; - AutoGetItem(myplr, MAXITEMS); - } } return sizeof(*p); diff --git a/Source/towners.cpp b/Source/towners.cpp index 6b3768fb0..a1731c36d 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -750,7 +750,7 @@ void TalkToTowner(int p, int t) towner[t]._tMsgSaid = FALSE; - if (pcurs >= CURSOR_FIRSTITEM && !DropItemBeforeTrig()) { + if (pcurs >= CURSOR_FIRSTITEM) { return; } diff --git a/Source/trigs.cpp b/Source/trigs.cpp index 95ae6b0ef..27a3a7dda 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -849,14 +849,10 @@ void CheckTriggers() PlaySFX(PS_WARR18); InitDiabloMsg(EMSG_NOT_IN_SHAREWARE); } else { - if (pcurs >= CURSOR_FIRSTITEM && DropItemBeforeTrig()) - return; StartNewLvl(myplr, trigs[i]._tmsg, currlevel + 1); } break; case WM_DIABPREVLVL: - if (pcurs >= CURSOR_FIRSTITEM && DropItemBeforeTrig()) - return; StartNewLvl(myplr, trigs[i]._tmsg, currlevel - 1); break; case WM_DIABRTNLVL: