]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
UNMERGE
authorhavoc havoc@d7cf8633-e32d-0410-b094-e92efae38249 <>
Fri, 4 Dec 2009 16:13:26 +0000 (16:13 +0000)
committerRudolf Polzer <rpolzer@grawp.div0.qc.to>
Tue, 26 Jan 2010 21:06:18 +0000 (22:06 +0100)
fixed a bug with sv_gameplayfix_nudgeoutofsolid where the player might
get put on the opposite side of a brush because of being very near the
plane that should be used for nudging, which caused it not to be
considered as a nudging plane
added some checks to ensure more consistency on trace direction (should
be able to swap start and end without startsolid trouble, at least less)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9537 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::unmerge=5b7ac1706712977bbc0297d2d53294e73574c7cd

collision.c
sv_main.c

index cd587f28b2b41cfe9e4d53e638486040950a6e9c..fbe922b1f1168d3a9f775142a0d460a5d4619de3 100644 (file)
@@ -717,16 +717,12 @@ void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *trace_sta
                //Con_Printf("%c%i: startdist = %f, enddist = %f, startdist / (startdist - enddist) = %f\n", nplane2 != nplane ? 'b' : 'a', nplane2, startdist, enddist, startdist / (startdist - enddist));
 
                // aside from collisions, this is also used for error correction
-               if (startdist < collision_impactnudge.value && nplane < numplanes1 && (startdepth < startdist || startdepth == 1))
+               if (startdist < 0 && (startdepth < startdist || startdepth == 1))
                {
                        startdepth = startdist;
                        VectorCopy(startplane, startdepthnormal);
                }
 
-               if (startdist >= -collision_impactnudge.value && enddist >= startdist)
-                       return;
-               if (startdist <= 0 && enddist <= 0)
-                       continue;
                if (startdist > enddist)
                {
                        // moving into brush
@@ -884,16 +880,12 @@ void Collision_TraceLineBrushFloat(trace_t *trace, const vec3_t linestart, const
                //Con_Printf("%c%i: startdist = %f, enddist = %f, startdist / (startdist - enddist) = %f\n", nplane2 != nplane ? 'b' : 'a', nplane2, startdist, enddist, startdist / (startdist - enddist));
 
                // aside from collisions, this is also used for error correction
-               if (startdist < collision_impactnudge.value && (startdepth < startdist || startdepth == 1))
+               if (startdist < 0 && (startdepth < startdist || startdepth == 1))
                {
                        startdepth = startdist;
                        VectorCopy(startplane, startdepthnormal);
                }
 
-               if (startdist >= -collision_impactnudge.value && enddist >= startdist)
-                       return;
-               if (startdist <= 0 && enddist <= 0)
-                       continue;
                if (startdist > enddist)
                {
                        // moving into brush
index c92b4a8a2d0a816949128ced37caac49b993264a..bc6a070871a585fea29cfbf5859a44bbb8a3dd6e 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -98,7 +98,7 @@ cvar_t sv_gameplayfix_multiplethinksperframe = {0, "sv_gameplayfix_multiplethink
 cvar_t sv_gameplayfix_noairborncorpse = {0, "sv_gameplayfix_noairborncorpse", "1", "causes entities (corpses, items, etc) sitting ontop of moving entities (players) to fall when the moving entity (player) is no longer supporting them"};
 cvar_t sv_gameplayfix_noairborncorpse_allowsuspendeditems = {0, "sv_gameplayfix_noairborncorpse_allowsuspendeditems", "1", "causes entities sitting ontop of objects that are instantaneously remove to float in midair (special hack to allow a common level design trick for floating items)"};
 cvar_t sv_gameplayfix_nudgeoutofsolid = {0, "sv_gameplayfix_nudgeoutofsolid", "1", "attempts to fix physics errors (where an object ended up in solid for some reason)"};
-cvar_t sv_gameplayfix_nudgeoutofsolid_bias = {0, "sv_gameplayfix_nudgeoutofsolid_bias", "0", "over-correction on nudgeoutofsolid logic, to prevent constant contact"};
+cvar_t sv_gameplayfix_nudgeoutofsolid_bias = {0, "sv_gameplayfix_nudgeoutofsolid_bias", "0.03125", "over-correction on nudgeoutofsolid logic, to prevent constant contact"};
 cvar_t sv_gameplayfix_q2airaccelerate = {0, "sv_gameplayfix_q2airaccelerate", "0", "Quake2-style air acceleration"};
 cvar_t sv_gameplayfix_setmodelrealbox = {0, "sv_gameplayfix_setmodelrealbox", "1", "fixes a bug in Quake that made setmodel always set the entity box to ('-16 -16 -16', '16 16 16') rather than properly checking the model box, breaks some poorly coded mods"};
 cvar_t sv_gameplayfix_slidemoveprojectiles = {0, "sv_gameplayfix_slidemoveprojectiles", "1", "allows MOVETYPE_FLY/FLYMISSILE/TOSS/BOUNCE/BOUNCEMISSILE entities to finish their move in a frame even if they hit something, fixes 'gravity accumulation' bug for grenades on steep slopes"};