Describe your issue here (drag+drop ZIP to attach it)
// this will be ok
double SQRTF_new(float in)
{
if (in <= 0.00001f)
return 0.0;
__m128 in128 = _mm_load_ss(&in);
return _mm_cvtss_f32(_mm_mul_ss(in128, _mm_rsqrt_ss(in128)));
}
// this make Rising Of Evil Mod crash in r10d
double SQRTF_new_ori(float in)
{
if (in > 0.00001f)
{
__m128 in128 = _mm_load_ss(&in);
return _mm_cvtss_f32(_mm_mul_ss(in128, _mm_rsqrt_ss(in128)));
}
return 0.0f;
}
Original game code:
float __cdecl SQRTF(float src)
{
if ( src <= 0.0000099999997 )
return 0.0;
return sqrt(src);
}
Validation
Describe your issue here (drag+drop ZIP to attach it)