mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
CEntity: Make NetworkClipped() const
This commit is contained in:
parent
cad00f7ce1
commit
57e16f3f7b
|
@ -29,14 +29,14 @@ CEntity::~CEntity()
|
|||
Server()->SnapFreeID(m_ID);
|
||||
}
|
||||
|
||||
bool CEntity::NetworkClipped(int SnappingClient)
|
||||
bool CEntity::NetworkClipped(int SnappingClient) const
|
||||
{
|
||||
return ::NetworkClipped(GameServer(), SnappingClient, m_Pos);
|
||||
return ::NetworkClipped(m_pGameWorld->GameServer(), SnappingClient, m_Pos);
|
||||
}
|
||||
|
||||
bool CEntity::NetworkClipped(int SnappingClient, vec2 CheckPos)
|
||||
bool CEntity::NetworkClipped(int SnappingClient, vec2 CheckPos) const
|
||||
{
|
||||
return ::NetworkClipped(GameServer(), SnappingClient, CheckPos);
|
||||
return ::NetworkClipped(m_pGameWorld->GameServer(), SnappingClient, CheckPos);
|
||||
}
|
||||
|
||||
bool CEntity::GameLayerClipped(vec2 CheckPos)
|
||||
|
@ -86,7 +86,7 @@ bool CEntity::GetNearestAirPosPlayer(vec2 PlayerPos, vec2 *OutPos)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool NetworkClipped(CGameContext *pGameServer, int SnappingClient, vec2 CheckPos)
|
||||
bool NetworkClipped(const CGameContext *pGameServer, int SnappingClient, vec2 CheckPos)
|
||||
{
|
||||
if(SnappingClient == -1 || pGameServer->m_apPlayers[SnappingClient]->m_ShowAll)
|
||||
return false;
|
||||
|
|
|
@ -128,8 +128,8 @@ public:
|
|||
Returns:
|
||||
True if the entity doesn't have to be in the snapshot.
|
||||
*/
|
||||
bool NetworkClipped(int SnappingClient);
|
||||
bool NetworkClipped(int SnappingClient, vec2 CheckPos);
|
||||
bool NetworkClipped(int SnappingClient) const;
|
||||
bool NetworkClipped(int SnappingClient, vec2 CheckPos) const;
|
||||
|
||||
bool GameLayerClipped(vec2 CheckPos);
|
||||
|
||||
|
@ -142,6 +142,6 @@ public:
|
|||
int m_Layer;
|
||||
};
|
||||
|
||||
bool NetworkClipped(CGameContext *pGameServer, int SnappingClient, vec2 CheckPos);
|
||||
bool NetworkClipped(const CGameContext *pGameServer, int SnappingClient, vec2 CheckPos);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue