1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 15:23:58 +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;
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)
{
MWWorld::Ptr follower = *it;
@ -92,7 +92,7 @@ namespace MWGui
}
// 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);