diff NPC.cpp @ 316:922a96fdcc86

Merge
author Nomad
date Wed, 20 Feb 2013 01:21:19 +0200
parents 72faa54ff319
children 95be2dcecadf
line wrap: on
line diff
--- a/NPC.cpp	Wed Feb 20 01:17:13 2013 +0200
+++ b/NPC.cpp	Wed Feb 20 01:21:19 2013 +0200
@@ -18,7 +18,7 @@
 void  InitializeTransitions();
 void  InitializeAutonotes();
 void  InitializeQuests();
-bool   CheckPortretAgainsSex(int portret_num, int sex); 
+bool   CheckPortretAgainstSex(int portret_num, int sex); 
 
 //----- (00476977) --------------------------------------------------------
 void NPCStats::InitializeNPCText()
@@ -518,7 +518,7 @@
 	}
 
 //----- (0047730C) --------------------------------------------------------
-bool  CheckPortretAgainsSex(int a1, int)
+bool  CheckPortretAgainstSex(int a1, int)
 	{
 	return true;
 	}
@@ -553,7 +553,7 @@
 		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 		0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0};
 
-	unsigned __int8 seed = (unsigned __int8)((double)(npc_uid - 1) * 0.33333334);
+	unsigned __int8 seed = (unsigned __int8)((double)(npc_uid - 1)/3.0);
 	uNPCSex = NPCSexGenTable[seed];
 	uRace = NPCRaceGenTable[seed];
 	pNPCDataBuff->uSex = uNPCSex;
@@ -617,7 +617,7 @@
 			}
 
 		uGeneratedPortret = uPortretMin + rand() % (uPortretMax - uPortretMin + 1);
-		if ( CheckPortretAgainsSex(uGeneratedPortret, uNPCSex))
+		if ( CheckPortretAgainstSex(uGeneratedPortret, uNPCSex))
 			break_gen = true;
 		++gen_attempts;
 		if ( gen_attempts >= 4 )