more robust SV_POSC parsing

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4617 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-08-09 15:18:49 +00:00
parent 5dff118bdd
commit 09dc040bfe
4 changed files with 31 additions and 36 deletions
+1 -2
View File
@@ -114,7 +114,7 @@ void parsepositions(ucharbuf &p)
float yaw, pitch, roll;
if(type == SV_POSC)
{
bitbuf q(p.buf + p.length(), p.remaining());
bitbuf q(&p);
cn = q.getbits(5);
o.x = q.getbits(sfactor + 4) / DMF;
o.y = q.getbits(sfactor + 4) / DMF;
@@ -137,7 +137,6 @@ void parsepositions(ucharbuf &p)
int z = q.getbits(s);
if(negz) z = -z;
o.z = z / DMF;
p.len += q.length();
}
else
{