From: Dr. Jaska Date: Sat, 10 Feb 2024 18:53:53 +0000 (+0000) Subject: Mininum velocity for teleporter exits X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c094f4455ce89614f733e9c40f5e9d2a3c0938df;p=xonotic%2Fxonotic-data.pk3dir.git Mininum velocity for teleporter exits --- diff --git a/physicsCPMA.cfg b/physicsCPMA.cfg index 559ce3a37..b6317debd 100644 --- a/physicsCPMA.cfg +++ b/physicsCPMA.cfg @@ -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 diff --git a/physicsFruit.cfg b/physicsFruit.cfg index 7c0c5170e..f1146b858 100644 --- a/physicsFruit.cfg +++ b/physicsFruit.cfg @@ -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 diff --git a/physicsHavoc.cfg b/physicsHavoc.cfg index fdefb9cca..55f26de71 100644 --- a/physicsHavoc.cfg +++ b/physicsHavoc.cfg @@ -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 diff --git a/physicsLeeStricklin-ModdedFruit.cfg b/physicsLeeStricklin-ModdedFruit.cfg index 25f2b54d6..e80bac135 100644 --- a/physicsLeeStricklin-ModdedFruit.cfg +++ b/physicsLeeStricklin-ModdedFruit.cfg @@ -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 diff --git a/physicsLeeStricklin.cfg b/physicsLeeStricklin.cfg index 5edcfbe27..5e4a81633 100644 --- a/physicsLeeStricklin.cfg +++ b/physicsLeeStricklin.cfg @@ -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 diff --git a/physicsLeeStricklinOld.cfg b/physicsLeeStricklinOld.cfg index a4bdd08ca..13d059108 100644 --- a/physicsLeeStricklinOld.cfg +++ b/physicsLeeStricklinOld.cfg @@ -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 diff --git a/physicsLzd.cfg b/physicsLzd.cfg index 8d54437fb..6bcbffb93 100644 --- a/physicsLzd.cfg +++ b/physicsLzd.cfg @@ -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 diff --git a/physicsNexuiz10.cfg b/physicsNexuiz10.cfg index 3ca1ded65..af10e6208 100644 --- a/physicsNexuiz10.cfg +++ b/physicsNexuiz10.cfg @@ -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 diff --git a/physicsNexuiz11.cfg b/physicsNexuiz11.cfg index 03056d184..22b743528 100644 --- a/physicsNexuiz11.cfg +++ b/physicsNexuiz11.cfg @@ -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 diff --git a/physicsNexuiz151.cfg b/physicsNexuiz151.cfg index e2aa58971..703a6a3c6 100644 --- a/physicsNexuiz151.cfg +++ b/physicsNexuiz151.cfg @@ -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 diff --git a/physicsNexuiz151b.cfg b/physicsNexuiz151b.cfg index 26f746a7c..d5d377b0c 100644 --- a/physicsNexuiz151b.cfg +++ b/physicsNexuiz151b.cfg @@ -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 diff --git a/physicsNexuiz16rc1.cfg b/physicsNexuiz16rc1.cfg index 40e7d1f3f..32a4aaac5 100644 --- a/physicsNexuiz16rc1.cfg +++ b/physicsNexuiz16rc1.cfg @@ -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 diff --git a/physicsNexuiz20.cfg b/physicsNexuiz20.cfg index 24e27b01d..d0c5e196a 100644 --- a/physicsNexuiz20.cfg +++ b/physicsNexuiz20.cfg @@ -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 diff --git a/physicsNexuiz25.cfg b/physicsNexuiz25.cfg index 167d2f4d4..a563f39b0 100644 --- a/physicsNexuiz25.cfg +++ b/physicsNexuiz25.cfg @@ -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 diff --git a/physicsNexuiz26.cfg b/physicsNexuiz26.cfg index 6c41d6bbc..7bd2891f9 100644 --- a/physicsNexuiz26.cfg +++ b/physicsNexuiz26.cfg @@ -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 diff --git a/physicsNoQWBunny-nexbased.cfg b/physicsNoQWBunny-nexbased.cfg index c1447c0f0..cf077e6ae 100644 --- a/physicsNoQWBunny-nexbased.cfg +++ b/physicsNoQWBunny-nexbased.cfg @@ -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 diff --git a/physicsOverkill.cfg b/physicsOverkill.cfg index aa97fb15b..794d1cc44 100644 --- a/physicsOverkill.cfg +++ b/physicsOverkill.cfg @@ -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 diff --git a/physicsQ.cfg b/physicsQ.cfg index b84883d88..9a5becaa3 100644 --- a/physicsQ.cfg +++ b/physicsQ.cfg @@ -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 diff --git a/physicsQ2.cfg b/physicsQ2.cfg index 5e18a2f04..3d3c14aea 100644 --- a/physicsQ2.cfg +++ b/physicsQ2.cfg @@ -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 diff --git a/physicsQ2a.cfg b/physicsQ2a.cfg index c614e817d..7fe21756f 100644 --- a/physicsQ2a.cfg +++ b/physicsQ2a.cfg @@ -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 diff --git a/physicsQ3.cfg b/physicsQ3.cfg index 08fdde547..1e26efb33 100644 --- a/physicsQ3.cfg +++ b/physicsQ3.cfg @@ -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 diff --git a/physicsQBF.cfg b/physicsQBF.cfg index 4de2fbd88..c12f3c3ba 100644 --- a/physicsQBF.cfg +++ b/physicsQBF.cfg @@ -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 diff --git a/physicsQBFplus.cfg b/physicsQBFplus.cfg index 880504782..dc2f3a186 100644 --- a/physicsQBFplus.cfg +++ b/physicsQBFplus.cfg @@ -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 diff --git a/physicsSamual.cfg b/physicsSamual.cfg index 88165e03d..b960eb01b 100644 --- a/physicsSamual.cfg +++ b/physicsSamual.cfg @@ -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 diff --git a/physicsWarsow.cfg b/physicsWarsow.cfg index f89927d5d..189b33078 100644 --- a/physicsWarsow.cfg +++ b/physicsWarsow.cfg @@ -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 diff --git a/physicsWarsowClassicBunny.cfg b/physicsWarsowClassicBunny.cfg index ac1a96b52..c891a2b74 100644 --- a/physicsWarsowClassicBunny.cfg +++ b/physicsWarsowClassicBunny.cfg @@ -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 diff --git a/physicsWarsowDev.cfg b/physicsWarsowDev.cfg index 7f7bcc8d6..7c9db0fba 100644 --- a/physicsWarsowDev.cfg +++ b/physicsWarsowDev.cfg @@ -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 diff --git a/physicsX.cfg b/physicsX.cfg index 21ded2a8c..f0f984bfa 100644 --- a/physicsX.cfg +++ b/physicsX.cfg @@ -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 diff --git a/physicsX010.cfg b/physicsX010.cfg index e350037e6..4a6d8bb86 100644 --- a/physicsX010.cfg +++ b/physicsX010.cfg @@ -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 diff --git a/physicsX07.cfg b/physicsX07.cfg index c7c2250e7..b3936901c 100644 --- a/physicsX07.cfg +++ b/physicsX07.cfg @@ -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 diff --git a/physicsXDF.cfg b/physicsXDF.cfg index 1436bbdcb..8baf5be7e 100644 --- a/physicsXDF.cfg +++ b/physicsXDF.cfg @@ -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 diff --git a/physicsXDFLight.cfg b/physicsXDFLight.cfg index 1c86e786d..bab680d68 100644 --- a/physicsXDFLight.cfg +++ b/physicsXDFLight.cfg @@ -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 diff --git a/qcsrc/common/mapobjects/teleporters.qc b/qcsrc/common/mapobjects/teleporters.qc index 651566c71..98864129c 100644 --- a/qcsrc/common/mapobjects/teleporters.qc +++ b/qcsrc/common/mapobjects/teleporters.qc @@ -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); diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index b7be1425c..9b4394e45 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -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) diff --git a/xonotic-server.cfg b/xonotic-server.cfg index e38ce52f9..3ec45a9fd 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -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"