From 1db2592b4273e0b992ac32c28d8013ccb8644e13 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 15 Dec 2022 17:37:40 +0100 Subject: [PATCH] Send force vector uncompressed to avoid missing decals when hitscan shots hit the ground with a small angle --- qcsrc/common/effects/qc/damageeffects.qc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/effects/qc/damageeffects.qc b/qcsrc/common/effects/qc/damageeffects.qc index 5f3cf9d43..20a335b6b 100644 --- a/qcsrc/common/effects/qc/damageeffects.qc +++ b/qcsrc/common/effects/qc/damageeffects.qc @@ -13,7 +13,7 @@ bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf) WriteByte(MSG_ENTITY, bound(1, this.dmg, 255)); WriteByte(MSG_ENTITY, bound(0, this.dmg_radius, 255)); WriteByte(MSG_ENTITY, bound(1, this.dmg_edge, 255)); - WriteShort(MSG_ENTITY, this.oldorigin.x); + WriteVector(MSG_ENTITY, this.velocity); WriteByte(MSG_ENTITY, this.species); return true; } @@ -38,7 +38,6 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad e.dmg_radius = rad; e.dmg_force = vlen(force); e.velocity = force; - e.oldorigin_x = compressShortVector(e.velocity); e.species = bloodtype; Net_LinkEntity(e, false, 0.2, Damage_DamageInfo_SendEntity); @@ -192,7 +191,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew) thedamage = ReadByte(); rad = ReadByte(); edge = ReadByte(); - force = decompressShortVector(ReadShort()); + force = ReadVector(); species = ReadByte(); return = true; -- 2.39.2