Update ray trace masks and beam cleanup
#### General - **Updated markdown** files. - Switched from `RayTrace.WorldOnlyMask` to CounterStrikeSharp's built-in `Masks.SolidBrushOnly` mask. - Added tracking and automatic removal of beams created by traces with `drawBeam` enabled.
This commit is contained in:
parent
f88fed45b3
commit
5f21afd34d
9 changed files with 50 additions and 6 deletions
21
.github/en.md
vendored
21
.github/en.md
vendored
|
|
@ -425,6 +425,27 @@ This plugin uses content from the following projects:
|
|||
|
||||
## 📋 Changelog
|
||||
|
||||
<details>
|
||||
<summary><b>v1.2.4.b3</b></summary>
|
||||
|
||||
- #### General
|
||||
- Updated compatibility with **CounterStrikeSharp v1.0.375**.
|
||||
- **Removed RayTrace-CSS-API / RayTrace-MM** (ray tracing is now built into CounterStrikeSharp).
|
||||
- **Updated gamedata** signatures and offsets for Windows/Linux.
|
||||
- Skill distribution failures are now logged and retried.
|
||||
- Spectators without a pawn are excluded from connected-player checks.
|
||||
|
||||
- #### Skill Fixes
|
||||
- **No Recoil** - Spread and inaccuracy are now disabled server-side for accurate shots.
|
||||
- **Long Zeus** - Kills now correctly count as Zeus kills, including killfeed, sound and ragdoll effects.
|
||||
- **Long Knife** - Long-range hits now show a tracer.
|
||||
- **Fragile Bomb** - Planted bombs are detected reliably and bullet paths are checked correctly.
|
||||
- **Tripwire** - Beams are now removed correctly when the skill changes.
|
||||
|
||||
**Full update contributed by [@ByDexterTR](https://github.com/ByDexterTR) in pull request [#61](https://github.com/Juzlus/jRandomSkills/pull/61). Thanks to ByDexterTR!**
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>v1.2.4.b2</b></summary>
|
||||
|
||||
|
|
|
|||
21
.github/pl.md
vendored
21
.github/pl.md
vendored
|
|
@ -425,6 +425,27 @@ Plugin korzysta z zawartości następujących projektów:
|
|||
|
||||
## 📋 Lista Zmian
|
||||
|
||||
<details>
|
||||
<summary><b>v1.2.4.b3</b></summary>
|
||||
|
||||
- #### Ogólne
|
||||
- Zaktualizowano kompatybilność z **CounterStrikeSharp v1.0.375**.
|
||||
- **Usunięto RayTrace-CSS-API / RayTrace-MM** (ray tracing jest teraz wbudowany w CounterStrikeSharp).
|
||||
- **Zaktualizowano gamedata** - sygnatury i offsety dla Windows/Linux.
|
||||
- Obserwatorzy bez pawna nie są już uwzględniani podczas sprawdzania liczby połączonych graczy.
|
||||
- Błędy podczas przydzielania umiejętności są teraz obserwowane i ponawiane.
|
||||
|
||||
- #### Poprawki mocy
|
||||
- **Skupienie** - Rozrzut i niecelność są teraz wyłączane również po stronie serwera, zapewniając celniejsze strzały.
|
||||
- **Długi Zeus** - Zabójstwa są teraz poprawnie zaliczane jako zabójstwa z Zeusa, wraz z killfeedem, dźwiękiem i efektami ragdolla.
|
||||
- **Długi Nóż** - Trafienia z dużego dystansu pokazują teraz ślad.
|
||||
- **Krucha Bomba** - Podłożone bomby są teraz wykrywane poprawnie, a trajektoria pocisku jest prawidłowo sprawdzana.
|
||||
- **"Linka z Drutu** - Wiązki są teraz poprawnie usuwane po zmianie umiejętności.
|
||||
|
||||
**Pełna aktualizacja została przygotowana przez [@ByDexterTR](https://github.com/ByDexterTR) w ramach pull requesta [#58](https://github.com/Juzlus/jRandomSkills/pull/58). Dziękujemy ByDexterTR!**
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>v1.2.4.b2</b></summary>
|
||||
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ namespace src.player
|
|||
Vector eyePos = new(pawn.AbsOrigin.X, pawn.AbsOrigin.Y, pawn.AbsOrigin.Z + pawn.ViewOffset.Z);
|
||||
Vector endPos = eyePos + SkillUtils.GetForwardVector(pawn.EyeAngles) * 80;
|
||||
|
||||
ulong mask = RayTrace.WorldOnlyMask | (ulong)(Contents.Player | Contents.Npc);
|
||||
ulong mask = (ulong)Masks.SolidBrushOnly | (ulong)(Contents.Player | Contents.Npc);
|
||||
ulong contents = 0;
|
||||
var result = RayTrace.TraceShape(player, eyePos, endPos, mask, contents);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace src.player.skills
|
|||
private static readonly List<Flight> flights = [];
|
||||
private static readonly object flightLock = new();
|
||||
private static readonly Color tracerColor = Color.FromArgb(170, 255, 226, 140);
|
||||
private static readonly ulong worldOnlyMask = RayTrace.WorldOnlyMask;
|
||||
private static readonly ulong worldOnlyMask = (ulong)Masks.SolidBrushOnly;
|
||||
|
||||
public static void LoadSkill()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ namespace src.player.skills
|
|||
Vector rightDir = SkillUtils.GetForwardVector(new QAngle(0, yaw - 90, 0));
|
||||
Vector leftDir = SkillUtils.GetForwardVector(new QAngle(0, yaw + 90, 0));
|
||||
|
||||
ulong wallMask = RayTrace.WorldOnlyMask;
|
||||
ulong wallMask = (ulong)Masks.SolidBrushOnly;
|
||||
|
||||
var rightHit = RayTrace.TraceShape(player, origin, origin + rightDir * maxDistance, wallMask, 0);
|
||||
var leftHit = RayTrace.TraceShape(player, origin, origin + leftDir * maxDistance, wallMask, 0);
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ namespace src.utils
|
|||
DestroyAllTracked();
|
||||
}
|
||||
|
||||
private static void ScheduleAutoDestroy(uint entityIndex, float? seconds)
|
||||
public static void ScheduleAutoDestroy(uint entityIndex, float? seconds)
|
||||
{
|
||||
if (seconds is not > 0) return;
|
||||
Instance?.AddTimer(seconds.Value, () => DestroyEntity(entityIndex), CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ namespace src.utils
|
|||
{
|
||||
public static class RayTrace
|
||||
{
|
||||
public const ulong WorldOnlyMask = (ulong)(Contents.Solid | Contents.Window | Contents.PassBullets);
|
||||
|
||||
private static bool traceFailureLogged;
|
||||
|
||||
|
|
@ -208,6 +207,9 @@ namespace src.utils
|
|||
beam.EndPos.Z = end.Z;
|
||||
|
||||
beam.DispatchSpawn();
|
||||
|
||||
EntityManager.RegisterEntity(beam.Index, int.MaxValue, "beam");
|
||||
EntityManager.ScheduleAutoDestroy(beam.Index, 10);
|
||||
}
|
||||
|
||||
public static float Distance(this CustomTraceResult result)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue