build 180122. radio channel cab controls, sky brightness calculation fix, motor ventilator spin rate tweaks

This commit is contained in:
tmj-fstate
2018-01-22 18:07:31 +01:00
parent 9abaf7414f
commit 0dc1394d59
15 changed files with 84 additions and 40 deletions

View File

@@ -1166,7 +1166,7 @@ TSubModel::offset( float const Geometrytestoffsetthreshold ) const {
auto offset { glm::vec3 { glm::make_mat4( parentmatrix.readArray() ) * glm::vec4 { 0, 0, 0, 1 } } };
if( glm::length2( offset ) < Geometrytestoffsetthreshold ) {
if( glm::length( offset ) < Geometrytestoffsetthreshold ) {
// offset of zero generally means the submodel has optimized identity matrix
// for such cases we resort to an estimate from submodel geometry
// TODO: do proper bounding area calculation for submodel when loading mesh and grab the centre point from it here