Developer knowledge network · moderated exchange

Супольнасць UnreliableCode

Супольнасць распрацоўшчыкаў даследаванняў, зваротнага праектавання і кадавання

Knowledge indexжыць
4Categories
919Threads
2.8KПаведамленні
Tutorial

Spectator Observer Count Reading from m_hObserverList in Apex Legends [v2.4 Technical Discussion]

apex_glow_god
Apex Reverser
MEMBER
прадстаўнік: 128
Дата далучэння: Dec 2020
Паведамленні: 8
Дзякуй: 30
1 месяцаў таму · Jul 11, 2026 7:51 PM
#1

Reading how many players are currently spectating your camera:

CPP
int GetObserverCount(CPlayer* pLocal) {
    int count = 0;
    for (int i = 1; i <= 64; i++) {
        auto pEnt = GetEntityByIndex(i);
        if (!pEnt || pEnt->IsAlive()) continue;
        
        // Check if dead player's observer target equals local player handle
        if (pEnt->m_hObserverTarget() == pLocal->GetHandle()) {
            count++;
        }
    }
    return count;
}

Displays a warning indicator on HUD whenever anyone is spectating!

vtable_slayer
Senior Reverser
MEMBER
прадстаўнік: 215
Дата далучэння: Mar 2018
Паведамленні: 86
Дзякуй: 61
1 месяцаў таму · Jul 11, 2026 10:26 PM
#2

Essential safety feature to automatically soften aimbot smoothing when spectated by multiple players.

hook_doctor
Hooking Specialist
MEMBER
прадстаўнік: 181
Дата далучэння: Jul 2019
Паведамленні: 21
Дзякуй: 50
1 месяцаў таму · Jul 12, 2026 1:44 PM
#3

Clean observer handle comparison.