]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Mininum velocity for teleporter exits
authorDr. Jaska <drjaska83@gmail.com>
Sat, 10 Feb 2024 18:53:53 +0000 (18:53 +0000)
committerDr. Jaska <drjaska83@gmail.com>
Sat, 10 Feb 2024 18:53:53 +0000 (18:53 +0000)
35 files changed:
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
physicsOverkill.cfg
physicsQ.cfg
physicsQ2.cfg
physicsQ2a.cfg
physicsQ3.cfg
physicsQBF.cfg
physicsQBFplus.cfg
physicsSamual.cfg
physicsWarsow.cfg
physicsWarsowClassicBunny.cfg
physicsWarsowDev.cfg
physicsX.cfg
physicsX010.cfg
physicsX07.cfg
physicsXDF.cfg
physicsXDFLight.cfg
qcsrc/common/mapobjects/teleporters.qc
qcsrc/common/stats.qh
xonotic-server.cfg

index 559ce3a37c78464f241c7f476e19595047b08c82..b6317debd19d54773dbb3efc201d82c4c0204101 100644 (file)
@@ -63,8 +63,8 @@ sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max ""
 // CPMA has ramp jumping
 sv_jumpspeedcap_max_disable_on_ramps 1
-// FIXME: Q3 teleporters _set_ speed to 400, not cap it
 g_teleport_maxspeed 400
+g_teleport_minspeed 400
 sv_track_canjump 1
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 1
index 7c0c5170e8216ea94536a2395e5881f8e7ce3d92..f1146b858654192c6ebc802807334a981ec4804a 100644 (file)
@@ -36,6 +36,7 @@ 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
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index fdefb9ccaf724f55c4247e3203fcc2aca2569ddf..55f26de719382d069e7cf8d2c0a0c2ccf1dc1e6b 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 25f2b54d6f186a98b4078837dcca526586050699..e80bac1350db5d45125523bd70b1b39206fff389 100644 (file)
@@ -45,6 +45,7 @@ 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
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 5edcfbe27b48a306962295049c6e0cf05874e68d..5e4a81633b8d1f36e285786f8ffd47ee642aaf3b 100644 (file)
@@ -45,6 +45,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index a4bdd08ca12be3c403daeba5707d584a48a4e883..13d059108cf6cdae15154a8b59eaf17bd01e7421 100644 (file)
@@ -40,6 +40,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max 0.38
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 8d54437fb82751732490a9fa5c4f59b3ea14a6c7..6bcbffb93ba1dc80f6e820bd8891da1fd3a9159f 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 3ca1ded65ce1ebb2ce281a90dbeb87ee3f8a79e5..af10e6208be50395088e1cbc91293c6b5b082ae8 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 03056d184e8ed1fe824137c52f0b542826cadc32..22b743528fe81c1f333e74dcd07f00bb6e427021 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index e2aa58971c1b50373ad16f37af9464ff489432e8..703a6a3c641740120555f22ebe90fafcd30b9d6c 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 26f746a7c0d9ae8e961a1afcebcd11f10d23f516..d5d377b0cd3f4b995c1279a5af2e05d28b83715a 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 40e7d1f3fca423b90d6c9dd9a0323032975a4f6a..32a4aaac534fee48a15a4bdb89a03c9134f899fd 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 24e27b01dd2fb07177d893c61fe69d5d07d24116..d0c5e196a86736a266ed0143dd3854c73d4361d1 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 167d2f4d453efb5a0b155c597915d2d3f3dffac0..a563f39b03af2677395bca10b92df57fb7f7a7cd 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 6c41d6bbc061e9106bcca2e96b7a9bf22990571a..7bd2891f95048206993f4d82a83fa17659e40fa6 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index c1447c0f091aa748b084ce148ae01af65fc91e98..cf077e6aec2d9207c90d4f095a52c6c8b441a486 100644 (file)
@@ -46,6 +46,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index aa97fb15b4882198f22757aea2be809eca3e5a08..794d1cc4428f7b532c719d18c7a83869a8bfe1ec 100644 (file)
@@ -52,6 +52,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 400
 g_movement_highspeed_q3_compat 0
index b84883d88bc4ab4acc2b8ba9244212339068392d..9a5becaa3cb1c30a8024670a46a7296374b4e0c0 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 5e18a2f0491a46da8c336e884ba00d9d70427c18..3d3c14aeae77888bef6b4710d30eb0542af5e72a 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index c614e817d350d64d1725b9f17da243ffd216379e..7fe21756f74015e5efe5f890c84aaf6cad44d6f7 100644 (file)
@@ -39,6 +39,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 08fdde547eda7a7f2f9b193f52f2ef3851992875..1e26efb33602e8e74c919ace39f2ed881a266f8b 100644 (file)
@@ -41,8 +41,8 @@ sv_jumpspeedcap_min ""
 // VQ3 has no ramp jumping
 sv_jumpspeedcap_max 270
 sv_jumpspeedcap_max_disable_on_ramps 0
-// FIXME: Q3 teleporters _set_ speed to 400, not cap it
 g_teleport_maxspeed 400
+g_teleport_minspeed 400
 sv_track_canjump 1
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 1
index 4de2fbd88517603b606b3ca9136bffa5a891cac2..c12f3c3ba3998270da07fc7affd61b7538411a29 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 880504782b2d999ca253d8c1b9dce55d7c8cbbfe..dc2f3a186a3b4e67f6aa0646b0a95a09f6f014b2 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 88165e03df64da0c0afc56cf714f2898423d53c8..b960eb01b6fb87d9c4dcb12a17c3664379d16958 100644 (file)
@@ -37,6 +37,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index f89927d5d3b18d259ff134cc7a47c637889362b3..189b3307834d090573414ced5d53e09b30a95ccd 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index ac1a96b52a1f9b8306dd2c6d2fdeab1733890295..c891a2b74928704a36d7935794186c611c895771 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 7f7bcc8d6fbb1ec494ef141a0739b68783bea611..7c9db0fbaeb243566dded3c480ca250853d68944 100644 (file)
@@ -38,6 +38,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 0
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 0
 g_movement_highspeed_q3_compat 0
index 21ded2a8c859376b438e9b49d7db39e7393bd3b3..f0f984bfa5f397a4a481c0139a145e1dd3883353 100644 (file)
@@ -53,6 +53,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 400
 g_movement_highspeed_q3_compat 0
index e350037e60e2da0591270e83014e2c1fcfc6595e..4a6d8bb86051822d8a7a4d8bd0fb27efa667e2b2 100644 (file)
@@ -46,6 +46,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 400
 g_movement_highspeed_q3_compat 0
index c7c2250e7c91a74f47cc64a8f6600f2a2f39464c..b3936901c42eb87da825eaed8ca1cb3de676e162 100644 (file)
@@ -52,6 +52,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 400
 g_movement_highspeed_q3_compat 0
index 1436bbdcb85bd00952a04855674d21957a779820..8baf5be7ec41282d89a97cc33d1f1e82a6a0dff4 100644 (file)
@@ -44,6 +44,7 @@ sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 0.5
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 600
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 400
 // needed for correct q3 haste simulation
index 1c86e786d1051d79643a7d0199ff4669421f7674..bab680d68605ac8465b8ae6478e2d326c11e6767 100644 (file)
@@ -44,6 +44,7 @@ sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 0
+g_teleport_minspeed 0
 sv_track_canjump 0
 sv_gameplayfix_stepdown_maxspeed 400
 g_movement_highspeed_q3_compat 0
index 651566c71b6fbec9ff4fd7ef5052a14dea7919ce..98864129cf20daa9e12d8d562a31995b8bc2e7f3 100644 (file)
@@ -225,9 +225,16 @@ entity Simple_TeleportPlayer(entity teleporter, entity player)
 
        if(!(teleporter.classname == "trigger_teleport" && (teleporter.spawnflags & TELEPORT_KEEP_SPEED)) &&
           !(teleporter.classname == "target_teleporter" && (teleporter.spawnflags & TARGET_TELEPORTER_KEEP_SPEED)))
+       {
+               // test if player is slower than min
+               if(STAT(TELEPORT_MINSPEED, player))
+                       if(vdist(player.velocity, <, STAT(TELEPORT_MINSPEED, player)))
+                               player.velocity = normalize(player.velocity) * max(0, STAT(TELEPORT_MINSPEED, player));
+               // test if player is faster than max (or if min is above max)
                if(STAT(TELEPORT_MAXSPEED, player))
                        if(vdist(player.velocity, >, STAT(TELEPORT_MAXSPEED, player)))
                                player.velocity = normalize(player.velocity) * max(0, STAT(TELEPORT_MAXSPEED, player));
+       }
 
        locout = e.origin + '0 0 1' * (1 - player.mins.z - 24);
 
index b7be1425c02c535c3354e91a9edc9af2613c8177..9b4394e45a62f1d0a2851555945521740c7c8e71 100644 (file)
@@ -343,8 +343,10 @@ REGISTER_STAT(NB_METERSTART, float)
 
 #ifdef SVQC
 float autocvar_g_teleport_maxspeed;
+float autocvar_g_teleport_minspeed;
 #endif
 REGISTER_STAT(TELEPORT_MAXSPEED, float, autocvar_g_teleport_maxspeed)
+REGISTER_STAT(TELEPORT_MINSPEED, float, autocvar_g_teleport_minspeed)
 REGISTER_STAT(TELEPORT_TELEFRAG_AVOID, int, autocvar_g_telefrags_avoid)
 
 REGISTER_STAT(CAMERA_SPECTATOR, int)
index e38ce52f96db5f5b4ec87751a8998337a0895198..3ec45a9fdb973bd567484e45c715ed53c9dbb8a2 100644 (file)
@@ -57,6 +57,7 @@ set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of s
 set g_telefrags_teamplay 1 "never telefrag team mates"
 set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
 set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
+set g_teleport_minspeed 0 "minimum speed that a player can keep when going through a teleporter which affects speed"
 
 set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
 set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"