Browse Source

Fix timedemo

pull/8386/head
Eric Robinson 3 months ago
parent
commit
9e1544c87d
  1. 3
      Source/player.cpp

3
Source/player.cpp

@ -972,8 +972,9 @@ void DamageArmor(Player &player, int numDurLost)
if (armor.isEmpty() && helmet.isEmpty()) if (armor.isEmpty() && helmet.isEmpty())
return; return;
const bool coin = FlipCoin(3);
const bool targetHelmet = armor.isEmpty() ? true : helmet.isEmpty() ? false const bool targetHelmet = armor.isEmpty() ? true : helmet.isEmpty() ? false
: FlipCoin(3); : coin;
int slot = targetHelmet ? INVLOC_HEAD : INVLOC_CHEST; int slot = targetHelmet ? INVLOC_HEAD : INVLOC_CHEST;
Item &item = player.InvBody[slot]; Item &item = player.InvBody[slot];

Loading…
Cancel
Save