Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't special handle RF_FRAMELERP on the client. #352

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -675,12 +675,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