]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into terencehill/centerprint_stuff
authorSamual <samual@xonotic.org>
Mon, 15 Aug 2011 21:53:53 +0000 (17:53 -0400)
committerSamual <samual@xonotic.org>
Mon, 15 Aug 2011 21:53:53 +0000 (17:53 -0400)
defaultXonotic.cfg
keybinds.txt
qcsrc/menu/xonotic/keybinder.c
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/navigation.qh
qcsrc/server/g_world.qc
xonotic-credits.txt

index a89f1936e78d6e0d18d9790c3d75d2281299edb3..f5efdc6852acdae5537255c3e6ee12f780b2c222 100644 (file)
@@ -1007,20 +1007,30 @@ bind ENTER +jump
 bind SPACE +jump
 
 // weapons
-bind 1 "impulse 1"
-bind 2 "impulse 2"
-bind 3 "impulse 3"
-bind 4 "impulse 4"
-bind 5 "impulse 5"
-bind 6 "impulse 6"
-bind 7 "impulse 7"
-bind 8 "impulse 8"
-bind 9 "impulse 9"
-bind 0 "impulse 14" // cycles the superweapons
+alias weapon_group_1 "impulse 1"
+alias weapon_group_2 "impulse 2"
+alias weapon_group_3 "impulse 3"
+alias weapon_group_4 "impulse 4"
+alias weapon_group_5 "impulse 5"
+alias weapon_group_6 "impulse 6"
+alias weapon_group_7 "impulse 7"
+alias weapon_group_8 "impulse 8"
+alias weapon_group_9 "impulse 9"
+alias weapon_group_0 "impulse 14" // cycles the superweapons
+bind 0 weapon_group_0
+bind 1 weapon_group_1
+bind 2 weapon_group_2
+bind 3 weapon_group_3
+bind 4 weapon_group_4
+bind 5 weapon_group_5
+bind 6 weapon_group_6
+bind 7 weapon_group_7
+bind 8 weapon_group_8
+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 56ff29d76685d0a2a16f2a11f24d44d477cde172..ca1f9b37e074d6d8ad824987262002cffda23830 100644 (file)
 "weaplast"                              "previously used"
 "weapbest"                              "best"
 "reload"                                "reload"
-"impulse 1"                             "Laser"
-"impulse 2"                             "Shotgun"
-"impulse 3"                             "Machine Gun"
-"impulse 4"                             "Mortar / Mine Layer"
-"impulse 5"                             "Electro"
-"impulse 6"                             "Crylink / HLAC"
-"impulse 7"                             "Nex / MinstaNex / Rifle"
-"impulse 8"                             "Hagar / Seeker"
-"impulse 9"                             "Rocket Launcher / Fireball"
-"impulse 14"                            "Port-O-Launch / Hook"
+"weapon_group_1"                        "Laser"
+"weapon_group_2"                        "Shotgun"
+"weapon_group_3"                        "Machine Gun"
+"weapon_group_4"                        "Mortar / Mine Layer"
+"weapon_group_5"                        "Electro"
+"weapon_group_6"                        "Crylink / HLAC"
+"weapon_group_7"                        "Nex / MinstaNex / Rifle"
+"weapon_group_8"                        "Hagar / Seeker"
+"weapon_group_9"                        "Rocket Launcher / Fireball"
+"weapon_group_0"                        "Port-O-Launch / Hook"
 ""                                      ""
 ""                                      "View"
 "+zoom"                                 "hold zoom"
index f4a6c5a3e3dc40adbefdaf5d4eb1f7a75b94be4a..754135bb21b9b98e9bcc341ce63836a29a964e6c 100644 (file)
@@ -70,6 +70,17 @@ entity makeXonoticKeyBinder()
        me.configureXonoticKeyBinder(me);
        return me;
 }
+void replace_bind(string from, string to)
+{
+       float n, j, k;
+       n = tokenize(findkeysforcommand(from)); // uses '...' strings
+       for(j = 0; j < n; ++j)
+       {
+               k = stof(argv(j));
+               if(k != -1)
+                       localcmd("\nbind \"", keynumtostring(k), "\" \"", to, "\"\n");
+       }
+}
 void XonoticKeyBinder_configureXonoticKeyBinder(entity me)
 {
        me.configureXonoticListBox(me);
@@ -77,6 +88,18 @@ void XonoticKeyBinder_configureXonoticKeyBinder(entity me)
                Xonotic_KeyBinds_Read();
        me.nItems = Xonotic_KeyBinds_Count;
        me.setSelected(me, 0);
+
+       // TEMP: Xonotic 0.1 to later
+       replace_bind("impulse 1", "weapon_group_1");
+       replace_bind("impulse 2", "weapon_group_2");
+       replace_bind("impulse 3", "weapon_group_3");
+       replace_bind("impulse 4", "weapon_group_4");
+       replace_bind("impulse 5", "weapon_group_5");
+       replace_bind("impulse 6", "weapon_group_6");
+       replace_bind("impulse 7", "weapon_group_7");
+       replace_bind("impulse 8", "weapon_group_8");
+       replace_bind("impulse 9", "weapon_group_9");
+       replace_bind("impulse 14", "weapon_group_0");
 }
 void XonoticKeyBinder_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
 {
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 58f53c05d1e0a4ad4a3d27d21fa1011acf46c322..adb7237780b16ada37f7925aa9a6d43aadfee9c3 100644 (file)
@@ -290,6 +290,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