From 8fb22a796d88106953a08e408c77857a3be625e0 Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 24 Jun 2018 15:20:46 +0300 Subject: [PATCH] fix compiler warnings --- src/enemy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/enemy.h b/src/enemy.h index 133bf3f..facb5df 100644 --- a/src/enemy.h +++ b/src/enemy.h @@ -166,9 +166,9 @@ struct Enemy : Character { if (enemy->health > 0.0f) { vec3 dir = vec3(enemy->pos.x - pos.x, 0.0f, enemy->pos.z - pos.z); float D = dir.length2(); - float R = enemy->radius + radius; + float R = float(enemy->radius + radius); if (D < R * R) { - D = sqrt(D); + D = sqrtf(D); pos -= dir.normal() * (R - D); } }