OSDN Git Service

Apply standard random in process of SetSpeciesData().
authorDeskull <desull@users.sourceforge.jp>
Sat, 7 Jun 2014 03:04:05 +0000 (12:04 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 7 Jun 2014 03:04:05 +0000 (12:04 +0900)
Deeangband/Creature.cpp

index 7dea815..9d6f38d 100644 (file)
@@ -94,14 +94,14 @@ namespace Deeangband
 
        void Creature::SetSpeciesData(Species *speciesPtr)
        {
-               std::normal_distribution<int> distHeight(speciesPtr->GetAverageHeight(), speciesPtr->GetAverageHeight() / 20);
-               std::normal_distribution<int> distWeight(speciesPtr->GetAverageWeight(), speciesPtr->GetAverageWeight() / 20);
+               std::normal_distribution<> distHeight(speciesPtr->GetAverageHeight(), speciesPtr->GetAverageHeight());
+               std::normal_distribution<> distWeight(speciesPtr->GetAverageWeight(), speciesPtr->GetAverageWeight());
                this->name = speciesPtr->GetName();
                this->currentSoul = this->maxSoul = speciesPtr->GetBaseSoul();
                this->currentFeed = speciesPtr->GetBaseFeed() * 3 / 4;
                this->maxFeed = speciesPtr->GetBaseFeed();
-               this->weight = 150;//distWeight(Dice::mt);
-               this->height = 40;//distHeight(Dice::mt);
+               this->weight = distWeight(Dice::mt);
+               this->height = distHeight(Dice::mt);
                this->campID = CAMP_FLOOR_NATIVE;
                //this->firstRace = speciesPtr->baseFirstRace;
                //this->secondRace = speciesPtr->baseSecondRace;