From: Mario Date: Sun, 30 Aug 2015 06:40:11 +0000 (+1000) Subject: Allow getting the full message from FormatMessage hook X-Git-Tag: xonotic-v0.8.2~1977 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7294ef7c342c4da2860578c4d03fb5191cbf8807;p=xonotic%2Fxonotic-data.pk3dir.git Allow getting the full message from FormatMessage hook --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a19b62ba8..5b7011ee7 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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; } } diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index f283693b5..93d44915b 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -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 */