Merge branch 'minor-fixes' of https://github.com/Flakebi/stk-code into Flakebi-minor-fixes
This commit is contained in:
commit
2106e0caaf
@ -2522,8 +2522,8 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
|
||||
{
|
||||
// fabs(speed) is important, otherwise the negative number will
|
||||
// become a huge unsigned number in the particle scene node!
|
||||
float f = fabsf(getSpeed())/m_kart_properties->getMaxSpeed() *
|
||||
m_difficulty->getMaxSpeed();
|
||||
float f = fabsf(getSpeed())/(m_kart_properties->getMaxSpeed() *
|
||||
m_difficulty->getMaxSpeed());
|
||||
// The speed of the kart can be higher (due to powerups) than
|
||||
// the normal maximum speed of the kart.
|
||||
if(f>1.0f) f = 1.0f;
|
||||
|
@ -1052,7 +1052,7 @@ void initRest()
|
||||
Online::RequestManager::get()->startNetworkThread();
|
||||
NewsManager::get(); // this will create the news manager
|
||||
|
||||
music_manager = new MusicManager();
|
||||
music_manager = new MusicManager();
|
||||
SFXManager::create();
|
||||
// The order here can be important, e.g. KartPropertiesManager needs
|
||||
// defaultKartProperties, which are defined in stk_config.
|
||||
@ -1238,7 +1238,7 @@ int main(int argc, char *argv[] )
|
||||
material_manager->addSharedMaterial(materials_file);
|
||||
}
|
||||
Referee::init();
|
||||
powerup_manager -> loadAllPowerups ();
|
||||
powerup_manager->loadAllPowerups();
|
||||
ItemManager::loadDefaultItemMeshes();
|
||||
|
||||
GUIEngine::addLoadingIcon( irr_driver->getTexture(FileManager::GUI,
|
||||
|
@ -56,7 +56,20 @@ void WorldStatus::reset()
|
||||
m_auxiliary_timer = 0.0f;
|
||||
// Using SETUP_PHASE will play the track into sfx first, and has no
|
||||
// other side effects.
|
||||
m_phase = UserConfigParams::m_race_now ? RACE_PHASE : SETUP_PHASE;
|
||||
m_phase = UserConfigParams::m_race_now ? MUSIC_PHASE : SETUP_PHASE;
|
||||
|
||||
// Parts of the initialisation-phase are skipped so do it here
|
||||
if (UserConfigParams::m_race_now)
|
||||
{
|
||||
// Setup music and sound
|
||||
if (World::getWorld()->getWeather() != NULL)
|
||||
World::getWorld()->getWeather()->playSound();
|
||||
|
||||
// Start engines
|
||||
for (unsigned int i = 0; i < World::getWorld()->getNumKarts(); i++)
|
||||
World::getWorld()->getKart(i)->startEngineSFX();
|
||||
}
|
||||
|
||||
m_previous_phase = UNDEFINED_PHASE;
|
||||
// Just in case that the game is reset during the intro phase
|
||||
m_track_intro_sound->stop();
|
||||
@ -65,6 +78,9 @@ void WorldStatus::reset()
|
||||
|
||||
if (device->getTimer()->isStopped())
|
||||
device->getTimer()->start();
|
||||
|
||||
// Set the right music
|
||||
World::getWorld()->getTrack()->startMusic();
|
||||
} // reset
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -140,7 +156,7 @@ void WorldStatus::update(const float dt)
|
||||
|
||||
if (World::getWorld()->getWeather() != NULL)
|
||||
{
|
||||
World::getWorld()->getWeather()->playSound();
|
||||
World::getWorld()->getWeather()->playSound();
|
||||
}
|
||||
|
||||
return;
|
||||
@ -213,8 +229,6 @@ void WorldStatus::update(const float dt)
|
||||
m_start_sound->play();
|
||||
}
|
||||
|
||||
World::getWorld()->getTrack()->startMusic();
|
||||
|
||||
// event
|
||||
onGo();
|
||||
}
|
||||
@ -254,6 +268,12 @@ void WorldStatus::update(const float dt)
|
||||
|
||||
break;
|
||||
case MUSIC_PHASE:
|
||||
// Start the music here when starting fast
|
||||
if (UserConfigParams::m_race_now)
|
||||
{
|
||||
music_manager->startMusic(music_manager->getCurrentMusic());
|
||||
UserConfigParams::m_race_now = false;
|
||||
}
|
||||
// how long to display the 'music' message
|
||||
if (m_auxiliary_timer>stk_config->m_music_credit_time)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user