From: TimePath Date: Thu, 18 Dec 2014 01:59:19 +0000 (+1100) Subject: Give jetpack a button X-Git-Tag: xonotic-v0.8.0~52^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54112237e4976af1a0b8afe3da9add23ad984072;p=xonotic%2Fxonotic-data.pk3dir.git Give jetpack a button --- diff --git a/keybinds.txt b/keybinds.txt index 3428f60fa..189d02eb4 100644 --- a/keybinds.txt +++ b/keybinds.txt @@ -6,6 +6,7 @@ "+jump" "jump / swim" "+crouch" "crouch / sink" "+hook" "off-hand hook" +"+jetpack" "jet pack" "" "" "" "Attacking" "+fire" "primary fire" diff --git a/keybinds.txt.de b/keybinds.txt.de index 4642fdd05..0c2aaf2b1 100644 --- a/keybinds.txt.de +++ b/keybinds.txt.de @@ -6,6 +6,7 @@ "+jump" "springen / schwimmen" "+crouch" "ducken / sinken" "+hook" "Enterhaken" +"+jetpack" "Jetpack" "" "" "" "Angriff" "+fire" "1. Feuermodus" diff --git a/keybinds.txt.es b/keybinds.txt.es index d0da89640..51d9bfc39 100644 --- a/keybinds.txt.es +++ b/keybinds.txt.es @@ -6,6 +6,7 @@ "+jump" "saltar / nadar" "+crouch" "agacharse / bajar" "+hook" "gancho" +"+jetpack" "jet pack" "" "" "" "Ataque" "+fire" "ataque primario" diff --git a/keybinds.txt.fr b/keybinds.txt.fr index 28c2c2cc7..8a8594864 100644 --- a/keybinds.txt.fr +++ b/keybinds.txt.fr @@ -6,6 +6,7 @@ "+jump" "sauter / nager" "+crouch" "s'accroupir / couler" "+hook" "grappin" +"+jetpack" "jet pack" "" "" "" "Attaque" "+fire" "tir primaire" diff --git a/keybinds.txt.hu b/keybinds.txt.hu index e42a6f78d..3ae11f77f 100644 --- a/keybinds.txt.hu +++ b/keybinds.txt.hu @@ -6,6 +6,7 @@ "+jump" "ugrás / úszás" "+crouch" "guggolás / süllyedés" "+hook" "kézi kampó" +"+jetpack" "rakéta puttony" "" "" "" "Tüzelés" "+fire" "Elsődleges" diff --git a/keybinds.txt.it b/keybinds.txt.it index 69d9da217..a01a9731b 100644 --- a/keybinds.txt.it +++ b/keybinds.txt.it @@ -6,6 +6,7 @@ "+jump" "salta / risalire in acqua" "+crouch" "abbassarsi / scendere in acqua" "+hook" "off-hand hook" +"+jetpack" "jet pack" "" "" "" "Attacco" "+fire" "fuoco primario" diff --git a/keybinds.txt.ru b/keybinds.txt.ru index 68cd41548..7ab93ff8f 100644 --- a/keybinds.txt.ru +++ b/keybinds.txt.ru @@ -6,6 +6,7 @@ "+jump" "прыжок / плыть" "+crouch" "пригнуться / погрузиться" "+hook" "крюк" +"+jetpack" "реактивный ранец" "" "" "" "Нападение" "+fire" "основной огонь" diff --git a/keybinds.txt.uk b/keybinds.txt.uk index fd22526d6..07812dee8 100644 --- a/keybinds.txt.uk +++ b/keybinds.txt.uk @@ -6,6 +6,7 @@ "+jump" "стрибок / плисти нагору" "+crouch" "присідання / занурення" "+hook" "гак" +"+jetpack" "реактивний ранець" "" "" "" "Бій" "+fire" "основний вогонь" diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index b1dccc7b5..a933990e8 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1140,6 +1140,10 @@ void ClientConnect (void) // Wazat's grappling hook SetGrappleHookBindings(); + // Jetpack binds + stuffcmd(self, "alias +jetpack +button10\n"); + stuffcmd(self, "alias -jetpack -button10\n"); + // get version info from player stuffcmd(self, "cmd clientversion $gameversion\n"); diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 9718260a9..bca53e50d 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -159,9 +159,9 @@ void CheckWaterJump() .float multijump_count; void CheckPlayerJump() { - if (self.BUTTON_JUMP) + if (self.BUTTON_JUMP || self.BUTTON_JETPACK) { - if (!PlayerJump() || self.multijump_count > 0) + if (self.BUTTON_JUMP && (!PlayerJump() || self.multijump_count > 0) || self.BUTTON_JETPACK) { if (!self.jetpack_stopped && (!autocvar_g_jetpack_fuel || self.ammo_fuel > 0 || self.items & IT_UNLIMITED_WEAPON_AMMO) && !self.frozen) { @@ -179,10 +179,11 @@ void CheckPlayerJump() } else { - self.flags |= FL_JUMPRELEASED; self.jetpack_stopped = FALSE; self.items &= ~IT_USING_JETPACK; } + if (!self.BUTTON_JUMP) + self.flags |= FL_JUMPRELEASED; if (self.waterlevel == WATERLEVEL_SWIMMING) CheckWaterJump (); diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index ab4dee318..a4f315406 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -13,6 +13,7 @@ noref float require_spawnfunc_prefix; // if this float exists, only functions wi #define BUTTON_USE buttonuse #define BUTTON_DRAG button8 #define BUTTON_ZOOMSCRIPT button9 +#define BUTTON_JETPACK button10 // Globals