committing old changes and a fix

This commit is contained in:
aap
2017-07-11 08:18:15 +02:00
parent e3c1f30856
commit f1d04ff732
4 changed files with 23 additions and 1 deletions

View File

@@ -105,6 +105,7 @@ Geometry::streamRead(Stream *stream)
GeoStreamData buf;
SurfaceProperties surfProps;
MaterialList *ret;
static SurfaceProperties reset = { 1.0f, 1.0f, 1.0f };
if(!findChunk(stream, ID_STRUCT, nil, &version)){
RWERROR((ERR_CHUNK, "STRUCT"));
@@ -154,7 +155,7 @@ Geometry::streamRead(Stream *stream)
defaultSurfaceProps = surfProps;
ret = MaterialList::streamRead(stream, &geo->matList);
if(version < 0x34000)
defaultSurfaceProps = (SurfaceProperties){ 1.0f, 1.0f, 1.0f };
defaultSurfaceProps = reset;
if(ret == nil)
goto fail;
if(s_plglist.streamRead(stream, geo))