diff --git a/source/src/geom.h b/source/src/geom.h index ad4bbfdf..c1e37dcc 100644 --- a/source/src/geom.h +++ b/source/src/geom.h @@ -43,7 +43,7 @@ inline float fCos(float x) { x *= 0.636619772f; FCOS; } inline float fSin(float x) { x *= 0.636619772f; x -= 1.0f; FCOS; } #undef FCOS -inline float ufS2C(float x) { x *= x; return x > 1.0f ? 0.0f : ufSqrt(1.0f - x); } +inline float ufS2C(float x) { x *= x; return x < 1.0f ? ufSqrt(1.0f - x) : 0.0f; } struct vec { diff --git a/source/src/server.cpp b/source/src/server.cpp index 54ba7f99..eb801688 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -2957,8 +2957,8 @@ void process(ENetPacket *packet, int sender, int chan) int usefactor = q.getbits(2) + 7; int xt = q.getbits(usefactor + 4); int yt = q.getbits(usefactor + 4); - cl->y = q.getbits(9); - cl->p = q.getbits(8); + cl->y = (q.getbits(9)*360)/512; + cl->p = ((q.getbits(8)-128)*90)/127; if(!q.getbits(1)) q.getbits(6); if(!q.getbits(1)) q.getbits(4 + 4 + 4); cl->f = q.getbits(8);