Follow xml changes.

develop
Alexander Gavrilov 2013-06-11 16:10:42 +04:00
parent 4ae8594fca
commit 49409d4630
2 changed files with 5 additions and 7 deletions

@ -1208,12 +1208,10 @@ int Units::computeMovementSpeed(df::unit *unit)
if (unsigned(unit->counters.webbed-1) <= 8)
speed += unit->counters.webbed*100;
// Muscle weight vs vascular tissue (?)
// Muscle and fat weight vs expected size
auto &attr_tissue = unit->body.physical_attr_tissues;
int muscle = attr_tissue[STRENGTH];
int blood = attr_tissue[AGILITY];
speed = std::max(speed*3/4, std::min(speed*3/2, int(int64_t(speed)*muscle/blood)));
auto &s_info = unit->body.size_info;
speed = std::max(speed*3/4, std::min(speed*3/2, int(int64_t(speed)*s_info.size_cur/s_info.size_base)));
// Attributes
@ -1243,7 +1241,7 @@ int Units::computeMovementSpeed(df::unit *unit)
// Inventory encumberance
int total_weight = calcInventoryWeight(unit);
int free_weight = std::max(1, muscle/10 + strength_attr*3);
int free_weight = std::max(1, s_info.size_cur/10 + strength_attr*3);
if (free_weight < total_weight)
{

@ -1 +1 @@
Subproject commit cacb0b9a347aaadc2b4b052a7cda40e58104f04f
Subproject commit 24d29ef54a4f60efb26fd9608c5cb11dfcd4d940