From d4ef35b3318170417dd0d4c616c7789433d9102e Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 24 Mar 2007 17:55:42 +0000 Subject: [PATCH] as requested by div0, sprint to world now behaves like print git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7002 d7cf8633-e32d-0410-b094-e92efae38249 --- svvm_cmds.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/svvm_cmds.c b/svvm_cmds.c index b0283c95..18d48733 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -275,9 +275,17 @@ static void VM_SV_sprint (void) int entnum; char string[VM_STRINGTEMP_LENGTH]; + VM_VarString(1, string, sizeof(string)); + VM_SAFEPARMCOUNTRANGE(2, 8, VM_SV_sprint); entnum = PRVM_G_EDICTNUM(OFS_PARM0); + // LordHavoc: div0 requested that sprintto world operate like print + if (entnum == 0) + { + Con_Print(string); + return; + } if (entnum < 1 || entnum > svs.maxclients || !svs.clients[entnum-1].active) { @@ -289,7 +297,6 @@ static void VM_SV_sprint (void) if (!client->netconnection) return; - VM_VarString(1, string, sizeof(string)); MSG_WriteChar(&client->netconnection->message,svc_print); MSG_WriteString(&client->netconnection->message, string); } -- 2.39.2