Jump to content


Photo

Patch: fix MoP character hair display bug.


  • Please log in to reply
5 replies to this topic

#1 zhing

zhing

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 29 August 2012 - 09:14 AM

This patch is for SVN r687.
Usage: Apply this patch to wowmodelviewer/src folder.

Posted Image

Index: charcontrol.cpp
===================================================================
--- charcontrol.cpp (revision 687)
+++ charcontrol.cpp (working copy)
@@ -896,19 +896,19 @@

  // select hairstyle geoset(s)
  for (CharHairGeosetsDB::Iterator it = hairdb.begin(); it != hairdb.end(); ++it) {
-  if (it->getUInt(CharHairGeosetsDB::Race)==cd.race && it->getUInt(CharHairGeosetsDB::Gender)==cd.gender) {
-   unsigned int id = it->getUInt(CharHairGeosetsDB::Geoset);
-   unsigned int section = it->getUInt(CharHairGeosetsDB::Section);
+  if (it->getUInt(CharHairGeosetsDB::Race)==cd.race &&
+		it->getUInt(CharHairGeosetsDB::Gender)==cd.gender &&
+		it->getUInt(CharHairGeosetsDB::Section)==cd.hairStyle)
+	{
+   unsigned int geosetId = it->getUInt(CharHairGeosetsDB::Geoset);
+	  bald = it->getUInt(CharHairGeosetsDB::Bald) != 0;

-   if (id!=0) {
-	for (size_t j=0; j<model->geosets.size(); j++) {
-	 if (model->geosets[j].id == id)
-	  model->showGeosets[j] = ((cd.hairStyle == section) && showHair);
-	}
-
-   } else if (cd.hairStyle==section) {
-	bald = true;
-   }
+	  for (size_t j=0; j<model->geosets.size(); j++) {
+		if (model->geosets[j].id == geosetId)
+		  model->showGeosets[j] = showHair;
+		else if (model->geosets[j].id >= 1 && model->geosets[j].id <= cd.maxHairStyle)
+		  model->showGeosets[j] = false;
+	  }
   }
  }
#if 0 // for worgen female
Index: database.h
===================================================================
--- database.h (revision 687)
+++ database.h (working copy)
@@ -193,8 +193,8 @@
  static const size_t Race = 1;	// uint
  static const size_t Gender = 2;	// uint, 0 = Male, 1 = Female
  static const size_t Section = 3;   // uint, ID unique between race, and gender.
- static const size_t Geoset = 4;	// uint, Defines hairstyle, each number should be unique for that race / gender combo.
- //static const size_t Bald = 5;	// uint, If this hairstyle bald or not .
+ static const size_t Geoset = 5;	// uint, Defines hairstyle, each number should be unique for that race / gender combo.
+  static const size_t Bald = 7;

  Record getByParams(unsigned int race, unsigned int gender, unsigned int section);
  int getGeosetsFor(unsigned int race, unsigned int gender);


#2 Suge

Suge

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 30 August 2012 - 02:00 PM

Hello thx for the patch, but how do you install this patch?
You said to apply to src folder but I don't have src folder with the WMV v0.7.0.4 MoP TestBuild 2 Windows 32-bit

#3 zhing

zhing

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 31 August 2012 - 05:10 AM

You need get the WMV source from the SVN, then apply the patch and compile it by yourself.

#4 Jeromnimo

Jeromnimo

    Programmer

  • Moderators
  • 302 posts
  • LocationFrance

Posted 31 August 2012 - 08:15 AM

Thanks for this patch Zhing !
I will push it this week end and build a version if a find some time to do it.

#5 Jeromnimo

Jeromnimo

    Programmer

  • Moderators
  • 302 posts
  • LocationFrance

Posted 04 September 2012 - 06:35 AM

Done. Your patch is now included in SVN, and a new WMV version is out, see here for more informations : http://wowmodelviewer.org/forum/index.php?/topic/4-wow-model-viewer-07x/page__pid__2011#entry2011

#6 Swisha

Swisha

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 08 September 2012 - 03:22 AM

Hi there,
Im having a problem with the "glow eyes" and also "big shoulders", i checked the forum and find nothing realy helpful about it.
Any clues? peace.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users