11-04-2011, 03:23 AM
(11-04-2011, 02:26 AM)FakeTruth Wrote: So it has nothing to do with MCServer I thinkI found a "fix" for it, but I don't understand it.
adding this to Endianness.h allowed it to read the packet correctly:
(void)printf("",(unsigned long)buf);
Code:
inline float NetworkToHostFloat4( void* a_Value )
{
u_long buf = *(u_long*)a_Value;
buf = ntohl( (unsigned long)buf );
(void)printf("",(unsigned long)buf);
return *(float*)reinterpret_cast<float *>(&buf);
}
Any ideas? It works, but I don't like not knowing why.