From 576b07891e32bc509c4e2f551a28472c0cf19457 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 25 Mar 2017 13:42:21 +0100 Subject: [PATCH] [IXModel] Fix surfs sign --- src/Components/Modules/AssetInterfaces/IXModel.cpp | 6 +++--- src/Game/Structs.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/Modules/AssetInterfaces/IXModel.cpp b/src/Components/Modules/AssetInterfaces/IXModel.cpp index ecc54c3a..34278013 100644 --- a/src/Components/Modules/AssetInterfaces/IXModel.cpp +++ b/src/Components/Modules/AssetInterfaces/IXModel.cpp @@ -149,7 +149,7 @@ namespace Assets { asset->materialHandles = reader.readArray(asset->numsurfs); - for (char i = 0; i < asset->numsurfs; ++i) + for (unsigned char i = 0; i < asset->numsurfs; ++i) { if (asset->materialHandles[i]) { @@ -320,7 +320,7 @@ namespace Assets if (asset->materialHandles) { - for (char i = 0; i < asset->numsurfs; ++i) + for (unsigned char i = 0; i < asset->numsurfs; ++i) { if (asset->materialHandles[i]) { @@ -422,7 +422,7 @@ namespace Assets Game::Material** destMaterials = buffer->dest(); buffer->saveArray(asset->materialHandles, asset->numsurfs); - for (char i = 0; i < asset->numsurfs; ++i) + for (unsigned char i = 0; i < asset->numsurfs; ++i) { if (asset->materialHandles[i]) { diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 5c1e15b6..f2755641 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -1797,7 +1797,7 @@ namespace Game const char *name; char numBones; char numRootBones; - char numsurfs; + unsigned char numsurfs; char lodRampType; float scale; unsigned int noScalePartBits[6];