Skip to content

Commit

Permalink
Merge pull request #380 from Max98/BugFixes-Clean
Browse files Browse the repository at this point in the history
Bug fixes clean
  • Loading branch information
Moncef Ben Slimane committed Aug 11, 2015
2 parents bca3b16 + fd61ac1 commit 1e4cb47
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions bin/resources/managed_materials/managed_mats.material
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ abstract material RoR/Managed_Mats/Base

abstract material RoR/Managed_Mats/BaseNoShadows
{
technique
technique BaseTechnique
{
pass
pass BaseRender
{
texture_unit Diffuse_Map
{
Expand Down
2 changes: 1 addition & 1 deletion source/main/RoRVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
// $Rev:$

#define ROR_VERSION_STRING_SHORT "0.4"
#define ROR_VERSION_STRING "0.4.5.0-dev"
#define ROR_VERSION_STRING "0.4.5.0"
#define ROR_VERSION_STRING_WIN 0,4,5,0

#endif //RORVERSION_H__
1 change: 1 addition & 0 deletions source/main/gfx/ShadowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ void ShadowManager::updateTerrainMaterial(Ogre::TerrainPSSMMaterialGenerator::SM
matProfile->setReceiveDynamicShadowsLowLod(false);
matProfile->setReceiveDynamicShadowsEnabled(true);
matProfile->setReceiveDynamicShadowsPSSM(pssmSetup);
matProfile->setLightmapEnabled(false);
}
}

Expand Down
4 changes: 2 additions & 2 deletions source/main/gfx/camera/CameraBehaviorOrbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ void CameraBehaviorOrbit::update(const CameraManager::CameraContext &ctx)
if ( ctx.mCurrTruck )
{
if (BeamFactory::getSingleton().getThreadingMode() == THREAD_MULTI)
precedingPosition += ctx.mCurrTruck->nodes[0].Velocity * ctx.mCurrTruck->ttdt;
precedingPosition += ctx.mCurrTruck->nodes[0].Velocity * ctx.mCurrTruck->oldframe_global_dt;
else
precedingPosition += ctx.mCurrTruck->nodes[0].Velocity * ctx.mCurrTruck->tdt;
precedingPosition += ctx.mCurrTruck->nodes[0].Velocity * ctx.mCurrTruck->global_dt;
}

Vector3 camPosition = (1.0f / (camRatio + 1.0f)) * desiredPosition + (camRatio / (camRatio + 1.0f)) * precedingPosition;
Expand Down
4 changes: 2 additions & 2 deletions source/main/gfx/camera/CameraBehaviorVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ void CameraBehaviorVehicle::update(const CameraManager::CameraContext &ctx)
}

if (BeamFactory::getSingleton().getThreadingMode() == THREAD_MULTI)
camRatio = 1.0f / (ctx.mCurrTruck->ttdt * 4.0f);
camRatio = 1.0f / (ctx.mCurrTruck->oldframe_global_dt * 4.0f);
else
camRatio = 1.0f / (ctx.mCurrTruck->tdt * 4.0f);
camRatio = 1.0f / (ctx.mCurrTruck->global_dt * 4.0f);

camDistMin = std::min(ctx.mCurrTruck->getMinimalCameraRadius() * 2.0f, 33.0f);

Expand Down
8 changes: 5 additions & 3 deletions source/main/gui/panels/GUI_GameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,14 @@ void CLASS::UpdateControls()
if (!IsLoaded)
{
m_water_type->addItem("Hydrax"); //It's working good enough to be here now.
m_shadow_type->addItem("Parallel-split Shadow Maps");
}

if (BSETTING("DevMode", false) && !IsLoaded)
{
//Things that aren't ready to be used yet.
m_sky_type->addItem("SkyX (best looking, slower)");
m_shadow_type->addItem("Parallel-split Shadow Maps");

}

//Sky effects
Expand All @@ -396,9 +397,9 @@ void CLASS::UpdateControls()

//Shadow technique
Ogre::String shadowtype = GameSettingsMap["Shadow technique"];
if (shadowtype == "Texture shadows")
if (shadowtype == "Texture shadows)")
m_shadow_type->setIndexSelected(1);
else if (shadowtype == "Parallel-split Shadow Maps" && BSETTING("DevMode", false))
else if (shadowtype == "Parallel-split Shadow Maps")
m_shadow_type->setIndexSelected(2);
else
m_shadow_type->setIndexSelected(0);
Expand Down Expand Up @@ -1166,6 +1167,7 @@ void CLASS::OnReMapPress(MyGUI::WidgetPtr _sender)
isFrameActivated = true;

m_key_mapping_window_info->setCaptionWithReplacing("");
mMainWidget->setEnabledSilent(true);

str_text = "";
}
Expand Down
10 changes: 5 additions & 5 deletions source/main/physics/Beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ void Beam::SyncReset()
void Beam::threadentry()
{
Beam **trucks = ttrucks;
dtperstep = tdt / (Real)tsteps;
dtperstep = global_dt / (Real)tsteps;

for (curtstep=0; curtstep<tsteps; curtstep++)
{
Expand Down Expand Up @@ -1618,8 +1618,8 @@ bool Beam::frameStep(Real dt)
BeamFactory::getSingleton()._WorkerWaitForSync();
}

ttdt = tdt;
tdt = dt;
oldframe_global_dt = global_dt;
global_dt = dt;

ffforce = affforce / steps;
ffhydro = affhydro / steps;
Expand Down Expand Up @@ -6058,13 +6058,13 @@ Beam::Beam(
, stabcommand(0)
, stabratio(0.0)
, stabsleep(0.0)
, tdt(0.1)
, global_dt(0.1)
, thread_index(0)
, thread_number(0)
, thread_task(THREAD_BEAMFORCESEULER)
, totalmass(0)
, tsteps(100)
, ttdt(0.1)
, oldframe_global_dt(0.1)
, watercontact(false)
, watercontactold(false)
{
Expand Down
4 changes: 2 additions & 2 deletions source/main/physics/Beam.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ class Beam :
int getLowestNode();
void preMapLabelRenderUpdate(bool mode, float cheight=0);

float tdt;
float ttdt;
float global_dt;
float oldframe_global_dt;
bool simulated;
int airbrakeval;
Ogre::Vector3 cameranodeacc;
Expand Down
4 changes: 3 additions & 1 deletion source/main/terrain/TerrainGeometryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ void TerrainGeometryManager::configureTerrainDefaults()
terrainOptions->setCompositeMapDistance(m_terrain_config.GetInt("CompositeMapDistance", 4000));
terrainOptions->setSkirtSize(m_terrain_config.GetInt("SkirtSize", 30));
terrainOptions->setLightMapSize(m_terrain_config.GetInt("LightMapSize", 1024));
terrainOptions->setCastsDynamicShadows(m_terrain_config.GetBool("CastsDynamicShadows", false));

if (matProfile->getReceiveDynamicShadowsPSSM())
terrainOptions->setCastsDynamicShadows(true);

terrainOptions->setUseRayBoxDistanceCalculation(false);

Expand Down

0 comments on commit 1e4cb47

Please # to comment.