From: Freddy Date: Wed, 13 Jul 2016 23:37:27 +0000 (+0200) Subject: Damagetext: move new mutator argument to the end to avoid breaking stuff X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=47c628d4f027365e1063e628942fb1339c83ed4e;p=xonotic%2Fxonotic-data.pk3dir.git Damagetext: move new mutator argument to the end to avoid breaking stuff --- diff --git a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc index 745e6c420..d4efe16bc 100644 --- a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc @@ -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 ( diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 91ba9cc28..82af5b072 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -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) diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 07a795b51..0f226aedc 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -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);