From 119993d28b9a7f19b22b490a188bef1332035b2a Mon Sep 17 00:00:00 2001 From: vortex Date: Wed, 14 Apr 2010 18:45:19 +0000 Subject: [PATCH] getsoundtime: cant query CHAN_AUTO, so print warning git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10084 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prvm_cmds.c b/prvm_cmds.c index b36494d9..c0770232 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -2900,7 +2900,7 @@ void VM_getsoundtime (void) } entnum = ((pnum == PRVM_CLIENTPROG) ? MAX_EDICTS : 0) + PRVM_NUM_FOR_EDICT(PRVM_G_EDICT(OFS_PARM0)); entchannel = (int)PRVM_G_FLOAT(OFS_PARM1); - if (entchannel < 0 || entchannel > 8) + if (entchannel <= 0 || entchannel > 8) VM_Warning("VM_getsoundtime: %s: bad channel %i\n", PRVM_NAME, entchannel); PRVM_G_FLOAT(OFS_RETURN) = (float)S_GetEntChallelPosition(entnum, entchannel); } -- 2.39.2