]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
Merge PR 'sv_gameplayfix_stepmultipletimes 1: Make stepping up while jumping reliable'
[xonotic/darkplaces.git] / sv_phys.c
index eb04a6dcb647a4bc357e184570af19c761e7de39..2e61888d5bba7b669f56e7bf3dd20874e32a5291 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -2351,7 +2351,11 @@ static void SV_WalkMove (prvm_edict_t *ent)
                VectorCopy(PRVM_serveredictvector(ent, maxs), entmaxs);
                trace = SV_TraceBox(upmove, entmins, entmaxs, downmove, type, ent, SV_GenericHitSuperContentsMask(ent), skipsupercontentsmask, skipmaterialflagsmask, collision_extendmovelength.value);
                if(trace.fraction < 1 && trace.plane.normal[2] > 0.7)
+               {
                        clip |= 1; // but we HAVE found a floor
+                       // set groundentity so we get carried when walking onto a mover with sv_gameplayfix_nogravityonground
+                       PRVM_serveredictedict(ent, groundentity) = PRVM_EDICT_TO_PROG(trace.ent);
+               }
        }
 
        // if the move did not hit the ground at any point, we're not on ground