comparison 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
comparison
equal deleted inserted replaced
1360:a47d9282ea7c 1361:b3ac17fd12de
1604 1604
1605 ++pParty->days_played_without_rest; 1605 ++pParty->days_played_without_rest;
1606 if (pParty->days_played_without_rest > 1) 1606 if (pParty->days_played_without_rest > 1)
1607 { 1607 {
1608 for (uint i = 0; i < 4; ++i) 1608 for (uint i = 0; i < 4; ++i)
1609 pParty->pPlayers[i].SetCondition(Player::Condition_Weak, 0); 1609 pParty->pPlayers[i].SetCondWeakWithBlockCheck(0);
1610 1610
1611 if (pParty->uNumFoodRations) 1611 if (pParty->uNumFoodRations)
1612 Party::TakeFood(1); 1612 Party::TakeFood(1);
1613 else 1613 else
1614 for (uint i = 0; i < 4; ++i) 1614 for (uint i = 0; i < 4; ++i)
1622 player->Zero(); 1622 player->Zero();
1623 1623
1624 if (!player->Pertified() && !player->Eradicated() && !player->Dead()) 1624 if (!player->Pertified() && !player->Eradicated() && !player->Dead())
1625 { 1625 {
1626 if (rand() % 100 < 5 * pParty->days_played_without_rest) 1626 if (rand() % 100 < 5 * pParty->days_played_without_rest)
1627 player->SetCondition(Player::Condition_Dead, 0); 1627 player->SetCondDeadWithBlockCheck(0);
1628 if (rand() % 100 < 10 * pParty->days_played_without_rest) 1628 if (rand() % 100 < 10 * pParty->days_played_without_rest)
1629 player->SetCondition(Player::Condition_Insane, 0); 1629 player->SetCondInsaneWithBlockCheck(0);
1630 } 1630 }
1631 } 1631 }
1632 } 1632 }
1633 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) 1633 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
1634 pOutdoor->SetFog(); 1634 pOutdoor->SetFog();