Updated for latest hl2sdk-dota changes.
--HG-- extra : rebase_source : 0365a2c057523822481dee0880f8a5d525a8050a
This commit is contained in:
parent
c2aad7a71d
commit
3b83356825
@ -44,7 +44,11 @@ public: //IRecipientFilter
|
||||
bool IsReliable() const;
|
||||
bool IsInitMessage() const;
|
||||
int GetRecipientCount() const;
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
void GetRecipientIndex(int *clientIndex, int slot) const;
|
||||
#else
|
||||
int GetRecipientIndex(int slot) const;
|
||||
#endif
|
||||
public:
|
||||
void Initialize(const cell_t *ptr, size_t count);
|
||||
void SetToReliable(bool isreliable);
|
||||
@ -79,13 +83,24 @@ inline int CellRecipientFilter::GetRecipientCount() const
|
||||
return m_Size;
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
inline void CellRecipientFilter::GetRecipientIndex(int *clientIndex, int slot) const
|
||||
#else
|
||||
inline int CellRecipientFilter::GetRecipientIndex(int slot) const
|
||||
#endif
|
||||
{
|
||||
int ret;
|
||||
if ((slot < 0) || (slot >= GetRecipientCount()))
|
||||
{
|
||||
return -1;
|
||||
ret = -1;
|
||||
}
|
||||
return static_cast<int>(m_Players[slot]);
|
||||
ret = static_cast<int>(m_Players[slot]);
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
*clientIndex = ret;
|
||||
#else
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void CellRecipientFilter::SetToInit(bool isinitmsg)
|
||||
|
@ -268,7 +268,13 @@ size_t MsgListenerWrapper::_FillInPlayers(int *pl_array, IRecipientFilter *pFilt
|
||||
|
||||
for (size_t i=0; i<size; i++)
|
||||
{
|
||||
pl_array[i] = pFilter->GetRecipientIndex(i);
|
||||
int index;
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
pFilter->GetRecipientIndex(&index, i);
|
||||
#else
|
||||
index = pFilter->GetRecipientIndex(i);
|
||||
#endif
|
||||
pl_array[i] = index;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
@ -44,7 +44,11 @@ public: //IRecipientFilter
|
||||
bool IsReliable() const;
|
||||
bool IsInitMessage() const;
|
||||
int GetRecipientCount() const;
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
void GetRecipientIndex(int*&clientIndex, int slot) const;
|
||||
#else
|
||||
int GetRecipientIndex(int slot) const;
|
||||
#endif
|
||||
public:
|
||||
void Initialize(cell_t *ptr, size_t count);
|
||||
void SetToReliable(bool isreliable);
|
||||
@ -79,13 +83,24 @@ inline int CellRecipientFilter::GetRecipientCount() const
|
||||
return m_Size;
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
inline void CellRecipientFilter::GetRecipientIndex(int *clientIndex, int slot) const
|
||||
#else
|
||||
inline int CellRecipientFilter::GetRecipientIndex(int slot) const
|
||||
#endif
|
||||
{
|
||||
int ret;
|
||||
if ((slot < 0) || (slot >= GetRecipientCount()))
|
||||
{
|
||||
return -1;
|
||||
ret = -1;
|
||||
}
|
||||
return static_cast<int>(m_Players[slot]);
|
||||
ret = static_cast<int>(m_Players[slot]);
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
*clientIndex = ret;
|
||||
#else
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void CellRecipientFilter::SetToInit(bool isinitmsg)
|
||||
|
Loading…
Reference in New Issue
Block a user