]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qc
Remove various SELFPARAM
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qc
index ec643fcb5885cac7d20ccd0cfe0cf16b93b6ea80..52110137253b224511204353637be62d99d7d36c 100644 (file)
@@ -57,22 +57,25 @@ string wordwrap(string s, float l)
 
 #ifndef MENUQC
 #ifndef CSQC
+entity _wordwrap_buffer_sprint_ent;
 void wordwrap_buffer_sprint(string s)
-{SELFPARAM();
+{
        wordwrap_buffer = strcat(wordwrap_buffer, s);
        if(s == "\n")
        {
-               sprint(self, wordwrap_buffer);
+               sprint(_wordwrap_buffer_sprint_ent, wordwrap_buffer);
                wordwrap_buffer = "";
        }
 }
 
-void wordwrap_sprint(string s, float l)
-{SELFPARAM();
+void wordwrap_sprint(entity to, string s, float l)
+{
        wordwrap_buffer = "";
+       _wordwrap_buffer_sprint_ent = to;
        wordwrap_cb(s, l, wordwrap_buffer_sprint);
+       _wordwrap_buffer_sprint_ent = NULL;
        if(wordwrap_buffer != "")
-               sprint(self, strcat(wordwrap_buffer, "\n"));
+               sprint(to, strcat(wordwrap_buffer, "\n"));
        wordwrap_buffer = "";
        return;
 }