X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcommand%2Fmarkup.qc;h=1618f6e08f8053828637e62dda1e6e18b2972b39;hp=d1562aaac4222c1ebf8eedbbfdf60f7d22ffc001;hb=e0012447bfce1b551df3dc01b043655aa93dafad;hpb=14d52331c099f8ad672f5ab28ada4dc50243230c diff --git a/qcsrc/common/command/markup.qc b/qcsrc/common/command/markup.qc index d1562aaac..1618f6e08 100644 --- a/qcsrc/common/command/markup.qc +++ b/qcsrc/common/command/markup.qc @@ -1,3 +1,6 @@ +#include "markup.qh" +#include "command.qh" + // ========================================================= // Markup chat characters command code, reworked by Samual // Last updated: December 28th, 2011 @@ -5,11 +8,10 @@ void GenericCommand_markup_init() { - float i; if (markup_init) return; - markup_init = 1; - i = 0; + markup_init = true; + int i = 0; markup_from[i] = "&alien"; markup_to[i] = "\x12"; ++i; markup_from[i] = "&:-)"; markup_to[i] = "\x13"; ++i; markup_from[i] = "&:-("; markup_to[i] = "\x14"; ++i; @@ -51,12 +53,11 @@ void GenericCommand_markup_init() markup_from[i] = "&.."; markup_to[i] = "\x9e"; ++i; markup_from[i] = "&.)"; markup_to[i] = "\x9f"; ++i; markup_from[i] = "&<|"; markup_to[i] = "\xff"; ++i; - unused_float = i; } string GenericCommand_markup(string s2) { - float red, ccase, i, j; + int red, ccase, i, j; string s, s3; GenericCommand_markup_init(); @@ -65,7 +66,8 @@ string GenericCommand_markup(string s2) red = 0; ccase = 0; - for(i = 0; i < strlen(s2); ++i) + int len = strlen(s2); + for (i = 0; i < len; ++i) { for(j = 0; j < NUM_MARKUPS; ++j) {