Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-09-22 22:20:59 +0000
committerStijn Buys <ingar@osirion.org>2010-09-22 22:20:59 +0000
commit158706fac974527436a3167cfa94a7ea82070d41 (patch)
tree604f10596a113bd8bc0fd60ee77ee8550fdccb0d /src
parenta6f9773c358dd7d091ff64cbda504ab8d8066dd3 (diff)
type conversion correction
Diffstat (limited to 'src')
-rw-r--r--src/game/base/cargo.cc3
1 files changed, 2 insertions, 1 deletions
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 <assert.h>
+#include <cmath>
#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) {