*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1301 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2007-09-07 01:30:56 +00:00
parent e90c82eac2
commit 9e8a6a0883
+8 -1
View File
@@ -126,6 +126,13 @@ struct clientstate : playerstate
return state==CS_ALIVE || (state==CS_DEAD && gamemillis - lastdeath <= DEATHMILLIS);
}
bool waitexpired(int gamemillis)
{
int wait = gamemillis - lastshot;
loopi(NUMGUNS) if(wait < gunwait[i]) return false;
return true;
}
void reset()
{
state = CS_DEAD;
@@ -1506,7 +1513,7 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
shot.type = GE_SHOT;
#define seteventmillis(event) \
{ \
if(!cl->timesync) \
if(!cl->timesync || (cl->events.length()==1 && cl->state.waitexpired(gamemillis))) \
{ \
cl->timesync = true; \
cl->gameoffset = gamemillis - getint(p); \