keep qc from using internal-only ones
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11924
d7cf8633-e32d-0410-b094-
e92efae38249
if (prog->argc < 7)
flags = 0;
else
- flags = PRVM_G_FLOAT(OFS_PARM6);
+ {
+ // LordHavoc: we only let the qc set certain flags, others are off-limits
+ flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED);
+ }
// sound_starttime exists instead of sound_startposition because in a
// networking sense you might not know when something is being received,
}
}
else
- flags = PRVM_G_FLOAT(OFS_PARM6);
+ {
+ // LordHavoc: we only let the qc set certain flags, others are off-limits
+ flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED);
+ }
if (volume < 0 || volume > 255)
{