SmileYzn / MatchBot

Counter-Strike 1.6 Match Plugin for ReHLDS and ReGameDLL_CS
GNU General Public License v3.0
28 stars 15 forks source link

[ISSUE/QUESTION] Matchbot Status #54

Closed yuyiken closed 1 year ago

yuyiken commented 1 year ago

Hi, I was testing it for a while and got in this issue.

For example I'm playing a match with bots and when I leave, the match is still running.

All bots are kicked, and no one is on server, as u can see it still counting rounds.

1

When I join again game continues as was before buy in my scoreboard are 0-0.

If I win or lose rounds game for example is going 4-5 and I have 0-1.

Another issue I have, got it twice only. When I do this and leave a server for night.

When start game next day. It do it starts like 1-0 not 0-0.

I got this issue only twice when game starts 1-0 not 0-0.

I think it should be something relationed with issue before.

noa1ms commented 1 year ago

When I join again game continues as was before buy in my scoreboard are 0-0.

If I win or lose rounds game for example is going 4-5 and I have 0-1.

Another issue I have, got it twice only. When I do this and leave a server for night.

When start game next day. It do it starts like 1-0 not 0-0.

I got this issue only twice when game starts 1-0 not 0-0.

I think it should be something relationed with issue before.

Yes, there is such a problem, I also encountered it today, I was even a little surprised at what such a situation could be, I rebooted the server and everything is normal, so far I have not observed it anymore

SmileYzn commented 1 year ago

@yuyiken

Did you make sure that BOTS leaves the game? There i need to use bot_quota 0 after disconnects the game.

And yes, the games was set to ended statem, after disconnect fom game and set bot_quota to 0

yuyiken commented 1 year ago

@SmileYzn no, bot_quota still in 9. There is a problem then. I only appreciate that they are kicked, but bot_quota still in 9. Anyways server was empty, If any bot is connected it appears in left side of server browser.

SmileYzn commented 1 year ago

@SmileYzn no, bot_quota still in 9. There is a problem then. I only appreciate that they are kicked, but bot_quota still in 9. Anyways server was empty, If any bot is connected it appears in left side of server browser.

Did you do a status command after you disconnect from server? MatchBot only consider a empty server if player and bots is not playing.

There is a problem with bots variables, not matchbot itself 🤔

yuyiken commented 1 year ago

EDIT: Yesterday I tested it with two methods and any from this method work for me:

1º I connected and started game with bots all was fine. I played 1 round before disconnect i type in console bot_quota 0 and all bots were kicked. Then I disconnected and waited for 2-3mins.I rejoined and matchbot was in live game. Counting rounds when ct win as default. But in scoreboard ct score not increasing only matchbots score increases. I was alone in the server.

2º I connected and started game with bots all was fine. I played 2 rounds. I disconnected and then I type from server console bot_quota 0 did status as code below. When I reconected to server bot_quota was in 0 so it was only me in the server, I was afk some rounds and happens same as I told before, CT win rounds Matchbot was counting it but scoreboard not.

Status server console when all bots were kicked bot_quota 0:

version :  48/1.1.2.7/Stdio 3082 secure  (10)
tcp/ip  :  0.0.0.0:27015
map     :  de_dust2 at: 0 x, 0 y, 0 z
players :  0 active (11 max)

#      name userid uniqueid frag time ping loss adr
0 users

My client console log when I was alone and you can see that rounds still counting:

[BOT] Match Bot Build May  1 2023 (SmileY)
[BOT] Say .help to view command list.
* Round 3 won by: Counter-Terrorists
[BOT] No stats in this round.
[BOT] The Counter-Terrorists are winning: 2-1
* Round 4 won by: Counter-Terrorists
* Round 5 won by: Counter-Terrorists
[BOT] No stats in this round.
[BOT] The Counter-Terrorists are winning: 3-1
[BOT] No stats in this round.
[BOT] The Counter-Terrorists are winning: 4-1
* Round 6 won by: Counter-Terrorists
[BOT] No stats in this round.

version :  48/1.1.2.7/Stdio 3082 secure  (10)
tcp/ip  :  0.0.0.0:27015
map     :  de_dust2 at: 0 x, 0 y, 0 z
players :  1 active (11 max)

#      name userid uniqueid frag time ping loss adr
# 1 "0xAE57" 60 STEAM_0:1:24216   0 08:32   30    0
1 users
SmileYzn commented 1 year ago

Did worked? I really did not understand.

yuyiken commented 1 year ago

@SmileYzn Hi, no that I tried to explain that what i did but it not worked for me.

Please read again my comment I edited it, hope you understand better now.

SmileYzn commented 1 year ago

@yuyiken

Try to see if was fixed here: https://github.com/SmileYzn/MatchBot/actions/runs/4889671823

I forgot to put what match bot does when server gets empty while vote session is running. In that case, i do a restart map since server can be empty too.

yuyiken commented 1 year ago

@SmileYzn Hi, I was testing and get same results, when the game is live and bot are disconected from game or I leave and bots are kicked. Nothing changes, game still live until half time with empty server.

And still have this issue too. is fixed it was my bad:

SmileYzn commented 1 year ago

@yuyiken Did you put mb_vote_map in matchbot.cfg?

I have sure that issue is fixed here:

void CMatchAdminMenu::MapMenuHandle(int EntityIndex, P_MENU_ITEM Item)
{
    auto Player = UTIL_PlayerByIndexSafe(EntityIndex);

    if (Player)
    {
        gMatchBot.m_VoteMap->value = 0.0f;

        gMatchChangeMap.ChangeMap(Item.Text, 5.0f, true);

        gMatchUtil.SayText(nullptr, Player->entindex(), _T("\3%s\1 changed map to: \4%s\1..."), STRING(Player->edict()->v.netname), Item.Text.c_str());
    }
}

Ps. You can talk in Spanish here. I can understand too.

SmileYzn commented 1 year ago

@yuyiken

Try to fix it here: https://github.com/SmileYzn/MatchBot/actions/runs/4898876553

I think that function is counting players always return one player since player is not fully disconnected from server yet.

yuyiken commented 1 year ago

@yuyiken Did you put mb_vote_map in matchbot.cfg?

I have sure that issue is fixed here:

void CMatchAdminMenu::MapMenuHandle(int EntityIndex, P_MENU_ITEM Item)
{
  auto Player = UTIL_PlayerByIndexSafe(EntityIndex);

  if (Player)
  {
      gMatchBot.m_VoteMap->value = 0.0f;

      gMatchChangeMap.ChangeMap(Item.Text, 5.0f, true);

      gMatchUtil.SayText(nullptr, Player->entindex(), _T("\3%s\1 changed map to: \4%s\1..."), STRING(Player->edict()->v.netname), Item.Text.c_str());
  }
}

Ps. You can talk in Spanish here. I can understand too.

You are right. I put it in matchbot.cfg and works fine. It was my mistake. But I tried to take value of this cvar without putting into matchbot and get value of 0 when game is live.

@yuyiken

Try to fix it here: https://github.com/SmileYzn/MatchBot/actions/runs/4898876553

I think that function is counting players always return one player since player is not fully disconnected from server yet.

So I tested and still have same issue. I really don't understand how can be possible that player is not fully disconnected. If he drops, time out or get kicked.. If playerdisconects function not working properly you can do the check when round ends or starts.. and game is live.. But counting players should work fine since you are using it for ready timer and another stuff..

PS: I prefer write in english because of people with issues that read in future can solve their issues faster..

SmileYzn commented 1 year ago

and still have same issue. I really don't understand how can be possible that player is not fully disconnected. If he drops, time out or get kicked.. If playerdisconects function not working properly you can do the check when round ends or starts.. and game is live.. But counting players should work fine since you are using it for ready t

mb_vote_map can't be put in any configuration file, it is used internally by Match BOT. I have sure that is fixed when i disconnects from server or server was empty the match stops.

Did you can put an cvarlist of bot_ variables? used?

yuyiken commented 1 year ago

I only use 1 cvar, when I join I type bot_quota 9 when I want to test stop i put bot_quota 0

yuyiken commented 1 year ago

Hi, issue is fixed, I notice that it can be my problem with server problem. Please keep always server updated with correct rehlds version and regamedll_cs.