clean up debugging outputs
This commit is contained in:
16
README.md
16
README.md
@@ -97,19 +97,23 @@ It demonstrates:
|
||||
- Coloring dropped AK-47s red for Terrorist viewers.
|
||||
- Coloring dropped M4A1-S blue for CT viewers.
|
||||
|
||||
Concealed-carry handle spoof:
|
||||
Concealed-carry weapon-list spoof:
|
||||
|
||||
```text
|
||||
examples/CounterStrikeSharp/SendProxyConcealedCarry/
|
||||
```
|
||||
|
||||
It hides owned primary weapons, secondary weapons, and grenades from every recipient except the owning player by spoofing weapon-related handles to `0xffffffff`:
|
||||
It hides a player's non-active carried weapons from every recipient except the owning player by spoofing the player/weapon association:
|
||||
|
||||
- `CBasePlayerPawn::m_pWeaponServices.m_hActiveWeapon`
|
||||
- `CBasePlayerPawn::m_pWeaponServices.m_hLastWeapon`
|
||||
- `CBaseEntity::m_hOwnerEntity` on carried weapon entities
|
||||
- `CBasePlayerPawn::m_pWeaponServices.m_hMyWeapons`
|
||||
- source handle: `CBasePlayerPawn::m_pWeaponServices.m_hActiveWeapon`
|
||||
- `CBaseEntity::m_hOwnerEntity = INVALID_EHANDLE` on non-active carried weapon entities
|
||||
- `CBaseEntity::m_CBodyComponent.m_pSceneNode.m_hParent = INVALID_EHANDLE`
|
||||
- `CBaseEntity::m_CBodyComponent.m_pSceneNode.m_hierarchyAttachName = 0`
|
||||
- `CCSWeaponBase::m_hPrevOwner = INVALID_EHANDLE`
|
||||
- `CBaseCSGrenade::m_bIsHeldByPlayer = false` for non-active grenades
|
||||
|
||||
It intentionally does not set `EF_NODRAW` and does not remove or drop the real weapons.
|
||||
This corresponds to CounterStrikeSharp's `player.PlayerPawn.Value.WeaponServices?.MyWeapons`, plus the weapon entity relationship fields that attach carried weapons to the owning pawn. During packing for non-owner recipients, native code temporarily masks non-active `m_hMyWeapons` elements to `INVALID_EHANDLE`; the CSS sample also spoofs non-active carried weapon entities as detached/unowned. It intentionally does not set `EF_NODRAW`, use render mode tricks, or remove/drop the real weapons.
|
||||
|
||||
This sample periodically reconciles desired rules and diffs them against active rule IDs. For production, prefer event-driven updates on player connect/disconnect/team changes/spawn/death and weapon pickup/drop/create/delete.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user