mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
interpolation needed more bounds checking
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2029 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
27bb33eb41
commit
7b4b590a8e
1 changed files with 11 additions and 3 deletions
|
@ -1598,8 +1598,13 @@ void CL_LinkPacketEntities (void)
|
|||
else
|
||||
{
|
||||
ent->lerpfrac = 1-(servertime - le->framechange) / (le->framechange - le->oldframechange);
|
||||
if (ent->lerpfrac < 0)
|
||||
if (ent->lerpfrac > 1)
|
||||
ent->lerpfrac = 1;
|
||||
else if (ent->lerpfrac < 0)
|
||||
{
|
||||
ent->lerpfrac = 0;
|
||||
//le->oldframechange = le->framechange;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -2758,10 +2763,13 @@ void CL_LinkPlayers (void)
|
|||
if (state->lerpstarttime)
|
||||
{
|
||||
ent->lerpfrac = 1-(realtime - state->lerpstarttime)*10;
|
||||
if (ent->lerpfrac < 0)
|
||||
ent->lerpfrac = 0;
|
||||
if (ent->lerpfrac > 1)
|
||||
ent->lerpfrac = 1;
|
||||
else if (ent->lerpfrac < 0)
|
||||
{
|
||||
ent->lerpfrac = 0;
|
||||
//state->lerpstarttime = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
ent->lerpfrac = 0;
|
||||
|
|
Loading…
Reference in a new issue