Merge branch 'master' into feature/jassimp-classloader
commit
5e739acfa1
|
@ -589,7 +589,10 @@ template <> inline void Structure :: Convert<short> (short& dest,const FileData
|
||||||
{
|
{
|
||||||
// automatic rescaling from short to float and vice versa (seems to be used by normals)
|
// automatic rescaling from short to float and vice versa (seems to be used by normals)
|
||||||
if (name == "float") {
|
if (name == "float") {
|
||||||
dest = static_cast<short>(db.reader->GetF4() * 32767.f);
|
float f = db.reader->GetF4();
|
||||||
|
if ( f > 1.0f )
|
||||||
|
f = 1.0f;
|
||||||
|
dest = static_cast<short>( f * 32767.f);
|
||||||
//db.reader->IncPtr(-4);
|
//db.reader->IncPtr(-4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue