r1782 - branches/nexuiz-2.0/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jul 28 07:22:05 EDT 2006
Author: div0
Date: 2006-07-28 07:22:05 -0400 (Fri, 28 Jul 2006)
New Revision: 1782
Modified:
branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
Log:
centerteamsay (say_team is also displayed as centerprint) - hopefully fixes teamplay issues in CTF :P
Better solution would still be two independent areas for say and "normal" messages
Modified: branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2006-07-28 11:20:49 UTC (rev 1781)
+++ branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2006-07-28 11:22:05 UTC (rev 1782)
@@ -3,7 +3,7 @@
void Say(entity source, float teamsay, string msgin)
{
- string msgstr, colorstr;
+ string msgstr, colorstr, cmsgstr;
entity head;
msgin = formatmessage(msgin);
@@ -37,9 +37,12 @@
}
if(teamsay)
- msgstr = strcat(colorstr, "(^3", source.netname, colorstr, ") ^7", msgin, "\n");
+ {
+ msgstr = strzone(strcat(colorstr, "(^3", source.netname, colorstr, ") ^7", msgin, "\n"));
+ cmsgstr = strcat(colorstr, "(^3", source.netname, colorstr, ")\n^7", wordwrap(msgin, 50));
+ }
else
- msgstr = strcat("^3", source.netname, "^7: ", msgin, "\n");
+ msgstr = strzone(strcat("^3", source.netname, "^7: ", msgin, "\n"));
head = find(world, classname, "player");
while(head)
@@ -48,6 +51,8 @@
if(!teamsay || (head.team == source.team))
{
sprint(head, msgstr);
+ if(teamsay)
+ centerprint(head, cmsgstr);
stuffcmd(head, "play2 misc/talk.wav\n");
}
head = find(head, classname, "player");
@@ -77,6 +82,8 @@
}
ServerConsoleEcho(substring(msgstr, 0, strlen(msgstr) - 1), TRUE);
}
+
+ strunzone(msgstr);
}
void SV_ParseClientCommand(string s) {
More information about the nexuiz-commits
mailing list