]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix a waypoint loading issue
authorRudolf Polzer <divverent@xonotic.org>
Wed, 23 Jan 2013 13:38:19 +0000 (14:38 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 23 Jan 2013 13:38:19 +0000 (14:38 +0100)
qcsrc/server/bot/waypoints.qc

index 0766ab0466dbe24fc9ae2bed9ecb2ce529eeef5d..8e9ae6b911e745cfb58bf6acb7132792f3d898eb 100644 (file)
@@ -390,7 +390,7 @@ float waypoint_load_links()
                wp_to_pos       = stov(argv(1));
 
                // Search "from" waypoint
-               if(wp_from && wp_from.origin!=wp_from_pos)
+               if(!wp_from || wp_from.origin!=wp_from_pos)
                {
                        wp_from = findradius(wp_from_pos, 1);
                        found = FALSE;
@@ -486,7 +486,7 @@ void waypoint_load_links_hardwired()
                wp_to_pos       = stov(argv(1));
 
                // Search "from" waypoint
-               if(wp_from && wp_from.origin!=wp_from_pos)
+               if(!wp_from || wp_from.origin!=wp_from_pos)
                {
                        wp_from = findradius(wp_from_pos, 5);
                        found = FALSE;