mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-03-04 01:35:23 +03:00
Fix compatibility whit rg_hint_message (#583)
When used reapi native rg_hint_message not work because tries to access to one pointer who not longer exists in CHintMessage::Send
This commit is contained in:
parent
8d6bf017f5
commit
c56982af18
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
CHintMessage::CHintMessage(const char *hintString, bool isHint, CUtlVector<const char *> *args, float duration)
|
CHintMessage::CHintMessage(const char *hintString, bool isHint, CUtlVector<const char *> *args, float duration)
|
||||||
{
|
{
|
||||||
m_hintString = hintString;
|
m_hintString = CloneString(hintString);
|
||||||
m_duration = duration;
|
m_duration = duration;
|
||||||
m_isHint = isHint;
|
m_isHint = isHint;
|
||||||
|
|
||||||
@ -16,6 +16,12 @@ CHintMessage::CHintMessage(const char *hintString, bool isHint, CUtlVector<const
|
|||||||
CHintMessage::~CHintMessage()
|
CHintMessage::~CHintMessage()
|
||||||
{
|
{
|
||||||
m_args.PurgeAndDeleteArrays();
|
m_args.PurgeAndDeleteArrays();
|
||||||
|
|
||||||
|
if (m_hintString)
|
||||||
|
{
|
||||||
|
delete[] m_hintString;
|
||||||
|
m_hintString = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHintMessage::Send(CBaseEntity *client)
|
void CHintMessage::Send(CBaseEntity *client)
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
void Send(CBaseEntity *client);
|
void Send(CBaseEntity *client);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char *m_hintString;
|
char *m_hintString;
|
||||||
bool m_isHint;
|
bool m_isHint;
|
||||||
CUtlVector<char *> m_args;
|
CUtlVector<char *> m_args;
|
||||||
float m_duration;
|
float m_duration;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user