File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,21 @@ static void CL_ProcessEntityUpdate( cl_entity_t *ent )
311311 if ( FBitSet ( ent -> curstate .entityType , ENTITY_NORMAL ))
312312 COM_NormalizeAngles ( ent -> curstate .angles );
313313
314+ // a1ba: follow entities are sent with null origin, grab their aiment origin here
315+ //
316+ // null origin leads to triggered entity teleport check and subsequent reset of position history
317+ // and empty position history doesn't allow entity to render correctly
318+ //
319+ // it's probably should be done somewhere else, as goldsrc doesn't do this here
320+ // it has MoveAiments function but it's called after LinkPacketEntities :shrug:
321+ if ( ent -> curstate .movetype == MOVETYPE_FOLLOW && VectorIsNull ( ent -> curstate .origin ) && ent -> curstate .aiment )
322+ {
323+ cl_entity_t * aiment = CL_GetEntityByIndex ( ent -> curstate .aiment );
324+
325+ if ( aiment )
326+ VectorCopy ( aiment -> origin , ent -> curstate .origin );
327+ }
328+
314329 parametric = ent -> curstate .starttime != 0.0f && ent -> curstate .impacttime != 0.0f ;
315330
316331 // allow interpolation on bmodels too
You can’t perform that action at this time.
0 commit comments