1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 09:53:50 +00:00

non-unique NPC ID workaround

This commit is contained in:
Marc Zinnschlag 2011-03-18 10:20:14 +01:00
parent 0f2152903e
commit 72ce493123

View file

@ -46,7 +46,14 @@ namespace MWClass
std::string hairID = ref->base->hair; std::string hairID = ref->base->hair;
std::string headID = ref->base->head; std::string headID = ref->base->head;
std::string npcName = ref->base->name;
// very ugly workaround to stop OGRE from chocking on non-unique scene node handles
static int uniqueId = 0;
std::ostringstream stream;
stream << "npc$" << uniqueId++;
std::string npcName = stream.str(); // ref->base->name;
//std::cout << "NPC: " << npcName << "\n"; //std::cout << "NPC: " << npcName << "\n";
//get the part of the bodypart id which describes the race and the gender //get the part of the bodypart id which describes the race and the gender