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.
This commit is contained in:
ByDexter 2026-08-16 16:33:09 +03:00
parent 5c65f4ac71
commit 0033d1e13d
29 changed files with 634 additions and 251 deletions

View file

@ -120,7 +120,9 @@ namespace src.player.skills
}
else
{
if (pilotInfo.TrailIndex != null)
PauseTrail(pilotInfo);
if (isOnGround)
ClearTrail(pilotInfo);
if (pilotInfo.Fuel <= 0)
@ -164,8 +166,13 @@ namespace src.player.skills
if (pilotInfo.TrailIndex != null)
{
var existing = Utilities.GetEntityFromIndex<CParticleSystem>((int)pilotInfo.TrailIndex.Value);
if (existing != null && existing.IsValid) return;
pilotInfo.TrailIndex = null;
if (existing != null && existing.IsValid)
{
ResumeTrail(pilotInfo);
return;
}
ClearTrail(pilotInfo);
}
if (pawn.AbsOrigin == null) return;
@ -179,6 +186,29 @@ namespace src.player.skills
particle.AcceptInput("Start");
pilotInfo.TrailIndex = particle.Index;
pilotInfo.TrailActive = true;
}
private static void ResumeTrail(Pilot_PlayerInfo pilotInfo)
{
if (pilotInfo.TrailActive || pilotInfo.TrailIndex == null) return;
var particle = Utilities.GetEntityFromIndex<CParticleSystem>((int)pilotInfo.TrailIndex.Value);
if (particle != null && particle.IsValid)
particle.AcceptInput("Start");
pilotInfo.TrailActive = true;
}
private static void PauseTrail(Pilot_PlayerInfo pilotInfo)
{
if (!pilotInfo.TrailActive || pilotInfo.TrailIndex == null) return;
var particle = Utilities.GetEntityFromIndex<CParticleSystem>((int)pilotInfo.TrailIndex.Value);
if (particle != null && particle.IsValid)
particle.AcceptInput("Stop");
pilotInfo.TrailActive = false;
}
private static void StopTrail(Pilot_PlayerInfo pilotInfo)
@ -187,6 +217,7 @@ namespace src.player.skills
uint index = pilotInfo.TrailIndex.Value;
pilotInfo.TrailIndex = null;
pilotInfo.TrailActive = false;
var particle = Utilities.GetEntityFromIndex<CParticleSystem>((int)index);
if (particle != null && particle.IsValid)
@ -252,9 +283,10 @@ namespace src.player.skills
public float LastJumpTime { get; set; } = 0;
public bool IsFlying { get; set; } = false;
public uint? TrailIndex { get; set; }
public bool TrailActive { get; set; }
}
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#1466F5", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = true, bool needsTeammates = false, string requiredPermission = "", float? hudDuration = null, float? descriptionHudDuration = null, int maxPerServer = -1, Rarity rarity = Rarity.Common, float maximumFuel = 150f, float fuelConsumption = .64f, float refuelling = .1f, string particleName = "particles/inferno_fx/incgrenade_thrown_trail.vpcf", float particleOffset = 0f) : SkillsInfo.DefaultSkillInfo(skill, active, color, onlyTeam, disableOnFreezeTime, needsTeammates, requiredPermission, hudDuration, descriptionHudDuration, maxPerServer, rarity)
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#1466F5", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = true, bool needsTeammates = false, string requiredPermission = "", float? hudDuration = null, float? descriptionHudDuration = null, int maxPerServer = -1, Rarity rarity = Rarity.Common, float maximumFuel = 150f, float fuelConsumption = .64f, float refuelling = .1f, string particleName = "particles/inferno_fx/incgrenade_thrown_trail.vpcf", float particleOffset = 10f) : SkillsInfo.DefaultSkillInfo(skill, active, color, onlyTeam, disableOnFreezeTime, needsTeammates, requiredPermission, hudDuration, descriptionHudDuration, maxPerServer, rarity)
{
public string ParticleName { get; set; } = particleName;
public float ParticleOffset { get; set; } = particleOffset;