Commit graph

16 commits

Author SHA1 Message Date
Tobias Thiele
a0ef6311ee 🔦 Modernize flashlight for CSS/.NET 10
Bump to CounterStrikeSharp 1.0.371 and .NET 10, replace per-tick light
spawns with a parented light_barn, add plugin config, real unit tests,
and refresh CI plus docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 07:26:30 +02:00
Vesper
081278a8ae fix(ci): allow release updates and fix step name
- Add allowUpdates: true to fix 'tag_name already exists' error
- Rename 'GunGameLite' step to 'Create Release' (copy-paste artifact)
2026-03-01 09:02:22 +00:00
Vesper
1b54187c0f
Merge PR #7: Fix entity validity check - fixes #2
Add IsValid checks before Remove() to prevent crashes when players switch teams

- Check entity validity in ToggleFlashlight()
- Check entity validity in OnPlayerDisconnect()
- Add OnPlayerTeam handler for team switch cleanup
- Bump version to 0.0.7
2026-02-28 22:21:24 +00:00
Vesper
57e502fbf6 fix: Entity validity check before Remove() - fixes #2
Add IsValid checks before calling Remove() on flashlight entities to prevent
InvalidOperationException when players switch teams.

Changes:
- Add validity check in ToggleFlashlight() before entity.Remove()
- Add validity check in OnPlayerDisconnect() before flashlight.Remove()
- Add OnPlayerTeam event handler to clean up flashlight on team switch
- Bump version to 0.0.7

This prevents the 'Entity is not valid' crash reported in Issue #2 when
players switch teams and their entities become invalid.
2026-02-28 22:21:00 +00:00
Vesper
806a3a9156
Merge PR #6: Update to latest CS2/CSS API and .NET 8.0
- Update to .NET 8.0 and CounterStrikeSharp.API v1.0.363
- Fix EyeAngles -> V_angle for Issue #5
- Fix closure capture bug in timer callbacks
- Add xUnit test project
- Update documentation
2026-02-28 22:17:58 +00:00
Vesper
bd2ad516f4 feat: Update to latest CS2/CSS API and .NET 8.0
- Update TargetFramework from net7.0 to net8.0
- Update CounterStrikeSharp.API from 1.0.126 to 1.0.363
- Update MinimumApiVersion from 126 to 363
- Bump ModuleVersion to 0.0.6
- FIX: Replace deprecated EyeAngles with V_angle (fixes #5)
- FIX: Fix closure capture bug in timer callbacks (race condition)
- Add null checks for player pawn data
- Add xUnit test project with core logic tests
- Update solution file to include test project
- Update README with development instructions and changelog

Workflow update will be handled separately due to GitHub token scope requirements.

This update ensures compatibility with the latest Counter-Strike 2
and CounterStrikeSharp API versions.
2026-02-28 22:16:15 +00:00
Tobias Thiele
91f7dd4f69 💡 Update module version to 0.0.5 in Flashlight.cs 2023-12-14 06:53:39 +01:00
Tobias Thiele
ea40c1a5ba 💡 ✏️ Update CounterStrikeSharp.API version to 1.0.126
- Updated the CounterStrikeSharp.API version in the Flashlight.csproj file to 1.0.126.
2023-12-14 06:53:12 +01:00
Tobias Thiele
95c459f931 Fix server crash on some systems 2023-12-13 17:57:52 +01:00
Tobias Thiele
f5a81d0b50 Update README 2023-12-13 11:16:31 +01:00
Tobias Thiele
e9908bea99 Update README 2023-12-13 11:13:36 +01:00
Tobias Thiele
e5733dab3a Update version number 2023-12-13 11:05:13 +01:00
Tobias Thiele
963229bb5d Fix /fl_toggle 2023-12-13 11:04:36 +01:00
Tobias Thiele
72cb2020e2 Fix crouching with temp solution 2023-12-13 10:32:26 +01:00
Tobias Thiele
54bd232e6a Added TODOs in README 2023-12-13 10:09:55 +01:00
Tobias Thiele
01b43dcdef 🚀 Initial commit 2023-12-13 09:46:00 +01:00