Controlling the timing of lag compensation.

I am working on a gamemode called Clock Blockers which is a sort of time-travel FPS. Whatever happens in this round is replayed by a bot in the next round. The trouble is that lag compensation isn’t done for the bots, so their shots tend to be behind that of the players’ shots.

Turning off lag compensation in the weapons by putting FireBullets into a timer seems to “fix” this issue, but feels bad and unnatural to play since the shots are delayed (which is not a consequence of the timer, but instead of the lack of lag compensation).

My best bet would be to simulate lag compensation in the bots themself, but there doesn’t seem to be a feature for this yet. I don’t know the exact details on how lag compensation works internally, but I’d guess it has to do with either the player’s ping or the tick at which the player had fired their weapon clientside.

Any ideas?

sorry for the retarded reply, but doesn’t

Entity:SetLagCompensated work on the bots?

I doubt he will get any benefit, bots do not lag as they are simulated on server.

EDIT: How do you currently record what players do? I think the best bet would be taking snapshots of their UserCmd.

That’s exactly what I’m doing. :v: