added GetGlobalTarget/SetGlobalTarget to g_pSM
const'd some things --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401696
This commit is contained in:
@@ -46,7 +46,7 @@ public: //IRecipientFilter
|
||||
int GetRecipientCount() const;
|
||||
int GetRecipientIndex(int slot) const;
|
||||
public:
|
||||
void Initialize(cell_t *ptr, size_t count);
|
||||
void Initialize(const cell_t *ptr, size_t count);
|
||||
void SetToReliable(bool isreliable);
|
||||
void SetToInit(bool isinitmsg);
|
||||
void Reset();
|
||||
@@ -98,7 +98,7 @@ inline void CellRecipientFilter::SetToReliable(bool isreliable)
|
||||
m_IsReliable = isreliable;
|
||||
}
|
||||
|
||||
inline void CellRecipientFilter::Initialize(cell_t *ptr, size_t count)
|
||||
inline void CellRecipientFilter::Initialize(const cell_t *ptr, size_t count)
|
||||
{
|
||||
memcpy(m_Players, ptr, count * sizeof(cell_t));
|
||||
m_Size = count;
|
||||
|
||||
+6
-1
@@ -35,6 +35,7 @@
|
||||
#include "UserMessages.h"
|
||||
#include "PlayerManager.h"
|
||||
#include "sm_stringutil.h"
|
||||
#include "GameConfigs.h"
|
||||
#include <compat_wrappers.h>
|
||||
|
||||
CHalfLife2 g_HL2;
|
||||
@@ -308,7 +309,11 @@ bool CHalfLife2::HintTextMsg(int client, const char *msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
pBitBuf->WriteByte(1);
|
||||
const char *pre_byte = g_pGameConf->GetKeyValue("HintTextPreByte");
|
||||
if (pre_byte != NULL && strcmp(pre_byte, "yes") == 0)
|
||||
{
|
||||
pBitBuf->WriteByte(1);
|
||||
}
|
||||
pBitBuf->WriteString(msg);
|
||||
g_UserMsgs.EndMessage();
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) con
|
||||
return false;
|
||||
}
|
||||
|
||||
bf_write *UserMessages::StartMessage(int msg_id, cell_t players[], unsigned int playersNum, int flags)
|
||||
bf_write *UserMessages::StartMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
|
||||
{
|
||||
bf_write *buffer;
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public: //IUserMessages
|
||||
bool GetMessageName(int msgid, char *buffer, size_t maxlength) const;
|
||||
bool HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
|
||||
bool UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
|
||||
bf_write *StartMessage(int msg_id, cell_t players[], unsigned int playersNum, int flags);
|
||||
bf_write *StartMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
|
||||
bool EndMessage();
|
||||
public:
|
||||
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type);
|
||||
|
||||
+3
-1
@@ -586,9 +586,11 @@ const char *SourceModBase::GetGamePath() const
|
||||
return g_BaseDir.c_str();
|
||||
}
|
||||
|
||||
void SourceModBase::SetGlobalTarget(unsigned int index)
|
||||
unsigned int SourceModBase::SetGlobalTarget(unsigned int index)
|
||||
{
|
||||
unsigned int old = m_target;
|
||||
m_target = index;
|
||||
return old;
|
||||
}
|
||||
|
||||
unsigned int SourceModBase::GetGlobalTarget() const
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ public:
|
||||
/**
|
||||
* @brief Stores the global target index.
|
||||
*/
|
||||
void SetGlobalTarget(unsigned int index);
|
||||
unsigned int SetGlobalTarget(unsigned int index);
|
||||
|
||||
/**
|
||||
* @brief Returns the global target index.
|
||||
|
||||
Reference in New Issue
Block a user