Browse Source

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

pull/2/head
Alibek Omarov 4 years ago
parent
commit
ddd48c420b
  1. 2
      engine/common/net_encode.c
  2. 2
      engine/server/sv_frame.c

2
engine/common/net_encode.c

@ -1870,7 +1870,7 @@ qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state @@ -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];
}

2
engine/server/sv_frame.c

@ -356,7 +356,7 @@ static void SV_EmitPacketEntities( sv_client_t *cl, client_frame_t *to, sizebuf_ @@ -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;
}
}

Loading…
Cancel
Save