1) Multiplied all weights by 10 (to have more granularity adjusting weights for
global powerups). 2) Weights for global powerups (parachute and switch) are divided by num_karts-4 if more than 4 karts are being used (see bug 3107638). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6736 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -36,19 +36,19 @@
|
||||
be quite rare, since otherwise the item might be used
|
||||
too often (compared with many items which will only
|
||||
affect a karts or two). -->
|
||||
<!-- bubble cake bowl zipper plunger switch para anvil -->
|
||||
<first w="3 0 1 0 0 1 0 0"
|
||||
w-multi="0 0 0 0 0 0 0 0" />
|
||||
<top33 w="3 3 3 3 3 1 3 0"
|
||||
w-multi="0 1 1 0 1 0 0 0" />
|
||||
<mid33 w="3 3 3 3 3 1 3 0"
|
||||
w-multi="0 2 2 2 2 0 0 0" />
|
||||
<end33 w="0 3 3 3 3 1 3 3"
|
||||
w-multi="0 3 3 3 3 0 0 0" />
|
||||
<last w="0 3 3 6 6 0 6 6"
|
||||
w-multi="0 3 3 6 6 0 0 0" />
|
||||
<battle w="0 6 3 0 0 0 0 0"
|
||||
w-multi="0 2 1 0 0 0 0 0" />
|
||||
<!-- bubble cake bowl zipper plunger switch para anvil -->
|
||||
<first w="30 0 10 0 0 10 0 0"
|
||||
w-multi=" 0 0 0 0 0 0 0 0" />
|
||||
<top33 w="30 30 30 30 30 10 30 0"
|
||||
w-multi=" 0 10 10 0 10 0 0 0" />
|
||||
<mid33 w="30 30 30 30 30 10 30 0"
|
||||
w-multi=" 0 20 20 20 20 0 0 0" />
|
||||
<end33 w=" 0 30 30 30 30 10 30 30"
|
||||
w-multi=" 0 30 30 30 30 0 0 0" />
|
||||
<last w=" 0 30 30 60 60 0 60 60"
|
||||
w-multi=" 0 30 30 60 60 0 0 0" />
|
||||
<battle w=" 0 60 30 0 0 0 0 0"
|
||||
w-multi=" 0 20 10 0 0 0 0 0" />
|
||||
|
||||
</powerup>
|
||||
|
||||
|
||||
@@ -269,7 +269,18 @@ void PowerupManager::updateWeightsForRace(unsigned int num_karts)
|
||||
PowerupType type =
|
||||
(PowerupType) ((i<=POWERUP_LAST) ? i
|
||||
: i+POWERUP_FIRST);
|
||||
unsigned int w =m_weights[pos_class][i-POWERUP_FIRST];
|
||||
unsigned int w =m_weights[pos_class][i-POWERUP_FIRST];
|
||||
// The 'global' powerups (i.e. powerups that affect
|
||||
// all karts, not only the ones close by) appear too
|
||||
// frequently with larger number of karts. To reduce
|
||||
// this effect their weight is reduced by the number
|
||||
// of karts.
|
||||
if(w!=0 && num_karts > 4 &&
|
||||
(type==POWERUP_PARACHUTE || type==POWERUP_SWITCH) )
|
||||
{
|
||||
w = w / (num_karts-4);
|
||||
if(w==0) w=1;
|
||||
}
|
||||
for(unsigned int j=0; j<w; j++)
|
||||
m_powerups_for_position[pos_class].push_back(type);
|
||||
} // for type in [POWERUP_FIRST, POWERUP_LAST]
|
||||
|
||||
Reference in New Issue
Block a user