Skip to content

Commit

Permalink
Merged pull request "Don't special handle RF_FRAMELERP on the client":
Browse files Browse the repository at this point in the history
  • Loading branch information
apanteleev committed Nov 2, 2023
2 parents e6a6f43 + 32388ed commit a4d4855
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
11 changes: 3 additions & 8 deletions src/client/entities.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ entity_update_new(centity_t *ent, const entity_state_t *state, const vec_t *orig

if (state->event == EV_PLAYER_TELEPORT ||
state->event == EV_OTHER_TELEPORT ||
(state->renderfx & (RF_FRAMELERP | RF_BEAM))) {
(state->renderfx & RF_BEAM)) {
// no lerping if teleported
VectorCopy(origin, ent->lerp_origin);
return;
Expand Down Expand Up @@ -575,12 +575,7 @@ static void CL_AddPacketEntities(void)
ent.oldframe = cent->prev.frame;
ent.backlerp = 1.0f - cl.lerpfrac;

if (renderfx & RF_FRAMELERP) {
// step origin discretely, because the frames
// do the animation properly
VectorCopy(cent->current.origin, ent.origin);
VectorCopy(cent->current.old_origin, ent.oldorigin); // FIXME
} else if (renderfx & RF_BEAM) {
if (renderfx & RF_BEAM) {
// interpolate start and end points for beams
LerpVector(cent->prev.origin, cent->current.origin,
cl.lerpfrac, ent.origin);
Expand Down Expand Up @@ -664,7 +659,7 @@ static void CL_AddPacketEntities(void)

// render effects (fullbright, translucent, etc)
if ((effects & EF_COLOR_SHELL))
ent.flags = renderfx & RF_FRAMELERP; // renderfx go on color shell entity
ent.flags = 0; // renderfx go on color shell entity
else
ent.flags = renderfx;

Expand Down
7 changes: 1 addition & 6 deletions src/refresh/gl/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,12 +658,7 @@ void GL_DrawAliasModel(const model_t *model)
if (backlerp == 0)
oldframenum = newframenum;

// interpolate origin, if necessarry
if (ent->flags & RF_FRAMELERP)
LerpVector2(ent->oldorigin, ent->origin,
backlerp, frontlerp, origin);
else
VectorCopy(ent->origin, origin);
VectorCopy(ent->origin, origin);

// cull the model, setup scale and translate vectors
if (newframenum == oldframenum)
Expand Down

0 comments on commit a4d4855

Please sign in to comment.