@@ -94,13 +94,12 @@ void RocketLeagueAssistant::LoadHooks()
94
94
//
95
95
96
96
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
+ /*/
104
103
105
104
// Overtime
106
105
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)
329
328
bool isReplay = replayCvar.getBoolValue ();
330
329
if (isReplay == true ) { Log (" It's a replay" ); return ; }
331
330
332
-
333
331
// Current team CVAR
334
332
// get current team cvar
335
333
CVarWrapper ha_playersTeam = cvarManager->getCvar (" ha_playersTeam" );
@@ -451,48 +449,50 @@ void RocketLeagueAssistant::StatsHook(void* params)
451
449
}
452
450
453
451
}
452
+
453
+ /*
454
454
//=================================
455
455
// 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
+ }
494
493
//=================================
495
- //
494
+ */
495
+
496
496
497
497
void RocketLeagueAssistant::FreeplayHook ()
498
498
{
@@ -655,7 +655,7 @@ void RocketLeagueAssistant::UpdateModal()
655
655
updateModal.SetColor (255 , 157 , 147 );
656
656
updateModal.SetBody (R"T( Rocket League Assistant has changed its default functionality to utilize JSON based requests.
657
657
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 .
659
659
660
660
Additionally, the team color JSON keys have been changed.
661
661
@@ -686,18 +686,18 @@ You can read about the changes at
686
686
//
687
687
// }
688
688
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
+ // }
693
693
694
694
void RocketLeagueAssistant::modalClosed (std::string name) {
695
695
696
696
CVarWrapper updateBoolcvar = cvarManager->getCvar (" updateModal_enabled" );
697
697
if (!updateBoolcvar) { return ; }
698
698
bool updateBool = true ;
699
699
updateBoolcvar.setValue (updateBool);
700
- // LOG("ModalClosed::: {}", updateBoolcvar.getBoolValue());
700
+ LOG (" ModalClosed::: {}" , updateBoolcvar.getBoolValue ());
701
701
702
702
if (name == " settings" ) {
703
703
0 commit comments