]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a server side option to disable bunnyhopping
authorMario <zacjardine@y7mail.com>
Fri, 9 Oct 2015 12:14:17 +0000 (22:14 +1000)
committerMario <zacjardine@y7mail.com>
Fri, 9 Oct 2015 12:14:17 +0000 (22:14 +1000)
31 files changed:
defaultXonotic.cfg
physics.cfg
physicsCPMA.cfg
physicsFruit.cfg
physicsHavoc.cfg
physicsLeeStricklin-ModdedFruit.cfg
physicsLeeStricklin.cfg
physicsLeeStricklinOld.cfg
physicsLzd.cfg
physicsNexuiz10.cfg
physicsNexuiz11.cfg
physicsNexuiz151.cfg
physicsNexuiz151b.cfg
physicsNexuiz16rc1.cfg
physicsNexuiz20.cfg
physicsNexuiz25.cfg
physicsNexuiz26.cfg
physicsNoQWBunny-nexbased.cfg
physicsQ.cfg
physicsQ2.cfg
physicsQ2a.cfg
physicsQ3.cfg
physicsQBF.cfg
physicsQBFplus.cfg
physicsSamual.cfg
physicsWarsow.cfg
physicsWarsowClassicBunny.cfg
physicsWarsowDev.cfg
qcsrc/common/physics.qc
qcsrc/common/physics.qh
qcsrc/common/stats.qh

index 0afdb7af70254056edf38c1153d4bc057fa55993..3735e55349da0713a11e59317ead64ebe0d13610 100644 (file)
@@ -305,6 +305,7 @@ set sv_doublejump 0 "allow Quake 2-style double jumps"
 set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
 set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
 set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
+set sv_track_canjump 0 "track if the player released the jump key between 2 jumps to decide if they are able to jump or not"
 
 seta sv_precacheplayermodels 1
 seta sv_precacheweapons 0
index 58d1b1f81d058263aa59c1ddd779f758c72b7e21..e9fe5628940d9597fd5843533b54bced13066ae0 100644 (file)
@@ -38,6 +38,7 @@ set g_physics_xonotic_accelerate 15
 set g_physics_xonotic_stopspeed 100
 set g_physics_xonotic_airaccelerate 2
 set g_physics_xonotic_airstopaccelerate 3
+set g_physics_xonotic_track_canjump 0
 
 // ========
 //  Nexuiz
@@ -65,6 +66,7 @@ set g_physics_nexuiz_accelerate 8
 set g_physics_nexuiz_stopspeed 100
 set g_physics_nexuiz_airaccelerate 5.5
 set g_physics_nexuiz_airstopaccelerate 0
+set g_physics_nexuiz_track_canjump 0
 
 // =======
 //  Quake
@@ -92,6 +94,7 @@ set g_physics_quake_accelerate 10
 set g_physics_quake_stopspeed 100
 set g_physics_quake_airaccelerate 106.66666666666666666666
 set g_physics_quake_airstopaccelerate 0
+set g_physics_quake_track_canjump 1
 
 // ========
 //  Warsow
@@ -119,6 +122,7 @@ set g_physics_warsow_accelerate 15
 set g_physics_warsow_stopspeed 100
 set g_physics_warsow_airaccelerate 1
 set g_physics_warsow_airstopaccelerate 2.5
+set g_physics_warsow_track_canjump 0
 
 // ========
 //  DeFrag
@@ -146,6 +150,7 @@ set g_physics_defrag_accelerate 15
 set g_physics_defrag_stopspeed 100
 set g_physics_defrag_airaccelerate 1
 set g_physics_defrag_airstopaccelerate 2.5
+set g_physics_defrag_track_canjump 0
 
 // =========
 //  Quake 3
@@ -173,6 +178,7 @@ set g_physics_quake3_accelerate 10
 set g_physics_quake3_stopspeed 100
 set g_physics_quake3_airaccelerate 1
 set g_physics_quake3_airstopaccelerate 0
+set g_physics_quake3_track_canjump 1
 
 // ========
 //  Vecxis
@@ -200,6 +206,7 @@ set g_physics_vecxis_accelerate 5.5
 set g_physics_vecxis_stopspeed 100
 set g_physics_vecxis_airaccelerate 5.5
 set g_physics_vecxis_airstopaccelerate 0
+set g_physics_vecxis_track_canjump 0
 
 // =========
 //  Quake 2
@@ -227,6 +234,7 @@ set g_physics_quake2_accelerate 10
 set g_physics_quake2_stopspeed 100
 set g_physics_quake2_airaccelerate 1
 set g_physics_quake2_airstopaccelerate 0
+set g_physics_quake2_track_canjump 1
 
 // =======
 //  Bones
@@ -254,3 +262,4 @@ set g_physics_bones_accelerate 15
 set g_physics_bones_stopspeed 100
 set g_physics_bones_airaccelerate 1
 set g_physics_bones_airstopaccelerate 2.5
+set g_physics_bones_track_canjump 0
index 9734cfc6f6ccc1180a9925105814321f1d5ed69f..e4bbad3d48630aa95c9f3463fdd1d327c7323a12 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 400
+sv_track_canjump 0
index 5f65d66d8ab36e6b6e2349174c15431ea20e6e3f..ee44b5547a052717cde7f28fb0f52063e638c65f 100644 (file)
@@ -33,3 +33,4 @@ sv_jumpspeedcap_min 0 // need predicting? (it should already be in CSQC predicti
 sv_jumpspeedcap_max 0.35
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+sv_track_canjump 0
index f107158720dc50d26d0dcc014a5a4eb23ae8ddbe..6aac341780e7573cbe580b714e62b747d61e6612 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 3553a94a7e587a415a24613aaf735392622e6a53..90eaa49c1223cd4bacf7aa7e228dc4670f88240b 100644 (file)
@@ -42,3 +42,4 @@ sv_jumpspeedcap_min 0 // need predicting? (it should already be in CSQC predicti
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+sv_track_canjump 0
index e4aef4440d6b5b173e141962d3e429077216ab31..03081fdab7554b9c5118b795ac8b86987ff966a6 100644 (file)
@@ -42,3 +42,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+sv_track_canjump 0
index eda92ac6930431893efd7865b83f26d45efecffc..ef213a70f9d356226b401c0779752d85d69c7157 100644 (file)
@@ -37,3 +37,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max 0.38
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index cd76c2fe39f557fd6bb50133fddc8dad880dc1e6..51c49d7832dbf0197ca6a2ab5d456389ce675ebf 100644 (file)
@@ -35,3 +35,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 6c99b307f00f74d41e90e6d95b5db96dcacb2e20..0ce33aa95132362f57bb28eeec904c6549bed91e 100644 (file)
@@ -35,3 +35,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 65a6a4b6fc40b9a67fc91d4936cee4095e32ebd2..08711fd5b0f6905b33ff2688261f0e0543611922 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 833a67dce383f608a8051938cdffa905d55f3d4d..092985cae51a00a87a76cf26a78519c9f5d3f127 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 31380c973828580dc2fe523cac5715e59e8ab020..c6d9bef4b912d82e5200691d82a3fb55627b4d88 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index f3a85e50b7cf4d03556fd315f7b731b5d4125ec6..5e0ee6ae0c6f265690c3783be05c3d10f35a1d19 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 60071e1844026fb1bb9fb04e695d19247295f33b..d129a2db05ebada4a9698aeafcfedbb9456ac2d9 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index dd984bb310c1a8c2299df157edc8b751e20d05d5..8a52299763d537423fb2012f6a9ed304c969ef0e 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 827bbc55c16501e6ee64e509b4313f8612a0d3c4..4df3f211ebe490134394e21d60a35a0b739fae6b 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index f8d43c4f2ece249c7fe52776ce6bae5c7577a535..3e905428f76d52f1183cde4fc116ccabc0268afa 100644 (file)
@@ -43,3 +43,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+sv_track_canjump 0
index c26745629677cf209b65c223eb60d5abfd6a9436..448e087f46f20c1d0287dfd29c9a605a93266fcc 100644 (file)
@@ -35,3 +35,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 05e2f1456cdd5152935fe084e730f717069dc4cd..124c50660a1046ca8bf9ce7245a4d9579a0ff71c 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 9b953e32e8b78b8852f663ed4e55668da55a1b1a..580f6257fa65f2bde52c74983f72492e45456f2f 100644 (file)
@@ -35,3 +35,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index eed1c7409008447be660d6b84b73e57da536d11f..6f00896b671b4b542115d6270c96b4bac7d08c20 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 320
+sv_track_canjump 0
index 8dff0edd9df5d208440a721a04fce1e236a5722a..31963e9feee4dc1dc6691514a081bde9d3765c7f 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 634b6083ee6c910a69442de8430c8251e2781bb7..82463859835480526e90bbae65db204238344fd7 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 8019089bf216f7eb5749c8d12064a494ca0f7edd..6858892e3b3ad27b1c8a8e8d4257c7a650e269c6 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 7d66b3716d987f96d48687973d7c09cfc7f1011d..50101d73d43165843ecf32f08b55fb33aff8fb2d 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 1dbb14a90fb4f87d31359ee48ee84ea32ae11231..c4c3535a7f9ac1c74d3daa7a7c7645f4daaa9e27 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index f2f989d7580295a9ea237701d240ab7084dc7bb0..331723ec9317539cbc2b2e4bdc139a99b52abb94 100644 (file)
@@ -34,3 +34,4 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+sv_track_canjump 0
index 1a799c8de79c903edef70a5db80115bc103d657b..cb823b1074c8ee19ed2048831b5e2b7f5d82cb89 100644 (file)
@@ -78,7 +78,8 @@ void Physics_AddStats()
        addstat(STAT_JETPACK_MAXSPEED_SIDE, AS_FLOAT, stat_jetpack_maxspeed_side);
 
        // hack to fix track_canjump
-       addstat(STAT_MOVEVARS_TRACK_CANJUMP, AS_INT, cvar_cl_movement_track_canjump);
+       addstat(STAT_MOVEVARS_CL_TRACK_CANJUMP, AS_INT, cvar_cl_movement_track_canjump);
+       addstat(STAT_MOVEVARS_TRACK_CANJUMP, AS_INT, stat_sv_track_canjump);
 
        // double jump
        addstat(STAT_DOUBLEJUMP, AS_INT, stat_doublejump);
@@ -175,6 +176,8 @@ void Physics_UpdateStats(float maxspd_mod)
        self.stat_sv_airstopaccelerate = Physics_ClientOption(self, "airstopaccelerate");
        self.stat_sv_jumpvelocity = Physics_ClientOption(self, "jumpvelocity");
 
+       self.stat_sv_track_canjump = Physics_ClientOption(self, "track_canjump");
+
        self.stat_gameplayfix_upvelocityclearsonground = UPWARD_VELOCITY_CLEARS_ONGROUND;
 }
 #endif
@@ -591,7 +594,11 @@ bool PlayerJump (void)
                if (!IS_ONGROUND(self))
                        return IS_JUMP_HELD(self);
 
-       if (PHYS_TRACK_CANJUMP(self))
+       bool track_jump = PHYS_CL_TRACK_CANJUMP(self);
+       if(PHYS_TRACK_CANJUMP(self))
+               track_jump = true;
+
+       if (track_jump)
                if (IS_JUMP_HELD(self))
                        return true;
 
index a249b238d7bf197650833c3e3d1badad89135478..d1f82991cd3308f4e5f45c70043e3f2ad076b0a9 100644 (file)
@@ -123,6 +123,7 @@ bool IsFlying(entity a);
        #define PHYS_JUMPSPEEDCAP_MAX                           cvar_string("cl_jumpspeedcap_max")
        #define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS       getstati(STAT_MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS)
 
+       #define PHYS_CL_TRACK_CANJUMP(s)                        getstati(STAT_MOVEVARS_CL_TRACK_CANJUMP)
        #define PHYS_TRACK_CANJUMP(s)                           getstati(STAT_MOVEVARS_TRACK_CANJUMP)
        #define PHYS_ACCELERATE                                         getstatf(STAT_MOVEVARS_ACCELERATE)
        #define PHYS_AIRACCEL_QW(s)                                     getstatf(STAT_MOVEVARS_AIRACCEL_QW)
@@ -247,6 +248,8 @@ bool IsFlying(entity a);
        .float stat_nostep;
        .float stat_jumpstep;
 
+       .bool stat_sv_track_canjump;
+
        #define PHYS_INPUT_ANGLES(s)                            s.v_angle
        #define PHYS_WORLD_ANGLES(s)                            s.angles
 
@@ -323,7 +326,8 @@ bool IsFlying(entity a);
        #define PHYS_JUMPSPEEDCAP_MAX                           autocvar_sv_jumpspeedcap_max
        #define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS       autocvar_sv_jumpspeedcap_max_disable_on_ramps
 
-       #define PHYS_TRACK_CANJUMP(s)                           s.cvar_cl_movement_track_canjump
+       #define PHYS_CL_TRACK_CANJUMP(s)                        s.cvar_cl_movement_track_canjump
+       #define PHYS_TRACK_CANJUMP(s)                           s.stat_sv_track_canjump
        #define PHYS_ACCELERATE                                         self.stat_sv_accelerate
        #define PHYS_AIRACCEL_QW(s)                                     s.stat_sv_airaccel_qw
        #define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)       self.stat_sv_airaccel_qw_stretchfactor
index eff0eff804ef1f07621f138f78f03266e8096a62..9bdcb5773a5e4bcff57fe8079b53542babfa2bef 100644 (file)
@@ -245,10 +245,10 @@ const int STAT_GAMEPLAYFIX_EASIERWATERJUMP            = 190;
 const int STAT_MOVEVARS_FRICTION_SLICK                = 191;
 const int STAT_MOVEVARS_FRICTION_ONLAND               = 192;
 const int STAT_MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS  = 193;
-// 194 empty?
+const int STAT_MOVEVARS_TRACK_CANJUMP                 = 194;
 // 195 empty?
 const int STAT_DOUBLEJUMP                             = 196;
-const int STAT_MOVEVARS_TRACK_CANJUMP                 = 197;
+const int STAT_MOVEVARS_CL_TRACK_CANJUMP              = 197;
 const int STAT_MULTIJUMP_ADD                          = 198;
 const int STAT_MULTIJUMP_SPEED                        = 199;
 const int STAT_MULTIJUMP                              = 200;