Fixed documentation and typo, thanks to Alayan.
This commit is contained in:
parent
714665f444
commit
60c9994e29
@ -94,7 +94,8 @@
|
|||||||
If there is a WeightsData object for the same kart number, it is
|
If there is a WeightsData object for the same kart number, it is
|
||||||
copied, otherwise an interpolated WeightsData object is created
|
copied, otherwise an interpolated WeightsData object is created
|
||||||
from the two WeightsData objects that are closest to the current
|
from the two WeightsData objects that are closest to the current
|
||||||
number of karts.
|
number of karts. If there is only one WeightsData for the race
|
||||||
|
mode, it is used for any number of karts.
|
||||||
Each Weights entry itself can contain one or more weight tags:
|
Each Weights entry itself can contain one or more weight tags:
|
||||||
The first entry is for the kart with rank 1, the last weight entry
|
The first entry is for the kart with rank 1, the last weight entry
|
||||||
for the last kart. The remaining entries are evenly distributed
|
for the last kart. The remaining entries are evenly distributed
|
||||||
@ -133,8 +134,10 @@
|
|||||||
there are more karts. -->
|
there are more karts. -->
|
||||||
|
|
||||||
<race-weight-list>
|
<race-weight-list>
|
||||||
<!-- The entry for '1' karts is special and means 'first kart' -->
|
|
||||||
<weights num-karts="1">
|
<weights num-karts="1">
|
||||||
|
<!-- The entry for '1' kart lists more than a single weight
|
||||||
|
because the others are used for interpolation when
|
||||||
|
there are two karts or more. -->
|
||||||
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
|
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
|
||||||
<weight single ="28 0 60 20 45 15 32 0 0 0"
|
<weight single ="28 0 60 20 45 15 32 0 0 0"
|
||||||
multi =" 0 0 0 0 0 0 0 0 0 0" />
|
multi =" 0 0 0 0 0 0 0 0 0 0" />
|
||||||
|
4
src/items/powerup_manager.cpp
Normal file → Executable file
4
src/items/powerup_manager.cpp
Normal file → Executable file
@ -522,7 +522,7 @@ void PowerupManager::computeWeightsForRace(int num_karts)
|
|||||||
{
|
{
|
||||||
int n = wd[i]->getNumKarts();
|
int n = wd[i]->getNumKarts();
|
||||||
if ( ( n < wd[prev_index]->getNumKarts() &&
|
if ( ( n < wd[prev_index]->getNumKarts() &&
|
||||||
wd[next_index]->getNumKarts() > num_karts) ||
|
wd[prev_index]->getNumKarts() > num_karts) ||
|
||||||
( n > wd[prev_index]->getNumKarts() && n <= num_karts ) )
|
( n > wd[prev_index]->getNumKarts() && n <= num_karts ) )
|
||||||
{
|
{
|
||||||
prev_index = i;
|
prev_index = i;
|
||||||
@ -592,7 +592,7 @@ PowerupManager::PowerupType PowerupManager::getRandomPowerup(unsigned int pos,
|
|||||||
void PowerupManager::unitTesting()
|
void PowerupManager::unitTesting()
|
||||||
{
|
{
|
||||||
// Test 1: Test all possible random numbers for tutorial, and
|
// Test 1: Test all possible random numbers for tutorial, and
|
||||||
// make sure that always a cake is picked.
|
// make sure that always three bowling balls are picked.
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
race_manager->setMinorMode(RaceManager::MINOR_MODE_TUTORIAL);
|
race_manager->setMinorMode(RaceManager::MINOR_MODE_TUTORIAL);
|
||||||
powerup_manager->computeWeightsForRace(1);
|
powerup_manager->computeWeightsForRace(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user