diff --git a/src/game/g_phys.pas b/src/game/g_phys.pas
index 9d93a5b560ec059d0dc6e5d984103f66acf88d57..81bdb78d6b095492405bb06c4afaf4d9601749d4 100644 (file)
--- a/src/game/g_phys.pas
+++ b/src/game/g_phys.pas
interface
uses
interface
uses
- e_graphics;
+ r_graphics;
type
PObj = ^TObj;
type
PObj = ^TObj;
// this is purely visual change, it won't affect anything else
slopeUpLeft: Integer; // left to go
slopeFramesLeft: Integer; // frames left to go
// this is purely visual change, it won't affect anything else
slopeUpLeft: Integer; // left to go
slopeFramesLeft: Integer; // frames left to go
+ // for frame interpolation
+ oldX, oldY: Integer;
+ procedure lerp(t: Single; out fX, fY: Integer);
end;
const
end;
const
const
SmoothSlopeFrames = 4;
const
SmoothSlopeFrames = 4;
+procedure TObj.lerp(t: Single; out fX, fY: Integer);
+begin
+ fX := nlerp(oldX, X, t);
+ fY := nlerp(oldY, Y, t);
+end;
function g_Obj_StayOnStep(Obj: PObj): Boolean; inline;
begin
function g_Obj_StayOnStep(Obj: PObj): Boolean; inline;
begin