compact pos packets are now parseable out of context; all-whitespace chat gets suppressed

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4620 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-08-09 20:34:09 +00:00
parent df7176e9af
commit 9fca17a7a9
5 changed files with 68 additions and 39 deletions
+3 -2
View File
@@ -116,8 +116,9 @@ void parsepositions(ucharbuf &p)
{
bitbuf q(&p);
cn = q.getbits(5);
o.x = q.getbits(sfactor + 4) / DMF;
o.y = q.getbits(sfactor + 4) / DMF;
int usefactor = q.getbits(2) + 7;
o.x = q.getbits(usefactor + 4) / DMF;
o.y = q.getbits(usefactor + 4) / DMF;
yaw = q.getbits(9) * 360.0f / 512;
pitch = (q.getbits(8) - 128) * 90.0f / 127;
roll = !q.getbits(1) ? (q.getbits(6) - 32) * 20.0f / 31 : 0.0f;