Misc tweaks, mainly to include new island tracks in challenges and GPs, and other minor fixes

This commit is contained in:
Marianne Gagnon 2014-12-15 21:34:22 -05:00
parent 84cf087ae6
commit 0af3f3de83
6 changed files with 24 additions and 9 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="islandtrack" laps="3"/>
<track id="20_island" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="95"/>

View File

@ -6,11 +6,11 @@
<hard>
<karts number="1"/>
<requirements energy="16" time="167"/>
<requirements energy="18" time="167"/>
</hard>
<medium>
<karts number="1"/>
<requirements energy="12" time="185"/>
<requirements energy="15" time="185"/>
</medium>
<easy>
<karts number="1"/>

View File

@ -1,7 +1,7 @@
<supertuxkart_grand_prix name="To the moon and back">
<track id="islandtrack" laps="3" reverse="false" />
<track id="20_island" laps="3" reverse="false" />
<track id="greenvalley" laps="2" reverse="false" />
<track id="mansion" laps="3" reverse="false" />
<track id="startrack" laps="3" reverse="false" />

View File

@ -1263,22 +1263,25 @@ scene::IMesh *IrrDriver::createTexturedQuadMesh(const video::SMaterial *material
v1.Pos = core::vector3df(-w_2,-h_2,0);
v1.Normal = core::vector3df(0, 0, -1.0f);
v1.TCoords = core::vector2d<f32>(1,1);
v1.Color = video::SColor(255, 255, 255, 255);
video::S3DVertex v2;
v2.Pos = core::vector3df(w_2,-h_2,0);
v2.Normal = core::vector3df(0, 0, -1.0f);
v2.TCoords = core::vector2d<f32>(0,1);
v1.Color = video::SColor(255, 255, 255, 255);
video::S3DVertex v3;
v3.Pos = core::vector3df(w_2,h_2,0);
v3.Normal = core::vector3df(0, 0, -1.0f);
v3.TCoords = core::vector2d<f32>(0,0);
v3.Color = video::SColor(255, 255, 255, 255);
video::S3DVertex v4;
v4.Pos = core::vector3df(-w_2,h_2,0);
v4.Normal = core::vector3df(0, 0, -1.0f);
v4.TCoords = core::vector2d<f32>(1,0);
v4.Color = video::SColor(255, 255, 255, 255);
// Add the vertices
// ----------------

View File

@ -277,10 +277,21 @@ void SkiddingAI::update(float dt)
}
// also give him some free nitro
if (m_kart->getPosition() > 1)
m_kart->setEnergy(m_kart->getEnergy() + 7);
else
m_kart->setEnergy(m_kart->getEnergy() + 4);
if (race_manager->getDifficulty() == RaceManager::DIFFICULTY_MEDIUM)
{
if (m_kart->getPosition() > 1)
m_kart->setEnergy(m_kart->getEnergy() + 2);
else
m_kart->setEnergy(m_kart->getEnergy() + 1);
}
else if (race_manager->getDifficulty() == RaceManager::DIFFICULTY_HARD ||
race_manager->getDifficulty() == RaceManager::DIFFICULTY_BEST)
{
if (m_kart->getPosition() > 1)
m_kart->setEnergy(m_kart->getEnergy() + 7);
else
m_kart->setEnergy(m_kart->getEnergy() + 4);
}
}
}

View File

@ -278,6 +278,7 @@ void RaceResultGUI::eventCallback(GUIEngine::Widget* widget,
StateManager::get()->popMenu();
World::deleteWorld();
CutsceneWorld::setUseDuration(true);
StateManager::get()->enterGameState();
race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
race_manager->setNumKarts(0);