]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/warpzonelib/client.qc
fix the boxiness code :P
[xonotic/xonotic-data.pk3dir.git] / qcsrc / warpzonelib / client.qc
index 2f4601219ac115cf4bd4fef51fbc90c48816bddb..1dbe824d6629929a90d053e2d9e8b71abea64160 100644 (file)
@@ -6,6 +6,8 @@ void WarpZone_Read(float isnew)
                self.enemy.classname = "warpzone_from";
        }
        self.classname = "trigger_warpzone";
+
+       self.warpzone_isboxy = ReadByte();
        self.origin_x = ReadCoord();
        self.origin_y = ReadCoord();
        self.origin_z = ReadCoord();
@@ -122,7 +124,7 @@ vector WarpZone_FixNearClip(vector o, vector c0, vector c1, vector c2, vector c3
                if(WarpZone_PlaneDist(e, o) < 0)
                        return '0 0 0';
                        // can't really be, though, but if it is, this is not my warpzone, but a random different one in the same mins/maxs
-               pd = min(
+               pd = min4(
                                WarpZone_PlaneDist(e, c0),
                                WarpZone_PlaneDist(e, c1),
                                WarpZone_PlaneDist(e, c2),
@@ -154,7 +156,7 @@ void WarpZone_FixView()
        warpzone_saved_angles = warpzone_fixview_angles;
        warpzone_saved_cl_viewangles = warpzone_fixview_cl_viewangles;
 
-       nearclip = '0 0 1' * (cvar("r_nearclip") * cvar("cl_warpzonenudge"));
+       nearclip = '0 0 1' * (cvar("r_nearclip") * 1.125);
        corner0 = cs_unproject('0 0 0' + nearclip);
        corner1 = cs_unproject('1 0 0' * cvar("vid_conwidth") + nearclip);
        corner2 = cs_unproject('0 1 0' * cvar("vid_conheight") + nearclip);