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-10-04 19:22:57 +0000
committerStijn Buys <ingar@osirion.org>2010-10-04 19:22:57 +0000
commit312b9bcb81748032ff21e3d3f1d5fd36405fb713 (patch)
treee6fef59aeb7bdfadbe0623f0a8b04de0b827479b /src
parent3d97c7737fdda88c5d5d9e3e7d13f4c1973c7774 (diff)
eliminate compiler warnings about float to int conversion
Diffstat (limited to 'src')
-rw-r--r--src/game/base/game.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index a3d9899..1202fe6 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -300,7 +300,7 @@ void Game::func_give(core::Player *player, const std::string &args)
return;
}
- const int max = player->control()->inventory()->capacity_available() / cargo->volume();
+ const int max = (int)floorf(player->control()->inventory()->capacity_available() / cargo->volume());
if (amount < 0 ) {
amount = max;
}