network time cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3336 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -862,15 +862,18 @@ void receivefile(uchar *data, int len)
|
||||
}
|
||||
}
|
||||
|
||||
void localservertoclient(int chan, uchar *buf, int len) // processes any updates from the server
|
||||
void servertoclient(int chan, uchar *buf, int len) // processes any updates from the server
|
||||
{
|
||||
ucharbuf p(buf, len);
|
||||
lastmillis -= curtime; // make sure local packets get processed with the same time as network packets
|
||||
switch(chan)
|
||||
{
|
||||
case 0: parsepositions(p); break;
|
||||
case 1: parsemessages(-1, NULL, p); break;
|
||||
case 2: receivefile(p.buf, p.maxlen); break;
|
||||
}
|
||||
lastmillis += curtime; // restore time
|
||||
}
|
||||
|
||||
void localservertoclient(int chan, uchar *buf, int len) // processes any updates from the server
|
||||
{
|
||||
servertoclient(chan, buf, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user