1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-18 02:41:29 +02:00

fix compiler warnings

This commit is contained in:
XProger
2018-06-24 15:20:46 +03:00
parent 4a8cb7e1f7
commit 8fb22a796d

View File

@@ -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);
}
}