Add mappool#415
Conversation
|
There's a lot of unrelated changes to the idea of adding different mappool files here. If you can split this up into multipe PRs it will be faster/more likely to get merged. |
|
|
||
| #undef REQUIRE_PLUGIN | ||
| #include "include/updater.inc" | ||
| #include <updater> |
There was a problem hiding this comment.
This change will break the automated compilation test since this file won't be available: https://github.com/splewis/csgo-pug-setup/blob/master/.travis.yml
I would revert this, unless there's a reliable location to get the include from (i.e., undo ca76885)
| @@ -1,9 +1,53 @@ | |||
| #define RANDOM_MAP_VOTE "-1" // must be in invalid index for array indexing | |||
|
|
|||
| char mapGroups[][] = { | |||
There was a problem hiding this comment.
As mentioned previously, I disagree with placing these in a different directory.
I also disagree with breaking backwards compatibility for existing users populating a different map config file.
| public void CreateMapVote() { | ||
| StartMapVote2(); | ||
| } | ||
| static void StartMapVote2() { |
There was a problem hiding this comment.
This seems like a poor name for this function. Can you use a more descriptive name?
| Format(text, 64, mapGroups[winner]); | ||
| ReplaceString(text, 64, ".txt", "", false); | ||
|
|
||
| PrintCenterTextAll("Winner is %s", text); |
There was a problem hiding this comment.
This text should use a translation string.
| menu.SetTitle("%T", "VoteMenuTitle", LANG_SERVER); | ||
| menu.ExitButton = false; | ||
| for (int i = 0; i < sizeof(mapGroups); i++) { | ||
| char text[64], id[4]; |
There was a problem hiding this comment.
Can this use the AddMenuInt helper function used elsewhere in the plugin?
|
|
||
| ServerCommand("sm_pugsetup_maplist %s", mapGroups[winner]); | ||
|
|
||
| char text[64]; |
There was a problem hiding this comment.
Using PLATFORM_MAX_PATH instead of 64 seems more appropriate here.
| else if (p == Permission_Leader) | ||
| return isLeader || isAdmin; | ||
| else if (p == Permission_Captains) | ||
| else if (p == Permission_Captains && UsingCaptains()) |
There was a problem hiding this comment.
This change seems potentially problematic. If a permission has Permission_Captains using this native will throw an error now.
| bool override = GetNativeCell(2); | ||
| if (!PugSetup_IsTeamBalancerAvaliable() || override) { | ||
| g_BalancerFunctionPlugin = plugin; | ||
| //ArrayList players = new ArrayList(); |
| } | ||
| Call_StartFunction(g_BalancerFunctionPlugin, g_BalancerFunction); | ||
| Call_PushCell(players); | ||
| Call_Finish(); |
There was a problem hiding this comment.
Why is this changing? It seems incorrect to invoke this function since the native could be called far before the match is ready.
as requested
| if (action == MenuAction_VoteEnd) { | ||
| int winner = GetMenuInt(menu, param1); | ||
|
|
||
| ServerCommand("sm_pugsetup_maplist %s", mapGroups[winner]); |
There was a problem hiding this comment.
It doesn't make sense to override the value here. It doesn't make sense to even have the cvar if the plugin will just override it before it gets used.
|
Hello, I am having problems with the blocking of teams, certain people can enter from ct or t in the middle of the live game, what could be failing me? |
|
i dont think that this is for support, |
#373
was made from Franc1sco Franug for me and worked fine for over a year now
i have updated it to latest version and included the fixes for sm11
steamworks needs a new version: https://forums.alliedmods.net/showpost.php?p=2785634&postcount=829
it has not been fully testet since my "update" but it looked good so far