]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
battle royale: fix incorrect check for sky above the dropship
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Tue, 30 May 2023 15:31:04 +0000 (17:31 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Tue, 30 May 2023 15:36:48 +0000 (17:36 +0200)
qcsrc/common/gamemodes/gamemode/br/sv_dropship.qc

index d118a04d237385c8b655ed4aec9d02fe86f5a1ca..236b671814602c4554875074207f3f52c2f7d0cc 100644 (file)
@@ -54,6 +54,9 @@ entity dropship_initialize()
             startorigin = dropship_seekPoint(this, startorigin, 1, 0, 1);
         } while((tracebox(startorigin, this.mins, this.maxs, startorigin + '0 0 1', MOVE_NORMAL, this), trace_fraction) >= 1);
 
+        if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT | Q3SURFACEFLAG_NOMARKS))) // dropship did not reach the sky
+            continue;
+
         mult = dropship_getMultipliers();
         startorigin = dropship_seekPoint(this, startorigin, 0, 1, mult.x);
         startorigin = dropship_seekPoint(this, startorigin, 1, 1, mult.y);
@@ -69,8 +72,6 @@ entity dropship_initialize()
         dropship_path_length = trace_fraction * vlen(endorigin - startorigin);
         if(dropship_path_length < (vlen(vec2(world.maxs - world.mins)) / 4)) // if the dropship path isn't atleast one quarter of the diagonal length of the map, retry, we're probably in a building
             continue;
-        if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT | Q3SURFACEFLAG_NOMARKS))) // dropship did not reach the sky
-            continue;
         endorigin = trace_endpos;
         dropship_path_direction = normalize(endorigin - startorigin);