Commit graph

101 commits

Author SHA1 Message Date
e94235f31b chore: build no longer writes "jRandomSkills - Server Files"
Drop the csproj Copy* targets and the directory's .gitignore entry. release.sh now assembles a
single tarball laid out like game/csgo/ (plugin, gamedata, compiled Panorama layouts) straight from
the build output and sources; updater.json points at it.
2026-09-24 21:44:32 +01:00
09437a275a chore: stop tracking build output, ship it as a release instead
"jRandomSkills - Server Files" is now gitignored build output; releases carry the built plugin.
The GeoLite2 country database moves to "jRandomSkills - SRC Files/packages" and a new
CopyPackagesToServer target copies it into the build output. The shipped configs are dropped:
the plugin writes config.json and skillsInfo.json itself when they are missing.
2026-09-24 21:41:09 +01:00
7810c6e302 chore: version 1.2.4.b2-panorama1, drop WASDMenuAPI project
- ModuleVersion 1.2.4.b2-panorama1; the startup version check and its download link now use
  git.zio.sh/cs2/jRandomSkills releases instead of upstream's GitHub
- updater.json lists the release
- Remove the unused WASDMenuAPI project from the solution and repo, and its README credit
2026-09-24 21:37:07 +01:00
793370a55f feat: Panorama skill HUD and menu, CSS 1.0.375
- Skill card and W/S/E target menu drawn as CCSCustomHudLayout panels via PanoramaManager
  (panorama/ sources), replacing PrintToCenterHtml and WASDMenuAPI; WASDMenuAPI.dll dropped
- Custom status lines (cooldowns, charges) overwrite the description on the card; Medic keeps its
  description with the charge count below
- css_setoverride toggles a per-player cooldown bypass
- YourSkillChatInfo also gates the round-start skill description in chat
- Language: "[css_useSkill]" becomes the configured button name, "Press ... key" wording,
  welcome message trimmed to its first line
- Build against CounterStrikeSharp.API 1.0.375
2026-09-24 21:28:37 +01:00
Juzlus
c58bff7150 Update readme & Rework NoRecoil 2026-09-17 22:54:05 +02:00
ByDexter
dfa68db18b v1.2.4.b2
# v1.2.4.b2

#### Crashes
* **Ninja, Ghost, C4 Camouflage** - a client could crash with `CopyExistingEntity: missing client entity` when a hidden player died nearby. Hidden players are now revealed in the `player_death` pre-hook, inside the same tick as the death, so the client always holds the entity. Cleanup previously ran on a 2-tick timer and left a gap.

#### Skills
* **Falcon Eye** - weapons stayed locked into the next round if the camera was active when the round ended. Restoring the default view no longer depends on the camera entity still existing.
* **Jump Ban** - the target could still jump. Upward velocity is now zeroed on the jump input, the downward pull was raised, and the block lasts longer.
* **Jump Ban** - the "you can jump again" message never arrived. It was gated behind a freeze-time check that is always true when skills are cleared.
* **Blast Shot** - grenades could be thrown during freeze time.
* **Sound Maker** - phantom screams came from world origin `0 0 0`, and the sound was sent to the emitter's own team. Only living enemies now receive it.
* **Careful Bullets, Darkness, Deaf, Expensive Ammo, Giant, Glitch, Jammer, Jet Kick, Jump Curse, Magnifier, Nightmare, Poison, Primary Ban, Wild Throw** - the message telling the target the effect had ended never arrived, for the same freeze-time reason.

#### Freeze time
* **DisableOnFreezeTime** - the setting only applied to actively triggered skills; passive damage handlers ignored it entirely. Cypher, Exploding Barrel, Explosive Shot, Fortnite, Iana, Illusionist and Replicator now honour it.

#### Reliability
* **Skill distribution** - a round could start with nobody receiving a skill. A permission lookup for a player who was disconnecting threw and aborted the whole selection loop; those lookups are now isolated, and a failure on one player no longer stops the rest.
* **Skill distribution** - if a round still ends with no skills assigned while players are connected, distribution retries up to 6 times at 0.5s intervals and writes the reason to the debug log.
2026-09-17 10:20:16 +03:00
ByDexter
a1d76f94d7 v1.2.4.b1 2026-09-04 16:50:10 +03:00
ByDexter
332210f58b v1.2.4.b1 2026-09-04 01:16:34 +03:00
ByDexter
273aa0ff59 v1.2.4.b1 2026-09-03 21:47:53 +03:00
ByDexter
12d04191f3 v1.2.4.b1 2026-09-02 01:44:59 +03:00
ByDexter
dcf4020981 v1.2.4.b1 2026-09-01 15:37:13 +03:00
ByDexter
a62ec611ca v1.2.3.b9
- #### Fixes
    - **Pyro** - Fire damage killed the holder at low health. The regeneration now runs before the damage is applied instead of after.
    - **Iana** - The clone did not absorb a lethal hit, same cause as Pyro.
    - **Dracula** - Lifesteal used the raw damage, so an AWP headshot healed for 400. It is now capped to the health the victim actually had, works on the killing blow, and can no longer leave the attacker alive at 0 HP.
    - **RobinHood** - Stolen money used the raw damage and a hardcoded 16000 cap. It is now capped to the victim's real health, works on the killing blow, and respects `mp_maxmoney`. The victim loses exactly what the attacker gains.
    - **Voodoo** - Reflected damage used the raw damage, now capped to the victim's real health.
    - **Config** - The `Rifle`, `Pistol` and `Grenade` weapon pools grew every time the config was loaded, so removed weapons came back on the next start.
    - **Use button** - Skills no longer trigger when a CT presses `Use` while looking at a planted C4, so the skill key no longer competes with the defuse key.

- #### Other
    - Built against CounterStrikeSharp 1.0.373.
2026-08-27 01:23:50 +03:00
ByDexter
68d311e130 v1.2.3.b8 - fix: perf percentiles and duplicate entity log lines
- #### Debug
    - **PerfLog** - `p50`, `p95` and `p99` returned the upper bound of the histogram bucket instead of a real sample, so they could report a value higher than `max`. It happened in 74% of the windows in a 6.5 hour session (e.g. `avg=0.06ms p99=8.00ms max=4.68ms`). Percentiles are now taken from the actual samples of the window, and the bucket estimate is only used as a fallback for windows that overflow the buffer - interpolated inside the bucket and clamped to `max`.
    - **EntityManager** - An entity that was already tracked logged a second `+` line, so creates and destroys stopped matching and the entity log read like a leak. Re-registering now logs `~ oldType -> newType` when the type changes and nothing when it does not.
    - **Ghost, Ninja, C4Camouflage** - The hiding prop was registered twice, first as `prop_dynamic` and then as `empty_prop`. It is now tracked under the right name from creation through the new `trackAs` parameter of `CreateTrackedDynamicProp`.
2026-08-21 17:24:26 +03:00
ByDexter
b95c52028e v1.2.3.b8 - fix: startup crash with PerfMode/DebugMode enabled
- #### Fixes
    - **Startup crash** - Servers with `PerfMode` or `DebugMode` enabled crashed during boot at the first skill. `PerfLog.Sample` called `IsServerIdle()` on every `SkillAction`, which scanned the player list while the server was still booting. Our own regression, introduced with the idle-logging gate in b8.
    - **PlayerManager** - Added a `serverActive` flag set on map start; `IsServerIdle`, `GetTickPlayers` and `GetTickBomb` no longer touch the game before the map is up.
    - **Commands** - `zmienmape` and one Chinese alias were listed twice, registering the same command name natively two times. Cleaned up the defaults and added a duplicate guard so user configs are covered too.

- #### Chat
    - **Skill announcement** - Teammate skills are now shown first and your own skill description last, so it stays at the bottom of the chat instead of scrolling away.
    - **SetRandomSkill** - No longer leaves the chat box unclosed when the player has teammates.
2026-08-21 10:34:22 +03:00
ByDexter
11f51b596c mp_autokick 2026-08-20 18:34:10 +03:00
ByDexter
d016d42780 v1.2.3.b8
- #### Shared Systems
    - **PlayerManager.FillSkillHolders** - Skill holders are resolved from the player index instead of scanning every controller each tick, replacing the per-skill full player loop used by ten skills.
    - **PlayerManager.GetControllerByPawn** - Tick-cached pawn to controller map, replacing the linear observer-target scan.
    - **PlayerManager.IsServerIdle** - Tick-cached idle check shared by the debug and perf writers.
    - **SkillUtils.IsFriendlyFireBlocked** - Now takes the skill, so the new per-skill `FriendlyFire` key and the server convars are resolved in one place. The convar-only overload remains for victim-side skills.
    - **SkillUtils.TerminateRound** - Accepts the player who ended the round and pays out the round-end money that the engine skips on plugin-terminated rounds.

- #### Performance
    - **OnTick(hud)** - Average cost down 17% against the previous build.
    - **CheckTransmit** - Average cost down 25%, peak down 39%.
    - **OnTick(skills)** - Peak cost down 62%.
    - **Host stalls** - Real freezes measured with players connected dropped from six to two across 785 rounds.
    - **DecoyRing** - Beam creation is spread across four frames instead of spawning the whole ring in one tick.
    - **Fourteen skills** - `OnTick` now returns immediately when the skill holds no state.
    - **Berserker, BladeMaster, BunnyHop, DemonEye, Flash, PawelJumper, Pilot, Poison, QuickShot, RadarHack, Regeneration** - Switched to the shared skill-holder list; config reads hoisted out of per-player loops.

- #### Fixes
    - **GravityDecoy** - Restored a hardcoded gravity of 1.0 when leaving the field, permanently breaking Astronaut. Each pawn's own scale is now captured and restored.
    - **PsychicDefusing** - The bomb location stayed unset when the skill was assigned after the plant, the stored position pointed into the entity and dangled once the bomb was killed, and setup was silently skipped when the pawn was not ready.
    - **PsychicDefusing, FragileBomb** - Winning teams were paid nothing when the plugin ended the round. Winners are now paid from the matching `cash_*` convars, with the defuser bonus on top.
    - **ToxicSmoke, HealingSmoke** - Smoke kept damaging and healing after its owner lost the skill, and expiry left behind smokes whose owner had already lost it. HealingSmoke never tracked an owner at all.
    - **EmpGrenade** - Crosshair and radar stayed jammed forever, because `OnTick` stops being dispatched once nobody holds the skill and the jam timer never expired.
    - **ThrowingKnife** - Losing the skill while the knife was thrown destroyed it without giving one back.
    - **OnlyHead, ReactiveArmor** - Both ignored fall and world damage, which has no player attacker.
    - **Gambler** - Refreshing consumed the one-shot instead of rolling two new skills, and the refresh row lost its colour prefix to the text-direction wrapper.
    - **Berserker, Flash** - The falling-speed clamp fired while noclipping.
    - **ExplodingBarrel** - The prop spawned without a model and received it a frame later; the model is now passed through `CEntityKeyValues` at spawn.
    - **FastReload** - Now has a cooldown, five seconds by default, with a HUD countdown. The cooldown only starts when a magazine is actually refilled.
    - **Config** - Missing-key migration now descends into nested sections, so keys under `HtmlHudCustomisation` are detected.

- #### Damage Hook
    - **OnEntityTakeDamagePre / OnEntityTakeDamagePost** - Replaced the deprecated `CBaseEntity_TakeDamageOldFunc` hook across 27 files.
    - **Teammate damage** - The new hook runs before the engine zeroes friendly fire, so attacker-side modifiers need explicit guards. Added to OneShot, Cutter, Assassin, Soldier, Berserker, Nemesis and Punisher.
    - **FriendlyFire** - New per-skill key on twelve skills, defaulting to `true`. Setting it to `false` stops teammates being affected, the way LongKnife and KillerFlash already allow. Covers both the damage amplifiers and the explosives that previously only reduced teammate damage.

- #### Menu
    - **WSADMenuVisibleItems** - New setting replacing the hardcoded three visible menu rows, clamped between one and ten.
    - **WSAD menu** - The final menu row keeps its `#RRGGBB` colour prefix instead of losing it to the text-direction wrapper.

- #### Config Migration
    - **skillsInfo.json** - Missing keys are written back to the file on load instead of only being defaulted in memory. Existing values are preserved.
    - **playersLanguage.json** - Now grouped by language instead of one row per player, which cuts a ten thousand player file by 20%. Old files are converted on load and invalid SteamIDs are dropped.

- #### Debug
    - **Perf samples** - Report `p50`, `p95` and `p99` alongside the average and maximum.
    - **Per-skill sampling** - Every skill is now sampled, instead of only logging the calls that exceeded two milliseconds. The measurement was already running; only the reporting threshold discarded it.
    - **Load context** - Aggregate lines carry the player, alive, bot, active-skill and round counts, so sessions can be compared under different loads.
    - **ENTITIES** - Tracked entities are broken down by type.
    - **STALL** - Lines carry the tick, tracked entity count and load context, which separates map-load pauses from genuine freezes.
    - **DMGHOOK** - Reports how often the attacker and ability resolve on the damage hook.
    - **Idle server** - Nothing is written while the server sits empty, apart from lifecycle lines and player connects and disconnects.

- #### Cleanup
    - **Compiler warnings** - All twelve resolved; the build is clean.
    - **SkillUtils.SetPlayerCollisions** - Removed, its body started with an unconditional `return`.
    - **Damage hook aliases** - Dropped the `param` and `param2` locals the migration left behind across 27 files.
2026-08-20 18:23:13 +03:00
Juzlus
ef8b8e595f Update readme & Polish translations 2026-08-18 00:39:00 +02:00
ByDexter
0033d1e13d v1.2.3.b7
## Shared Systems

* **DecoyTracker** - owner-aware decoy tracking shared by FrozenDecoy, GravityDecoy and MagneticDecoy, replacing the per-skill position dictionaries.
* **DebugCategory** - new flag enum backing the numeric `DebugMode`, with automatic migration from the old boolean value.
* **SkillsInfo.GetSkillConfig** - indexed skill config lookup replacing the linear scan used by draws and HUD rendering.
* **SkillNames** - cached enum name table, removing repeated `ToString()` calls from the draw path.
* **SkillUtils.HideCarriedEntities** - shared carried-weapon resolution for C4Camouflage, Ghost and Ninja.

## Performance

* **Skill draw** - replaced the O(n²) config lookup; rounds exceeding the perf threshold dropped from 89% to 0.3%.
* **CheckTransmit** - the weapon chain is now resolved once per hidden pawn instead of once per receiver; Ghost cost down 61%.
* **Pilot** - the exhaust trail is paused and resumed instead of being destroyed and recreated on every jump release.
* **MagneticDecoy** - config reads and the pawn list are hoisted out of the per-decoy loop.
* **FrozenDecoy** - config reads are hoisted out of the per-tick loop.
* **Debug** - the damage hook is only installed when damage logging is enabled.

## Fixes

* **PsychicDefusing** - can no longer finish a defuse and award an extra round after the round has already ended.
* **Spectator** - now picks a different enemy on each activation and no longer creates an unused camera prop every time the skill is switched off.
* **Random** - replaced the shared `Random` instance with `Random.Shared`, preventing degenerate results from concurrent use.
* **Baseball** - decoys are removed when their owner dies or loses the skill.
* **FrozenDecoy, GravityDecoy, MagneticDecoy** - decoys and their ground rings are removed when the skill is taken away.
* **ThirdEye** - fixed the camera check dereferencing a missing `CameraServices`, and the door toggle now verifies the entity class before casting.
* **Round start** - fixed `[gamerules unavailable]` appearing on the first freeze-time end after every map change.
* **Config** - added migration for keys missing from existing configuration files.

## Menu

* **WASDMenuAPI** - fixed a malformed `<font>` tag that wrapped every non-hovered menu row in an unclosed attribute.
* **WSAD menu** - the controls line is no longer dropped when the header line is hidden.
* **HtmlHudCustomisation** - line size options left empty now hide their line instead of emitting an invalid font class.

## Debug

* **DebugMode** - changed from a boolean to a number with concatenated category digits: `1` Skill, `2` Round, `3` Entity, `4` Damage. `123` enables Skill, Round and Entity. `0` disables logging. Existing `true` values migrate automatically.
* **EntityManager** - entity creation, destruction and failures are now logged under the Entity category instead of the server console.
* Startup now reports which debug categories are active.
2026-08-16 16:33:09 +03:00
Juzlus
5c65f4ac71 Add ThirdEye door toggle and decoy ring config 2026-08-10 04:18:16 +02:00
ByDexter
b2d2c5bf9a v1.2.3.b6
New skills (9)
- Bounty: put a cash price on an enemy's head, the killer collects it.
- EmpGrenade: grenade victims lose radar and crosshair for a while.
- GravityDecoy: the decoy alters gravity for everyone in its radius.
- Heavyweight: immune to push and slow effects from other skills.
- Nemesis: the marked player takes extra damage from everyone.
- Punisher: banks part of the damage you take and releases it on your next hit.
- Rewind: drop a marker and teleport back to it shortly after.
- TrueArmor: armor absorbs part of incoming damage instead of health.
- Voodoo: the marked enemy shares the damage you take.

Shared systems
- DecoyRing: reusable ground ring so decoy skills show their real area of effect. Adopted by FireRain, FrozenDecoy, GravityDecoy and MagneticDecoy.
- WeaponPool: single cached weapon classification (rifle/pistol/grenade) with a normalizing lookup, backed by the new config Weapons section. Replaces the duplicated hardcoded arrays in Assassin, Chicken, Ghost, NoNades, PrimaryBan, RandomWeapon, SniperElite and WeaponsSwap. [because of compatibility with WeaponRestrict]
- HUD suppression registry in SkillUtils: crosshair and radar hiding is now refcounted per owner, so overlapping skills (Glitch, Jammer, EmpGrenade) cannot restore each other's state early.
- SkillUtils.ResolveHiddenPawns: shared invisible-pawn resolution for C4Camouflage, Ghost and Ninja.
- Config gained a Weapons section with automatic migration for existing installs, plus a per-skill DisableOnPistolRound switch honoured by both the round draw and css_setskill.

Sound
- Volume rebalance
- Add SkillUtils.EmitSoundToPlayer with a private RecipientFilter. A null filter had been broadcasting every skill sound to all clients. Migrated 16 call sites: Poison, DemonEye, ToxicSmoke, CarefulBullets, Thorns, HotBomb, LastGasp, LongKnife, Nightmare, Jester, Tripwire, Medic, HealingSmoke, Rewind, Watchmaker.
- New effects: LongKnife knife-hit feedback (Weapon_Knife.Hit.Heavy/Light), Grapple hook impact, Fortnite barricade placement, Ricochet bounce, Nightmare cursed tone, Replicator/Illusionist spawn, PsychicDefusing defuse cue, TakeAmmo pickup, Tripwire and Jammer trigger tones.
- 29 skills gained a configurable SoundVolume, LongKnife also HitSoundVolume.
- Grapple: emit the hook impact at the hook entity instead of at the owner so the enemy team can locate it.
- PawelJumper: the engine already plays the first jump, only extra jumps emit.

Models and visuals
- Grapple: real hook model with configurable hookScale and hookEmbed so the hook sits in the surface it hit.
- Pilot: glowing exhaust trail parented to the pawn, active only while airborne.

Performance
- SkillsInfo.GetValue now resolves through a ConcurrentDictionary cache instead of reflecting on every call; invalidated on config reload.
- HUD render cache keyed on player, config, description flag and the three source lines; identical frames skip the rebuild.
- Glaz.CheckTransmit: hoist smoke index resolution out of the per-viewer loop and build the pawn-owner map lazily.
- playersSkills switched from ConcurrentBag to HashSet<Skills>, turning the NoRepeat filter from an O(n) scan into a set lookup.

Fixes
- NoRepeat could hand a player two or three skills in one round because the history bag was never deduplicated; the HashSet rewrite closes it.
- SniperElite: restore the saved weapon after the halftime team swap instead of dropping it on the pistol round.
- Illiterate: the holder alert now reaches chat and is exempt from its own scrambler via PrintToChat(ignoreIlliterate).
- EntityManager.DestroyBeam: zero out width and render colour before the kill so beams cannot linger visibly, with a next-frame Remove fallback.
- Ricochet: drop all 18 diagnostic Trace calls and the Trace helper; the skill measured stable over 48h and the tracing dominated the debug log.

Debug
- Tag round start, round end and freeze-time-end lines with [WARMUP] so warmup load is separable from live rounds.
2026-08-09 00:37:02 +03:00
Juzlus
34198e9f95 Update readme 2026-08-06 14:56:01 +02:00
ByDexter
709ed95614 v1.2.3.b5
## GENERAL
- The HUD loop now runs on the shared 16 Hz frame gate (SkillUtils.IsHudFrame) instead of keeping its own every-other-tick schedule, and fifteen skills that were refreshing their HUD on every single tick were moved onto that same gate.
- Added SkillData.GetSnapshot(), a cached array of the registered skills, so the HUD no longer copies the whole skill bag every frame. The cache is invalidated together with the existing lookup map, so a reload still picks up new skills.
- Added SkillUtils.ForceFullUpdateToAllChunked(), which spreads a full network update across frames (two clients per frame) instead of pushing one for every connected client in a single tick. The original ForceFullUpdateToAll is untouched, so the six skills that already call it keep their current behaviour.
- BlastShot, Cypher and Iana now clear their HUD line in DisableSkill, so a stale line can no longer survive the skill being taken away.

## FIXES
- SoundMaker threw a divide-by-zero on every tick when its cooldown was configured as 0, because the tick gate divides by that value. The cooldown is now clamped to at least 1.
- Regeneration and RadarHack were calling the wrong SkillsInfo.DefaultSkillInfo overload, which silently dropped disableOnFreezeTime, requiredPermission, hudDuration, descriptionHudDuration, maxPerServer and rarity. Every configured field now reaches the base class, so those two skills finally honour their own config.
- Falcon Eye blocked the trigger on the wrong side of the check: picking up a weapon while back in the normal view locked primary and secondary fire, because the pickup handler tested for the player being in their own view instead of in the skill camera.
- Spectator locked primary and secondary fire when its camera could not be created at all, which happens when no enemy is alive to spectate. The player stayed in the normal view with a weapon that would not fire until the round ended.

## SKILL IMPROVEMENTS
- Wallhack:
  -- The glow build and the full network update now start when freeze time ends and are spread across frames, instead of running in a single tick the moment the skill is handed out. On a busy server this used to cost roughly 13 ms in one frame, close to a dropped tick at 64 tick; across four grants in an eight-hour session it no longer reaches the 2 ms profiler threshold at all.
- Jackal:
  -- CheckTransmit resolves the trail relays once per frame rather than once per viewer, so the same entity lookups are no longer repeated for every client on the server.
  -- Removed an opponent list that was gathered in EnableSkill and never used.
- ThrowingKnife:
  -- CheckTransmit builds the knife glow list once per frame, and the viewer index is resolved once per client instead of once per knife.
- Glaz:
  -- The observer target is only resolved for players who do not own the skill themselves, and the lookup now bails out early when there is no observer target at all.
- RadarHack and QuickShot:
  -- The skill check runs before the validity check, so players without the skill are skipped immediately instead of being fully validated first.
- Distancer, HealingChicken and SoundMaker:
  -- These now return straight away while nobody holds the skill, rather than walking the player list every tick.

## DEBUG
- Removed the [HITGROUP] mismatch check. Every recorded case was accounted for: ten were Aimbot rewriting the hit group as designed, and thirteen were non-bullet skill damage, which reports a generic hit group by nature. Dropping the check also removes a dictionary write from every damage event.
- Removed the identity-split tag from the damage log. It was dead by construction, because the victim controller had already been routed before the comparison ran, so it could never report a difference.
- Removed the player-shoot handler, which produced no output on this build.
- [DMG] lines now print the routing fields only when the routed index actually differs from the original one, so the check remains as a tripwire without adding noise to every line.

## TRANSLATIONS
- Turkish: reworded sixty-two entries that padded their sentences with second-person verb endings, dropped the English glosses left in parentheses, and settled every [css_useSkill] line into one shape. Also fixed genuine typos in Dracula, Giant, Thorns and Impostor.
- All eight languages received the strings for the four new skills. (AI)

## NEW SKILLS:
- Chameleon: The first player you kill gives you their skill.
- Grapple Hook: Press [css_useSkill] to fire a hook at the point you are aiming at and pull yourself there.
- Inheritance: When a teammate dies you can take over their skill.
- Ricochet: Your bullets bounce off walls and can still hit enemies.
2026-08-06 04:21:39 +03:00
Juzlus
faa0f8f1d8 Guard skill header when size is unset 2026-08-03 22:56:41 +02:00
Juzlus
82d1de87d5 Update readme 2026-08-03 22:45:21 +02:00
Juzlus
ada2f4ff7b Improve illiterate text and FOV handling 2026-08-03 21:58:19 +02:00
ByDexter
db7108517a v1.2.3.b4
- Curses are now tracked at all times and cleared when a player leaves, so a curse can no longer stick to whoever joins into that player slot afterwards
- Wallhack and Nightmare no longer shows up for the whole server during the round start skill reveal
- One skill throwing during round cleanup no longer cancels the rest of the cleanup or leaves entity kills suppressed for the rest of the map
- Fixed the TakeAmmo crash on map change while restoring weapon reserve ammo
- Friendly fire reduction now applies to BlastShot, DeathBomb, ExplodingBarrel, ExplosiveShot and ToxicSmoke
- FireRain molotovs now land around the decoy instead of on nearby rooftops, and the fire keeps its owner and team so friendly fire rules apply to it
- Teammates can no longer shoot the chickens spawned by HealingChicken
- Fortnite wall now spawns with its model and health set up front, so it takes the configured amount of damage instead of breaking on the first bullet
- JetKick, CarefulBullets and WildThrow now clean up after their target disconnects
2026-08-03 01:25:04 +03:00
Juzlus
20f1ba212a v1.2.3.b3 - HUD auto-hide 2026-08-02 00:09:46 +02:00
Juzlus
94ba41f8cb Update markdown & translate curse_limit_info 2026-08-01 21:23:57 +02:00
Juzlus
9857be3236 v1.2.3.b3 - HUD auto-hide
Added automatic HUD hiding to prevent conflicts with other plugins using the center HUD system.
2026-08-01 21:11:59 +02:00
Juzlus
6e2415ee98 ExplodingBarrel Radius Buff
ExplosionRadius changed from 210 to 600 for the ExplodingBarrel skill
2026-07-31 21:12:42 +02:00
Juzlus
8038a4d646 v1.2.3.b2 - Part 2
## GENERAL
- Added a css_entity admin command to check whether an entity with a given index/handle exists (prints the designer name to chat or console).
- Added a TakeDamage post-hook (OnTakeDamagePost) alongside the existing pre-hook, so skills can now react after damage has actually been applied, not just before.
- Added CreateMolotovProjectile (new CMolotovProjectile_CreateFunc signature) and CreateTrackedChicken entity helpers.
- Added a weapon_mp7 → weapon_mp5sd fallback mapping.
- Added class for KillfeedIcons

## SKILL IMPROVEMENTS
- Aimbot:
  -- Only forces a headshot hitgroup once (skips if it's already a head or an invalid hitgroup), and now restores the original hitgroup value in the new post-damage hook instead of leaving it overwritten.
- Tripwire:
  -- Reduced the default wire width from 1.5 to 0.7.

## NEW SKILLS:
- Berserker: You deal more damage and move faster as your health gets lower.
- Blast Shot: Press Attack2 with the MP5 to fire an HE grenade.
- Demon Eye: You deal damage to every enemy you are looking at.
- Fire Rain: Throw a decoy to call down a rain of Molotovs.
- Flashlight: Click [css_useSkill] to turn the flashlight on or off; its light can blind enemies.
- Healing Chicken: Your chickens heal you while you are nearby.
- Jetkick: Select a player to jetkick - every shot they fire knocks them backwards until disabled.
- Last Gasp: After you die, you deal damage to the enemy who killed you.
- Take Ammo: Click [css_useSkill] to take the active weapon's magazine from a random enemy.
- Team Teleport: Press [css_useSkill] to teleport to the teammate you're looking at.
2026-07-31 20:28:02 +02:00
ByDexter
2c8a8f77ed Fix Aimbot 2026-07-31 17:48:39 +03:00
ByDexter
a6db93d19d Update to clarify meaning in the TR lang 2026-07-31 01:43:39 +03:00
ByDexter
7292ab1787 QoE Update — 2
## Added

- **`Spectator` use cooldown** (`UseCooldown` in skillsInfo.json, default 0.5s) — every press destroyed and recreated the camera prop, with no rate limit.
- **`SkillUtils.ClearCursesFor(playerIndex)`** — clears a leaving player's curse bookkeeping from both sides (as curser and as victim).
- **`SkillUtils.AnyCurseCapacity(player)`** — reports whether a player still has  any enemy left that is under the curse limit.
- **`Spectator.PlayerDisconnect`** handler.
- **`Thief`** added to the curse skill set.

## Changed

- **`CurseSkillPerPlayer` is ignored in GameMode 1 (TeamSkills), 2 (SameSkills) and 5 (Debug).**
- **Curse target menus no longer go empty.** When every living enemy is already at the limit, the menu falls back to the unfiltered list and the claim is forced through.
- `C4Camouflage` `MaxPerServer` -1 -> 1
2026-07-31 01:38:50 +03:00
ByDexter
b0b50a224f QoE Update
## Added

- **`CurseSkillPerPlayer`** (config.json) — limits how many curse skills (Darkness, JumpBan, PrimaryBan, Bankrupt and 14 others) can be stacked on a single player per round. `null` = unlimited (default), `1` = one curse per player, `2` = two. When the limit is reached the target is rejected and the curser gets a chat warning. Enforced centrally in `SkillAction`, so no per-skill code is needed.
- **Tripwire cooldown mode** — replaces the fixed wire limit with a Replicator-style cooldown. Players can place as many wires as they want as long as the cooldown is up; remaining time is shown on the HUD. Configurable via `Cooldown` in skillsInfo.json (default 20s).
- **Tripwire team colors** — T wires red (255, 64, 64), CT wires blue (64, 128, 255).

## Fixed

- **ExpensiveAmmo** also charged money for knife swings and grenade throws. It now only charges when a bullet-firing weapon is fired.
- **Knockback** also triggered on grenade throws; bound to the same allowlist.

## Removed

- Dead code: `Earthquake.cs` and `HealingChicken.cs` (neither was registered in the `Skills` enum, so neither ever ran), `EntityManager.CreateTrackedEnvShake`, `EntityManager.CreateTrackedChicken`, `PlayerManager.UpdatePlayerSkill`.

## Changed

- **Tripwire wires are now removed when the owner dies or loses the skill.** Previously they stayed on the map until the end of the round.
- `PlayerEvents.cs` split into three partial files: player events in `PlayerEvents.cs`, round and skill dispatch in `RoundEvents.cs`, entity and weapon hooks in `EntityEvents.cs`. Behaviour is unchanged; all members stay in the same `Event` class.
- 28 copy-pasted enemy-gathering LINQ chains reduced to the shared helper (Bankrupt, CarefulBullets, Darkness, Deactivator, Deaf, ExpensiveAmmo, Giant, Glitch, Jammer, JumpBan, JumpCurse, LifeSwap, Magnifier, MoneySwap, Nightmare, Poison, PrimaryBan, WildThrow).
2026-07-30 20:52:07 +03:00
ByDexter
98f6e65b01 1.2.3.b2 2026-07-30 01:15:32 +03:00
ByDexter
0e86f54e0a v1.2.3.b1
Revive skills (Second Chance / Phoenix / Re-Zombie) — unified "on death" logic:
- Intercept the lethal hit before it is applied. Previously they reacted after the death was already committed, so one-shots, fall damage and skill-based kills were missed (Phoenix and Re-Zombie were rewritten from a post-death handler to pre-damage interception).

Killer Flash:
- Kills through real damage instead of forcing a suicide, so revive skills can intercept.

Baseball:
- Fixed a rare server crash from decoy grenades: a freed decoy's entity index could be reused by another entity and written to (use-after-free). Decoy tracking is now validated per tick (DesignerName gate) and cleared every round.

Native crash hardening:
- Aimbot: guard the hit-group native pointer before writing (avoids writing to freed/null memory).
- Wallhack: detach the glow when the target dies or disconnects (stale FollowEntity on a freed pawn).
- Spectator / Cypher / FalconEye / ThirdEye: null-guard the camera SceneNode walk and re-validate the target before teleport/parent (cross-frame freed-entity deref).
- CServerSideClient.ForceFullUpdate now bails on a null client handle.

Performance:
- Added a per-tick player/bomb cache (PlayerManager.GetTickPlayers / GetTickBomb).
- Migrated 82 skills from per-skill Utilities.GetPlayers() to the one shared per-tick scan, and the HUD loop reuses it. Much lower per-tick cost at high player counts (verified 10v10).

RayTrace:
- Prints a single notice when the module is not installed; dependent skills (Long Zeus, Long Knife, Iana, Cypher, Noclip, Shade + the skill-use aim check) no-op instead of failing silently (#43).
2026-07-26 17:49:36 +03:00
Juzlus
1f4aae0204 Update readme and ModuleVersion to v1.2.2.b9 2026-07-23 01:59:01 +02:00
ByDexter
21e702654d Fix leaked skill state, second chance revives, and unrestored server cvars
General:
- Jester's no-damage state no longer applies to players who do not hold the
  skill. The shared health helper checked Jester's internal table without
  verifying the current assignment, so a single stale entry silently cancelled
  damage across every skill that deals damage through it.
- Jester's per-round reset no longer aborts when the holder is dead, which
  previously left the table populated for the following rounds.
- The per-round reset now covers every skill used on the current map instead of
  only the ones held in the round that just ended, so a skill nobody drew still
  clears state left over from an earlier round.
- Skills that track another player as a target are now notified when that player
  disconnects. Controller indexes are reused, so a leftover entry applied to
  whoever connected into that index next. Affects Poison, Deaf, Darkness,
  Glitch, Magnifier, Legless, No Rifles, Jammer and Jester.
- Aimbot no longer retains raw native pointers after a hit is handled. They were
  never cleared and were written back to later, which could corrupt memory the
  engine had already freed.
- An exception inside a skill's OnTick no longer cancels the tick of every skill
  after it in the same frame.
- Cooldowns configured low enough to truncate to zero no longer throw (Poison,
  Regeneration, Hot Bomb, Healing Smoke, Toxic Smoke).
- Round changes are cheaper: Long Knife no longer detaches a detour it never
  attached, and Wild Throw skips its player sweep when it has nothing to unwind.

Skill improvements:
- Second Chance: now survives several lethal hits landing in the same tick
  (shotgun, two attackers) and restores health inside the damage hook instead of
  a frame later. It also runs after skills that modify damage, so One-Shot and
  Soldier are seen at their final value instead of the raw one.
- Spectator: returning to your own view no longer leaves the camera handle set,
  which made the tick handler reset the weapon cooldown every frame and play as
  rapid fire. The manual toggle is unchanged.
- Radar Hack: players hidden behind a replacement model (Chicken) are shown on
  the radar again. Only Ghost, Ninja and C4 Camouflage hide the pawn itself, so
  render alpha alone no longer decides.
- Focus: weapon_accuracy_nospread is reference counted, so one holder losing the
  skill no longer removes the effect from the others still holding it.
- Friendly Fire: mp_autokick is restored at the end of the round instead of
  staying disabled for the rest of the map, and is no longer executed on every
  friendly hit.
- Reactive Armor / Iana: no longer restore health for a player who no longer
  holds the skill.
- Free Planter / Short Fuse: each restores mp_c4timer only when it actually
  changed it, so overlapping rounds cannot write back the wrong value.
- Illusionist: the replica movement timer now stops on map change.
- Ghost / Ninja / C4 Camouflage: the bomb is located once per transmit instead of
  once per receiver and hidden player, and the pass is skipped when nobody is
  hidden.
2026-07-21 19:44:13 +03:00
Juzlus
b4e70ea0a1 Add per-skill HUD duration overrides
Introduce optional `HudDuration` and `DescriptionHudDuration` fields in skill config metadata and propagate them through all skill config constructors and `skillsInfo.json`.
2026-07-13 21:38:23 +02:00
Juzlus
e490b7f3df Add optional full force client update path
- Updated markdown files.
- Added FullForceUpdate as an optional feature.
- Jester: Fixes crashes that occur when a skill is being disabled.
2026-07-13 00:28:30 +02:00
ByDexter
1dda45c977 Fix skill bugs and dying-entity transmit, add radar and bomb-timer handling 2026-07-12 16:52:57 +03:00
ByDexter
4b42670804 Remove ForceFullUpdate, rework entity lifecycle, move skill selection to round end 2026-07-12 16:52:57 +03:00
ByDexter
a5c0e3ca4b Update gamedata for latest CS2 update, bump CounterStrikeSharp to 1.0.371 2026-07-12 16:52:39 +03:00
ByDexter
380d2ca731 Warmup-safe skill assignment, PerfLog header
- Treat null GameRules as "not ready" so skills are never assigned during
  warmup right after plugin load/hot-reload (SetSkill + RoundStart)
- PerfLog writes a header line on first measurement so the perf file
  appears immediately when PerfMode is active
2026-07-06 03:30:59 +03:00
ByDexter
b68a033b4c Fix GeoLite crash, add PerfMode profiling, reload cache invalidation
- GeoLite/MaxMind lookup wrapped in try/catch and disabled for the session on failure
  (stops the per-tick exception spam when the assembly cannot load during hot-reload)
- New PerfMode config option: writes performance logs to logs/perf_<date>.txt
  (DisableAll/SetSkill/PlayerDeath totals, per-skill SkillAction timings,
  aggregated OnTick/CheckTransmit avg-max summaries)
- css_reload now invalidates the skill-info and freeze-time caches
- Removed the last null-forgiving player lookups (Command, Armored, Baseball,
  FriendlyFire, OneShot)
2026-07-06 02:50:56 +03:00
ByDexter
25cd8eb989 v1.2.2.b6
Performance & stability pass (issue #34 + audit)

General:
- DisableAll resets only skills active in the previous round instead of all loaded skills (~89ms -> ~5ms)
- Removed per-tick LINQ/allocations, O(1) HUD skill lookups, translation substitutions moved to load time
- ForceFullUpdate creates the network service once per broadcast; view-angle guard only skips a genuine (0,0,0) placeholder
- Debug hooks/logging only active when DebugMode is enabled (single reused writer)
- Player skill state unified to a single collection (fixes a rare disconnect race)
- Gamedata signatures resolved lazily/isolated; hardened tick/transmit paths against invalid handles
- Description HUD honours always-show / -1 duration consistently across all assignment paths

Skills:
- Jester: fixed the no-damage effect leaking after a mid-round skill change (Thief/Deactivator)
- Jackal: fixed trail entities accumulating over a round
- Falcon Eye / Third Eye / Spectator: camera state cleared on disable

Also: added missing translation keys as untranslated markers across language files.

Fixes #34
2026-07-05 21:48:29 +03:00
Juzlus
47985cdfef v1.2.2.b5
Fixed conflicts with the merge https://github.com/Juzlus/jRandomSkills/pull/33

- #### General:
    - ###### Fixed players' view angle snapping to look at (0, 0, 0) at round start (ForceFullUpdate was re-applying a zeroed view angle). [by: @ByDexterTR and @Juzlus].
    - ###### Stability: skills are now correctly disabled and cleaned up on attacker-less deaths (fall damage, drowning, world). [by: @ByDexterTR].
    - ###### Performance: the end-of-round skill summary now runs in a single timer instead of one per player, and skips players who disconnect during the delay. [by: @ByDexterTR].

- #### Skill improvements:
    - ###### Re-Zombie:
        - ###### Fixed the player dying instead of respawning with full zombie health. [by: @ByDexterTR].
    - ###### Jester:
        - ###### Armor no longer drains while the skill is active. [by: @ByDexterTR].
    - ###### Soundmaker / Anomaly:
        - ###### Updated the description. [by: @ByDexterTR].
2026-06-30 07:06:10 +02:00
Juzlus
42e5453fd4 v1.2.2.b4
- #### General:
    - ###### Updated the GitHub source code to implement the changes introduced in merge request (https://github.com/Juzlus/jRandomSkills/pull/32).

- #### Skill improvements:
    - ###### Ninja:
        - ###### Removed debug chat messages that were used for testing.
2026-06-29 16:10:59 +02:00
Juzlus
2ae293d1aa v1.2.2.b3
## 📋 Changelog

- #### General:
    - ###### Updated Chinese language translation by [by: [@Ericzzrbb](hhttps://github.com/Ericzzrbb)].
    - ###### Fixed a bug where a player could be given multiple skills at once while the HUD displayed only one (the player list was never cleared on map change and had no duplicate protection on join). [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Fixed skill names and descriptions showing the raw translation key on Turkish servers (culture-sensitive lowercasing) - affected skills starting with "I" (e.g. Illiterate, Impostor, InfiniteAmmo, Iana). [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### RayTrace-based skills and the skill-use button no longer throw when the RayTrace module is not installed - they now degrade gracefully instead of crashing. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Fixed the skill-use button (when bound to Use/E) blocking option selection inside WSAD target menus. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Performance: cached reflection lookups in `SkillAction` and `SkillsInfo.GetValue`, and de-duplicated the repeated event-dispatch logic on hot paths (OnTick, OnTakeDamage, etc.). [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Stability: removed dead methods that threw `NotImplementedException`, hardened team-score handling, and reset all skill state on round start / map change. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Build: post-build copy paths now follow the active `$(Configuration)` and `$(TargetFramework)`. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Added new Turkish translation strings for the skill notifications listed below. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Fixed bot-related messages so they now display correctly in the chat of the controlling player.
    - ###### When a player takes control of a bot, all active skill effects affecting that bot are now correctly transferred to the controlling player.
    - ###### Prevented bots from automatically using skills while being controlled by a player.

- #### Skill improvements:
    - ###### Wallhack:
        - ###### Fixed enemy outlines briefly flashing for everyone when the skill holder dies. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Area Reaper:
        - ###### Teammates (CT) are now notified which bombsite (A/B) was sealed. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Wild Throw:
        - ###### Now notifies the targeted player, consistent with other targeted skills. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Careful Bullets / Darkness / Deaf / Glitch / Jammer / Jump Ban / Magnifier / Poison / Primary Ban / Wild Throw:
        - ###### The targeted player is now notified when the effect ends after the skill holder dies. [by: [@ByDexterTR](https://github.com/ByDexterTR)]
    - ###### Careful Bullets:
        - ###### Added damage-taken sound effects when missing a shot
    - ###### C4 Camouflage / Ninja:
        - ###### Fixed a bug where dying with invisibility active and taking control of a bot would grant invisibility to the bot as well.
    - ###### Poison:
        - ###### Added damage-taken sound effects.
    - ###### Primary Ban:
        - ###### Changed mechanic to directly block shooting weapons instead of forcing a weapon switch to the knife.
    - ###### Hot Bomb:
        - ###### Replaced the bomb-burning sound effects.
        - ###### Added a notification when the burning effect ends and the bomb returns to its normal color.
2026-06-29 06:12:53 +02:00