Remove some unused code
This commit is contained in:
@@ -38,11 +38,11 @@ GamePadDevice::GamePadDevice(const int irr_index, const std::string &name,
|
||||
GamepadConfig *config = static_cast<GamepadConfig*>(m_configuration);
|
||||
if(m_configuration->getNumberOfButtons()<button_count)
|
||||
{
|
||||
static_cast<GamepadConfig*>(m_configuration)->setNumberOfButtons(button_count);
|
||||
config->setNumberOfButtons(button_count);
|
||||
}
|
||||
if(m_configuration->getNumberOfAxes()<axis_count)
|
||||
{
|
||||
static_cast<GamepadConfig*>(m_configuration)->setNumberOfAxis(axis_count);
|
||||
config->setNumberOfAxis(axis_count);
|
||||
}
|
||||
m_prev_axis_directions = new Input::AxisDirection[axis_count];
|
||||
m_prev_axis_value = new int[axis_count];
|
||||
|
||||
@@ -196,10 +196,8 @@ void PlayerController::action(PlayerAction action, int value)
|
||||
m_controls->m_rescue = (value!=0);
|
||||
break;
|
||||
case PA_FIRE:
|
||||
{
|
||||
m_controls->m_fire = (value!=0);
|
||||
break;
|
||||
}
|
||||
case PA_LOOK_BACK:
|
||||
m_controls->m_look_back = (value!=0);
|
||||
break;
|
||||
@@ -207,12 +205,14 @@ void PlayerController::action(PlayerAction action, int value)
|
||||
if(value==0)
|
||||
m_controls->m_skid = KartControl::SC_NONE;
|
||||
else
|
||||
{
|
||||
if(m_steer_val==0)
|
||||
m_controls->m_skid = KartControl::SC_NO_DIRECTION;
|
||||
else
|
||||
m_controls->m_skid = m_steer_val<0
|
||||
? KartControl::SC_RIGHT
|
||||
: KartControl::SC_LEFT;
|
||||
}
|
||||
break;
|
||||
case PA_PAUSE_RACE:
|
||||
if (value != 0) StateManager::get()->escapePressed();
|
||||
|
||||
@@ -615,12 +615,12 @@ void World::resetAllKarts()
|
||||
|
||||
if (!kart_over_ground)
|
||||
{
|
||||
Log::error("[World]",
|
||||
Log::error("World",
|
||||
"No valid starting position for kart %d on track %s.",
|
||||
(int)(i-m_karts.begin()), m_track->getIdent().c_str());
|
||||
if (UserConfigParams::m_artist_debug_mode)
|
||||
{
|
||||
Log::warn("[World]", "Activating fly mode.");
|
||||
Log::warn("World", "Activating fly mode.");
|
||||
(*i)->flyUp();
|
||||
continue;
|
||||
}
|
||||
@@ -672,14 +672,14 @@ void World::resetAllKarts()
|
||||
&normal);
|
||||
if(!material)
|
||||
{
|
||||
Log::error("[World]",
|
||||
Log::error("World",
|
||||
"No valid starting position for kart %d "
|
||||
"on track %s.",
|
||||
(int)(i-m_karts.begin()),
|
||||
m_track->getIdent().c_str());
|
||||
if (UserConfigParams::m_artist_debug_mode)
|
||||
{
|
||||
Log::warn("[World]", "Activating fly mode.");
|
||||
Log::warn("World", "Activating fly mode.");
|
||||
(*i)->flyUp();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -97,8 +97,6 @@ void MessageDialog::doInit(MessageDialogType type,
|
||||
}
|
||||
else if (type == MessageDialog::MESSAGE_DIALOG_YESNO)
|
||||
{
|
||||
ButtonWidget* yesbtn = getWidget<ButtonWidget>("confirm");
|
||||
|
||||
ButtonWidget* cancelbtn = getWidget<ButtonWidget>("cancel");
|
||||
cancelbtn->setText(_("No"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user