]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Display client binds in gameplay tips
authorterencehill <piuntn@gmail.com>
Fri, 25 Mar 2022 17:28:47 +0000 (18:28 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 25 Mar 2022 17:28:47 +0000 (18:28 +0100)
qcsrc/common/mutators/mutator/hook/cl_hook.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc

index b600701a291db668c1549b557d8983880d1e8623..4c8b2621a44b05da3a8c502448464054e5d5547a 100644 (file)
@@ -5,8 +5,9 @@ REGISTER_MUTATOR(cl_hook, true);
 
 MUTATOR_HOOKFUNCTION(cl_hook, BuildGameplayTipsString)
 {
+       string key = getcommandkey(_("off-hand hook"), "+hook");
        M_ARGV(0, string) = strcat(M_ARGV(0, string),
-               "\n\n", _("^3grappling hook^8 is enabled, press 'e' (+hook) to use it"), "\n");
+               "\n\n", sprintf(_("^3grappling hook^8 is enabled, press ^3%s^8 to use it"), key), "\n");
 }
 
 #endif
index 49e70b600fd8cb9b2b2500d7e11bab5345c12be7..36531e87f4eae03506833482a573f0bb98354563 100644 (file)
@@ -120,8 +120,9 @@ MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile)
 
 MUTATOR_HOOKFUNCTION(cl_nades, BuildGameplayTipsString)
 {
+       string key = getcommandkey(_("drop weapon / throw nade"), "dropweapon");
        M_ARGV(0, string) = strcat(M_ARGV(0, string),
-               "\n\n", _("^3nades^8 are enabled, press 'g' (dropweapon) to use them"), "\n");
+               "\n\n", sprintf(_("^3nades^8 are enabled, press ^3%s^8 to use them"), key), "\n");
 }
 
 bool Projectile_isnade(int p)
index 39e6ad8d419c38df03ebb2e1b44d436d4b43e132..ebf44d000db02a4b9b3e61e24abcd6967e0af27b 100644 (file)
@@ -4,6 +4,7 @@ REGISTER_MUTATOR(cl_offhand_blaster, true);
 
 MUTATOR_HOOKFUNCTION(cl_offhand_blaster, BuildGameplayTipsString)
 {
+       string key = getcommandkey(_("off-hand hook"), "+hook");
        M_ARGV(0, string) = strcat(M_ARGV(0, string),
-               "\n\n", _("^3offhand blaster^8 is enabled, press 'e' (+hook) to use it"), "\n");
+               "\n\n", sprintf(_("^3offhand blaster^8 is enabled, press ^3%s^8 to use it"), key), "\n");
 }