From: Rudolf Polzer Date: Wed, 4 Aug 2010 13:33:42 +0000 (+0200) Subject: properly support "boxy" warpzones (mins/maxs override) X-Git-Tag: xonotic-v0.1.0preview~266^2~20 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fb2d17fe3dcbda8f75e87781548e82d1eb353bcb;p=xonotic%2Fxonotic-data.pk3dir.git properly support "boxy" warpzones (mins/maxs override) --- diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index 3c3eaf5a3..605fd7019 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -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(); diff --git a/qcsrc/warpzonelib/common.qc b/qcsrc/warpzonelib/common.qc index 1c3835afa..c8e1f664b 100644 --- a/qcsrc/warpzonelib/common.qc +++ b/qcsrc/warpzonelib/common.qc @@ -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; diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index c156299c6..f333beaff 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -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); diff --git a/qcsrc/warpzonelib/util_server.qc b/qcsrc/warpzonelib/util_server.qc index 9aae116c7..eca17af58 100644 --- a/qcsrc/warpzonelib/util_server.qc +++ b/qcsrc/warpzonelib/util_server.qc @@ -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)