From: Martin Taibr <taibr.martin@gmail.com>
Date: Mon, 5 Sep 2016 21:12:32 +0000 (+0200)
Subject: replace ints with floats in PlayerDamaged hookfunction
X-Git-Tag: xonotic-v0.8.2~481^2~11
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f8bc8649557b1ecab34836d607221a7e89bf7582;p=xonotic%2Fxonotic-data.pk3dir.git

replace ints with floats in PlayerDamaged hookfunction
---

diff --git a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc
index 3d4288cd2e..7134d0abc3 100644
--- a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc
+++ b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc
@@ -95,8 +95,8 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
     if (SV_DAMAGETEXT_DISABLED()) return;
     const entity attacker = M_ARGV(0, entity);
     const entity hit = M_ARGV(1, entity); if (hit == attacker) return;
-    const int health = M_ARGV(2, int);
-    const int armor = M_ARGV(3, int);
+    const float health = M_ARGV(2, float);
+    const float armor = M_ARGV(3, float);
     const int deathtype = M_ARGV(5, int);
     const vector location = hit.origin;
     FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh
index 7e40b1af1e..af7e60c4c0 100644
--- a/qcsrc/server/mutators/events.qh
+++ b/qcsrc/server/mutators/events.qh
@@ -337,8 +337,8 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate, EV_PlayerDamage_Calculate);
 #define EV_PlayerDamaged(i, o) \
     /** attacker  */ i(entity, MUTATOR_ARGV_0_entity) \
     /** target    */ i(entity, MUTATOR_ARGV_1_entity) \
-    /** health    */ i(int,    MUTATOR_ARGV_2_int) \
-    /** armor     */ i(int,    MUTATOR_ARGV_3_int) \
+    /** health    */ i(float,    MUTATOR_ARGV_2_float) \
+    /** armor     */ i(float,    MUTATOR_ARGV_3_float) \
     /** location  */ i(vector, MUTATOR_ARGV_4_vector) \
     /** deathtype */ i(int,    MUTATOR_ARGV_5_int) \
     /**/