v1.2.3.b8 - fix: perf percentiles and duplicate entity log lines
- #### Debug
- **PerfLog** - `p50`, `p95` and `p99` returned the upper bound of the histogram bucket instead of a real sample, so they could report a value higher than `max`. It happened in 74% of the windows in a 6.5 hour session (e.g. `avg=0.06ms p99=8.00ms max=4.68ms`). Percentiles are now taken from the actual samples of the window, and the bucket estimate is only used as a fallback for windows that overflow the buffer - interpolated inside the bucket and clamped to `max`.
- **EntityManager** - An entity that was already tracked logged a second `+` line, so creates and destroys stopped matching and the entity log read like a leak. Re-registering now logs `~ oldType -> newType` when the type changes and nothing when it does not.
- **Ghost, Ninja, C4Camouflage** - The hiding prop was registered twice, first as `prop_dynamic` and then as `empty_prop`. It is now tracked under the right name from creation through the new `trackAs` parameter of `CreateTrackedDynamicProp`.
This commit is contained in:
parent
b95c52028e
commit
68d311e130
8 changed files with 59 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
|
@ -170,7 +170,7 @@ namespace src.player.skills
|
|||
{
|
||||
if (player == null || !player.IsValid) return;
|
||||
|
||||
var emptyProp = EntityManager.CreateTrackedDynamicProp(player.Index);
|
||||
var emptyProp = EntityManager.CreateTrackedDynamicProp(player.Index, trackAs: "empty_prop");
|
||||
if (emptyProp == null || !emptyProp.IsValid) return;
|
||||
|
||||
var playerPawn = player.PlayerPawn?.Value;
|
||||
|
|
@ -188,7 +188,6 @@ namespace src.player.skills
|
|||
|
||||
Utilities.SetStateChanged(emptyProp, "CBaseEntity", "m_CBodyComponent");
|
||||
|
||||
EntityManager.RegisterExisting(emptyProp, player.Index, "empty_prop");
|
||||
}
|
||||
|
||||
public static void PlayerHurt(EventPlayerHurt @event)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
|
@ -114,7 +114,7 @@ namespace src.player.skills
|
|||
{
|
||||
if (player == null || !player.IsValid) return;
|
||||
|
||||
var emptyProp = EntityManager.CreateTrackedDynamicProp(player.Index);
|
||||
var emptyProp = EntityManager.CreateTrackedDynamicProp(player.Index, trackAs: "empty_prop");
|
||||
if (emptyProp == null || !emptyProp.IsValid) return;
|
||||
|
||||
var playerPawn = player.PlayerPawn?.Value;
|
||||
|
|
@ -132,7 +132,6 @@ namespace src.player.skills
|
|||
|
||||
Utilities.SetStateChanged(emptyProp, "CBaseEntity", "m_CBodyComponent");
|
||||
|
||||
EntityManager.RegisterExisting(emptyProp, player.Index, "empty_prop");
|
||||
}
|
||||
|
||||
public static void DisableSkill(CCSPlayerController player)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
|
@ -143,7 +143,7 @@ namespace src.player.skills
|
|||
{
|
||||
if (player == null || !player.IsValid) return;
|
||||
|
||||
var emptyProp = EntityManager.CreateTrackedDynamicProp(player.Index);
|
||||
var emptyProp = EntityManager.CreateTrackedDynamicProp(player.Index, trackAs: "empty_prop");
|
||||
if (emptyProp == null || !emptyProp.IsValid) return;
|
||||
|
||||
var playerPawn = player.PlayerPawn?.Value;
|
||||
|
|
@ -161,7 +161,6 @@ namespace src.player.skills
|
|||
|
||||
Utilities.SetStateChanged(emptyProp, "CBaseEntity", "m_CBodyComponent");
|
||||
|
||||
EntityManager.RegisterExisting(emptyProp, player.Index, "empty_prop");
|
||||
}
|
||||
|
||||
private static void UpdateNinja(CCSPlayerController? player)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue