m_VictimRenderInfo
is probably an array or a pointer? e.g. if it's an array, you need to index it first, like m_VictimRenderInfo[1].m_CustomColoredSkin
c++
CKillMsg Kill;
...
Kill.m_VictimID = pMsg->m_Victim;
if(Kill.m_VictimID >= 0 && Kill.m_VictimID < MAX_CLIENTS)
{
Kill.m_VictimTeam = m_pClient->m_aClients[Kill.m_VictimID].m_Team;
Kill.m_VictimDDTeam = m_pClient->m_Teams.Team(Kill.m_VictimID);
str_copy(Kill.m_aVictimName, m_pClient->m_aClients[Kill.m_VictimID].m_aName);
if(m_Sendable = 0)
{
m_aVictimSkinBuffer[m_VictimSkinCurrent + 1] = m_pClient->m_aClients[Kill.m_VictimID].m_RenderInfo;
m_VictimSkinCurrent = (m_VictimSkinCurrent + 1) % (MAX_KILLMSGTEAM - 1);
}
else
m_aVictimSkinBuffer[0] = m_pClient->m_aClients[Kill.m_VictimID].m_RenderInfo;
}
(edited)m_Sendable
is another packet, which determines the actions of each packet delivery.
If m_Sendable
is 0, it's in a write state that only fills in all the buffers.
If m_Sendable
is 1, then it's in a read state, which makes sure the first item in the buffer is the person who died / gets strong. It will package the buffer, alongside the size of the team, or the maximum allowed in the killfeed buffer.CKillMsg Kill
, but currently it's writing to nothing.CKillMessages
class, outside of struct CKillMsg
, I made another global array to store tee skins for each team member that died.
c++
CKillMsg m_aKillmsgs[MAX_KILLMSGS];
int m_KillmsgCurrent;
CTeeRenderInfo m_aVictimSkinBuffer[MAX_KILLMSGTEAM];
int m_VictimSkinCurrent;
c++
int KillerSkinsValid = 0;
for(int i = 0; i <= Kill.m_TeamSize; i++)
{
Kill.m_VictimRenderInfo[i] = m_aVictimSkinBuffer[i];
if(!m_aVictimSkinBuffer[i].m_CustomColoredSkin && m_aVictimSkinBuffer[i].m_OriginalRenderSkin.m_Body.IsValid())
KillerSkinsValid++;
}
bool KillMsgValid = (Kill.m_VictimRenderInfo.m_CustomColoredSkin && Kill.m_VictimRenderInfo.m_ColorableRenderSkin.m_Body.IsValid()) || (KillerSkinsValid == Kill.m_TeamSize);
(edited)Kill.m_VictimRenderInfo[i]
Kill.m_VictimRenderInfo.m_CustomColoredSkin
m_VictimRenderInfo
is an array or it is notKill.m_KillerRenderInfo
, which doesn't have an array. (edited)c++
CKillMsg Kill;
...
Kill.m_VictimID = pMsg->m_Victim;
if(Kill.m_VictimID >= 0 && Kill.m_VictimID < MAX_CLIENTS)
{
Kill.m_VictimTeam = m_pClient->m_aClients[Kill.m_VictimID].m_Team;
Kill.m_VictimDDTeam = m_pClient->m_Teams.Team(Kill.m_VictimID);
str_copy(Kill.m_aVictimName, m_pClient->m_aClients[Kill.m_VictimID].m_aName);
if(m_Sendable = 0)
{
m_aVictimSkinBuffer[m_VictimSkinCurrent + 1] = m_pClient->m_aClients[Kill.m_VictimID].m_RenderInfo;
m_VictimSkinCurrent = (m_VictimSkinCurrent + 1) % (MAX_KILLMSGTEAM - 1);
}
else
m_aVictimSkinBuffer[0] = m_pClient->m_aClients[Kill.m_VictimID].m_RenderInfo;
}
(edited)Why if(m_Sendable = 0)?
I think it need be if(m_Senable == 0) or if(!m_Senable)
Why if(m_Sendable = 0)?
I think it need be if(m_Senable == 0) or if(!m_Senable)
if(!m_Sendable)
ScrollRelative
function to initiate relative scrolling programmatically, to realise scroll regions that scroll when the mouse is being dragged at the edge.
Add DoEdgeScrolling
to encapsulate all the necessary edge scrolling logic based on the position of the mouse. The edge scrolling starts at a fixed distance from the edges. The scrolling speed is dependent on the distance of the mouse from this border.
openssl
is bad even on his 700GB ram machine xd