06 Feb 12, 01:29AM
It's been noted that this can be a bug however in this case he was playing a on a hit-fixed server. This is the code the server runs:
The bug couldn't possibly occur on a fixed server because it's hit-fixed. That means we're sure that the bullet will get past the first conditional and therefore the server can't get out of sync. It's hard to explain this to non-programmers but essentially, it shouldn't happen at all.
[SELECT ALL] Code:
clientstate &gs = c->state;
int wait = e.millis - gs.lastshot;
if(!gs.isalive(gamemillis) ||
e.gun<GUN_KNIFE || e.gun>=NUMGUNS ||
gs.mag[e.gun]<=0)
return;
if(e.gun!=GUN_KNIFE) gs.mag[e.gun]--;
The bug couldn't possibly occur on a fixed server because it's hit-fixed. That means we're sure that the bullet will get past the first conditional and therefore the server can't get out of sync. It's hard to explain this to non-programmers but essentially, it shouldn't happen at all.