From 4dd50f3dfdab1133e0a524fc144478264f8596b3 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 24 Aug 2011 16:17:50 +0200 Subject: [PATCH] also accept items as a proof we're not inside a "stupid cage" --- qcsrc/server/miscfunctions.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- 2.39.2