From 0cfc4b08e1636c476d9bece89d765f944b224d40 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Tue, 27 Jul 2010 01:26:49 +0000 Subject: [PATCH] compatibility purposes git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5461 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/geom.h | 2 +- source/src/server.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);