You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// maybe we find the layout-ammo on the ground to load it with
872
-
for (std::vector<BattleItem*>::iterator k = _craftInventoryTile->getInventory()->begin(); (!loaded) && k != _craftInventoryTile->getInventory()->end(); ++k)
873
-
{
874
-
if ((*k)->getRules()->getType() == (*j)->getAmmoItem() && (*k)->getSlot() == ground
875
-
&& item->setAmmoItem((*k)) == 0)
876
-
{
877
-
_save->getItems()->push_back(*k);
878
-
(*k)->setSlot(righthand);
879
-
loaded = true;
880
-
// note: soldier is not owner of the ammo, we are using this fact when saving equipments
// let's try to load this weapon, whether we equip it or not.
969
-
for (std::vector<BattleItem*>::iterator i = _craftInventoryTile->getInventory()->begin(); i != _craftInventoryTile->getInventory()->end() && !loaded; ++i)
970
-
{
971
-
if ((*i)->getSlot() == ground && item->setAmmoItem((*i)) == 0)
972
-
{
973
-
_save->getItems()->push_back(*i);
974
-
(*i)->setXCOMProperty(true);
975
-
(*i)->setSlot(rightHand);
976
-
weight += (*i)->getRules()->getWeight();
977
-
loaded = true;
978
-
// note: soldier is not owner of the ammo, we are using this fact when saving equipments
979
-
}
980
-
}
981
-
}
982
963
983
964
if (loaded && (unit->getGeoscapeSoldier() == 0 || _allowAutoLoadout))
984
965
{
985
-
if (!unit->getItem("STR_RIGHT_HAND") && unit->getStats()->strength * 0.66 >= weight)
966
+
if (!unit->getItem("STR_RIGHT_HAND") && unit->getStats()->strength * 0.66 >= weight)// weight is always considered 0 for aliens
if ((unit->getGeoscapeSoldier() == 0 || _allowAutoLoadout))
1015
996
{
1016
-
if (unit->getStats()->strength >= weight)
997
+
if (unit->getStats()->strength >= weight)// weight is always considered 0 for aliens
1017
998
{
1018
999
for (std::vector<std::string>::const_iterator i = _game->getRuleset()->getInvsList().begin(); i != _game->getRuleset()->getInvsList().end() && !placed; ++i)
0 commit comments