From 8959e00e75bbfa94adc982bfda3949275db3fde3 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 3 Mar 2018 13:02:02 +0100 Subject: [PATCH] Update others.cpp --- src/hooks/others.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp index 0843b0a6..c8421726 100644 --- a/src/hooks/others.cpp +++ b/src/hooks/others.cpp @@ -697,12 +697,13 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf) static const char *lastfilter; static const char *lastname; static bool retrun = false; - if (data[0] == LOCAL_E->m_IDX) { - if (retrun) + if (data[0] != LOCAL_E->m_IDX) { + if (retrun) { PrintChat("\x07%06X%s\x01: \x07%06X%s\x01", 0xe05938, lastname, 0xefec1f, lastfilter); + retrun = false; + } } - retrun = false; if (chat_filter_enabled && data[0] != LOCAL_E->m_IDX) { if (!strcmp(chat_filter.GetString(), "")) @@ -946,9 +947,9 @@ void LevelShutdown_hook(void *_this) int RandomInt_hook(void *_this, int iMinVal, int iMaxVal) { - static const RandomInt_t original = + static const RandomInt_t original = RandomInt_t(hooks::vstd.GetMethod(offsets::RandomInt())); - + if (medal_flip && iMinVal == 0 && iMaxVal == 9) return 0; return original(_this, iMinVal, iMaxVal);