From: terencehill Date: Thu, 15 Dec 2022 16:37:40 +0000 (+0100) Subject: Send force vector uncompressed to avoid missing decals when hitscan shots hit the... X-Git-Tag: xonotic-v0.8.6~226^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1db2592b4273e0b992ac32c28d8013ccb8644e13;p=xonotic%2Fxonotic-data.pk3dir.git Send force vector uncompressed to avoid missing decals when hitscan shots hit the ground with a small angle --- 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;