getsoundtime: cant query CHAN_AUTO, so print warning
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 14 Apr 2010 18:45:19 +0000 (18:45 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 14 Apr 2010 18:45:19 +0000 (18:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10084 d7cf8633-e32d-0410-b094-e92efae38249

prvm_cmds.c

index b36494d..c077023 100644 (file)
@@ -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);
 }