diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-04 19:22:57 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-04 19:22:57 +0000 |
commit | 312b9bcb81748032ff21e3d3f1d5fd36405fb713 (patch) | |
tree | e6fef59aeb7bdfadbe0623f0a8b04de0b827479b /src/game/base | |
parent | 3d97c7737fdda88c5d5d9e3e7d13f4c1973c7774 (diff) |
eliminate compiler warnings about float to int conversion
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/game.cc | 2 |
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; } |