movement interp bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2168 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -503,16 +503,18 @@ void physicsframe() // optimally schedule physics frames inside the gra
|
||||
}
|
||||
}
|
||||
|
||||
VAR(physinterp, 0, 1, 1);
|
||||
|
||||
void interppos(physent *pl)
|
||||
{
|
||||
pl->o = pl->newpos;
|
||||
|
||||
int diff = lastphysframe - (lastmillis + curtime);
|
||||
if(diff <= 0) return;
|
||||
if(diff <= 0 || !physinterp) return;
|
||||
|
||||
vec deltapos(pl->deltapos);
|
||||
deltapos.mul(min(diff, physframetime)/float(physframetime));
|
||||
pl->o.sub(deltapos);
|
||||
pl->o.add(deltapos);
|
||||
}
|
||||
|
||||
void moveplayer(physent *pl, int moveres, bool local)
|
||||
|
||||
Reference in New Issue
Block a user