From: Mario Date: Sat, 22 Oct 2016 01:13:49 +0000 (+0000) Subject: Merge branch 'martin-t/damagetext' into 'master' X-Git-Tag: xonotic-v0.8.2~481 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=ac9fba402abf745436adf0ecaa8f90347708ff53 Merge branch 'martin-t/damagetext' into 'master' fix damage text rounding errors when accumulating damage This fixes MG reporting wrong damage when accumulated after passing through a wall (or similar situations where damage is not a whole number) while keeping rounding behavior for weapons like mortar. I used MinceR's idea of multiplying the damage by 100 and sending the decimal part inside the short instead of using float to keep bandwidth the same. Now that i think about it, this could cause trouble if the damage dealt is higher than 655 (because 656*100 won't fit in short). However health and armor max is 200 so it shouldn't happen unless we start sending damage text for vehicles as well. See merge request !365 --- ac9fba402abf745436adf0ecaa8f90347708ff53