build 171027: bounding area calculation fixes, novice ui obstacle indicator, minor traction render enhancement, shadow calculations for tall enough platforms

This commit is contained in:
tmj-fstate
2017-10-28 00:56:10 +02:00
parent d8c3b5caf4
commit 4ce975a656
23 changed files with 334 additions and 138 deletions

View File

@@ -867,11 +867,11 @@ void TTrack::Load(cParser *parser, vector3 pOrigin)
}
// calculate path location
m_location = glm::dvec3{ (
m_area.center = ( glm::dvec3{ (
CurrentSegment()->FastGetPoint_0()
+ CurrentSegment()->FastGetPoint( 0.5 )
+ CurrentSegment()->FastGetPoint_1() )
/ 3.0 };
/ 3.0 } );
}
// TODO: refactor this mess
@@ -2821,6 +2821,18 @@ TTrack::endpoints() const {
}
}
// calculates path's bounding radius
void
TTrack::radius_() {
auto const points = endpoints();
for( auto &point : points ) {
m_area.radius = std::max(
m_area.radius,
static_cast<float>( glm::length( m_area.center - point ) ) ); // extra margin to prevent driven vehicle from flicking
}
}
void TTrack::MovedUp1(float const dh)
{ // poprawienie przechyłki wymaga wydłużenia podsypki
fTexHeight1 += dh;