Skip to content

Razor: steal movement speed instead of dealing damage - #14

Open
Razavik wants to merge 24 commits into
Next21Team:razor-knife-reworkfrom
Razavik:feature/razor-speed-rework
Open

Razor: steal movement speed instead of dealing damage#14
Razavik wants to merge 24 commits into
Next21Team:razor-knife-reworkfrom
Razavik:feature/razor-speed-rework

Conversation

@Razavik

@Razavik Razavik commented Aug 12, 2026

Copy link
Copy Markdown

Adds a dedicated PlrPowerSpeed core stat (mirroring PlrPowerDamage) so
Razor's speed steal has its own decay, HUD line and natives instead of
overloading the damage stat.

  • Sphere (E) now deals 0 real damage but still triggers pain shock and
    interrupts channeling
  • Introduces a PLGF_IN_SPEED_OVERRIDE core flag so knives that drive
    maxspeed directly (Blink's sprint/dash) don't get stomped by the
    PowerSpeed decay tick every 0.5s
  • Flag lifecycle (spawn/death/knife switch) is reset centrally in core
    instead of duplicated per knife, so other knives can reuse it safely

Claude and others added 18 commits August 11, 2026 01:47
Adds a dedicated PlrPowerSpeed core stat (mirroring PlrPowerDamage) so the
speed steal has its own decay, HUD line and natives instead of overloading
the damage stat. The sphere (E) now deals 0 real damage but still triggers
pain shock and interrupts channeling, and Power Punch (R) is blocked while
the speed pool is negative.

Also introduces a PLGF_IN_SPEED_OVERRIDE core flag so knives that drive
maxspeed directly (Blink's sprint/dash) don't get stomped by the PowerSpeed
decay tick, with the flag's lifecycle reset centrally in core (spawn, death,
knife switch) instead of duplicated per knife.
Long jump (Creepy, Leap), stomp/high jump (Spikes), and wall-run
(AcidTrap) all hard-gate on var_maxspeed >= knife SPEED. A Razor speed
theft now drops var_maxspeed below that threshold and fully disables
the ability instead of just slowing the player, same issue already
fixed for Blink's double jump.
…-zero edge case

- Blink sprint start snapshots core's own maxspeed bookkeeping instead of
  recomputing SPEED + powerspeed manually, avoiding a mismatch against
  core's MIN_PLAYER_SPEED clamp when powerspeed exactly cancels SPEED out
- Blink sprint and Creepy/Nuclear's speed rush now keep re-adding the
  live (still decaying) powerspeed for the duration of the effect instead
  of freezing it at the value from the moment it started
- A positive powerspeed gain now gets a 3s grace window before decay can
  touch it again, reset on every top-up (POWERSPEED_GAIN_GRACE)
- Force cl_forwardspeed/cl_sidespeed/cl_backspeed up on connect so sv_maxspeed
  actually has room to matter during normal WASD movement
- Razor's channel steal ratio changed from 4/5 to 5/4 (attacker/target)
Razor's own abilities still deal 0 damage - this only affects the
regular knife swing damage add-on core already applies to every knife.
player_rush() unconditionally reset the target's maxspeed bookkeeping and
called SetClientMaxspeed, regardless of whether another knife (Blink's
sprint/dash) was already driving that player's speed itself. Any rush
source (Thunder's team-buff, Creepy, Nuclear) hitting a sprinting Blink
player would desync core's bookkeeping from Blink's own tracking and
cause its next allow-sprint check to think something external happened,
silently cancelling the sprint.

Now player_rush is a no-op while PLGF_IN_SPEED_OVERRIDE is set for the
target - the knife already in control keeps it until it's done.
Raising client movement input scalers past their default is treated as
speedhacking on this server's rules regardless of intent, so don't push
these cvars automatically.
Sprint speed is always the flat SPRINT_SPEED constant now, unaffected by
powerspeed in either direction. The allow-sprint check freezes a
powerspeed snapshot at sprint start (PlrSprintPowerSpeed) instead of
re-reading a live, still-decaying value - comparing bookkeeping (also
frozen while sprint drives it) against a live value caused the check to
drift and cut sprint every 0.5s.

The comparison also now mirrors core's own MIN_PLAYER_SPEED clamp
instead of a plain subtraction, so a powerspeed steal large enough to
floor walking speed at ~0 no longer blocks sprint from starting.

Also stripped the inline explanatory comments added while working
through this feature across efk_core.sma and the knife files - the
commit history carries that context instead.
@Psycrow101
Psycrow101 changed the base branch from main to razor-knife-rework September 3, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants