Merge remote-tracking branch 'origin/master' into Flakebi-fixes
This commit is contained in:
@@ -133,6 +133,11 @@
|
||||
work anymore - so for now don't enable this. -->
|
||||
<networking enable="false"/>
|
||||
|
||||
<!-- The field od views for 1-4 player split screen. fov-3 is
|
||||
actually not used (since 3 player split screen uses the
|
||||
same layout as 4 player split screen) -->
|
||||
<camera fov-1="75" fov-2="65" fov-3="50" fov-4="75" />
|
||||
|
||||
<!-- disable-while-unskid: Disable steering when stop skidding during
|
||||
the time it takes to adjust the physical body with the graphics.
|
||||
camera-follow-skid: If true the camera will stay behind the kart,
|
||||
|
||||
@@ -275,6 +275,14 @@ void STKConfig::getAllData(const XMLNode * root)
|
||||
steer_node->get("camera-follow-skid", &m_camera_follow_skid );
|
||||
}
|
||||
|
||||
if (const XMLNode *camera = root->getNode("camera"))
|
||||
{
|
||||
camera->get("fov-1", &m_camera_fov[0]);
|
||||
camera->get("fov-2", &m_camera_fov[1]);
|
||||
camera->get("fov-3", &m_camera_fov[2]);
|
||||
camera->get("fov-4", &m_camera_fov[3]);
|
||||
}
|
||||
|
||||
if (const XMLNode *music_node = root->getNode("music"))
|
||||
{
|
||||
std::string title_music;
|
||||
|
||||
@@ -157,6 +157,9 @@ public:
|
||||
* be generated. */
|
||||
float m_replay_delta_angle;
|
||||
|
||||
/** The field of view for 1, 2, 3, 4 player split screen. */
|
||||
float m_camera_fov[4];
|
||||
|
||||
private:
|
||||
/** True if stk_config has been loaded. This is necessary if the
|
||||
* --stk-config command line parameter has been specified to avoid
|
||||
|
||||
@@ -222,7 +222,7 @@ void Camera::setupCamera()
|
||||
irr_driver->getActualScreenSize().Width,
|
||||
irr_driver->getActualScreenSize().Height);
|
||||
m_scaling = core::vector2df(1.0f, 1.0f);
|
||||
m_fov = DEGREE_TO_RAD*75.0f;
|
||||
m_fov = DEGREE_TO_RAD*stk_config->m_camera_fov[0];
|
||||
break;
|
||||
case 2: m_viewport = core::recti(0,
|
||||
m_index==0 ? 0
|
||||
@@ -232,7 +232,7 @@ void Camera::setupCamera()
|
||||
: irr_driver->getActualScreenSize().Height);
|
||||
m_scaling = core::vector2df(1.0f, 0.5f);
|
||||
m_aspect *= 2.0f;
|
||||
m_fov = DEGREE_TO_RAD*65.0f;
|
||||
m_fov = DEGREE_TO_RAD*stk_config->m_camera_fov[1];
|
||||
break;
|
||||
case 3:
|
||||
/*
|
||||
@@ -265,7 +265,7 @@ void Camera::setupCamera()
|
||||
const int y2 = (m_index<2 ? irr_driver->getActualScreenSize().Height>>1 : irr_driver->getActualScreenSize().Height);
|
||||
m_viewport = core::recti(x1, y1, x2, y2);
|
||||
m_scaling = core::vector2df(0.5f, 0.5f);
|
||||
m_fov = DEGREE_TO_RAD*50.0f;
|
||||
m_fov = DEGREE_TO_RAD*stk_config->m_camera_fov[3];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1192,8 +1192,6 @@ namespace GUIEngine
|
||||
// further render)
|
||||
g_env->drawAll();
|
||||
|
||||
MessageQueue::update(elapsed_time);
|
||||
|
||||
// ---- some menus may need updating
|
||||
if (gamestate != GAME)
|
||||
{
|
||||
@@ -1215,6 +1213,7 @@ namespace GUIEngine
|
||||
}
|
||||
}
|
||||
|
||||
MessageQueue::update(elapsed_time);
|
||||
|
||||
if (gamestate == INGAME_MENU && dynamic_cast<CutsceneWorld*>(World::getWorld()) != NULL)
|
||||
{
|
||||
|
||||
@@ -123,6 +123,7 @@ World::World() : WorldStatus(), m_clear_color(255,100,101,140)
|
||||
m_schedule_tutorial = false;
|
||||
m_is_network_world = false;
|
||||
m_weather = NULL;
|
||||
m_force_disable_fog = false;
|
||||
|
||||
m_stop_music_when_dialog_open = true;
|
||||
|
||||
|
||||
@@ -439,6 +439,15 @@ void btKart::updateVehicle( btScalar step )
|
||||
btVector3 kart_up = getChassisWorldTransform().getBasis().getColumn(1);
|
||||
btVector3 terrain_up(0,1,0);
|
||||
btVector3 axis = kart_up.cross(terrain_up);
|
||||
axis.normalize();
|
||||
|
||||
// To avoid the kart going backwards/forwards (or rolling sideways),
|
||||
// set the pitch/roll to 0 before applying the 'straightening' impulse.
|
||||
// TODO: make this works if gravity is changed.
|
||||
btVector3 av = m_chassisBody->getAngularVelocity();
|
||||
av.setX(0);
|
||||
av.setZ(0);
|
||||
m_chassisBody->setAngularVelocity(av);
|
||||
// Give a nicely balanced feeling for rebalancing the kart
|
||||
m_chassisBody->applyTorqueImpulse(axis * m_kart->getKartProperties()->getSmoothFlyingImpulse());
|
||||
}
|
||||
|
||||
@@ -162,18 +162,18 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
float f = ((int)(n/1024.0f/1024.0f*10.0f+0.5f))/10.0f;
|
||||
char s[32];
|
||||
sprintf(s, "%.1f", f);
|
||||
unit=_("%s MB", s);
|
||||
unit = _LTR("%s MB", s);
|
||||
}
|
||||
else if(n>1024)
|
||||
{
|
||||
float f = ((int)(n/1024.0f*10.0f+0.5f))/10.0f;
|
||||
char s[32];
|
||||
sprintf(s, "%.1f", f);
|
||||
unit=_("%s KB", s);
|
||||
unit = _LTR("%s KB", s);
|
||||
}
|
||||
else
|
||||
// Anything smaller just let it be 1 KB
|
||||
unit=_("%s KB", 1);
|
||||
unit = _LTR("%s KB", 1);
|
||||
core::stringw size = _("Size: %s", unit.c_str());
|
||||
getWidget<LabelWidget>("size")->setText(size, false);
|
||||
} // AddonsLoading
|
||||
|
||||
@@ -837,8 +837,15 @@ void RaceResultGUI::determineGPLayout()
|
||||
ri->m_y_pos = (float)(m_top+rank*m_distance_between_rows);
|
||||
int p = race_manager->getKartPrevScore(kart_id);
|
||||
ri->m_current_displayed_points = (float)p;
|
||||
ri->m_new_points =
|
||||
(float)race_manager->getPositionScore(kart->getPosition());
|
||||
if (kart->isEliminated())
|
||||
{
|
||||
ri->m_new_points = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ri->m_new_points =
|
||||
(float)race_manager->getPositionScore(kart->getPosition());
|
||||
}
|
||||
}
|
||||
|
||||
// Now update the GP ranks, and determine the new position
|
||||
|
||||
Reference in New Issue
Block a user