2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

engine: decrease instanced baseline index by minus one to avoid zero offset which interpreted as no baseline at all

This commit is contained in:
Alibek Omarov 2021-06-01 21:52:33 +03:00
parent f31e9ae19e
commit ddd48c420b
2 changed files with 2 additions and 2 deletions

View File

@ -1870,7 +1870,7 @@ qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state
}
else
{
baseline_offset = abs( baseline_offset );
baseline_offset = abs( baseline_offset + 1 );
if( baseline_offset < cl.instanced_baseline_count )
from = &cl.instanced_baseline[baseline_offset];
}

View File

@ -356,7 +356,7 @@ static void SV_EmitPacketEntities( sv_client_t *cl, client_frame_t *to, sizebuf_
if( !Q_strcmp( classname, sv.instanced[i].classname ))
{
baseline = &sv.instanced[i].baseline;
offset = -i;
offset = -i - 1; // to avoid zero offset
break;
}
}