1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-06 13:16:52 +02:00

Merge pull request #24 from Gh0stBlade/VS2017

Fix VS2017 build and some compiler warnings.
This commit is contained in:
Timur Gagiev
2016-11-26 15:39:11 +03:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ struct Controller {
mat4 m = animation.getJoints(getMatrix(), joint);
vec3 delta = (m.inverse() * t).normal();
float angleY = clampAngle(atan2(delta.x, delta.z));
float angleY = clampAngle(atan2f(delta.x, delta.z));
float angleX = clampAngle(asinf(delta.y));
if (angleX > angleRange.x && angleX <= angleRange.y &&

View File

@@ -100,7 +100,7 @@ struct Enemy : Character {
vec3 b = getDir();
vec3 n = vec3(0, 1, 0);
if (angleX) *angleX = 0.0f;
if (angleY) *angleY = atan2(b.cross(a).dot(n), a.dot(b));
if (angleY) *angleY = atan2f(b.cross(a).dot(n), a.dot(b));
}
return true;
}

View File

@@ -3,7 +3,7 @@
#endif
#ifdef MINIMAL
#if _MSC_VER == 1900 // VS2015
#if _MSC_VER >= 1900 // VS2015 (1900) VS2017 (1910)
#include <malloc.h>
void __cdecl operator delete(void *ptr, unsigned int size) { free(ptr); }
// add "/d2noftol3" to compiler additional options