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>
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.
- 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.