1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 09:23:51 +00:00

Clamp price multiplication to 1, as it resulted in player alone traveling at no fee.

This commit is contained in:
NeveHanter 2016-12-20 21:23:55 +01:00
parent 8902bb5b13
commit 15cd3c178b

View file

@ -78,7 +78,7 @@ namespace MWGui
std::set<MWWorld::Ptr> followers; std::set<MWWorld::Ptr> followers;
MWBase::Environment::get().getMechanicsManager()->getActorsFollowing(player, followers); MWBase::Environment::get().getMechanicsManager()->getActorsFollowing(player, followers);
unsigned int travellingFollowers = 0; int travellingFollowers = 0;
for(std::set<MWWorld::Ptr>::iterator it = followers.begin();it != followers.end();++it) for(std::set<MWWorld::Ptr>::iterator it = followers.begin();it != followers.end();++it)
{ {
MWWorld::Ptr follower = *it; MWWorld::Ptr follower = *it;
@ -92,7 +92,7 @@ namespace MWGui
} }
// Apply followers cost, in vanilla one follower travels for free // Apply followers cost, in vanilla one follower travels for free
price *= travellingFollowers; price *= std::max(1, travellingFollowers);
price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr, price, true); price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr, price, true);