[SRC]bag jumble Fix

Codes already submitted by people of the forums.
Post Reply
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
find
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wsprintf(G_cTxt, "RequestInitDataHandler error: Client(%s) Item(%d)", m_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scroll up a bit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iTotalItemA = 0;
for (i = 0; i < DEF_MAXITEMS; i++)
if (m_pClientList[iClientH]->m_pItemList != NULL)
iTotalItemA++;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
add
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//fix for bag jumble
bFlag = FALSE;
while (bFlag == FALSE) {
bFlag = TRUE;
for (i = 0; i < DEF_MAXITEMS-1; i++)
if ((m_pClientList[iClientH]->m_pItemList == NULL) && (m_pClientList[iClientH]->m_pItemList[i+1] != NULL)) {
m_pClientList[iClientH]->m_pItemList = m_pClientList[iClientH]->m_pItemList[i+1];
m_pClientList[iClientH]->m_pItemList[i+1] = NULL;

m_pClientList[iClientH]->m_ItemPosList.x = m_pClientList[iClientH]->m_ItemPosList[i+1].x;
m_pClientList[iClientH]->m_ItemPosList.y = m_pClientList[iClientH]->m_ItemPosList[i+1].y;
bFlag = FALSE;
}
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
make sure there 16 not 15
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (memcmp(token, "item-position-x", 16) == 0) {
cReadModeA = 50;
cReadModeB = 1;
}
if (memcmp(token, "item-position-y", 16) == 0) {
cReadModeA = 51;
cReadModeB = 1;
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`



Have Fun Brought To You By Juggalo2
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1+12
Member
Posts: 173
Joined: Sat Feb 04, 2006 5:05 pm

Post by 1+12 »

Have you tested this to make sure it actually works?

Then again its nice to see someone still contributing to the HB Community.
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

This has already been suggested and proven not to work. Even at 15, it still matches because the first 15 bytes are still exact. It still processes a match. Though it does seem to fix an error of reading the y values into x, that doesn't explain why the items are just swapped back an index value putting them in the spot the next item up was at. That's an indexing issue not so much a reading issue.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

bone-you wrote: This has already been suggested and proven not to work. Even at 15, it still matches because the first 15 bytes are still exact. It still processes a match. Though it does seem to fix an error of reading the y values into x, that doesn't explain why the items are just swapped back an index value putting them in the spot the next item up was at. That's an indexing issue not so much a reading issue.
dude there more than just the 15 to 16 change durr.


and yes i tested an it works i havent had a bag jumble yet
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

bone-you wrote: This has already been suggested and proven not to work. Even at 15, it still matches because the first 15 bytes are still exact. It still processes a match. Though it does seem to fix an error of reading the y values into x, that doesn't explain why the items are just swapped back an index value putting them in the spot the next item up was at. That's an indexing issue not so much a reading issue.
Turns out the 2.20 was almost there. That bFlag shit (although confusing) is the 2.20 fix. Thats why I never experienced the bug after performing hypno's proposed fix on my files. Juggalo found the final peice. So in both cases, Juggalo wins, you lose. :D
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
1+12
Member
Posts: 173
Joined: Sat Feb 04, 2006 5:05 pm

Post by 1+12 »

Lol, Anyways, good job :)
Charles
Loyal fan
Posts: 418
Joined: Wed Nov 26, 2003 8:20 pm

Post by Charles »

wouldnt it be better to add it to the part above instead of below it? i just added the x and y pos inside the itotalitema part. and edited the notify case for item postion with the 2.20 one. haven't experienced any scramble yet. if you look at other codes inside the source about how you get an item. you'll see you dont need to add another part. just have to edit an existing part
<i>"Always write good code. Feel bad to write bad code."</i>
Post Reply