# HG changeset patch # User Ritor1 # Date 1367330922 -21600 # Node ID 3696848c0413a28eb2b0cdd50fb6c0f79811f773 # Parent 34ed2d5e7cfb6c52cef94e2a90ebeba9462cb83d meteorite rain and other spells fix diff -r 34ed2d5e7cfb -r 3696848c0413 mm7_3.cpp --- a/mm7_3.cpp Sun Apr 28 19:11:36 2013 +0600 +++ b/mm7_3.cpp Tue Apr 30 20:08:42 2013 +0600 @@ -11522,34 +11522,36 @@ v10.uViewportZ = 639; v10.uViewportW = 479; v12 = 0; - v3 = (char *)&pOtherOverlayList->pOverlays[0].field_C; - do - { - if ( *((short *)v3 - 3) > 0 ) - { - result = *((short *)v3 - 6); - if ( result >= 300 ) - { - v4 = result; - v5 = result == v2 + 320 | result == v2 + 330 | result == v2 + 340 | result == v2 + 350; - result = v2 + 310; - if ( v4 == v2 + 310 | v5 ) - { - if ( !*(short *)v3 ) - { - v6 = pSpriteFrameTable->GetFrame( - pOverlayList->pOverlays[*((short *)v3 - 5)].uSpriteFramesetID, - *((short *)v3 - 4)); + //v3 = (char *)&pOtherOverlayList->pOverlays[0].field_C; + //do + for ( uint i = 0; i < 50; ++i ) + { + if ( pOtherOverlayList->pOverlays[i].field_6 > 0 ) + { + result = pOtherOverlayList->pOverlays[i].field_0; + if ( pOtherOverlayList->pOverlays[i].field_0 >= 300 ) + { + //v4 = result; + v5 = pOtherOverlayList->pOverlays[i].field_0 == v2 + 320 + | pOtherOverlayList->pOverlays[i].field_0 == v2 + 330 | pOtherOverlayList->pOverlays[i].field_0 == v2 + 340 + | pOtherOverlayList->pOverlays[i].field_0 == v2 + 350; + pOtherOverlayList->pOverlays[i].field_0 = v2 + 310; + if ( pOtherOverlayList->pOverlays[i].field_0 == v2 + 310 | v5 ) + { + if ( !pOtherOverlayList->pOverlays[i].field_0 ) + { + v6 = pSpriteFrameTable->GetFrame(pOverlayList->pOverlays[pOtherOverlayList->pOverlays[i].field_2].uSpriteFramesetID, + pOtherOverlayList->pOverlays[i].field_4); v7 = v6; - v11 = *((int *)v3 + 1); + v11 = pOtherOverlayList->pOverlays[i].field_E; v13 = v6->scale; v13 = (unsigned __int64)(v11 * (signed __int64)v13) >> 16; - v10.uScreenSpaceX = *((short *)v3 - 2); - v10.uScreenSpaceY = *((short *)v3 - 1); + v10.uScreenSpaceX = pOtherOverlayList->pOverlays[i].field_8; + v10.uScreenSpaceY = pOtherOverlayList->pOverlays[i].field_A; v10._screenspace_x_scaler_packedfloat = v13; v10._screenspace_y_scaler_packedfloat = v13; v10.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v6->uPaletteIndex, 0, 1); - v8 = *((short *)v3 - 5); + v8 = pOtherOverlayList->pOverlays[i].field_2; v10.sZValue = 0; v10.uFlags = 0; v9 = pOverlayList->pOverlays[v8].uOverlayType; @@ -11563,9 +11565,9 @@ } } } - v3 += 20; - } - while ( (signed int)v3 < (signed int)&pOverlayList->pOverlays ); + //v3 += 20; + } + //while ( (signed int)v3 < (signed int)&pOverlayList->pOverlays ); return result; } diff -r 34ed2d5e7cfb -r 3696848c0413 mm7_5.cpp --- a/mm7_5.cpp Sun Apr 28 19:11:36 2013 +0600 +++ b/mm7_5.cpp Tue Apr 30 20:08:42 2013 +0600 @@ -4544,7 +4544,7 @@ //bool uPlayerID; // eax@3 //Player *pPlayer; // edi@4 Actor *pMonster; // esi@7 - SpriteObject *v9; // ebx@12 + //SpriteObject *v9; // ebx@12 int v10; // eax@12 int v11; // ebx@12 unsigned int v12; // ecx@12 @@ -4689,12 +4689,12 @@ v61 = v4->field_60_distance_related_prolly_lod; if ( !v19 ) { - v9 = (SpriteObject *)uDamageAmount; - v50 = pParty->vPosition.x - *(int *)(uDamageAmount + 4); + //v9 = (SpriteObject *)uDamageAmount; + v50 = pParty->vPosition.x - v4->vPosition.x; //v55 = abs(v50); - pMonsterName = (char *)(pParty->vPosition.y - v9->vPosition.y); + pMonsterName = (char *)(pParty->vPosition.y - v4->vPosition.y); //v51 = (unsigned __int64 *)abs((int)pMonsterName); - pPlayerName = (char *)(pParty->vPosition.z - v9->vPosition.z); + pPlayerName = (char *)(pParty->vPosition.z - v4->vPosition.z); v52 = abs((int)pPlayerName); v61 = abs(v50); v10 = abs(v50); @@ -4729,7 +4729,7 @@ { v61 = 1; } - v4 = (SpriteObject *)uDamageAmount; + //v4 = (SpriteObject *)uDamageAmount; } v15 = v4->spell_id; diff -r 34ed2d5e7cfb -r 3696848c0413 mm7_6.cpp --- a/mm7_6.cpp Sun Apr 28 19:11:36 2013 +0600 +++ b/mm7_6.cpp Tue Apr 30 20:08:42 2013 +0600 @@ -1110,7 +1110,7 @@ || (v2 = 300.0 < p[1].vWorldViewPosition.x, v3 = 0, v4 = 300.0 == p[1].vWorldViewPosition.x, - BYTE1(result) = HIBYTE(v1), + //BYTE1(result) = HIBYTE(v1), !(v2 | v4)) ) { if ( p->vWorldViewPosition.x < 300.0 ) @@ -1118,17 +1118,17 @@ v6 = 300.0 < p[1].vWorldViewPosition.x; v7 = 0; v8 = 300.0 == p[1].vWorldViewPosition.x; - BYTE1(result) = HIBYTE(v1); + //BYTE1(result) = HIBYTE(v1); if ( !(v6 | v8) ) { - LOBYTE(result) = 0; - return result; + //LOBYTE(result) = 0; + return false; } } v9 = 300.0 < p->vWorldViewPosition.x; v10 = 0; v11 = 300.0 == p->vWorldViewPosition.x; - BYTE1(result) = HIBYTE(v1); + //BYTE1(result) = HIBYTE(v1); if ( v9 | v11 ) { v16 = 1.0 / (p->vWorldViewPosition.x - p[1].vWorldViewPosition.x); @@ -1150,8 +1150,8 @@ p->vWorldViewPosition.z = v15 * v14 + p->vWorldViewPosition.z; } } - LOBYTE(result) = 1; - return result; + //LOBYTE(result) = 1; + return true; } //----- (004268E3) -------------------------------------------------------- @@ -4747,7 +4747,7 @@ a1.uSpriteFrameID = 0; a1.spell_caster_pid = PID(OBJECT_Player, v3->uPlayerID); a1.spell_target_pid = v730; - __debugbreak(); + //__debugbreak();//звездопад a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges); a1.uFacing = v685; a1.uSoundID = LOWORD(v3->sound_id);