]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also accept items as a proof we're not inside a "stupid cage"
authorRudolf Polzer <divverent@alientrap.org>
Wed, 24 Aug 2011 14:17:50 +0000 (16:17 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 24 Aug 2011 14:17:50 +0000 (16:17 +0200)
qcsrc/server/miscfunctions.qc

index 61df00dd0b1bf173262628d6666f9fd31e1ca7f4..fcf6283db1c00fef41e8a8e493e7f4f6e4219336 100644 (file)
@@ -2534,7 +2534,13 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
                if(checkpvs(mstart, sp))
                        break;
        if(!sp)
-               continue;
+       {
+               for(sp = world; (sp = findflags(sp, flags, FL_ITEM)); )
+                       if(checkpvs(mstart, sp))
+                               break;
+               if(!sp)
+                       continue;
+       }
 
         // find a random vector to "look at"
         end_x = org_x + random() * delta_x;