MCPcopy Create free account
hub / github.com/assaultcube/AC / interppos

Function interppos

source/src/physics.cpp:795–806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793VAR(physinterp, 0, 1, 1);
794
795void interppos(physent *pl)
796{
797 pl->o = pl->newpos;
798 pl->o.z += pl->eyeheight;
799
800 int diff = lastphysframe - lastmillis;
801 if(diff <= 0 || !physinterp) return;
802
803 vec deltapos(pl->deltapos);
804 deltapos.mul(min(diff, physframetime)/float(physframetime));
805 pl->o.add(deltapos);
806}
807
808void moveplayer(physent *pl, int moveres, bool local)
809{

Callers 1

moveplayerFunction · 0.85

Calls 3

minFunction · 0.85
mulMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected