diff --git a/source/src/client.cpp b/source/src/client.cpp index 73d32072..85b59abe 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -259,8 +259,8 @@ void c2sinfo(dynent *d) // send update to the server putint(q, (int)(d->vel.x*DVF)); // quantize to 1/100, almost always 1 byte putint(q, (int)(d->vel.y*DVF)); putint(q, (int)(d->vel.z*DVF)); - // pack rest in 1 byte: strafe:2, move:2, onfloor:1, state:3 - putint(q, (d->strafe&3) | ((d->move&3)<<2) | (((int)d->onfloor)<<4) | ((editmode ? CS_EDITING : d->state)<<5) ); + // pack rest in 1 int: strafe:2, move:2, onfloor:1, state:3, onladder: 1 + putint(q, (d->strafe&3) | ((d->move&3)<<2) | (((int)d->onfloor)<<4) | ((editmode ? CS_EDITING : d->state)<<5) | (((int)d->onladder)<<8) ); enet_packet_resize(packet, q.length()); incomingdemodata(0, q.buf, q.length(), true); diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 4e9b9243..9b0ca8ae 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -77,10 +77,14 @@ void parsepositions(ucharbuf &p) d->strafe = (f&3)==3 ? -1 : f&3; f >>= 2; d->move = (f&3)==3 ? -1 : f&3; - d->onfloor = (f>>2)&1; - int state = f>>3; + f >>= 2; + d->onfloor = f&1; + f >>= 1; + int state = f&7; if(state==CS_DEAD && d->state!=CS_DEAD) d->lastaction = lastmillis; d->state = state; + f >>= 3; + d->onladder = f&1; if(!demoplayback) updatepos(d); break; };