Always write viewmodel index to client

This commit is contained in:
cypress 2024-09-01 18:54:51 -07:00
parent 4c8d0b556d
commit ce50b0f8e1
2 changed files with 6 additions and 9 deletions

View file

@ -941,11 +941,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

@ -712,8 +712,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;
@ -755,8 +755,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);