splewis / csgo-retakes

CS:GO Sourcemod plugin for a site-retake gamemode
GNU General Public License v3.0
329 stars 115 forks source link

Player join team bug fix #269

Closed RavageCS closed 4 years ago

RavageCS commented 4 years ago

https://github.com/splewis/csgo-retakes/blob/f2f1473989a4af24ba9ba1ee62d3edf435de56ef/scripting/retakes.sp#L451

I was doing some testing today and the bug where you have to click join a team twice or hit escape is fixed by changing the above to:

SetEventBool(event, "silent", true);

I'm not exactly sure why this fixes it, as I think the original syntax is correct, but after doing some testing this fixed it for me.

Also

https://github.com/splewis/csgo-retakes/blob/f2f1473989a4af24ba9ba1ee62d3edf435de56ef/scripting/retakes.sp#L455-L467

I do believe valve fixed mp_force_pick_time (there are 3 underscores) a few years ago with an update, so I don't believe setting m_fForceTeam is necessary.

I won't submit a pull request as my fork is customized for my servers when I was actually running them.

If you want to force players to join a team I simply ran a client side command

public Action ForceJoin(Handle timer, int client) { if(IsClientConnected(client)) ClientCommand(client,"joingame"); }

RavageCS commented 4 years ago

This was working except as soon as someone clicked on join spectator you need to click twice again.

I went and changed the rest of the event function calls to use this syntax, and from my testing it looks to be fixed.

I went and made a new branch on my fork so I was able to submit pr

Used current retakes version and sourcemod 1.11.0-git6581

borzaka commented 4 years ago

Related PR: #270