Skip to content

Commit 86a1d1b

Browse files
authored
Repo Cleanup....
Repo got all messed up due to wrong folder upload
1 parent a4ae0fd commit 86a1d1b

File tree

4 files changed

+57
-57
lines changed

4 files changed

+57
-57
lines changed

RocketLeagueAssistant/RocketLeagueAssistant.cpp

+53-53
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,12 @@ void RocketLeagueAssistant::LoadHooks()
9494
//
9595

9696

97-
//Chat Beta - Can be used to trigger automations based on "What a save!","Nice one!", etc,etc, not implemented:
98-
//
99-
//gameWrapper->HookEventWithCaller<ActorWrapper>("Function TAGame.HUDBase_TA.OnChatMessage",
100-
// [this](ActorWrapper caller, void* params, std::string eventName) {
101-
// ChatHook(params);
102-
// });
103-
//
97+
/*/Chat Beta - Can be used to trigger automations based on "What a save!","Nice one!", etc,etc, not implemented:
98+
gameWrapper->HookEventWithCaller<ActorWrapper>("Function TAGame.HUDBase_TA.OnChatMessage",
99+
[this](ActorWrapper caller, void* params, std::string eventName) {
100+
ChatHook(params);
101+
});
102+
/*/
104103

105104
//Overtime
106105
gameWrapper->HookEvent("Function TAGame.GameEvent_Soccar_TA.OnOvertimeUpdated", std::bind(&RocketLeagueAssistant::OvertimeHook, this, std::placeholders::_1));
@@ -329,7 +328,6 @@ void RocketLeagueAssistant::StatsHook(void* params)
329328
bool isReplay = replayCvar.getBoolValue();
330329
if (isReplay == true) { Log("It's a replay"); return; }
331330

332-
333331
//Current team CVAR
334332
//get current team cvar
335333
CVarWrapper ha_playersTeam = cvarManager->getCvar("ha_playersTeam");
@@ -451,48 +449,50 @@ void RocketLeagueAssistant::StatsHook(void* params)
451449
}
452450

453451
}
452+
453+
/*
454454
//=================================
455455
// Quickchat-based automation prep. May not be implemented
456-
//
457-
//struct ChatMessage
458-
//{
459-
// void* PRI;
460-
// void* Team;
461-
// wchar_t* PlayerName;
462-
// uint8_t PlayerNamePadding[0x8];
463-
// wchar_t* Message;
464-
// uint8_t MessagePadding[0x8];
465-
// uint8_t ChatChannel;
466-
// unsigned long bPreset : 1;
467-
//};
468-
469-
//void RocketLeagueAssistant::ChatHook(void* params)
470-
//{
471-
//
472-
// if (params)
473-
// {
474-
// ChatMessage* chatMessage = static_cast<ChatMessage*>(params);
475-
// if (chatMessage->PlayerName == nullptr) return;
476-
// std::wstring playerName(chatMessage->PlayerName);
477-
// if (chatMessage->Message == nullptr) return;
478-
// std::wstring message(chatMessage->Message);
479-
// std::string bMessage(message.begin(), message.end());
480-
// cvarManager->log("Message: " + bMessage);
481-
// std::string whatasave = "Group2Message4";
482-
//
483-
//
484-
// int isWhatASave = whatasave.compare(bMessage);
485-
//
486-
// if (isWhatASave == 0) {
487-
//
488-
// cvarManager->log("Get What a Saved'd");
489-
//
490-
// }
491-
// }
492-
//
493-
//}
456+
struct ChatMessage
457+
{
458+
void* PRI;
459+
void* Team;
460+
wchar_t* PlayerName;
461+
uint8_t PlayerNamePadding[0x8];
462+
wchar_t* Message;
463+
uint8_t MessagePadding[0x8];
464+
uint8_t ChatChannel;
465+
unsigned long bPreset : 1;
466+
};
467+
468+
void RocketLeagueAssistant::ChatHook(void* params)
469+
{
470+
471+
if (params)
472+
{
473+
ChatMessage* chatMessage = static_cast<ChatMessage*>(params);
474+
if (chatMessage->PlayerName == nullptr) return;
475+
std::wstring playerName(chatMessage->PlayerName);
476+
if (chatMessage->Message == nullptr) return;
477+
std::wstring message(chatMessage->Message);
478+
std::string bMessage(message.begin(), message.end());
479+
cvarManager->log("Message: " + bMessage);
480+
//std::string whatasave = "Group2Message4";
481+
//
482+
//
483+
//int isWhatASave = whatasave.compare(bMessage);
484+
//
485+
//if (isWhatASave == 0) {
486+
//
487+
// cvarManager->log("Get What a Saved'd");
488+
//
489+
//}
490+
}
491+
492+
}
494493
//=================================
495-
//
494+
*/
495+
496496

497497
void RocketLeagueAssistant::FreeplayHook()
498498
{
@@ -655,7 +655,7 @@ void RocketLeagueAssistant::UpdateModal()
655655
updateModal.SetColor(255, 157, 147);
656656
updateModal.SetBody(R"T(Rocket League Assistant has changed its default functionality to utilize JSON based requests.
657657
658-
Going forward, JSON will be utilized and seperate webhook are no longer available. To continue using seperate webhook, please visit the GitHub and compile a version less than v3.0.
658+
Going forward, JSON will be utilized and seperate webhook are no longer available. To continue using seperate webhook, please visit the GitHub and compile a version less than v2.2.
659659
660660
Additionally, the team color JSON keys have been changed.
661661
@@ -686,18 +686,18 @@ You can read about the changes at
686686
//
687687
//}
688688

689-
void RocketLeagueAssistant::OnInput(const std::string& input, bool was_closed)
690-
{
691-
LOG("input:: {}", input);
692-
}
689+
//void RocketLeagueAssistant::OnInput(const std::string& input, bool was_closed)
690+
//{
691+
// LOG("input:: {}", input);
692+
//}
693693

694694
void RocketLeagueAssistant::modalClosed(std::string name) {
695695

696696
CVarWrapper updateBoolcvar = cvarManager->getCvar("updateModal_enabled");
697697
if (!updateBoolcvar) { return; }
698698
bool updateBool = true;
699699
updateBoolcvar.setValue(updateBool);
700-
//LOG("ModalClosed::: {}", updateBoolcvar.getBoolValue());
700+
LOG("ModalClosed::: {}", updateBoolcvar.getBoolValue());
701701

702702
if (name == "settings") {
703703

RocketLeagueAssistant/RocketLeagueAssistant.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class RocketLeagueAssistant: public BakkesMod::Plugin::BakkesModPlugin, public B
4040
void modalClosed(std::string name);
4141
int GetScore(int teamNum);
4242
void GetHAVersion();
43-
void OnInput(const std::string& input, bool was_closed);
43+
//void OnInput(const std::string& input, bool was_closed);
4444

4545

4646
//GUI

RocketLeagueAssistant/RocketLeagueAssistantGUI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// Plugin Settings Window code here
1010
std::string RocketLeagueAssistant::GetPluginName() {
11-
return "RocketLeagueAssistant BETA";
11+
return "RocketLeagueAssistant";
1212
}
1313

1414
void RocketLeagueAssistant::SetImGuiContext(uintptr_t ctx) {

RocketLeagueAssistant/version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
22
#define VERSION_MAJOR 2
3-
#define VERSION_MINOR 1
3+
#define VERSION_MINOR 2
44
#define VERSION_PATCH 0
5-
#define VERSION_BUILD 1078
5+
#define VERSION_BUILD 1088
66

77
#define stringify(a) stringify_(a)
88
#define stringify_(a) #a

0 commit comments

Comments
 (0)