X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_player.pas;h=8f84ed9d7328db4c512b6834993235cefa6e7e66;hb=458ad9bc8def2f7fb7f3be7c6bd7d78f84c73045;hp=068c2b4124e41fe4d225a6dd4685666797c1300c;hpb=b9615dc5473b0eadac9f3298714b440ff406d322;p=d2df-sdl.git diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 068c2b4..8f84ed9 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -1437,6 +1437,8 @@ begin e_TextureFontPrint(0, fH * 3, 'Vel Y: ' + IntToStr(p.FObj.Vel.Y), gStdFont); e_TextureFontPrint(0, fH * 4, 'Acc X: ' + IntToStr(p.FObj.Accel.X), gStdFont); e_TextureFontPrint(0, fH * 5, 'Acc Y: ' + IntToStr(p.FObj.Accel.Y), gStdFont); + e_TextureFontPrint(0, fH * 6, 'Old X: ' + IntToStr(p.FObj.oldX), gStdFont); + e_TextureFontPrint(0, fH * 7, 'Old Y: ' + IntToStr(p.FObj.oldY), gStdFont); end; procedure g_Player_DrawHealth(); @@ -5069,8 +5071,11 @@ begin NetServer := g_Game_IsNet and g_Game_IsServer; AnyServer := g_Game_IsServer; - if FGhost then - DoLerp(4); + if g_Game_IsClient and (NetInterpLevel > 0) then + DoLerp(NetInterpLevel + 1) + else + if FGhost then + DoLerp(4); if NetServer then if FClientID >= 0 then @@ -5748,6 +5753,8 @@ procedure TPlayer.SetLerp(XTo, YTo: Integer); var AX, AY: Integer; begin + FXTo := XTo; + FYTo := YTo; if NetInterpLevel < 1 then begin FObj.X := XTo; @@ -5755,9 +5762,6 @@ begin end else begin - FXTo := XTo; - FYTo := YTo; - AX := Abs(FXTo - FObj.X); AY := Abs(FYTo - FObj.Y); if (AX > 32) or (AX <= NetInterpLevel) then