]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Print an error message if player can't spawn a waypoint
authorterencehill <piuntn@gmail.com>
Wed, 9 Aug 2017 14:32:14 +0000 (16:32 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 9 Aug 2017 14:32:14 +0000 (16:32 +0200)
qcsrc/server/bot/default/waypoints.qc

index 657933989bfb1c2ef3d9ffe22e76ec64caed25d5..185ec0f1fd4279c9857625fb4e883d4de5e70b85 100644 (file)
@@ -268,6 +268,11 @@ void waypoint_spawn_fromeditor(entity pl)
 
        LABEL(add_wp);
        e = waypoint_spawn(org, org, 0);
+       if(!e)
+       {
+               LOG_INFOF("Couldn't spawn waypoint at %v\n", org);
+               return;
+       }
        waypoint_schedulerelink(e);
        bprint(strcat("Waypoint spawned at ", vtos(e.origin), "\n"));
        if(sym)