Don't handicap AIs

This commit is contained in:
Flakebi 2014-11-04 23:57:33 +01:00
parent 5a84b471e4
commit 9dd86c8332
4 changed files with 9 additions and 28 deletions

View File

@ -37,9 +37,9 @@
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="perPlayerDifficulty"/>
<checkbox id="show-login"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Enable handicaped users"/>
<label height="100%" I18N="In the ui settings" text="Always show login screen"/>
</div>
</div>
@ -47,17 +47,18 @@
<div layout="horizontal-row" width="100%" height="fit">
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="show-login"/>
<checkbox id="enable-hw-report"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Always show login screen"/>
<label height="100%" id="label-hw-report" I18N="In the ui settings"
text="Send anonymous HW statistics"/>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="aiHandicap"/>
<checkbox id="perPlayerDifficulty"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Handicap AI karts"/>
<label height="100%" I18N="In the ui settings" text="Enable handicaped users"/>
</div>
</div>
@ -72,12 +73,7 @@
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="enable-hw-report"/>
<spacer width="20" height="100%" />
<label height="100%" id="label-hw-report" I18N="In the ui settings"
text="Send anonymous HW statistics"/>
</div>
<!-- Nothing here yet -->
</div>
<spacer height="18" width="4"/>

View File

@ -681,11 +681,6 @@ namespace UserConfigParams
&m_handicap,
"If handicapped users can be selected") );
PARAM_PREFIX BoolUserConfigParam m_ai_handicap
PARAM_DEFAULT( BoolUserConfigParam(false, "ai_handicap",
&m_handicap,
"If AIs are handicapped") );
// ---- Internet related
PARAM_PREFIX IntUserConfigParam m_internet_status

View File

@ -349,8 +349,7 @@ void RaceManager::startNew(bool from_overworld)
for(unsigned int i = 0; i < ai_kart_count; i++)
{
m_kart_status.push_back(KartStatus(m_ai_kart_list[i], i, -1, -1,
init_gp_rank, KT_AI, UserConfigParams::m_ai_handicap ?
PLAYER_DIFFICULTY_HANDICAP : PLAYER_DIFFICULTY_NORMAL));
init_gp_rank, KT_AI, PLAYER_DIFFICULTY_NORMAL));
init_gp_rank ++;
if(UserConfigParams::m_ftl_debug)
{

View File

@ -152,9 +152,6 @@ void OptionsScreenUI::init()
CheckBoxWidget* difficulty = getWidget<CheckBoxWidget>("perPlayerDifficulty");
assert( difficulty != NULL );
difficulty->setState( UserConfigParams::m_per_player_difficulty );
CheckBoxWidget* ai_handicap = getWidget<CheckBoxWidget>("aiHandicap");
assert( ai_handicap != NULL );
ai_handicap->setState( UserConfigParams::m_ai_handicap );
CheckBoxWidget* show_login = getWidget<CheckBoxWidget>("show-login");
assert( show_login!= NULL );
@ -311,12 +308,6 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
assert( difficulty != NULL );
UserConfigParams::m_per_player_difficulty = difficulty->getState();
}
else if (name=="aiHandicap")
{
CheckBoxWidget* ai_handicap = getWidget<CheckBoxWidget>("aiHandicap");
assert( ai_handicap != NULL );
UserConfigParams::m_ai_handicap = ai_handicap->getState();
}
else if (name == "language")
{
ListWidget* list_widget = getWidget<ListWidget>("language");