diff mm7_4.cpp @ 1361:b3ac17fd12de

Moved condition checking to a separate class, extracted it from player::SetCondition
author Grumpy7
date Sun, 14 Jul 2013 23:22:43 +0200
parents 61010a655c94
children d6cf8ead9242
line wrap: on
line diff
--- a/mm7_4.cpp	Sat Jul 13 21:36:35 2013 +0200
+++ b/mm7_4.cpp	Sun Jul 14 23:22:43 2013 +0200
@@ -1606,7 +1606,7 @@
     if (pParty->days_played_without_rest > 1)
     {
       for (uint i = 0; i < 4; ++i)
-        pParty->pPlayers[i].SetCondition(Player::Condition_Weak, 0);
+        pParty->pPlayers[i].SetCondWeakWithBlockCheck(0);
 
       if (pParty->uNumFoodRations)
         Party::TakeFood(1);
@@ -1624,9 +1624,9 @@
           if (!player->Pertified() && !player->Eradicated() && !player->Dead())
           {
             if (rand() % 100 < 5 * pParty->days_played_without_rest)
-              player->SetCondition(Player::Condition_Dead, 0);
+              player->SetCondDeadWithBlockCheck(0);
             if (rand() % 100 < 10 * pParty->days_played_without_rest)
-              player->SetCondition(Player::Condition_Insane, 0);
+              player->SetCondInsaneWithBlockCheck(0);
           }
         }
     }