Skip to content

Commit

Permalink
Fix owngoal and unwanted pass settings
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienML committed Jul 9, 2024
1 parent 4cbdb8c commit 318d9a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BetterChat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void BetterChat::onGoal() {

BetterChatParams pluginParams = getParamsInJson("Default config");

if (scorerTeam == lastTouchTeam || pluginParams.owngoal) {
if (scorerTeam == lastTouchTeam || !pluginParams.owngoal) {
if (scorerTeam == numTeam) { // Allied goal
LOG("[EVENT] Allied goal");
map<string, bool> afterAlliedGoalMsg = readMapInJson("afterAlliedGoal");
Expand All @@ -338,7 +338,7 @@ void BetterChat::onGoal() {
}
}

if ((lastTouchTeam == scorerTeam && secondLastTouchTeam == scorerTeam) || (lastTouchTeam != scorerTeam && thirdLastTouchTeam == scorerTeam) || pluginParams.unwanted_pass) {
if ((lastTouchTeam == scorerTeam && secondLastTouchTeam == scorerTeam) || (lastTouchTeam != scorerTeam && thirdLastTouchTeam == scorerTeam) || !pluginParams.unwanted_pass) {
if (assist) { // Assist
assist = false;
map<string, bool> afterPassMsg = readMapInJson("afterPass");
Expand Down

0 comments on commit 318d9a7

Please sign in to comment.