]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/common.qc
Transifex autosync
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / common.qc
index 2103b87c7e64ea3318928c01b035d1d2c71fb0ce..7858311bcecdb78404d6999fc56adc5e6969ba95 100644 (file)
@@ -826,6 +826,7 @@ bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher, bool touchfunc)
        return WarpZoneLib_BoxTouchesBrush(emin, emax, this, toucher); // accurate
 }
 
+
 void WarpZoneLib_MoveOutOfSolid_Expand(entity e, vector by)
 {
        const float eps = 0.0625;
@@ -840,16 +841,16 @@ void WarpZoneLib_MoveOutOfSolid_Expand(entity e, vector by)
        }
 }
 
-bool WarpZoneLib_MoveOutOfSolid(entity e)
+int WarpZoneLib_MoveOutOfSolid(entity e)
 {
        vector o = e.origin;
        traceline(o, o, MOVE_WORLDONLY, e);
        if (trace_startsolid)
-               return false;
+               return 0; // too stuck, giving up
 
        tracebox(o, e.mins, e.maxs, o, MOVE_WORLDONLY, e);
        if (!trace_startsolid)
-               return true;
+               return -1; // wasn't stuck
 
        vector m0 = e.mins;
        vector m1 = e.maxs;
@@ -867,8 +868,8 @@ bool WarpZoneLib_MoveOutOfSolid(entity e)
        if (trace_startsolid)
        {
                setorigin(e, o);
-               return false;
+               return 0; // can't fix
        }
 
-       return true;
+       return 1; // was stuck but is fixed now
 }