Mercurial > mm7
diff Player.cpp @ 188:207b2492e14b
AddItem crash
author | Nomad |
---|---|
date | Fri, 15 Feb 2013 22:54:19 +0200 |
parents | 49728858c35e |
children | 9b77686e2239 |
line wrap: on
line diff
--- a/Player.cpp Fri Feb 15 22:38:05 2013 +0200 +++ b/Player.cpp Fri Feb 15 22:54:19 2013 +0200 @@ -2332,10 +2332,10 @@ std::string v12; // [sp-18h] [bp-40h]@9 const char *v13; // [sp-8h] [bp-30h]@9 int v14; // [sp-4h] [bp-2Ch]@9 - int v15; // [sp+Ch] [bp-1Ch]@3 - int v16; // [sp+10h] [bp-18h]@3 - int v17; // [sp+14h] [bp-14h]@3 - int v18; // [sp+18h] [bp-10h]@3 + int v15[4] = {0, 1, 2, 3}; // [sp+Ch] [bp-1Ch]@3 + //int v16; // [sp+10h] [bp-18h]@3 + //int v17; // [sp+14h] [bp-14h]@3 + //int v18; // [sp+18h] [bp-10h]@3 Player *v19; // [sp+1Ch] [bp-Ch]@9 Party *v20; // [sp+20h] [bp-8h]@1 int v21; // [sp+24h] [bp-4h]@10 @@ -2346,17 +2346,17 @@ v2 = pItem->uItemID; if ( !BYTE2(pItemsTable->pItems[v2 + 1].uItemID) ) pItem->uAttributes |= 1u; - v15 = 0; - v16 = 1; - v18 = 3; - v17 = 2; + ///v15 = 0; + //v16 = 1; + //v18 = 3; + //v17 = 2; if ( uActiveCharacter ) { v3 = uActiveCharacter - 1; v4 = 0; do { - *(&v15 + v4++) = v3++; + v15[v4++] = v3++; if ( (signed int)v3 >= 4 ) v3 = 0; } @@ -2366,13 +2366,13 @@ if ( v5 ) { v6 = pIcons_LOD->LoadTexture(v5, TEXTURE_16BIT_PALETTE); - v7 = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); + v7 = (Texture *)(v6 != -1 ? &pIcons_LOD->pTextures[v6] : 0); v21 = areWeLoadingTexture; v8 = 0; while ( 1 ) { - v9 = &v20->pPlayers[*(&v15 + v8)]; - v19 = &v20->pPlayers[*(&v15 + v8)]; + v9 = &v20->pPlayers[v15[v8]]; + v19 = &v20->pPlayers[v15[v8]]; v10 = v19->AddItem(0xFFFFFFFFu, pItem->uItemID); if ( v10 ) break;