]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
changed use of GL_ARB_fragment_shader and friends to the core GL 2.0
[xonotic/darkplaces.git] / sv_phys.c
index d7ae93f4daf8d6f73d6d7259d6a427764993384a..e55ae81e77c7fbe62ce505cc35cda37a7c36f535 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1230,6 +1230,11 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qboolean applygravity, flo
        if (time <= 0)
                return 0;
        gravity = 0;
+
+       if(sv_gameplayfix_nogravityonground.integer)
+               if((int)ent->fields.server->flags & FL_ONGROUND)
+                       applygravity = false;
+
        if (applygravity)
        {
                if (sv_gameplayfix_gravityunaffectedbyticrate.integer)
@@ -1292,12 +1297,24 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qboolean applygravity, flo
                        //Con_Printf("step %f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
                        VectorSet(steppush, 0, 0, stepheight);
                        VectorCopy(ent->fields.server->origin, org);
-                       SV_PushEntity(&steptrace, ent, steppush, false, false);
+                       if(!SV_PushEntity(&steptrace, ent, steppush, false, false))
+                       {
+                               blocked |= 8;
+                               break;
+                       }
                        //Con_Printf("%f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
-                       SV_PushEntity(&steptrace2, ent, push, false, false);
+                       if(!SV_PushEntity(&steptrace2, ent, push, false, false))
+                       {
+                               blocked |= 8;
+                               break;
+                       }
                        //Con_Printf("%f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
                        VectorSet(steppush, 0, 0, org[2] - ent->fields.server->origin[2]);
-                       SV_PushEntity(&steptrace3, ent, steppush, false, false);
+                       if(!SV_PushEntity(&steptrace3, ent, steppush, false, false))
+                       {
+                               blocked |= 8;
+                               break;
+                       }
                        //Con_Printf("%f %f %f : ", ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2]);
                        // accept the new position if it made some progress...
                        if (fabs(ent->fields.server->origin[0] - org[0]) >= 0.03125 || fabs(ent->fields.server->origin[1] - org[1]) >= 0.03125)