]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow getting the full message from FormatMessage hook
authorMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 06:40:11 +0000 (16:40 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 06:40:11 +0000 (16:40 +1000)
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh

index a19b62ba8463151dae9b856b83d0106f2f331789..5b7011ee743a1abb0ed55fc3723eca65f7741d23 100644 (file)
@@ -301,7 +301,9 @@ string formatmessage(string msg)
                        case "S": replacement = ftos(vlen(self.velocity)); break;
                        default:
                        {
-                               MUTATOR_CALLHOOK(FormatMessage, escape, replacement);
+                               MUTATOR_CALLHOOK(FormatMessage, escape, replacement, msg);
+                               escape = format_escape;
+                               replacement = format_replacement;
                                break;
                        }
                }
index f283693b5256219129a24d251ff30c8cb2aa4422..93d44915ba29c294a326b8cc30998f20f79d5a56 100644 (file)
@@ -137,9 +137,11 @@ MUTATOR_HOOKABLE(SpectateCopy, EV_SpectateCopy);
     /**/ i(string, format_escape) \
     /**/ i(string, format_replacement) \
     /**/ o(string, format_replacement) \
+    /**/ i(string, format_message) \
     /**/
 string format_escape;
 string format_replacement;
+string format_message;
 MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage);
 
 /** returns 1 if throwing the current weapon shall not be allowed */