Fixed chat system

This commit is contained in:
Vortrex
2022-03-29 21:05:07 -05:00
parent d02def641d
commit 351ac19801
2 changed files with 7 additions and 9 deletions

View File

@@ -49,18 +49,21 @@ function unBindChatBoxKeys() {
// ===========================================================================
function receiveChatBoxMessageFromServer(messageString, colour) {
logToConsole(LOG_DEBUG, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`);
logToConsole(LOG_INFO, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`);
// Just in case it's hidden by auto hide
setChatWindowEnabled(true);
let colouredString = replaceColoursInMessage(messageString);
if(bottomMessageIndex >= chatBoxHistory.length-1) {
logToConsole(LOG_INFO, `[VRR.ChatBox]: Changed colours in string: ${colouredString}`);
//if(bottomMessageIndex >= chatBoxHistory.length-1) {
message(colouredString, colour);
bottomMessageIndex = chatBoxHistory.length-1;
}
//}
addToChatBoxHistory(colouredString, colour);
chatLastUse = getCurrentUnixTimestamp();
}

View File

@@ -220,18 +220,13 @@ function onFocus(event) {
// ===========================================================================
function onLocalPlayerSwitchWeapon(oldWeapon, newWeapon) {
}
// ===========================================================================
function onCameraProcess(event) {
}
// ===========================================================================
function onChatOutput(event, messageText, colour) {
//event.preventDefault();
//receiveChatBoxMessageFromServer(messageText, colour);
}
// ===========================================================================