From 312b9bcb81748032ff21e3d3f1d5fd36405fb713 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Oct 2010 19:22:57 +0000 Subject: eliminate compiler warnings about float to int conversion --- src/game/base/game.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game') 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; } -- cgit v1.2.3