]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Damagetext: move new mutator argument to the end to avoid breaking stuff
authorFreddy <schro.sb@gmail.com>
Wed, 13 Jul 2016 23:37:27 +0000 (01:37 +0200)
committerFreddy <schro.sb@gmail.com>
Wed, 13 Jul 2016 23:37:27 +0000 (01:37 +0200)
qcsrc/common/mutators/mutator/damagetext/damagetext.qc
qcsrc/server/cl_player.qc
qcsrc/server/mutators/events.qh

index 745e6c42029d82531c25a30150fbdb2cd6614eb5..d4efe16bc3e21bfa87d13d36bd83f6d31ad64cdd 100644 (file)
@@ -107,8 +107,8 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
     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 int potential_damage = M_ARGV(4, int);
-    const int deathtype = M_ARGV(6, int);
+    const int deathtype = M_ARGV(5, int);
+    const int potential_damage = M_ARGV(6, int);
     const vector location = hit.origin;
     FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
         if (
index 91ba9cc28148c24269af354b938b2bad70cdd31d..82af5b0727f794e485bcecff3bec50b5570cbf8b 100644 (file)
@@ -511,7 +511,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
        }
        if (damage)
        {
-               MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, damage, hitloc, deathtype);
+               MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype, damage);
        }
 
        if (this.health < 1)
index 07a795b512e3342da8ce8c3ffdfa6c34ce314134..0f226aedc3f470a12cb44df69ffef8e88f04f772 100644 (file)
@@ -329,9 +329,9 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate, EV_PlayerDamage_Calculate);
     /** target    */ i(entity, MUTATOR_ARGV_1_entity) \
     /** health    */ i(int,    MUTATOR_ARGV_2_int) \
     /** armor     */ i(int,    MUTATOR_ARGV_3_int) \
-    /** potential_damage     */ i(int,    MUTATOR_ARGV_4_int) \
-    /** location  */ i(vector, MUTATOR_ARGV_5_vector) \
-    /** deathtype */ i(int,    MUTATOR_ARGV_6_int) \
+    /** location  */ i(vector, MUTATOR_ARGV_4_vector) \
+    /** deathtype */ i(int,    MUTATOR_ARGV_5_int) \
+    /** potential_damage     */ i(int,    MUTATOR_ARGV_6_int) \
     /**/
 MUTATOR_HOOKABLE(PlayerDamaged, EV_PlayerDamaged);