From: Rudolf Polzer Date: Wed, 24 Aug 2011 14:17:50 +0000 (+0200) Subject: also accept items as a proof we're not inside a "stupid cage" X-Git-Tag: xonotic-v0.5.0~62 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4dd50f3dfdab1133e0a524fc144478264f8596b3;p=xonotic%2Fxonotic-data.pk3dir.git also accept items as a proof we're not inside a "stupid cage" --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 61df00dd0..fcf6283db 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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;