Razor: steal movement speed instead of dealing damage - #14
Open
Razavik wants to merge 24 commits into
Open
Conversation
…-based rush/slow pulses)" This reverts commit a4ebb6b.
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.
…, drop steal-interrupt speed penalty
…-frame velocity loss, not proximity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
interrupts channeling
maxspeed directly (Blink's sprint/dash) don't get stomped by the
PowerSpeed decay tick every 0.5s
instead of duplicated per knife, so other knives can reuse it safely