Mercurial > mm7
changeset 1425:16a24dc103e7
uninitialized Party::walk_sound_timer leads to crash
author | Nomad |
---|---|
date | Wed, 31 Jul 2013 13:27:23 +0200 |
parents | 5930342f092b |
children | 2754f373a8b3 |
files | AudioPlayer.cpp Party.cpp |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/AudioPlayer.cpp Tue Jul 30 15:14:46 2013 +0600 +++ b/AudioPlayer.cpp Wed Jul 31 13:27:23 2013 +0200 @@ -535,9 +535,9 @@ //----- (004AA258) -------------------------------------------------------- void AudioPlayer::_4AA258(int a2) { - __debugbreak(); - if ( this->bPlayerReady ) - { + if (!bPlayerReady) + return; + if ( this->b3DSoundInitialized && a2 && this->uNum3DSamples > 0 ) { for ( uint i = 0; i < this->uNum3DSamples; ++i ) @@ -568,7 +568,6 @@ } } } - } } //----- (004AA306) --------------------------------------------------------
--- a/Party.cpp Tue Jul 30 15:14:46 2013 +0600 +++ b/Party.cpp Wed Jul 31 13:27:23 2013 +0200 @@ -84,12 +84,16 @@ uDefaultPartyHeight = 120; field_14 = 37; y_rotation_granularity = 25; + y_rotation_speed = 90; + uWalkSpeed = 384; - y_rotation_speed = 90; + walk_sound_timer = 0; + field_24 = 5; field_6FC = 0; field_708 = 15; field_0 = 25; + } //inlined