48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
d->o.x += dx < 0 ? r - fx : -(r - fx);
};
int lagtime = lastmillis - d->lastupdate;
if (lagtime) {
d->plag = (d->plag * 5 + lagtime) / 6;
d->lastupdate = lastmillis;
};
};
void
localservertoclient(
uchar *buf, int len) // processes any updates from the server
{
if (ENET_NET_TO_HOST_16(*(ushort *)buf) != len)
neterr(@"packet length");
|
<
>
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
d->o.x += dx < 0 ? r - fx : -(r - fx);
};
int lagtime = lastmillis - d->lastupdate;
if (lagtime) {
d->plag = (d->plag * 5 + lagtime) / 6;
d->lastupdate = lastmillis;
};
}
void
localservertoclient(
uchar *buf, int len) // processes any updates from the server
{
if (ENET_NET_TO_HOST_16(*(ushort *)buf) != len)
neterr(@"packet length");
|