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
"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"
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);
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)
{
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
}
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;
.float navigation_hasgoals;
.float lastteleporttime;
+.float blacklisted;
+
.entity navigation_jetpack_goal;
.vector navigation_jetpack_point;
BADCVAR("sv_vote_master_password");
BADCVAR("sys_colortranslation");
BADCVAR("sys_specialcharactertranslation");
+ BADCVAR("timeformat");
BADCVAR("timestamps");
BADPREFIX("developer_");
BADPREFIX("g_ban_");
Calinou
chooksta
Cuinn "Cuinnton" Herrick
+Florian Paul "lda17h" Schmidt
Kristian "morfar" Johansson
kojn
Maik "SavageX" Merten