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 a19b62b..5b7011e 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 f283693..93d4491 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 */