Quote:
Originally Posted by 1337norway
After reviewing the source code I think you may have messed up the logic.
https://github.com/XutaxKamay/firebu...letsfix.sp#L84
You are obtaining the position from the most recent user command processed on the server. This will be the real time position the player currently is at. When using lag compensation all the targets along with the attacker should be re-winded back in time to the positions they were when the shoot command was issued. The usercmd packet includes a field "tick_count" which is the data used to sync the client-server for prediction.
The position you really want to teleport the player to would be the position the player was at in the issued tick_count usercmd + 1. (If the firebullets pos is really using old player pos) I might be missing something though so correct me if i'm wrong.
|
void CLagCompensationManager::StartLagCompensation should not happen for the attacker, It is real time for the player but not for others, we should only rewind them
// Don't lag compensate yourself you loser...
if ( player == pPlayer )
{
continue;
}