Always write viewmodel index to client

This commit is contained in:
cypress 2024-09-01 18:54:41 -07:00
parent 9d34ffa8fa
commit 39cc0a6655
2 changed files with 6 additions and 9 deletions

View file

@ -824,11 +824,8 @@ void CL_ParseClientdata (int bits)
cl.stats[STAT_WEAPONSKIN] = 0;
if (bits & SU_WEAPON)
i = MSG_ReadShort ();
else
i = 0;
// Weapon model index
i = MSG_ReadShort();
if (cl.stats[STAT_WEAPON] != i)
cl.stats[STAT_WEAPON] = i;

View file

@ -715,8 +715,8 @@ void SV_WriteClientdataToMessage (edict_t *ent, sizebuf_t *msg)
if (ent->v.weaponskin)
bits |= SU_WEAPONSKIN;
if (ent->v.weapon)
bits |= SU_WEAPON;
// if (ent->v.weapon)
// bits |= SU_WEAPON;
//if (ent->v.perks)
// bits |= SU_PERKS;
@ -758,8 +758,8 @@ void SV_WriteClientdataToMessage (edict_t *ent, sizebuf_t *msg)
MSG_WriteByte (msg, ent->v.weaponframe);
if (bits & SU_WEAPONSKIN)
MSG_WriteByte (msg, ent->v.weaponskin);
if (bits & SU_WEAPON)
MSG_WriteShort (msg, SV_ModelIndex(pr_strings+ent->v.weaponmodel));
MSG_WriteShort (msg, SV_ModelIndex(pr_strings+ent->v.weaponmodel));
if (bits & SU_GRENADES)
MSG_WriteLong (msg, ent->v.grenades);