]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - svvm_cmds.c
move crc16()
[xonotic/darkplaces.git] / svvm_cmds.c
index f252ade14b7e64a06718a40b5d324f6ca393a6ff..8f0d5c787aeb6d6fad427356a321699dde80f07b 100644 (file)
@@ -21,7 +21,8 @@ const char *vm_sv_extensions =
 "DP_CON_STARTMAP "
 "DP_CRYPTO "
 "DP_CSQC_BINDMAPS "
-"DP_CSQC_ENTITYNOCULL "
+"DP_CSQC_ENTITYWORLDOBJECT "
+"DP_CSQC_ENTITYMODELLIGHT "
 "DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET "
 "DP_CSQC_MULTIFRAME_INTERPOLATION "
 "DP_CSQC_BOXPARTICLES "
@@ -74,6 +75,7 @@ const char *vm_sv_extensions =
 "DP_LITSUPPORT "
 "DP_MONSTERWALK "
 "DP_MOVETYPEBOUNCEMISSILE "
+"DP_MOVETYPEFLYWORLDONLY "
 "DP_MOVETYPEFOLLOW "
 "DP_NULL_MODEL "
 "DP_QC_ASINACOSATANATAN2TAN "
@@ -106,6 +108,7 @@ const char *vm_sv_extensions =
 "DP_QC_GETTAGINFO_BONEPROPERTIES "
 "DP_QC_GETTIME "
 "DP_QC_GETTIME_CDTRACK "
+"DP_QC_I18N "
 "DP_QC_LOG "
 "DP_QC_MINMAXBOUND "
 "DP_QC_MULTIPLETEMPSTRINGS "
@@ -141,6 +144,7 @@ const char *vm_sv_extensions =
 "DP_SND_DIRECTIONLESSATTNNONE "
 "DP_SND_FAKETRACKS "
 "DP_SND_SOUND7_WIP1 "
+"DP_SND_SOUND7_WIP2 "
 "DP_SND_OGGVORBIS "
 "DP_SND_SETPARAMS "
 "DP_SND_STEREOWAV "
@@ -531,7 +535,7 @@ static void VM_SV_sound (void)
        if (prog->argc < 6)
                pitchchange = 0;
        else
-               pitchchange = PRVM_G_FLOAT(OFS_PARM5);
+               pitchchange = PRVM_G_FLOAT(OFS_PARM5) * 0.01f;
 
        if (prog->argc < 7)
        {
@@ -565,7 +569,7 @@ static void VM_SV_sound (void)
                return;
        }
 
-       SV_StartSound (entity, channel, sample, volume, attenuation, flags & CHANFLAG_RELIABLE);
+       SV_StartSound (entity, channel, sample, volume, attenuation, flags & CHANFLAG_RELIABLE, pitchchange);
 }
 
 /*
@@ -583,14 +587,16 @@ static void VM_SV_pointsound(void)
        const char      *sample;
        int             volume;
        float           attenuation;
+       float           pitchchange;
        vec3_t          org;
 
-       VM_SAFEPARMCOUNT(4, VM_SV_pointsound);
+       VM_SAFEPARMCOUNTRANGE(4, 5, VM_SV_pointsound);
 
        VectorCopy(PRVM_G_VECTOR(OFS_PARM0), org);
        sample = PRVM_G_STRING(OFS_PARM1);
        volume = (int)(PRVM_G_FLOAT(OFS_PARM2) * 255);
        attenuation = PRVM_G_FLOAT(OFS_PARM3);
+       pitchchange = prog->argc < 5 ? 0 : PRVM_G_FLOAT(OFS_PARM4) * 0.01f;
 
        if (volume < 0 || volume > 255)
        {
@@ -604,7 +610,7 @@ static void VM_SV_pointsound(void)
                return;
        }
 
-       SV_StartPointSound (org, sample, volume, attenuation);
+       SV_StartPointSound (org, sample, volume, attenuation, pitchchange);
 }
 
 /*
@@ -1100,6 +1106,7 @@ VM_SV_droptofloor
 void() droptofloor
 ===============
 */
+
 static void VM_SV_droptofloor (void)
 {
        prvm_edict_t            *ent;
@@ -1127,7 +1134,8 @@ static void VM_SV_droptofloor (void)
        end[2] -= 256;
 
        if (sv_gameplayfix_droptofloorstartsolid_nudgetocorrect.integer)
-               SV_UnstickEntity(ent);
+               if (sv_gameplayfix_unstickentities.integer)
+                       SV_UnstickEntity(ent);
 
        trace = SV_TraceBox(PRVM_serveredictvector(ent, origin), PRVM_serveredictvector(ent, mins), PRVM_serveredictvector(ent, maxs), end, MOVE_NORMAL, ent, SV_GenericHitSuperContentsMask(ent));
        if (trace.startsolid && sv_gameplayfix_droptofloorstartsolid.integer)
@@ -1140,7 +1148,8 @@ static void VM_SV_droptofloor (void)
                if (trace.startsolid)
                {
                        Con_DPrintf("droptofloor at %f %f %f - COULD NOT FIX BADLY PLACED ENTITY\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
-                       SV_UnstickEntity(ent);
+                       if (sv_gameplayfix_unstickentities.integer)
+                               SV_UnstickEntity(ent);
                        SV_LinkEdict(ent);
                        PRVM_serveredictfloat(ent, flags) = (int)PRVM_serveredictfloat(ent, flags) | FL_ONGROUND;
                        PRVM_serveredictedict(ent, groundentity) = 0;
@@ -1150,7 +1159,8 @@ static void VM_SV_droptofloor (void)
                {
                        Con_DPrintf("droptofloor at %f %f %f - FIXED BADLY PLACED ENTITY\n", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
                        VectorCopy (trace.endpos, PRVM_serveredictvector(ent, origin));
-                       SV_UnstickEntity(ent);
+                       if (sv_gameplayfix_unstickentities.integer)
+                               SV_UnstickEntity(ent);
                        SV_LinkEdict(ent);
                        PRVM_serveredictfloat(ent, flags) = (int)PRVM_serveredictfloat(ent, flags) | FL_ONGROUND;
                        PRVM_serveredictedict(ent, groundentity) = PRVM_EDICT_TO_PROG(trace.ent);