From: Côme Chilliet Date: Sat, 26 Nov 2016 08:57:38 +0000 (+0800) Subject: It makes no sense to use a player id as key for skinText X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=dcfcaa86f46665886448d5aa6766b39c9e1c01b8;p=lugaru.git It makes no sense to use a player id as key for skinText --- diff --git a/Source/ConsoleCmds.cpp b/Source/ConsoleCmds.cpp index 4f3dfe1..698c73b 100644 --- a/Source/ConsoleCmds.cpp +++ b/Source/ConsoleCmds.cpp @@ -141,7 +141,7 @@ static void set_clothes(int pnum, const char *args) char buf[64]; snprintf(buf, 63, ":Data:Textures:%s.png", args); - if (!AddClothes(buf, &Person::players[pnum]->skeleton.skinText[pnum])) + if (!AddClothes(buf, &Person::players[pnum]->skeleton.skinText[0])) return; Person::players[pnum]->DoMipmaps(); diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index ea59163..3d492fd 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -2133,7 +2133,7 @@ void doDebugKeys() if (Person::players[closest]->creature == rabbittype) { Person::players[closest]->skeleton.id = closest; Person::players[closest]->skeleton.Load((char *)":Data:Skeleton:Basic Figure Wolf", (char *)":Data:Skeleton:Basic Figure Wolf Low", (char *)":Data:Skeleton:Rabbitbelt", (char *)":Data:Models:Wolf.solid", (char *)":Data:Models:Wolf2.solid", (char *)":Data:Models:Wolf3.solid", (char *)":Data:Models:Wolf4.solid", (char *)":Data:Models:Wolf5.solid", (char *)":Data:Models:Wolf6.solid", (char *)":Data:Models:Wolf7.solid", (char *)":Data:Models:Wolflow.solid", (char *)":Data:Models:Belt.solid", 0); - Person::players[closest]->skeleton.drawmodel.textureptr.load(":Data:Textures:Wolf.jpg", 1, &Person::players[closest]->skeleton.skinText[closest], &Person::players[closest]->skeleton.skinsize); + Person::players[closest]->skeleton.drawmodel.textureptr.load(":Data:Textures:Wolf.jpg", 1, &Person::players[closest]->skeleton.skinText[0], &Person::players[closest]->skeleton.skinsize); Person::players[closest]->whichskin = 0; Person::players[closest]->creature = wolftype;