]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
properly support "boxy" warpzones (mins/maxs override)
authorRudolf Polzer <divverent@alientrap.org>
Wed, 4 Aug 2010 13:33:42 +0000 (15:33 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 4 Aug 2010 13:33:42 +0000 (15:33 +0200)
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc
qcsrc/warpzonelib/util_server.qc

index 3c3eaf5a3dacda1350719773fe293690f8f8e1c5..605fd7019a3ce04ccd885f2a2d4ca09842458bf1 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();
index 1c3835afa35235a51d9a88e47ef5d7b749038c0a..c8e1f664b4465bb0a44277c4197c8f4c83db252b 100644 (file)
@@ -113,7 +113,7 @@ float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig)
 {
     float f, s;
 
-    if not(e.modelindex)
+    if(!e.modelindex || e.WarpZone_isboxy)
         return 1;
 
     s = e.solid;
index c156299c6967c96bddf44661b8c1f32f6fe203c3..f333beaff7a660e4438683e5fbda37cce236b2ca 100644 (file)
@@ -130,6 +130,9 @@ float WarpZone_Send(entity to, float sendflags)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE);
 
+       // we must send this flag for clientside to match properly too
+       WriteByte(MSG_ENTITY, self.WarpZone_isboxy);
+
        // we need THESE to render the warpzone (and cull properly)...
        WriteCoord(MSG_ENTITY, self.origin_x);
        WriteCoord(MSG_ENTITY, self.origin_y);
index 9aae116c71844a56de12bfecb64779a48340321b..eca17af58458b39e5d974f0b34b4201813873016 100644 (file)
@@ -67,6 +67,7 @@ void WarpZoneLib_ExactTrigger_Init()
                makevectors (self.angles);
                self.movedir = v_forward;
        }
+       self.WarpZone_isboxy = 1;
        if(self.model != "")
        {
                mi = self.mins;
@@ -79,6 +80,8 @@ void WarpZoneLib_ExactTrigger_Init()
                        self.mins = mi;
                        self.maxs = ma;
                }
+               else
+                       self.WarpZone_isboxy = 0; // enable exacttrigger matching
        }
        setorigin(self, self.origin);
        if(self.scale)