File tree Expand file tree Collapse file tree
Client/mods/deathmatch/logic/luadefs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1592,6 +1592,16 @@ int CLuaElementDefs::IsElementStreamedIn(lua_State* luaVM)
15921592 // Is this a streaming compatible class?
15931593 if (pEntity->IsStreamingCompatibleClass ())
15941594 {
1595+ // Local player is always streamed in from its own perspective.
1596+ // Its entity is created via _CreateLocalModel() which doesn't go through
1597+ // InternalStreamIn(), so m_bStreamedIn can stay false even though the player
1598+ // is fully active — breaking scripts that filter handlers with isElementStreamedIn(source).
1599+ if (IS_PLAYER (pEntity) && static_cast <CClientPlayer*>(pEntity)->IsLocalPlayer ())
1600+ {
1601+ lua_pushboolean (luaVM, true );
1602+ return 1 ;
1603+ }
1604+
15951605 CClientStreamElement* pStreamElement = static_cast <CClientStreamElement*>(pEntity);
15961606
15971607 // Return whether or not this class is streamed in
You can’t perform that action at this time.
0 commit comments