gh-0x / l4d2-internal-base

Internal base for making hacks for left 4 dead 2
Do What The F*ck You Want To Public License
8 stars 4 forks source link

wont compile for some reason please help Thanks #2

Open Boof7277 opened 2 weeks ago

Boof7277 commented 2 weeks ago

image_2024-10-07_001746834

xastrix commented 6 days ago

Hello, Compile it in Release/x86 image

Boof7277 commented 6 days ago

Hello, Compile it in Release/x86 image

same issue image

xastrix commented 5 days ago

Open l4d2/math/math.cpp and include cmath

#include "math.h"
#include <cmath> // sin, cos - cmath

math g_math;

void math::sin_cos(float radians, float* sine, float* cosine)
{
    *sine = std::sin(radians);
    *cosine = std::cos(radians);
}

void math::angle_vectors(vec3 angles, vec3& f)
{
    float sp, sy, sr, cp, cy, cr;

    sin_cos(DEG2RAD(angles[0]), &sp, &cp);
    sin_cos(DEG2RAD(angles[1]), &sy, &cy);
    sin_cos(DEG2RAD(angles[2]), &sr, &cr);

    f[0] = cp * cy;
    f[1] = cp * sy;
    f[2] = -sp;
}