Commit graph

172 commits

Author SHA1 Message Date
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
7b142cf933 Merge branch 'main' of https://github.com/Juzlus/jRandomSkills 2026-07-31 21:12:45 +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
github-actions[bot]
fb6dfcb5ef chore: update contributors and thanks 2026-07-31 18:36:13 +00:00
Juzlus
a56793c664 Merge branch 'main' of https://github.com/Juzlus/jRandomSkills 2026-07-31 20:35:17 +02:00
Juzlus
ade49a1963 Update readme 2026-07-31 20:35:08 +02:00
github-actions[bot]
ad1e912956 chore: update contributors and thanks 2026-07-31 18:29:10 +00: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
Juzlus
203a0c3986
Merge pull request #45 from ByDexterTR/main
v1.2.3.b2 - Part 1
2026-07-31 20:00:38 +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
github-actions[bot]
de1db9fe5a chore: update contributors and thanks 2026-07-26 23:13:35 +00:00
Juzlus
66094bfcee Update readme 2026-07-27 01:12:46 +02:00
github-actions[bot]
cab5a07723 chore: update contributors and thanks 2026-07-26 23:09:12 +00:00
Juzlus
c287846602 Merge branch 'main' of https://github.com/Juzlus/jRandomSkills 2026-07-27 01:05:28 +02:00
Juzlus
07951e12e8 Update readme 2026-07-27 01:05:20 +02:00
github-actions[bot]
22aa67d9f5 chore: update contributors and thanks 2026-07-26 23:04:51 +00:00
Juzlus
437c02194a update readme 2026-07-27 01:03:42 +02:00
Juzlus
c0949dffdc
Merge pull request #44 from ByDexterTR/main
v1.2.3.b1
2026-07-27 00:49:08 +02: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
github-actions[bot]
c7ee500957 chore: update contributors and thanks 2026-07-22 23:59:36 +00:00
Juzlus
1f4aae0204 Update readme and ModuleVersion to v1.2.2.b9 2026-07-23 01:59:01 +02:00
Juzlus
5fc3e8db66
Merge pull request #41 from ByDexterTR/fix/skill-state-leaks
1.2.2.b9
2026-07-22 23:18:42 +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
92175f6949
Update updater.json 2026-07-14 22:05:14 +02:00
Juzlus
571c68e25b
Create updater.json 2026-07-14 22:01:02 +02:00
github-actions[bot]
0c8efd1ec4 chore: update contributors and thanks 2026-07-13 23:10:23 +00:00
Juzlus
6551020774 Update markdown 2026-07-14 01:08:33 +02: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
github-actions[bot]
03bbe6ca98 chore: update contributors and thanks 2026-07-12 22:43:36 +00: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
Juzlus
559e7be23f
Merge pull request #38 from ByDexterTR/main
v1.2.2.b7
2026-07-13 00:25:05 +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
Juzlus
0bfc31c059 Update readme files 2026-07-07 01:45:02 +02:00
Juzlus
b480247348
Merge pull request #35 from ByDexterTR/main
v1.2.2.b6
2026-07-07 01:01:45 +02: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
github-actions[bot]
a0f37ba1a1 chore: update contributors and thanks 2026-06-30 05:31:05 +00: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
f97911d67c Update update_thanks.yml 2026-06-29 18:28:51 +02:00
github-actions[bot]
a2aeabdfae chore: update contributors and thanks 2026-06-29 14:11:59 +00: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
github-actions[bot]
36bd85ef06 chore: update contributors and thanks 2026-06-29 04:20:43 +00:00