commit
f7179a9e9e
@ -255,6 +255,21 @@ private:
|
||||
char m_szCvarNameBuffer[256];
|
||||
};
|
||||
|
||||
class CLC_VoiceData : public CNetMessage
|
||||
{
|
||||
DECLARE_CLC_MESSAGE( VoiceData );
|
||||
|
||||
int GetGroup() const { return INetChannelInfo::VOICE; }
|
||||
|
||||
CLC_VoiceData() { m_bReliable = false; };
|
||||
|
||||
public:
|
||||
int m_nLength;
|
||||
bf_read m_DataIn;
|
||||
bf_write m_DataOut;
|
||||
uint64 m_xuid;
|
||||
};
|
||||
|
||||
class NET_SetConVar : public CNetMessage
|
||||
{
|
||||
DECLARE_NET_MESSAGE(SetConVar);
|
||||
|
@ -484,11 +484,17 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
{
|
||||
votelogger::antikick_ticks--;
|
||||
for (int i = 0; i < (int) 70; i++)
|
||||
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
||||
}
|
||||
else
|
||||
for (int i = 0; i < (int) serverlag_amount; i++)
|
||||
g_IEngine->ServerCmd("use", false);
|
||||
}
|
||||
else {
|
||||
NET_StringCmd senddata("voicemenu 0 0");
|
||||
INetChannel *ch2 = (INetChannel *) g_IEngine->GetNetChannelInfo();
|
||||
senddata.SetNetChannel(ch2);
|
||||
senddata.SetReliable(false);
|
||||
for (int i = 0; i < (int) serverlag_amount; i++)
|
||||
ch2->SendNetMsg(senddata, false);
|
||||
ch2->Transmit();
|
||||
}
|
||||
}
|
||||
|
||||
// PROF_END("CreateMove");
|
||||
|
@ -57,13 +57,6 @@ DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_,
|
||||
OldNightmode = nightmode;
|
||||
}
|
||||
}
|
||||
// if (servercrash.KeyDown()) {
|
||||
// NET_SignonState voice_meme(6, 0);
|
||||
// INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
|
||||
// for(int i = 0; i<128; i++)
|
||||
// ch->SendNetMsg((INetMessage&)voice_meme, false, false);
|
||||
// ch->Transmit();
|
||||
// }
|
||||
static IClientEntity *ent;
|
||||
|
||||
PROF_SECTION(FrameStageNotify_TOTAL);
|
||||
|
@ -411,6 +411,30 @@ const char *NET_SignonState::ToString(void) const
|
||||
return strfmt("net_SignonState: state %i, count %i", m_nSignonState, m_nSpawnCount);
|
||||
}
|
||||
|
||||
const char *CLC_VoiceData::ToString(void) const
|
||||
{
|
||||
return strfmt("%s: %i bytes", GetName(), m_nLength );
|
||||
}
|
||||
|
||||
bool CLC_VoiceData::WriteToBuffer( bf_write &buffer )
|
||||
{
|
||||
buffer.WriteUBitLong( GetType(), NETMSG_TYPE_BITS );
|
||||
|
||||
m_nLength = m_DataOut.GetNumBitsWritten();
|
||||
|
||||
buffer.WriteWord( m_nLength ); // length in bits
|
||||
|
||||
return buffer.WriteBits( m_DataOut.GetBasePointer(), m_nLength );
|
||||
}
|
||||
|
||||
bool CLC_VoiceData::ReadFromBuffer( bf_read &buffer )
|
||||
{
|
||||
m_nLength = buffer.ReadWord(); // length in bits
|
||||
m_DataIn = buffer;
|
||||
|
||||
return buffer.SeekRelative( m_nLength );
|
||||
}
|
||||
|
||||
bool NET_SetConVar::WriteToBuffer(bf_write &buffer)
|
||||
{
|
||||
// logging::Info("Writing to buffer 0x%08x!", buf);
|
||||
|
Reference in New Issue
Block a user