# HG changeset patch # User zipi # Date 1406222066 -3600 # Node ID 7948957d91785f09c2cb042db6c748b8d532eb29 # Parent 45dcf81c5b1c3da42f70fa61fa8863b8b71578a5 * sudden drop while flying fixed * ~AudioPlayer * free pSoundHeaders diff -r 45dcf81c5b1c -r 7948957d9178 AudioPlayer.cpp --- a/AudioPlayer.cpp Thu Jul 24 12:50:24 2014 +0600 +++ b/AudioPlayer.cpp Thu Jul 24 18:14:26 2014 +0100 @@ -2346,6 +2346,7 @@ if ( this->bPlayerReady ) { + free(pSoundHeaders); CloseHandle(hMagicVid); CloseHandle(hMightVid); pAudioPlayer->StopChannels(-1, -1); diff -r 45dcf81c5b1c -r 7948957d9178 AudioPlayer.h --- a/AudioPlayer.h Thu Jul 24 12:50:24 2014 +0600 +++ b/AudioPlayer.h Thu Jul 24 18:14:26 2014 +0100 @@ -162,7 +162,7 @@ field_2D4 = 0; s3DSoundVolume = 127; } - + inline ~AudioPlayer(){ Release(); }; void SetMusicVolume(int vol); void SetMasterVolume(float fVolume); void _4AA258(int a2); diff -r 45dcf81c5b1c -r 7948957d9178 mm7_4.cpp --- a/mm7_4.cpp Thu Jul 24 12:50:24 2014 +0600 +++ b/mm7_4.cpp Thu Jul 24 18:14:26 2014 +0100 @@ -213,7 +213,7 @@ int last_reg_time; // qax@1 int v4; // eax@2 int v5; // edi@5 - bool cursed_flag; // ecx@5 + long long *v6; // ecx@5 char v7; // sf@5 int *v8; // ecx@10 int v9; // edi@15 @@ -258,11 +258,15 @@ if ( !(pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags & 1) ) { v5 = v4 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uPower; - cursed_flag = pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].pConditions[Condition_Cursed];//cursed - v7 = cursed_flag < v5; + //cursed_flag = pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].pConditions[Condition_Cursed];//cursed + //v7 = cursed_flag < v5; //cursed_flag -= v5; - if ( !v7 ) + + v6 = &pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].pConditions[Condition_Cursed]; + + if ( *v6 < v5 ) { + v6 = 0; pParty->uFlags &= 0xFFFFFFBFu; pParty->bFlying = false; redraw_flag = true;