]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/damageeffects.qc
Merge branch 'master' into Mario/stats_eloranking
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / damageeffects.qc
index c85d66eeb6686cee70d27d77482757baf0336550..1fc64d1d259697f7fb04c691a1d83ead70ef220f 100644 (file)
@@ -6,11 +6,10 @@ REGISTER_NET_LINKED(ENT_CLIENT_DAMAGEINFO)
 
 bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
 {
+       vector org = vec3(floor(this.origin.x), floor(this.origin.y), floor(this.origin.z));
        WriteHeader(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
        WriteShort(MSG_ENTITY, this.projectiledeathtype);
-       WriteCoord(MSG_ENTITY, floor(this.origin.x));
-       WriteCoord(MSG_ENTITY, floor(this.origin.y));
-       WriteCoord(MSG_ENTITY, floor(this.origin.z));
+       WriteVector(MSG_ENTITY, org);
        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));
@@ -187,9 +186,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
        w_issilent = (w_deathtype & 0x8000);
        w_deathtype = (w_deathtype & 0x7FFF);
 
-       w_org.x = ReadCoord();
-       w_org.y = ReadCoord();
-       w_org.z = ReadCoord();
+       w_org = ReadVector();
 
        thedamage = ReadByte();
        rad = ReadByte();