Merge branch 'master' into Mario/vehicles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / portals.qc
index 7acbc65..b79b282 100644 (file)
@@ -266,6 +266,10 @@ void Portal_Touch()
        if(other.classname == "grapplinghook")
                return; // handled by think
 
+       if(!autocvar_g_vehicles_teleportable)
+       if(other.vehicle_flags & VHF_ISVEHICLE)
+               return; // no teleporting vehicles?
+
        if(!self.enemy)
                error("Portal_Touch called for a broken portal\n");