]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/server.qc
Transifex autosync
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / server.qc
index b9157d2526c500c4250b9dfb575e604021da0934..f216aa9c64bd64dd180f9d91a2de54db8b20625a 100644 (file)
@@ -193,12 +193,11 @@ void WarpZone_Touch(entity this, entity toucher)
        if(toucher.move_movetype == MOVETYPE_NONE || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity)
                return;
 
-       if(!WarpZoneLib_ExactTrigger_Touch(this, toucher))
-               return;
-
        if(WarpZone_PlaneDist(this, toucher.origin + toucher.view_ofs) >= 0) // wrong side of the trigger_warpzone (don't teleport yet)
                return;
 
+       EXACTTRIGGER_TOUCH(this, toucher);
+
        float f;
        // number of frames we need to go back:
        //   dist = 16*sqrt(2) qu
@@ -703,19 +702,9 @@ spawnfunc(trigger_warpzone)
                this.scale = this.modelscale;
        if(!this.scale)
                this.scale = 1;
-       string m;
-       m = this.model;
-       WarpZoneLib_ExactTrigger_Init(this);
-       if(m != "")
-       {
-               precache_model(m);
-               _setmodel(this, m); // no precision needed
-       }
-       setorigin(this, this.origin);
-       if(this.scale)
-               setsize(this, this.mins * this.scale, this.maxs * this.scale);
-       else
-               setsize(this, this.mins, this.maxs);
+
+       WarpZoneLib_ExactTrigger_Init(this, false);
+
        setSendEntity(this, WarpZone_Send);
        this.SendFlags = 0xFFFFFF;
        BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
@@ -815,7 +804,7 @@ void WarpZone_StartFrame()
                        if (warpzone_warpzones_exist) {
                                entity e = WarpZone_Find(it.origin + it.mins, it.origin + it.maxs);
                                if (e)
-                               if (WarpZoneLib_ExactTrigger_Touch(e, it))
+                               if (WarpZoneLib_ExactTrigger_Touch(e, it, false))
                                if (WarpZone_PlaneDist(e, it.origin + it.view_ofs) <= 0)
                                        WarpZone_Teleport(e, it, -1, 0); // NOT triggering targets by this!
                        }
@@ -825,7 +814,7 @@ void WarpZone_StartFrame()
                        {
                                entity ent = Teleport_Find(it.origin + it.mins, it.origin + it.maxs);
                                if (ent)
-                               if (WarpZoneLib_ExactTrigger_Touch(ent, it))
+                               if (WarpZoneLib_ExactTrigger_Touch(ent, it, false))
                                        Simple_TeleportPlayer(ent, it); // NOT triggering targets by this!
                        }
                }