diff NPC.cpp @ 333:405d0c4dd1b3

Слияние
author Ritor1
date Wed, 20 Feb 2013 20:51:55 +0600
parents 72faa54ff319
children 95be2dcecadf
line wrap: on
line diff
--- a/NPC.cpp	Wed Feb 20 20:50:22 2013 +0600
+++ b/NPC.cpp	Wed Feb 20 20:51:55 2013 +0600
@@ -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 )