*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@658 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2006-11-14 00:29:08 +00:00
parent fdc3bd7c3d
commit f6e7fb2721
2 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -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);
+6 -2
View File
@@ -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;
};