mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-30 02:30:41 +00:00
- made Blood's inventory cycle-able.
IMO it's a totally annoying limitations to block wraparound of the cursor.
This commit is contained in:
parent
447573aa36
commit
e0ca98602d
1 changed files with 22 additions and 9 deletions
|
@ -545,30 +545,43 @@ void packPrevItem(PLAYER *pPlayer)
|
||||||
{
|
{
|
||||||
if (pPlayer->packItemTime > 0)
|
if (pPlayer->packItemTime > 0)
|
||||||
{
|
{
|
||||||
for (int nPrev = ClipLow(pPlayer->packItemId-1,0); nPrev >= 0; nPrev--)
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
for (int nPrev = pPlayer->packItemId-1; nPrev >= 0; nPrev--)
|
||||||
{
|
{
|
||||||
if (pPlayer->packSlots[nPrev].curAmount)
|
if (pPlayer->packSlots[nPrev].curAmount)
|
||||||
{
|
{
|
||||||
pPlayer->packItemId = nPrev;
|
pPlayer->packItemId = nPrev;
|
||||||
break;
|
pPlayer->packItemTime = 600;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pPlayer->packItemId = 4;
|
||||||
|
if (pPlayer->packSlots[4].curAmount) break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pPlayer->packItemTime = 600;
|
pPlayer->packItemTime = 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
void packNextItem(PLAYER *pPlayer)
|
void packNextItem(PLAYER* pPlayer)
|
||||||
{
|
{
|
||||||
if (pPlayer->packItemTime > 0)
|
if (pPlayer->packItemTime > 0)
|
||||||
{
|
{
|
||||||
for (int nNext = ClipHigh(pPlayer->packItemId+1,5); nNext < 5; nNext++)
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
for (int nNext = pPlayer->packItemId + 1; nNext < 5; nNext++)
|
||||||
{
|
{
|
||||||
if (pPlayer->packSlots[nNext].curAmount)
|
if (pPlayer->packSlots[nNext].curAmount)
|
||||||
{
|
{
|
||||||
pPlayer->packItemId = nNext;
|
pPlayer->packItemId = nNext;
|
||||||
break;
|
pPlayer->packItemTime = 600;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pPlayer->packItemId = 0;
|
||||||
|
if (pPlayer->packSlots[0].curAmount) break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pPlayer->packItemTime = 600;
|
pPlayer->packItemTime = 600;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue