Grant access to the FULLVOLUME flag from the QC VM (allows custom background music...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 6 Mar 2018 01:21:11 +0000 (01:21 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 6 Mar 2018 01:21:11 +0000 (01:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12344 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
svvm_cmds.c

index 290cabc..e5cb60f 100644 (file)
@@ -208,7 +208,7 @@ static void VM_CL_sound (prvm_prog_t *prog)
        else
        {
                // 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);
+               flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED | CHANNELFLAG_FULLVOLUME);
        }
 
        // sound_starttime exists instead of sound_startposition because in a
index b5f96a8..b41de02 100644 (file)
@@ -559,7 +559,7 @@ static void VM_SV_sound(prvm_prog_t *prog)
        else
        {
                // 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);
+               flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED | CHANNELFLAG_FULLVOLUME);
        }
 
        if (nvolume < 0 || nvolume > 255)