]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' of git://git.xonotic.org/xonotic/xonotic-data.pk3dir
authorRudolf Polzer <divverent@xonotic.org>
Mon, 15 Aug 2011 18:10:44 +0000 (20:10 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 15 Aug 2011 18:10:44 +0000 (20:10 +0200)
defaultXonotic.cfg
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/navigation.qh
qcsrc/server/g_world.qc
xonotic-credits.txt

index e4a0e79e86eb79118220fb7b619e16e9f4f08b4e..b948ab8ab081883a4a25670b7390675fc5d81eab 100644 (file)
@@ -1030,7 +1030,7 @@ bind 9 weapon_group_9
 bind q weaplast
 bind MOUSE1 +fire
 bind MOUSE2 +fire2
-bind MOUSE3 +zoom
+bind MOUSE3 togglezoom
 bind MOUSE4 weaplast
 bind MOUSE5 +hook
 bind MWHEELUP weapnext
index 749b78fed6546eb7c9460dd88a00cfa2d43b07e3..4f680284eec19ff96b3b6bcfbfa3477a04d9abd7 100644 (file)
@@ -645,7 +645,11 @@ void navigation_routerating(entity e, float f, float rangebias)
        if (!e)
                return;
 
+       if(e.blacklisted)
+               return;
+
        o = (e.absmin + e.absmax) * 0.5;
+
        //print("routerating ", etos(e), " = ", ftos(f), " - ", ftos(rangebias), "\n");
 
        // Evaluate path using jetpack
@@ -747,14 +751,48 @@ void navigation_routerating(entity e, float f, float rangebias)
        }
        else
        {
+               float search;
+
+               search = TRUE;
+
+               if(e.flags & FL_ITEM)
+               {
+                       if not(e.flags & FL_WEAPON)
+                       if(e.nearestwaypoint)
+                               search = FALSE;
+               }
+               else if (e.flags & FL_WEAPON)
+               {
+                       if(e.classname != "droppedweapon")
+                       if(e.nearestwaypoint)
+                               search = FALSE;
+               }
+
+               if(search)
                if (time > e.nearestwaypointtimeout)
                {
                        nwp = navigation_findnearestwaypoint(e, TRUE);
                        if(nwp)
                                e.nearestwaypoint = nwp;
                        else
+                       {
                                dprint("FAILED to find a nearest waypoint to '", e.classname, "' #", etos(e), "\n");
 
+                               if(e.flags & FL_ITEM)
+                                       e.blacklisted = TRUE;
+                               else if (e.flags & FL_WEAPON)
+                               {
+                                       if(e.classname != "droppedweapon")
+                                               e.blacklisted = TRUE;
+                               }
+
+                               if(e.blacklisted)
+                               {
+                                       dprint("The entity '", e.classname, "' is going to be excluded from path finding during this match\n");
+                                       return;
+                               }
+                       }
+
                        // TODO: Cleaner solution, probably handling this timeout from ctf.qc
                        if(e.classname=="item_flag_team")
                                e.nearestwaypointtimeout = time + 2;
index 8971692de03193c546f0a33ac09eb65709038884..b3b40ce03e55443be1c82e8e362f354381e82483 100644 (file)
@@ -28,6 +28,8 @@ entity navigation_bestgoal;
 .float navigation_hasgoals;
 .float lastteleporttime;
 
+.float blacklisted;
+
 .entity navigation_jetpack_goal;
 .vector navigation_jetpack_point;
 
index 047d2c0be61a8d1bc26e8161fa2ebaf0be0409cd..27bfba9ce98cd212076c3e215d0e955bb91f5219 100644 (file)
@@ -293,6 +293,7 @@ void cvar_changes_init()
                BADCVAR("sv_vote_master_password");
                BADCVAR("sys_colortranslation");
                BADCVAR("sys_specialcharactertranslation");
+               BADCVAR("timeformat");
                BADCVAR("timestamps");
                BADPREFIX("developer_");
                BADPREFIX("g_ban_");
index 50e1f5d5890a0f5a74e89e1f78475d6b922b0fea..1ffde9fd0e0280a5d6bd2aa2346309d26c1cc7c5 100644 (file)
@@ -91,6 +91,7 @@ blkrbt
 Calinou
 chooksta
 Cuinn "Cuinnton" Herrick
+Florian Paul "lda17h" Schmidt
 Kristian "morfar" Johansson
 kojn
 Maik "SavageX" Merten