Make the slick flag usable outside of applygravity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qc
index 9f7ddab502d31764b79c546bfd40fc3b8e7b176e..02657dee8db2f80360d38e04cd83d917cc3d06dc 100644 (file)
@@ -690,13 +690,12 @@ void PM_check_slick(entity this)
        if(!IS_ONGROUND(this))
                return;
 
-       if(!PHYS_SLICK_APPLYGRAVITY(this))
-               return;
-
+       trace_dphitq3surfaceflags = 0;
        tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this);
        if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
        {
-               UNSET_ONGROUND(this);
+               if(PHYS_SLICK_APPLYGRAVITY(this))
+                       UNSET_ONGROUND(this);
                SET_ONSLICK(this);
        }
        else