]> 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 e35564bbde6b6166976db3df7b6eb89ef3deaca6..f01aeff8908e2f2e7bdd9f7bd332627efb64d70a 100644 (file)
@@ -938,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);
@@ -1705,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));
 }