# HG changeset patch # User Nomad # Date 1375270043 -7200 # Node ID 16a24dc103e76407571440c9fd656f3b2e7aa752 # Parent 5930342f092bb235d137f96b0f14b1ce476ab166 uninitialized Party::walk_sound_timer leads to crash diff -r 5930342f092b -r 16a24dc103e7 AudioPlayer.cpp --- 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) -------------------------------------------------------- diff -r 5930342f092b -r 16a24dc103e7 Party.cpp --- 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