fix conversion warnings (MSVC)

This commit is contained in:
Enno Rehling 2017-12-30 11:51:57 +01:00
parent d45141255e
commit 57b161132d
3 changed files with 10 additions and 2 deletions

View file

@ -1307,7 +1307,7 @@ static int sp_rosthauch(castorder * co)
for (; iweapon != NULL; iweapon = iweapon->next) {
item **ip = i_find(&u->items, iweapon->type);
if (*ip) {
float chance = (*ip)->number;
double chance = (*ip)->number;
if (chance > force) chance = force;
if (iweapon->chance < 1.0) {
chance *= iweapon->chance;
@ -4158,7 +4158,8 @@ static int sp_seduce(castorder * co)
loot += rng_int() % 2;
}
if (loot > 0) {
if (loot > 5 * force) loot = 5 * force;
int floot = (int)(5 * force);
if (loot > floot) loot = floot;
}
}
if (loot > 0) {

View file

@ -11,6 +11,9 @@
*/
#ifdef _MSC_VER
#include <platform.h>
#endif
#include "message.h"
#include "strings.h"

View file

@ -1,3 +1,7 @@
#ifdef _MSC_VER
#include <platform.h>
#endif
#include "variant.h"
#include <stdlib.h>