]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
replace ints with floats in PlayerDamaged hookfunction
authorMartin Taibr <taibr.martin@gmail.com>
Mon, 5 Sep 2016 21:12:32 +0000 (23:12 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Mon, 5 Sep 2016 21:12:32 +0000 (23:12 +0200)
qcsrc/common/mutators/mutator/damagetext/damagetext.qc
qcsrc/server/mutators/events.qh

index 3d4288cd2ebd0908f2a4d33e41b1321ed825df32..7134d0abc33faf8ccf8dabb77fb58dd8451540d8 100644 (file)
@@ -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(
index 7e40b1af1e80daba8461dba1e543dfddd9f3d4ff..af7e60c4c01f4371ad33347715cd1bc2766c653c 100644 (file)
@@ -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) \
     /**/