From 158706fac974527436a3167cfa94a7ea82070d41 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 22 Sep 2010 22:20:59 +0000 Subject: type conversion correction --- src/game/base/cargo.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/base/cargo.cc b/src/game/base/cargo.cc index b54af55..3014a1e 100644 --- a/src/game/base/cargo.cc +++ b/src/game/base/cargo.cc @@ -5,6 +5,7 @@ */ #include +#include #include "base/game.h" #include "base/cargo.h" @@ -241,7 +242,7 @@ void Cargo::buy(core::EntityControlable *buyer, core::Entity *seller, const int // maximum cargo size if (negotiated_amount * volume() > buyer->inventory()->capacity_available()) { - negotiated_amount = buyer->inventory()->capacity_available() / volume(); + negotiated_amount = (int)floorf(buyer->inventory()->capacity_available() / volume()); } if (negotiated_amount < 1) { -- cgit v1.2.3