]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Round up the health/armor values before sending them
authorMario <mario@smbclan.net>
Sat, 5 Mar 2016 01:03:31 +0000 (11:03 +1000)
committerMario <mario@smbclan.net>
Sat, 5 Mar 2016 01:03:31 +0000 (11:03 +1000)
qcsrc/common/mutators/mutator/damagetext/damagetext.qc

index 6a33ab34e6268230983db5b642d910a7c8dd7663..866ffeb4c743e155c9f89c8b158d72a4d2d2e98a 100644 (file)
@@ -98,8 +98,8 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
         ) {
             msg_entity = it;
             WriteHeader(MSG_ONE, damagetext);
-            WriteShort(MSG_ONE, health);
-            WriteShort(MSG_ONE, armor);
+            WriteShort(MSG_ONE, rint(health));
+            WriteShort(MSG_ONE, rint(armor));
             WriteEntity(MSG_ONE, hit);
             WriteCoord(MSG_ONE, location.x);
             WriteCoord(MSG_ONE, location.y);