Fix Chat Logs When Wrapping
This commit is contained in:
parent
032490c7b2
commit
6a6e973867
@ -100,12 +100,24 @@ static void Inventory_selectSlot_injection(unsigned char *inventory, int32_t slo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print Chat To Log
|
// Print Chat To Log
|
||||||
|
static bool Gui_addMessage_recursing = false;
|
||||||
static void Gui_addMessage_injection(unsigned char *gui, std::string const& text) {
|
static void Gui_addMessage_injection(unsigned char *gui, std::string const& text) {
|
||||||
// Print Log Message
|
if (!Gui_addMessage_recursing) {
|
||||||
fprintf(stderr, "[CHAT]: %s\n", text.c_str());
|
// Start Recursing
|
||||||
|
Gui_addMessage_recursing = true;
|
||||||
|
|
||||||
// Call Original Method
|
// Print Log Message
|
||||||
(*Gui_addMessage)(gui, text);
|
fprintf(stderr, "[CHAT]: %s\n", text.c_str());
|
||||||
|
|
||||||
|
// Call Original Method
|
||||||
|
(*Gui_addMessage)(gui, text);
|
||||||
|
|
||||||
|
// End Recursing
|
||||||
|
Gui_addMessage_recursing = false;
|
||||||
|
} else {
|
||||||
|
// Call Original Method
|
||||||
|
(*Gui_addMessage)(gui, text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_misc_cpp() {
|
void init_misc_cpp() {
|
||||||
|
Loading…
Reference in New Issue
Block a user