X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FPerson.cpp;h=330dd40fb9f0e415bd9fe9f58defb676b6ffeb82;hb=ff29f47f799d99cec7c2a6aa2cf818da2b931fc5;hp=64876000e106b9879a446549b3a038b7490dc8b4;hpb=90a372e7d97dd17e83a02732444788cc4b8f31a0;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index 6487600..330dd40 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -6533,14 +6533,20 @@ void Person::takeWeapon(int weaponId) weaponids[0] = weaponId; } -bool Person::addClothes(const int& clothesId) +void Person::addClothes() { - return addClothes(clothes[clothesId]); + if (numclothes > 0) { + for (int i = 0; i < numclothes; i++) { + addClothes(i); + } + DoMipmaps(); + } } -bool Person::addClothes(const char* fileName) +bool Person::addClothes(const int& clothesId) { LOGFUNC; + const char* fileName = clothes[clothesId]; GLubyte* array = &skeleton.skinText[0]; @@ -6551,6 +6557,10 @@ bool Person::addClothes(const char* fileName) float alphanum; //Is it valid? if (opened) { + float tintr = clothestintr[clothesId]; + float tintg = clothestintg[clothesId]; + float tintb = clothestintb[clothesId]; + if (tintr > 1) tintr = 1; if (tintg > 1) tintg = 1; if (tintb > 1) tintb = 1;