]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - svvm_cmds.c
modified droptofloor to treat trace.startsolid as an acceptable situation, this preve...
[xonotic/darkplaces.git] / svvm_cmds.c
index 89760f551885a1ab34e2fc1fbb994262f451500c..f01aeff8908e2f2e7bdd9f7bd332627efb64d70a 100644 (file)
@@ -91,6 +91,7 @@ char *vm_sv_extensions =
 "DP_SV_DRAWONLYTOCLIENT "
 "DP_SV_DROPCLIENT "
 "DP_SV_EFFECT "
+"DP_SV_ENTITYCONTENTSTRANSITION "
 "DP_SV_NODRAWTOCLIENT "
 "DP_SV_PING "
 "DP_SV_PLAYERPHYSICS "
@@ -937,9 +938,10 @@ void PF_droptofloor (void)
 
        trace = SV_Move (ent->fields.server->origin, ent->fields.server->mins, ent->fields.server->maxs, end, MOVE_NORMAL, ent);
 
-       if (trace.fraction != 1)
+       if (trace.fraction != 1 || (trace.startsolid && sv_gameplayfix_droptofloorstartsolid.integer))
        {
-               VectorCopy (trace.endpos, ent->fields.server->origin);
+               if (trace.fraction < 1)
+                       VectorCopy (trace.endpos, ent->fields.server->origin);
                SV_LinkEdict (ent, false);
                ent->fields.server->flags = (int)ent->fields.server->flags | FL_ONGROUND;
                ent->fields.server->groundentity = PRVM_EDICT_TO_PROG(trace.ent);
@@ -1704,6 +1706,19 @@ void PF_effect (void)
                VM_Warning("effect: model not precached\n");
                return;
        }
+
+       if (PRVM_G_FLOAT(OFS_PARM3) < 1)
+       {
+               VM_Warning("effect: framecount < 1\n");
+               return;
+       }
+
+       if (PRVM_G_FLOAT(OFS_PARM4) < 1)
+       {
+               VM_Warning("effect: framerate < 1\n");
+               return;
+       }
+
        SV_StartEffect(PRVM_G_VECTOR(OFS_PARM0), i, (int)PRVM_G_FLOAT(OFS_PARM2), (int)PRVM_G_FLOAT(OFS_PARM3), (int)PRVM_G_FLOAT(OFS_PARM4));
 }
 
@@ -2858,7 +2873,7 @@ VM_atan,                                  // #473 float(float t) VM_atan (DP_QC_ASINACOSATANATAN2TAN)
 VM_atan2,                                      // #474 float(float c, float s) VM_atan2 (DP_QC_ASINACOSATANATAN2TAN)
 VM_tan,                                                // #475 float(float a) VM_tan (DP_QC_ASINACOSATANATAN2TAN)
 VM_strlennocol,                                // #476 float(string s) : DRESK - String Length (not counting color codes) (DP_QC_STRINGCOLORFUNCTIONS)
-VM_strdecolorize,                      // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS)
+VM_strdecolorize,                      // #477 string(string s) : DRESK - Decolorized String (DP_SV_STRINGCOLORFUNCTIONS)
 NULL,                                          // #478
 NULL,                                          // #479
 e10, e10                                       // #480-499 (LordHavoc)