]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
DP_SND_SOUND7_WIP1
[xonotic/darkplaces.git] / prvm_cmds.c
index df5ea5eaf90a57d5db11d5e4373046359e747cdb..c0b34d4a215050728d0e26ba0a9fe5a07a367386 100644 (file)
@@ -2923,7 +2923,8 @@ 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);
        }
        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)
+       entchannel = CHAN_USER2ENGINE(entchannel);
+       if (!IS_CHAN(entchannel))
                VM_Warning("VM_getsoundtime: %s: bad channel %i\n", PRVM_NAME, entchannel);
        PRVM_G_FLOAT(OFS_RETURN) = (float)S_GetEntChannelPosition(entnum, entchannel);
 }
                VM_Warning("VM_getsoundtime: %s: bad channel %i\n", PRVM_NAME, entchannel);
        PRVM_G_FLOAT(OFS_RETURN) = (float)S_GetEntChannelPosition(entnum, entchannel);
 }