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:
Lee Salzman
2008-10-30 15:44:54 +00:00
parent c380de0426
commit dfe58d1f08
5 changed files with 12 additions and 8 deletions
+6 -3
View File
@@ -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);
}