Skip to content

Commit

Permalink
Merge pull request #35869 from DaviBones/horsepower-carry-weight
Browse files Browse the repository at this point in the history
Factor in animal carry weight when determining yoke-and-harness power
  • Loading branch information
ZhilkinSerg committed Dec 5, 2019
2 parents baeea93 + 84aa39e commit 5812006
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,9 @@ int vehicle::part_vpower_w( const int index, const bool at_full_hp ) const
if( vp.info().fuel_type == fuel_type_animal ) {
monster *mon = get_pet( index );
if( mon != nullptr && mon->has_effect( effect_harnessed ) ) {
pwr = mon->get_speed() * ( mon->get_size() - 1 ) * 3;
// An animal that can carry twice as much weight, can pull a cart twice as hard.
pwr = mon->get_speed() * ( mon->get_size() - 1 ) * 3
* ( mon->get_mountable_weight_ratio() * 5 );
} else {
pwr = 0;
}
Expand Down

0 comments on commit 5812006

Please sign in to comment.