bind mouse1 +toggle cl_dummy_hammer 1 0
and turn on copybind mouse1 +toggle cl_dummy_hammer 1 0
and turn on copy 0.001
, gravity will be set to (int)(0.001 * 100) = (int)(0.1) = 0
python speedtune.py <speed factor> [prefix]
so for example python speedtune.py 0.5 tune
would give you the commands for global tunes to set the speed to 0.5xtune gravity 0.008
<-- breakstune ground_jump_impulse 1.6
tune gravity 0.01
this should be enough to replicate the obviously weird behaviourfrom sys import argv as args
try:
factor = float(args[1])
except IndexError as e:
print("Please supply a speed factor!")
exit(1)
except ValueError as e:
print("Not a valid factor: " + args[1])
exit(1)
prefix = ""
if len(args) > 2:
prefix = " ".join(args[2:])
inverse = 1 / factor
square = factor * factor
print(f"{prefix} ground_control_speed {10.0 * factor :.3f}")
print(f"{prefix} ground_control_accel {2.0 * square :.3f}")
print(f"{prefix} ground_friction {0.5 ** factor :.3f}")
print(f"{prefix} ground_jump_impulse {13.2 * factor :.3f}")
print(f"{prefix} air_jump_impulse {12.0 * factor :.3f}")
print(f"{prefix} air_control_speed {5.0 * factor :.3f}")
print(f"{prefix} air_control_accel {1.5 * square :.3f}")
print(f"{prefix} air_friction {0.95 ** factor :.3f}")
print(f"{prefix} hook_drag_accel {3.0 * square :.3f}")
print(f"{prefix} hook_drag_speed {15.0 * factor :.3f}")
print(f"{prefix} gravity {0.5 * square :.3f}")
print(f"{prefix} velramp_start {550 * factor :.3f}")
print(f"{prefix} velramp_range {2000 * factor :.3f}")
But 1 there is 1 drawback, now I will describe which one.
1. ground_control_speed:
Expression: 10.0 * factor
Calculation: 10.0 * 0.5 = 5.000
Result: ground_control_speed 5.000
2. ground_control_accel:
Expression: 2.0 * square, where square = factor * factor
Calculation: 2.0 * (0.5 * 0.5) = 2.0 * 0.25 = 0.500
Result: ground_control_accel 0.500
3. ground_friction:
Expression: 0.5 ** factor
Calculation: 0.5 ** 0.5 ≈ 0.707
Result: ground_friction 0.707
4. ground_jump_impulse:
Expression: 13.2 * factor
Calculation: 13.2 * 0.5 = 6.600
Result: ground_jump_impulse 6.600
5. air_jump_impulse:
Expression: 12.0 * factor
Calculation: 12.0 * 0.5 = 6.000
Result: air_jump_impulse 6.000
6. air_control_speed:
Expression: 5.0 * factor
Calculation: 5.0 * 0.5 = 2.500
Result: air_control_speed 2.500
7. air_control_accel:
Expression: 1.5 * square, where square = factor * factor
Calculation: 1.5 * 0.25 = 0.375
Result: air_control_accel 0.375
8. air_friction:
Expression: 0.95 ** factor
Calculation: 0.95 ** 0.5 ≈ 0.975
Result: air_friction 0.975
9. hook_drag_accel:
Expression: 3.0 * square, where square = factor * factor
Calculation: 3.0 * 0.25 = 0.750
Result: hook_drag_accel 0.750
10. hook_drag_speed:
Expression: 15.0 * factor
Calculation: 15.0 * 0.5 = 7.500
Result: hook_drag_speed 7.500
11. gravity:
Expression: 0.5 * square, where square = factor * factor
Calculation: 0.5 * 0.25 = 0.125
Result: gravity 0.125
12. velramp_start:
Expression: 550 * factor
Calculation: 550 * 0.5 = 275.000
Result: velramp_start 275.000
13. velramp_range:
Expression: 2000 * factor
Calculation: 2000 * 0.5 = 1000.000
Result: velramp_range 1000.000
bind mouse1 +toggle cl_dummy_hammer 1 0
and turn on copy